package com.wecloud.im.param;

import javax.validation.constraints.NotNull;

import com.wecloud.dispatch.common.BaseRequest;
import com.wecloud.im.ws.model.request.PushVO;
import com.wecloud.utils.JsonUtils;

/**
 * @Description 聊天内容
 * @Author lixiaozhong
 * @Date 2022/1/26 6:11 下午
 */
public class ChatContentVo extends BaseRequest {

    /**
     * 客户端请求id
     */
    String reqId;

    /**
     * 推送到通知栏对象
     */
    PushVO push;

    /**
     * 会话id
     */
    @NotNull
    Long toConversation;

    /**
     * 消息类型
     */
    @NotNull
    Integer type;

    /**
     * 发送文本
     */
    String text;

    /**
     * 被@人clientId， 多人用英文逗号分隔; @所有人 入参为 -1
     */
    String at;

    /**
     * 是否阅后即焚 0-否 1-是
     */
    Integer burn;

    /**
     * 多久之后开始焚毁消息 单位秒
     */
    Integer timeToBurn;

    public PushVO getPush() {
        return JsonUtils.beanCopyDeep(this.get("push"), PushVO.class);
    }

    public void setPush(PushVO push) {
        this.push = push;
    }

    public Long getToConversation() {
        return Long.valueOf(this.get("toConversation") + "");
    }

    public void setToConversation(Long toConversation) {
        this.toConversation = toConversation;
    }

    public Integer getType() {
        return Integer.valueOf(this.get("type") + "");
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getText() {
        return this.get("text") + "";

    }

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

    public String getAt() {
        return this.get("at") + "";
    }

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

    public Integer getBurn() {
        return burn;
    }

    public void setBurn(Integer burn) {
        this.burn = burn;
    }

    public Integer getTimeToBurn() {
        return timeToBurn;
    }

    public void setTimeToBurn(Integer timeToBurn) {
        this.timeToBurn = timeToBurn;
    }

    @Override
    public String getReqId() {
        return reqId;
    }

    @Override
    public void setReqId(String reqId) {
        this.reqId = reqId;
    }
}
