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

import com.zhongshu.card.client.type.paySetting.RegularType;
import com.zhongshu.card.client.type.paySetting.SettlementRulesType;
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 jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

/**
 * @author TRX
 * @date 2024/11/5
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProjectMainPaySettingParam {

    @Schema(description = "选择的机构主支付配置数据id")
    @NotEmpty
    private String paySettingInfoId;

    @Schema(description = "主商户的子商户")
    private String childPaySettingInfoId;

    @Schema(description = "项目oid")
    @NotEmpty
    private String projectOid;

    //----------------------- 结算规则 start -----------------

    @Schema(description = "结算规则")
    @NotNull
    private SettlementRulesType settlementRulesType;

    //---------------D+N结算 设置
    @Schema(description = "天数，>= 1")
    private Integer days;

    @Schema(description = "d+N的时间")
    private String dnTimeStr;

    //---------------定期结算 设置

    @Schema(description = "定期类型")
    private RegularType regularType;

    @Schema(description = "定期结算时间")
    private String regularTimeStr;

    @Schema(description = "当前的时间，如：12:30")
    private String timeStr;

    //----------------------------提现规则 start --------------

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

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

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

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

    //---------------------------分账规则配置 start ------------
    @Schema(description = "最小分账金额, 单位分")
    private Long minSharing = 0L;

    @Schema(description = "全局项目分账比例，0-100")
    private BigDecimal projectScale = BigDecimal.ZERO;

    @Schema(description = "全局机构分账比例，0-100")
    private BigDecimal orgScale = BigDecimal.ZERO;

}
