package cn.pluss.platform.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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

/**
 * @author DJH
 */
@Data
public class Cash {

    /**
     * 提现成功
     */
    public static final int STATUS_SUCCESS = 1;

    /**
     * 提现失败
     */
    public static final int STATUS_FAIL = 2;

    /**
     * 提现审核中
     */
    public static final int STATUS_CHECKING = 0;

    /**
     * 最小提现额度
     */
    public static final int MINIMUM_CASH = 10;

    @TableId
    private Long id;
    private Long userId;
    private String userName;
    private String merchantCode;
    private String merchantName;

    /**
     * 本次提现记录的支付宝账号名称
     */
    private String accountName;

    /**
     * 本次提现记录的支付宝账号
     */
    private String accountNo;

    private BigDecimal cashAmt;
    private Integer status;
    private String reason;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createDt;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateDt;
    private String logo;
    private String cashNumber;
    private String backNo;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date backDt;
    private String updator;
    private Integer type;

    /**
     * 备注
     */
    @TableField(exist = false)
    private String remark;

    @TableField(exist = false)
    private String phone;

    /**
     * 全部推广分润
     */
    @TableField(exist = false)
    private BigDecimal totalProfit;

    /**
     * 全部粉丝分润
     */
    @TableField(exist = false)
    private BigDecimal totalShareMoney;

    /**
     * 已提现金额
     */
    @TableField(exist = false)
    private BigDecimal cashTotalAmt;

    /**
     * 用来接收搜索条件的起始时间
     */
    @TableField(exist = false)
    private String beginTime;
    @TableField(exist = false)
    private String endTime;

    /**
     * 商户简称
     */
    @TableField(exist = false)
    private String alias;
    /**
     * 支付宝账号
     */
    @TableField(exist = false)
    private String aliAccount;
    /**
     * 银行卡号
     */
    @TableField(exist = false)
    private String bankCardNo;

    /**
     * 支付密码
     */
    @TableField(exist = false)
    private String payPassword;

    /**
     * 基本提现手续费
     */
    @TableField
    private BigDecimal baseServiceCharge;

    /**
     * 比例提现手续费
     */
    @TableField
    private BigDecimal ratioCharge;

    /**
     * 提现手续费比例(%)
     */
    @TableField(exist = false)
    private int rate;

    /**
     * 总手续费
     */
    @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
    private BigDecimal virTotalCharge;

    /**
     * 实际到账金额
     */
    @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
    private BigDecimal virRealCashAmt;
}

