package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
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.util.Date;

/**
 * 支付交易
 *
 * @author system
 * @since 2025-01-XX
 */
@Data
@JsonInclude
@TableName("lawyer_payment_transaction")
@ApiModel(value = "LawyerPaymentTransaction对象", description = "支付交易")
public class LawyerPaymentTransaction extends Model<LawyerPaymentTransaction> {

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

    @ApiModelProperty(value = "咨询订单ID")
    @TableField("consultation_order_id")
    private Integer consultationOrderId;

    @ApiModelProperty(value = "支付用户ID")
    @TableField("client_user_id")
    private Integer clientUserId;

    @ApiModelProperty(value = "交易流水号")
    @TableField("transaction_number")
    private String transactionNumber;

    @ApiModelProperty(value = "交易金额,单位分")
    @TableField("transaction_amount")
    private Integer transactionAmount;

    @ApiModelProperty(value = "支付方式, 0:微信, 1:支付宝, 2:银行卡")
    @TableField("payment_method")
    private Integer paymentMethod;

    @ApiModelProperty(value = "交易状态, 0:待支付, 1:支付成功, 2:支付失败, 3:已退款")
    @TableField("transaction_status")
    private Integer transactionStatus;

    @ApiModelProperty(value = "交易时间")
    @TableField("transaction_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date transactionTime;

    @ApiModelProperty(value = "第三方交易号")
    @TableField("third_party_trade_no")
    private String thirdPartyTradeNo;

    @ApiModelProperty(value = "退款金额,单位分")
    @TableField("refund_amount")
    private Integer refundAmount;

    @ApiModelProperty(value = "退款时间")
    @TableField("refund_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date refundTime;

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

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

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

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

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

