package com.hzs.common.domain.third.pay;

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

import com.baomidou.mybatisplus.annotation.*;
import com.hzs.common.core.web.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.ibatis.type.JdbcType;

/**
 * 在线退款信息
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@KeySequence("T_ONLINE_REFUND_SEQ")
@TableName("T_ONLINE_REFUND")
public class TOnlineRefund extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId("PK_ID")
    private Long pkId;

    /**
     * 退款信息编号
     */
    @TableField("REFUND_CODE")
    private String refundCode;

    /**
     * 支付信息主键
     */
    @TableField("PK_ONLINE_PAYMENT")
    private Long pkOnlinePayment;

    /**
     * 退款业务单号
     */
    @TableField("BUSINESS_CODE")
    private String businessCode;

    /**
     * 退款金额
     */
    @TableField("REFUND_MONEY")
    private BigDecimal refundMoney;

    /**
     * 退款渠道（0=衫德,1=支付宝,2=微信,3=通联,4=京东,5=宝付,6=汇付）
     */
    @TableField("REFUND_CHANNEL")
    private Integer refundChannel;

    /**
     * 退款状态（0=退款中,1=已退款,2=退款失败）
     */
    @TableField("REFUND_STATUS")
    private Integer refundStatus;

    /**
     * 三方退款流水号
     */
    @TableField("REFUND_NUMBER")
    private String refundNumber;

    /**
     * 退款完成时间
     */
    @TableField("FINISH_TIME")
    private Date finishTime;

    /**
     * 退款到账金额
     */
    @TableField("FINISH_MONEY")
    private BigDecimal finishMoney;

    /**
     * 退款失败原因
     */
    @TableField(value = "ERROR_MSG", jdbcType = JdbcType.VARCHAR, updateStrategy = FieldStrategy.IGNORED)
    private String errorMsg;

    /**
     * 回调业务状态（0=未回调,1=回调成功,2=回调失败）
     */
    @TableField("CALLBACK_STATUS")
    private Integer callbackStatus;

    /**
     * 回调业务信息
     */
    @TableField(value = "CALLBACK_INFO", jdbcType = JdbcType.VARCHAR, updateStrategy = FieldStrategy.IGNORED)
    private String callbackInfo;

}
