package shop.alien.entity.second;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SecondTradeOperation对象", description="二手交易操作表")
public class SecondTradeOperation extends Model<SecondTradeOperation> {
    private static final long serialVersionUID = 1L;

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

    @TableField("trade_id")
    @ApiModelProperty(value = "交易ID")
    private Integer tradeId;

    @TableField("user_id")
    @ApiModelProperty(value = "操作人ID")
    private Integer userId;

    @TableField("type")
    @ApiModelProperty(value = "操作类型  1-发起交易  2-拒绝交易  3-确认交易  4-签到  5-交易成功  6-交易失败  7-交易取消")
    private Integer type;

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

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

    @ApiModelProperty(value = "创建人ID")
    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
    private Integer createdUserId;

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

    @ApiModelProperty(value = "修改人ID")
    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
    private Integer updatedUserId;
}