package com.ga.core.vo.commission;

import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.Data;

import java.math.BigDecimal;

/**
 * referral_commission_ledger 등록 요청.
 * commission_amount 는 Service가 계산 후 VO에 set.
 */
@Data
public class ReferralCommissionLedgerSaveReq {

    @NotNull
    private Long contractId;

    @NotNull
    private Long referrerAgentId;

    @NotBlank
    private String settleMonth;

    @NotBlank
    private String referralType;

    @NotNull
    @Positive
    private BigDecimal baseAmount;

    @DecimalMin("0")
    @DecimalMax("1")
    private BigDecimal commissionRate;
}
