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;

/**
 * commission_simulation 저장 요청.
 * 산출 결과 컬럼(companyPayment/agentCommission/withholdingTax/netAmount)은
 * Service의 simulate() 메서드가 계산 후 VO에 채워 INSERT.
 */
@Data
public class CommissionSimulationSaveReq {

    @NotBlank
    private String simName;

    @NotNull
    @Positive
    private BigDecimal premiumAmount;

    @NotNull
    @DecimalMin("0")
    @DecimalMax("1")
    private BigDecimal companyRate;

    @NotNull
    @DecimalMin("0")
    @DecimalMax("1")
    private BigDecimal payoutRate;

    @NotNull
    @Positive
    private Integer commissionYear;

    /** 예상 환수액 — 선택 입력 */
    private BigDecimal expectedChargeback;
}
