package com.ga.core.vo.settle;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 해촉 정산 등록 요청 VO.
 * 배치/서비스에서 해촉 처리 시 사용.
 */
@Data
public class TerminationSettlementSaveReq {

    @NotNull(message = "설계사 ID는 필수입니다")
    private Long agentId;

    @NotNull(message = "해촉 일자는 필수입니다")
    private LocalDate terminationDate;

    private Long orgHistoryId;

    @NotBlank(message = "정산 처리 월은 필수입니다")
    @Pattern(regexp = "\\d{6}", message = "정산월은 6자리 숫자(YYYYMM)여야 합니다")
    private String calcMonth;

    private BigDecimal unpaidRecruitAmount;
    private BigDecimal unpaidInstallmentAmount;
    private BigDecimal unpaidIncentiveAmount;
    private BigDecimal chargebackExpectedAmount;
    private BigDecimal chargebackWaivedAmount;
    private BigDecimal deductionAmount;
    private BigDecimal finalPayAmount;

    @Size(max = 1000)
    private String note;
}
