package com.xueyi.system.api.sms.domain.vo;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import javax.validation.constraints.NotBlank;

@Data
public class DingdingReqEntity {
    @NotBlank(message = "msgtype不能为空")
    private String msgtype;

    @NotBlank(message = "text不能为空")
    private JSONObject text;


    public JSONObject toJson(){
        JSONObject json = new JSONObject(true);
        json.put("msgtype", msgtype);
        json.put("text", text);
        return json;
    }

}
