package com.fs.live.domain;

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

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

/**
 * 支付明细对象 live_order_payment
 *
 * @author fs
 * @date 2025-08-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class LiveOrderPayment extends BaseEntity{

    /** ID */
    private Long paymentId;

    /** 支付订单号 */
    @Excel(name = "支付订单号")
    private String payCode;

    /** 支付类型 weixin alipay */
    @Excel(name = "支付类型 weixin alipay")
    private String payTypeCode;

    /** 支付金额 */
    @Excel(name = "支付金额")
    private BigDecimal payMoney;

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

    /** 外部订单号 */
    @Excel(name = "外部订单号")
    private String tradeNo;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** OPENID */
    @Excel(name = "OPENID")
    private String openId;

    /** 业务类型  */
    @Excel(name = "业务类型 ")
    private Integer businessType;

    /** 关联业务ID */
    @Excel(name = "关联业务ID")
    private String businessId;

    /** 状态 0未支付 1已支付 -1 已退款 */
    @Excel(name = "状态 0未支付 1已支付 -1 已退款")
    private Integer status;

    /** 交易单号 */
    @Excel(name = "交易单号")
    private String bankTransactionId;

    /** 银行流水号 */
    @Excel(name = "银行流水号")
    private String bankSerialNo;

    /** 退款金额 */
    @Excel(name = "退款金额")
    private BigDecimal refundMoney;

    /** 退款时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "退款时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refundTime;

    /** 店铺ID */
    @Excel(name = "店铺ID")
    private Long storeId;

    /** 公司id */
    @Excel(name = "公司id")
    private Long companyId;

    /** 员工id */
    @Excel(name = "员工id")
    private Long companyUserId;

    /** 关联业务编号 */
    @Excel(name = "关联业务编号")
    private String businessCode;

    /** 支付方式: zb tz wx */
    @Excel(name = "支付方式: zb tz wx")
    private String payMode;

    /** 分账状态 0未分账 1已分账 */
    @Excel(name = "分账状态 0未分账 1已分账")
    private Integer shareStatus;

    /** 分账单号 */
    @Excel(name = "分账单号")
    private String shareCode;

    /** 分账金额 */
    @Excel(name = "分账金额")
    private BigDecimal shareMoney;

    /** 是否分账 */
    @Excel(name = "是否分账")
    private Integer isShare;

    //小程序appId(用于多汇付支付/退款)
    private String appId;

    private Long merConfigId;
}
