package shop.alien.entity.second;

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

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 二手交易记录表
 * </p>
 *
 * @author qrs
 * @since 2025-07-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SecondTradeRecord对象", description="二手交易记录表")
public class SecondTradeRecord extends Model<SecondTradeRecord> {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "交易编号")
    @TableField("trade_no")
    private String tradeNo;

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

    @ApiModelProperty(value = "商品记录表id")
    @TableField("goods_record_id")
    private Integer goodsRecordId;

    @ApiModelProperty(value = "买家id")
    @TableField("buyer_id")
    private Integer buyerId;

    @ApiModelProperty(value = "卖家id")
    @TableField("seller_id")
    private Integer sellerId;

    @ApiModelProperty(value = "交易时间")
    @TableField("transaction_time")
    private Date transactionTime;

    @ApiModelProperty(value = "交易地点(经纬度)")
    @TableField("transaction_latitude_longitude")
    private String transactionLatitudeLongitude;

    @ApiModelProperty(value = "交易地点(经纬度地址)")
    @TableField("transaction_latitude_longitude_address")
    private String transactionLatitudeLongitudeAddress;

    @ApiModelProperty(value = "交易地点(详细地址)")
    @TableField("transaction_location")
    private String transactionLocation;

    @ApiModelProperty(value = "交易金额")
    @TableField("transaction_amount")
    private BigDecimal transactionAmount;

    @ApiModelProperty(value = "买家是否签到  0-未签到  1-已签到")
    @TableField("buyer_sign_in")
    private Integer buyerSignIn;

    @ApiModelProperty(value = "买家签到时间")
    @TableField("buyer_sign_in_time")
    private Date buyerSignInTime;

    @ApiModelProperty(value = "买家签到地点(经纬度)")
    @TableField("buyer_sign_in_latitude_longitude")
    private String buyerSignInLatitudeLongitude;

    @ApiModelProperty(value = "买家签到地点(经纬度)")
    @TableField("buyer_sign_in_latitude_longitude_address")
    private String buyerSignInLatitudeLongitudeAddress;

    @ApiModelProperty(value = "卖家是否签到  0-未签到  1-已签到")
    @TableField("seller_sign_in")
    private Integer sellerSignIn;

    @ApiModelProperty(value = "卖家签到时间")
    @TableField("seller_sign_in_time")
    private Date sellerSignInTime;

    @ApiModelProperty(value = "卖家签到地点(经纬度)")
    @TableField("seller_sign_in_latitude_longitude")
    private String sellerSignInLatitudeLongitude;

    @ApiModelProperty(value = "卖家签到地点(经纬度地址)")
    @TableField("seller_sign_in_latitude_longitude_address")
    private String sellerSignInLatitudeLongitudeAddress;

    @ApiModelProperty(value = "买家交易状态  0-未确认  1-交易成功  2-交易失败")
    @TableField("buyer_transaction_status")
    private Integer buyerTransactionStatus;

    @ApiModelProperty(value = "买家完成交易时间")
    @TableField("buyer_complete_time")
    private Date buyerCompleteTime;

    @ApiModelProperty(value = "买家评价")
    @TableField("buyer_evaluate")
    private String buyerEvaluate;

    @ApiModelProperty(value = "买家评分")
    @TableField("buyer_rating")
    private Integer buyerRating;

    @ApiModelProperty(value = "卖家交易状态  0-未确认  1-交易成功  2-交易失败")
    @TableField("seller_transaction_status")
    private Integer sellerTransactionStatus;

    @ApiModelProperty(value = "卖家完成交易时间")
    @TableField("seller_complete_time")
    private Date sellerCompleteTime;

    @ApiModelProperty(value = "卖家评价")
    @TableField("seller_evaluate")
    private String sellerEvaluate;

    @ApiModelProperty(value = "卖家评分")
    @TableField("seller_rating")
    private Integer sellerRating;

    @ApiModelProperty(value = "交易状态  1-待确认  2-已拒绝  3-待交易  4-交易成功  5-交易失败  6-交易取消")
    @TableField("trade_status")
    private Integer tradeStatus;

    @ApiModelProperty(value = "取消交易的用户id")
    @TableField("cancel_user_id")
    private Integer cancelUserId;

    @ApiModelProperty(value = "取消交易原因(字典表_cancelTradeReason)")
    @TableField("cancel_reason")
    private String cancelReason;

    @ApiModelProperty(value = "取消交易原因补充")
    @TableField("cancel_reason_supplement")
    private String cancelReasonSupplement;

    @ApiModelProperty(value = "失效状态(平台端统计用)  0-未失效  1-已失效")
    @TableField("failure_flag")
    private String failureFlag;

    @ApiModelProperty(value = "失效原因")
    @TableField("failure_reason")
    private String failureReason;

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

    @ApiModelProperty(value = "创建时间")
    @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 = "修改时间")
    @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;

}
