package com.sckw.stream.model;

import com.sckw.core.utils.UUIDUtils;
import com.sckw.stream.enums.MessageEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @desc: message消费对象
 * @author: yzc
 * @date: 2023-06-19 13:52
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class SckwMessage {
    public SckwMessage(MessageEnum messageEnum) {
        this.messageEnum = messageEnum;
        this.requestId = UUIDUtils.get32UUID();
    }

    /**
     * 请求id
     */
    private String requestId;

    /**
     * 短信模板code
     */
    private MessageEnum messageEnum;

    /**
     * 消息跳转参数
     */
    private Map<String, Object> params;

    /**
     * 消息跳转url(废弃)
     */
    private String msgUrl;

    /**
     * 消息跳转urls（key为app、pc,value为对应的跳转地址）
     */
    private Map<String, String> msgUrls;

    /**
     * 推送设备类型
     */
    private String pushType;

    /**
     * 定时推送开始时间
     */
    private Date pushTime;

    /**
     * 创建人
     */
    private Long createBy;

    /**
     * 推送用户信息
     */
    private List<UserInfo> userInfos;

    /**
     * 移动端推送
     */
    private Boolean appPush;

    /**
     * 推送设备id
     */
    private String clientId;
}

