package com.casic.missiles.model.workbench;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.casic.missiles.annotation.DictCodeField;
import com.casic.missiles.constants.MeterDictCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 所有业务消息提醒
 * </p>
 *
 * @author wangpeng
 * @since 2023-02-23
 */
@ApiModel
@Data
@TableName("workbench_remind_message")
public class WorkbenchRemindMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("id")
    @ApiModelProperty(value = "主键id", dataType = "Long")
    private Long id;

    /**
     * 消息提醒的用户id（sys_user表id）
     */
    @ApiModelProperty(value = "消息提醒的用户id", dataType = "Long")
    @TableField("remind_id")
    private Long remindId;

    /**
     * 消息提醒的用户部门id
     */
    @ApiModelProperty(value = "消息提醒的用户部门id", dataType = "Long")
    @TableField("remind_dept_id")
    private Long remindDeptId;

    /**
     * 消息提醒的业务表id
     */
    @ApiModelProperty(value = "消息提醒的业务表id", dataType = "Long")
    @TableField("business_id")
    private Long businessId;

    /**
     * 消息提醒的业务关联表id
     */
    @ApiModelProperty(value = "关联表业务主键", dataType = "Long")
    @TableField("relation_business_id")
    private Long relationBusinessId;

    /**
     * 消息提醒的业务内容编码
     */
    @ApiModelProperty(value = "消息提醒的业务内容编码", dataType = "String")
    @TableField("business_code")
    private String businessCode;

    /**
     * 消息提醒的业务类型
     */
    @ApiModelProperty(value = "消息提醒的业务类型（字典code）", dataType = "String")
    @DictCodeField(message = "消息提醒的业务类型不合法", cacheName = MeterDictCode.MESSAGE_TYPE)
    @TableField("message_type")
    private String messageType;

    @ApiModelProperty(value = "消息提醒的业务类型（字典value）", dataType = "String")
    @TableField(exist = false)
    private String messageTypeName;

    @DictCodeField(message = "来源模块不合法", cacheName = MeterDictCode.MESSAGE_SOURCE_MODULE)
    @ApiModelProperty(value = "来源模块（字典code）", dataType = "String")
    @TableField("message_source_module")
    private String messageSourceModule;

    @ApiModelProperty(value = "来源模块（字典value）", dataType = "String")
    @TableField(exist = false)
    private String messageSourceModuleName;

    /**
     * 消息主题
     */
    @ApiModelProperty(value = "消息主题", dataType = "String")
    @TableField("message_topic")
    private String messageTopic;

    /**
     * 消息主题（冗余）
     */
    @ApiModelProperty(value = "消息主题（冗余）", dataType = "String")
    @TableField("message_title")
    private String messageTitle;

    /**
     * 消息内容（消息提醒的业务内容名称）
     */
    @ApiModelProperty(value = "消息内容（消息提醒的业务内容名称）", dataType = "String")
    @TableField("message_content")
    private String messageContent;

    /**
     * 1已读0未读
     */
    @ApiModelProperty(value = "1已读0未读", dataType = "Integer")
    @TableField("status")
    private Integer status;

    /**
     * 发起提醒人id
     */
    @ApiModelProperty(value = "发起提醒人id", dataType = "Long")
    @TableField("create_user")
    private Long createUser;

    /**
     * 发起提醒人名字
     */
    @ApiModelProperty(value = "发起提醒人名字", dataType = "String")
    @TableField("create_user_name")
    private String createUserName;

    /**
     * 发起时间
     */
    @ApiModelProperty(value = "发起时间", dataType = "String")
    @TableField("create_time")
    private String createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间", dataType = "String")
    @TableField("update_time")
    private String updateTime;

    public WorkbenchRemindMessage(Long remindId, Long remindDeptId, Long businessId, String businessCode, String messageType, String messageSourceModule, String messageTitle, String messageTopic, String messageContent, Integer status, Long createUser, String createUserName) {
        this.remindId = remindId;
        this.remindDeptId = remindDeptId;
        this.businessId = businessId;
        this.businessCode = businessCode;
        this.messageType = messageType;
        this.messageSourceModule = messageSourceModule;
        this.messageTopic = messageTopic;
        this.messageTitle = messageTitle;
        this.messageContent = messageContent;
        this.status = status;
        this.createUser = createUser;
        this.createUserName = createUserName;
    }

    public WorkbenchRemindMessage() {
    }
}
