package com.jay.monitor.data.server.models.request.dingding;

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
 * @Module TODO
 * @Description TODO
 * @Author liukaixiong
 * @Date 2020/12/14 15:14
 */
public class MdModel extends BaseDDModel {

    public MdModel() {
        super("markdown");
    }

    /**
     * msgtype : markdown
     * markdown : {"title":"杭州天气","text":"#### 杭州天气 @150XXXXXXXX \n> 9度，西北风1级，空气良89，相对温度73%\n> ![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png)\n> ###### 10点20分发布 [天气](https://www.dingtalk.com) \n"}
     * at : {"atMobiles":["150XXXXXXXX"],"isAtAll":false}
     */

    @JsonProperty("markdown")
    private MarkdownDTO markdown;
    @JsonProperty("at")
    private AtDTO at;

    public MarkdownDTO getMarkdown() {
        return markdown;
    }

    public void setMarkdown(MarkdownDTO markdown) {
        this.markdown = markdown;
    }

    public AtDTO getAt() {
        return at;
    }

    public void setAt(AtDTO at) {
        this.at = at;
    }

    public static class MarkdownDTO {
        /**
         * title : 杭州天气
         * text : #### 杭州天气 @150XXXXXXXX
         * > 9度，西北风1级，空气良89，相对温度73%
         * > ![screenshot](https://img.alicdn.com/tfs/TB1NwmBEL9TBuNjy1zbXXXpepXa-2400-1218.png)
         * > ###### 10点20分发布 [天气](https://www.dingtalk.com)
         */

        @JsonProperty("title")
        private String title;
        @JsonProperty("text")
        private String text;

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }
    }

    public static class AtDTO {
        /**
         * atMobiles : ["150XXXXXXXX"]
         * isAtAll : false
         */

        @JsonProperty("isAtAll")
        private Boolean isAtAll;
        @JsonProperty("atMobiles")
        private List<String> atMobiles;

        public Boolean getAtAll() {
            return isAtAll;
        }

        public void setAtAll(Boolean atAll) {
            isAtAll = atAll;
        }

        public List<String> getAtMobiles() {
            return atMobiles;
        }

        public void setAtMobiles(List<String> atMobiles) {
            this.atMobiles = atMobiles;
        }
    }
}
