package com.zhongshu.card.client.model.paySetting.withdrawal;

import com.zhongshu.card.client.model.paySetting.paySetting.OrgPayConfigModel;
import com.zhongshu.card.client.type.paySetting.WithdrawMethodType;
import com.zhongshu.card.client.type.paySetting.WithdrawType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * web 机构 提现的信息
 *
 * @author TRX
 * @date 2024/12/3
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrgWithdrawalModel {

    @Schema(description = "机构的账号信息")
    private OrgPayConfigModel orgPayConfigModel;

    //------------------------------提现规则 --------------------
    @Schema(description = "提现规则类型")
    private WithdrawType withdrawType;

    private String withdrawTypeStr;

    public String getWithdrawTypeStr() {
        if (withdrawType != null) {
            return withdrawType.getRemark();
        }
        return "";
    }

    @Schema(description = "提现方式")
    private WithdrawMethodType withdrawMethodType;

    private String withdrawMethodTypeStr;

    public String getWithdrawMethodTypeStr() {
        if (withdrawMethodType != null) {
            return withdrawMethodType.getRemark();
        }
        return "";
    }

    @Schema(description = "最小的提现额度")
    private Long minWithdraw = 0L;

    @Schema(description = "最大的提现额度")
    private Long maxWithdraw = 0L;

    @Schema(description = "余额，分")
    private Long balance = 0L;

    @Schema(description = "余额，元")
    private BigDecimal withdrawAmount = BigDecimal.ZERO;

}
