package com.muchinfo.mtp3pojos.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 公告消息表
 * </p>
 *
 * @author XKF
 * @since 2025-02-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("NOTICEMSG")
@ApiModel(value="Noticemsg对象", description="公告消息表")
@AllArgsConstructor
@NoArgsConstructor
@Builder
@KeySequence(value = "SEQ_NOTICEMSG")
public class Noticemsg extends Model<Noticemsg> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增ID")
    @TableId(value = "AUTOID", type = IdType.INPUT)
    private Long autoid;

    @ApiModelProperty(value = "消息类型 - 1:公告通知 2:系统消息 3:商品到期提货通知")
    @TableField("MSGTYPE")
    private Integer msgtype;

    @ApiModelProperty(value = "标题")
    @TableField("TITLE")
    private String title;

    @ApiModelProperty(value = "内容")
    @TableField("CONTENT")
    private String content;

    @ApiModelProperty(value = "计划发送时间")
    @TableField("SCHEDULETIME")
    private Date scheduletime;

    @ApiModelProperty(value = "消息发布者")
    @TableField("PUBLISHER")
    private String publisher;

    @ApiModelProperty(value = "推送方式 - 1：全体广播 2：按会员广播 3：个人推送 4:按会员广播(仅会员)")
    @TableField("SENDTYPE")
    private Integer sendtype;

    @ApiModelProperty(value = "会员/投资者ID 推送方式 为 个人时，填写投资者ID")
    @TableField("USERID")
    private Long userid;

    @ApiModelProperty(value = "是否置顶 - 0:不置顶 1:置顶")
    @TableField("ISTOP")
    private Integer istop;

    @ApiModelProperty(value = "推送状态 - 0:未推送 1:已推送 2:审核拒绝 3:提前失效")
    @TableField("SENTSTATUS")
    private Integer sentstatus;

    @ApiModelProperty(value = "结束时间")
    @TableField("ENDTIME")
    private Date endtime;

    @ApiModelProperty(value = "建仓人")
    @TableField("CREATORID")
    private Long creatorid;

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATETIME")
    private Date createtime;

    @ApiModelProperty(value = "审核人")
    @TableField("AUDITORUSERID")
    private Long auditoruserid;

    @ApiModelProperty(value = "审核日期")
    @TableField("AUDITTIME")
    private Date audittime;

    @ApiModelProperty(value = "审核备注")
    @TableField("AUDITREMARK")
    private String auditremark;

    @ApiModelProperty(value = "消息图标Url")
    @TableField("MSGICONURL")
    private String msgiconurl;

    @ApiModelProperty(value = "是否强制显示 - 0:不强制 1:强制")
    @TableField("ISFORCEDISPLAY")
    private Integer isforcedisplay;

    @TableField(select = false)
    private String creatorName;
    @TableField(select = false)
    private String auditName;
    @TableField(select = false)
    private String membername;

    @Override
    public Serializable pkVal() {
        return this.autoid;
    }

}
