package com.ruoyi.ss.withdraw.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.ValidGroup;
import com.ruoyi.ss.transfer.domain.TransferVO;
import com.ruoyi.ss.transfer.interfaces.AfterTransfer;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 提现记录对象 rl_withdraw
 *
 * @author qzz
 * @date 2024-09-28
 */
@Data
public class Withdraw extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 提现id */
    private Long id;

    /** 提现单号 */
    @Excel(name = "提现单号")
    private String withdrawNo;

    /** 提现金额 */
    @Excel(name = "提现金额")
    private BigDecimal amount;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 驳回原因 */
    @Excel(name = "驳回原因")
    private String rejectReason;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime auditTime;

    /** 申请人 */
    @Excel(name = "申请人")
    private String ownerName;

    /** 申请人id */
    @Excel(name = "申请人id")
    private Long ownerId;

    /** 手机号 */
    @Excel(name = "手机号")
    private String ownerPhone;

    /** 用户类型 */
    @Excel(name = "用户类型")
    private String ownerType;

    /** 微信openid */
    @Excel(name = "微信openid")
    private String wxOpenid;

    /** 手续费 */
    @Excel(name = "手续费")
    private BigDecimal handlingCharge;

    /** 成本 */
    @Excel(name = "成本")
    private BigDecimal cost;

    /** 提现渠道id */
    @Excel(name = "提现渠道id")
    private Long withdrawChannelId;

    /** 用户提现渠道id */
    @Excel(name = "用户提现渠道id")
    private Long userWithdrawChannelId;

    /** 提现手续费类型：1-按比例，2-按每笔 */
    private String handlingChargeType;

    /** 服务费 */
    private BigDecimal withdrawHandlingCharge;

    /** 到账金额= 提现金额-手续费*/
    private BigDecimal receivedAmount;

    /** 提现类型：1-线上；2-线下 */
    private String type;

    /** 是否自动转账 */
    private Boolean isAuto;

    /** 提现后余额 */
    private BigDecimal afterBalance;

}
