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_review")
@ApiModel(value = "CommonPushReview", description = "推送审核表")
public class CommonPushReview 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("审核状态：0-草稿/待提交 1-待审核 2-审核通过 3-审核驳回")
    @TableField("review_status")
    private Integer reviewStatus;

    @ApiModelProperty("任务驳回次数，达到3次不可再次提交")
    @TableField("reject_count")
    private Integer rejectCount;

    @ApiModelProperty("审核驳回原因")
    @TableField("reject_reason")
    private String rejectReason;

    @ApiModelProperty("审核人用户ID")
    @TableField("review_by")
    private Long reviewBy;

    @ApiModelProperty("审核操作时间")
    @TableField("review_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date reviewAt;

    @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;
}
