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.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 推送任务用户关联表
 */
@Data
@JsonInclude
@TableName("common_push_task_user")
@ApiModel(value = "CommonPushTaskUser", description = "推送任务用户关联表")
public class CommonPushTaskUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("关联推送主表 common_push_task.id")
    @TableField("push_task_id")
    private Long pushTaskId;

    @ApiModelProperty("关联系统用户ID（允许重复，同一用户可多设备）")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty("设备唯一标识ID")
    @TableField("device_id")
    private String deviceId;

    @ApiModelProperty("手机设备类型")
    @TableField("phone_type")
    private String phoneType;

    @ApiModelProperty("关联类型：1-接收用户 2-协办人 3-权限查看人")
    @TableField("rel_type")
    private Integer relType;

    @ApiModelProperty("发送状态：2-已发送 3-已抵达设备")
    @TableField("status")
    private Integer status;

    @ApiModelProperty("展示状态：0-未展示 1-已展示")
    @TableField("show_info")
    private Integer showInfo;

    @ApiModelProperty("点击状态：0-未点击 1-已点击")
    @TableField("user_add")
    private Integer userAdd;

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

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

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

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

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