package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 疑似公告
 */
@Data
@JsonInclude
@TableName("life_notice")
public class LifeNotice {

    @TableId(value = "id", type = IdType.AUTO)
    private String id;

    @ApiModelProperty(value = "发表公告人id（'user_'/'store_'/'lawyer_' + 手机号，或 system）")
    private String senderId;

    @TableField("sender_user_type")
    @ApiModelProperty(value = "发送人用户分类：1-用户 2-商户 3-律师")
    private Integer senderUserType;

    @TableField("sender_ref_id")
    @ApiModelProperty(value = "发送人对应表主键id（与 sender_user_type 对应）")
    private Integer senderRefId;

    @ApiModelProperty(value = "接收人id（'user_'/'store_'/'lawyer_' + 手机号）")
    private String receiverId;

    @TableField("receiver_user_type")
    @ApiModelProperty(value = "接收人用户分类：1-用户 2-商户 3-律师")
    private Integer receiverUserType;

    @TableField("receiver_ref_id")
    @ApiModelProperty(value = "接收人对应表主键id（与 receiver_user_type 对应）")
    private Integer receiverRefId;

    @ApiModelProperty(value = "业务id  关注通知-粉丝id；动态通知-动态id；")
    @TableField("business_id")
    private Integer businessId;

    @ApiModelProperty(value = "标题")
    @TableField(value = "title", insertStrategy = FieldStrategy.IGNORED)
    private String title;

    @ApiModelProperty(value = "公告内容")
    private String context;

    @ApiModelProperty(value = "公告类型  (0-系统通知和订单提醒之外的类型 1-系统通知 2-订单提醒)")
    private Integer noticeType;

    @ApiModelProperty(value = "是否已读  0:未读  1:已读")
    private Integer isRead;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField("created_user_id")
    private Integer createdUserId;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @ApiModelProperty(value = "修改人ID")
    @TableField("updated_user_id")
    private Integer updatedUserId;

    @ApiModelProperty(value = "业务类型0-其他，1-律师模块通知")
    @TableField("business_type")
    private Integer businessType;
}
