package com.ga.core.vo.commission;

import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * commission_simulation — 수수료 시뮬레이터 (V103)
 * 시나리오별 수수료 산출 결과 저장.
 * 공식:
 *   company_payment  = premium_amount × company_rate
 *   agent_commission = company_payment × payout_rate
 *   withholding_tax  = agent_commission × 0.033 (3.3%, HALF_UP)
 *   net_amount       = agent_commission - withholding_tax
 */
@Data
public class CommissionSimulationVO {
    private Long simId;
    private String simName;
    private BigDecimal premiumAmount;
    private BigDecimal companyRate;
    private BigDecimal payoutRate;
    private Integer commissionYear;
    /** 보험사 지급액 = 보험료 × company_rate */
    private BigDecimal companyPayment;
    /** 설계사 수수료 = 보험사지급액 × payout_rate */
    private BigDecimal agentCommission;
    /** 원천세 = 설계사수수료 × 3.3% */
    private BigDecimal withholdingTax;
    /** 실지급 = 설계사수수료 - 원천세 */
    private BigDecimal netAmount;
    /** 예상 환수액 (시나리오에 따라 선택) */
    private BigDecimal expectedChargeback;
    private LocalDateTime createdAt;
    private Long createdBy;
}
