package shop.alien.entity.second;

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.io.Serializable;
import java.util.Date;

/**
 * 二手商品审核记录
 */
@Data
@JsonInclude
@TableName("second_goods_audit")
public class SecondGoodsAudit implements Serializable {
    private static final long serialVersionUID = 1L;

    // 商品状态常量
    public static final int GOODS_STATUS_SUCCESS = 1; // 审核成功
    public static final int GOODS_STATUS_FAILED = 2;  // 审核失败

    // 删除标记常量
    public static final int DELETE_FLAG_NO = 0;  // 未删除
    public static final int DELETE_FLAG_YES = 1; // 已删除

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

    @TableField("goods_id")
    @ApiModelProperty(value = "商品ID")
    private Integer goodsId;

    @TableField("goods_status")
    @ApiModelProperty(value = "商品状态 1:审核成功 2:审核失败")
    private Integer goodsStatus;

    @TableField("failed_reason")
    @ApiModelProperty(value = "审核描述（失败原因）")
    private String failedReason;

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

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

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

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

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