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;

/**
 * recognized_performance_ledger 등록 요청.
 * converted_premium / recognized_amount 는 Service가 계산 후 VO에 set.
 */
@Data
public class RecognizedPerformanceLedgerSaveReq {

    @NotNull
    private Long agentId;

    @NotNull
    private Long contractId;

    @NotBlank
    private String settleMonth;

    @NotNull
    @Positive
    private BigDecimal premiumAmount;

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

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