package com.persagy.dmp.message.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.persagy.dmp.common.model.entity.AuditableEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * 消息
 * @author Charlie Yu
 * @date 2021-05-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "dt_message", autoResultMap = true)
public class MessageVO extends AuditableEntity {

    /** 消息类型 */
    @NotNull(message = "消息类型ID不允许为空")
    private String typeId;
    /** 接收用户 */
    private String userId;
    /** 消息标题 */
    @NotNull(message = "消息标题不允许为空")
    private String title;
    /** 消息详情 */
    @NotNull(message = "消息内容不允许为空")
    private String content;
    /** 关联业务主键 */
    private String businessId;
    /** 所属项目 */
    private String projectId;
    /** 消息发送渠道 - MessageChannelEnum */
    private String sendChannel;
    /** 已读标识 */
    private Boolean readFlag;
    /** 置顶标识 */
    private Boolean topFlag;
}
