package com.sptg.estate.api.entity;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

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

/**
 * title: ApplyPayRefund
 * package: com.sptg.estate.api.entity
 * description: 支付退款申请
 *
 *
 *
 */
@Setter
@Getter
@TableName(value = "estate_pay_refund_apply")
public class ApplyPayRefund {

    /**
     * 主键
     */
    @TableId(value = "l_id",type = IdType.AUTO)
    private Long id;

    /**
     * 支付凭证ID
     */
    @TableField(value = "l_pay_certificate_id")
    private Long payCertificateId;

    /**
     * 订单ID
     */
    @TableField(value = "l_order_id")
    private Long orderId;

    /**
     * 订单ID
     */
    @TableField(value = "s_order_no")
    private String orderNo;

    /**
     * 主键
     */
    @TableField(value = "l_user_id")
    private Long userId;

    /**
     * 支付类型：wxPay，aliPay
     */
    @TableField(value = "s_pay_type")
    private String payType;
    /**
     * 实际付款金额
     */
    @TableField(value = "d_actual_pay_fee")
    private BigDecimal actualPayFee;

    /**
     * 申请退款金额
     */
    @TableField(value = "d_refund_fee")
    private BigDecimal refundFee;

    /**
     * 退款入账账户
     * 退回银行卡：{银行名称}{卡类型}{卡尾号}
     * 退回支付用户零钱:支付用户零钱
     * 退还商户:商户基本账户 商户结算银行账户
     * 退回支付用户零钱通:支付用户零钱通
     */
    @TableField(value = "s_refund_recv_accout")
    private String refundRecvAccout;

    /**
     * 内部退款单号
     */
    @TableField(value = "s_refund_no")
    private String refundNo;

    /**
     * 第三方退款单号
     */
    @TableField(value = "s_thrid_refund_id")
    private String thridRefundId;

    /**
     * 审核状态：0：申请待审核，1：申请审核通过，2：申请审核拒绝
     */
    @TableField(value = "i_check_status")
    private Integer checkStatus;

    /**
     *  退款状态，WAIT：退款中，SUCCESS：退款成功，REFUNDCLOSE：退款关闭，CHANGE：退款异常
     */
    @TableField(value = "i_refund_status")
    private String refundStatus;

    /**
     *  最近申请时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @TableField(value = "d_apply_date")
    private Date applyDate;

    /**
     *  后台审核时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @TableField(value = "d_check_date")
    private Date checkDate;

    /**
     *  更新时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @TableField(value = "d_update_date")
    private Date updateDate;

    /**
     * 申请人姓名
     */
    @TableField(value = "s_name")
    private String name;

    /**
     * 申请手机号
     */
    @TableField(value = "s_phone")
    private String phone;

    /**
     * 所在小区id
     */
    @TableField(value = "l_residential_id")
    private Long residentialId;

    /**
     * 所在小区名
     */
    @TableField(value = "s_residential_name")
    private String residentialName;

    /**
     * 所在单元名
     */
    @TableField(value = "s_unit_name")
    private String unitName;

    /**
     * 所在房间名
     */
    @TableField(value = "s_room_name")
    private String roomName;

    /**
     * 第三方退款申请提交信息
     */
    @TableField(value = "s_third_refund_apply")
    private String thirdRefundApply;

    /**
     * 第三方退款申请结果通知信息
     */
    @TableField(value = "s_third_refund_notify")
    private String thirdRefundNotify;

    /**
     * 删除标志
     */
    @TableField(value = "i_status")
    private String status;
}
