package com.doumee.dao.system.model; import com.baomidou.mybatisplus.annotation.TableField; import com.doumee.core.annotation.excel.ExcelColumn; import com.doumee.service.business.third.model.LoginUserModel; import com.doumee.core.utils.Constants; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import java.util.Date; /** * 系统消息信息表 * @author 江蹄蹄 * @date 2024/01/16 10:03 */ @Data @ApiModel("系统消息信息表") @TableName("`notices`") public class Notices extends LoginUserModel { @TableId(type = IdType.AUTO) @ApiModelProperty(value = "主键", example = "1") @ExcelColumn(name="主键") private Integer id; @ApiModelProperty(value = "创建人编码", example = "1") @ExcelColumn(name="创建人编码") private Integer creator; @ApiModelProperty(value = "创建时间") @ExcelColumn(name="创建时间") private Date createDate; @ApiModelProperty(value = "更新人编码", example = "1") @ExcelColumn(name="更新人编码") private Integer editor; @ApiModelProperty(value = "更新时间") @ExcelColumn(name="更新时间") private Date editDate; @ApiModelProperty(value = "是否删除0否 1是", example = "1") @ExcelColumn(name="是否删除0否 1是") private Integer isdeleted; @ApiModelProperty(value = "备注") @ExcelColumn(name="备注") private String remark; @ApiModelProperty(value = "标题") @ExcelColumn(name="标题") private String title; @ApiModelProperty(value = "简介",notes = "展示状态描述 根据param2 设置") @ExcelColumn(name="简介") private String info; @ApiModelProperty(value = "内容") @ExcelColumn(name="内容") private String content; @ApiModelProperty(value = "关联对象编码", example = "1") @ExcelColumn(name="关联对象编码") private Integer objId; @ApiModelProperty(value = "关联对象类型") @ExcelColumn(name="关联对象类型") private Integer objType; @ApiModelProperty(value = "关联对象名称") @ExcelColumn(name="关联对象名称") private String objName; @ApiModelProperty(value = "类型 0访客审批 1访客报备 2用车审批 3隐患处理 4物流车审批 5系统系统 6入园原因 7海康考勤代办") @ExcelColumn(name="类型 0访客审批 1访客报备 2用车审批 3隐患处理 4物流车审批 5系统系统 6入园原因 7海康考勤代办") private Integer type; @ApiModelProperty(value = "类型描述") @TableField(exist = false) private String typeDetail; @ApiModelProperty(value = "存储 消息展示JSON" ,notes = "存储 消息展示JSON ") @ExcelColumn(name="关联参数1") private String param1; @ApiModelProperty(value = "用于存储 业务状态信息 0=待处理;1=已同意/已处理;2=已拒绝/已退回;3=已转交;4=已撤销",notes = "用于存储 业务状态信息 0 =待处理;1=已同意/已处理;2=已拒绝/已退回;3=已转交;4=已撤销") @ExcelColumn(name="关联参数2") private String param2; @ApiModelProperty(value = "发起人",notes = "发起人") @ExcelColumn(name="关联参数3") private String param3; @ApiModelProperty(value = "操作人") @ExcelColumn(name="关联参数4") private String param4; @ApiModelProperty(value = "关联参数5") @ExcelColumn(name="关联参数5") private String param5; @ApiModelProperty(value = "关联用户编码(关联system_user)", example = "1") @ExcelColumn(name="关联用户编码(关联system_user)") private Integer userId; @ApiModelProperty(value = "关联企业编码(关联company)", example = "1") @ExcelColumn(name="关联企业编码(关联company)") private Integer companyId; @ApiModelProperty(value = "关联企业名称") @TableField(exist = false) private String companyName; @ApiModelProperty(value = "平台 0平台消息 1企业消息 2商户消息", example = "1") @ExcelColumn(name="平台 0平台消息 1企业消息 2商户消息 ") private Integer palt; @ApiModelProperty(value = "状态 0正常 1已关闭 ", example = "1") @ExcelColumn(name="状态 0正常 1已关闭 ") private Integer status; @ApiModelProperty(value = "是否抄送 0不是 1是", example = "1") @ExcelColumn(name="是否抄送 0不是 1是") private Integer sendacopy; @ApiModelProperty(value = "是否已读 0未读 1已读", example = "1") @ExcelColumn(name="是否已读 0未读 1已读") private Integer readed; @ApiModelProperty(value = "查詢类型 0投保 1发票 2理赔", example = "1") @TableField(exist = false) private Integer queryType; public Notices(){ } /** * * @param noticeObjectType 消息类型 * @param palt 数据平台 0平台消息 1企业消息 * @param objId 关联对象主键 * @param content */ public Notices(Constants.NoticeObjectType noticeObjectType,Integer objId, String content, Integer userId, Integer palt ){ this.createDate = new Date(); this.creator = userId ; this.isdeleted = Constants.ZERO ; this.title = noticeObjectType.getName(); this.objType = noticeObjectType.getKey(); this.objId = objId; this.info = noticeObjectType.getInfo(); this.content = content; this.status = Constants.ZERO; this.readed = Constants.ZERO; this.userId=userId; this.palt = palt ; } }