package com.ruoyi.ehsNoticeMessage.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 内部公告对象 ehs_notice_message
 *
 * @author ruoyi
 * @date 2023-12-06
 */
@Data
@ToString
@NoArgsConstructor
@Accessors(chain = true)
@TableName("ehs_notice_message")
public class EhsNoticeMessage extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(type= IdType.AUTO)
    private Long noticeMessageId;

    /** 标题 */
    @Excel(name = "标题")
    private String title;
    @Excel(name = "部门列表")
    @TableField(exist = false)
    private String deptListName;
    private String deptList;
    /** 内容 */
    //@Excel(name = "内容")
    private String displayContent;
    @Excel(name = "发布时间", dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date issueTime;
    /** 文件下载列表 */
    //@Excel(name = "文件下载列表")
    @TableField(exist = false)
    private String fileName;
    /** 临时任务的下载模板 */
    private String fileTempName;
    //@Excel(name = "模板文件")
    private String fileTempOriginalName;
    /** 1:未发布 2:已发布 */
    //@Excel(name = "0:未发布 1:已发布")
    private String status;

    /** 已阅读企业id */
    @Excel(name = "已阅读企业数")
    private String readDeptId;

    /** 0临时任务，1通知公告 */
    //@Excel(name = "0临时任务，1通知公告")
    private Long mesgType;

    /** 需要接收消息的企业列表 */


    /** 0不是全部，1全部企业 */
    //@Excel(name = "0不是全部，1全部企业")
    private Integer allDept;

    /** 创建的部门，主要区别二级监管 */
    //@Excel(name = "创建的部门，主要区别二级监管")
    private Long createDeptId;
    @Excel(name = "已上传数")
    @TableField(exist = false)
    private Integer fileCount;

    @TableField(exist = false)
    private String fileState;

    @TableField(exist = false)
    private Long fileDeptId;

    @TableField(exist = false)
    private Long isRead;

    @TableField(exist = false)
    private Long noticeMessageFileId;

    @TableField(exist = false)
    private String originalName;

    @TableField(exist = false)
    private String messageFileId;
    @TableField(exist = false)
    private Long[] deptListArray;


    @TableField(exist = false)
    private Long myMessageId; //我的消息对应的id
    @TableField(exist = false)
    private Long myUserId;//我的消息的对应人员的id
    @TableField(exist = false)
    private String myMessageState;//我的消息阅读状态
}
