package com.xingxi.business.PaymentInfo.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xingxi.common.annotation.Excel;
import com.xingxi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

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

/**
 * 支付信息对象 t_payment_info
 *
 * @author xingxi
 * @date 2025-03-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString
public class PaymentInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    // 主键
    private Long payId;

    // 订单ID
    @Excel(name = "订单ID")
    private Long orderId;

    // 订单号
    @Excel(name = "订单号")
    private String orderNo;

    // 支付时间
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    // 销售方ID
    @Excel(name = "销售方ID")
    private Long sellerId;

    // 商品名称
    @Excel(name = "商品名称")
    private String description;

    // 商户订单号
    @Excel(name = "商户订单号")
    private String outTradeNo;

    // 商户回调地址
    @Excel(name = "商户回调地址")
    private String notifyUrl;

    // 总金额
    @Excel(name = "总金额")
    private BigDecimal amountTotal;

    // 用户标识
    @Excel(name = "用户标识")
    private String payerOpenid;

    // 预支付交易会话标识
    @Excel(name = "预支付交易会话标识")
    private String prepayId;

    // 通知ID
    @Excel(name = "通知ID")
    private String notifyId;

    // 通知创建时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "通知创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date notifyTime;

    // 通知的类型
    @Excel(name = "通知的类型")
    private String eventType;

    // 微信支付订单号
    @Excel(name = "微信支付订单号")
    private String transactionId;

    // 交易类型
    @Excel(name = "交易类型")
    private String tradeType;

    // 交易状态
    @Excel(name = "交易状态")
    private String tradeState;

    // 交易状态描述
    @Excel(name = "交易状态描述")
    private String tradeStateDesc;

    // 银行类型
    @Excel(name = "银行类型")
    private String bankType;

    // 支付完成时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date successTime;

    // 删除标志
    @Excel(name = "删除标志")
    private String delFlag;
}
