package com.ga.core.vo.commission;

import lombok.Data;

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

/**
 * clawback_receivable 조회 응답 — 설계사명 조인 + 회수이력 포함.
 * 상세 조회(selectById)에서 recoveries 가 채워진다.
 */
@Data
public class ClawbackReceivableResp {
    private Long receivableId;
    private Long agentId;
    /** agent.agent_name */
    private String agentName;
    private String originSettleMonth;
    private BigDecimal originalAmount;
    private BigDecimal recoveredAmount;
    private BigDecimal balance;
    /** OUTSTANDING / RECOVERING / CLEARED / WRITTEN_OFF */
    private String status;
    /** 공통코드 CLAWBACK_RCV_STATUS */
    private String statusName;
    private String lastRecoveryMonth;
    private String writeoffReason;
    private LocalDateTime writtenOffAt;
    private Long writtenOffBy;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    /** 회수 이력 (상세 조회 시 populate) */
    private List<ClawbackRecoveryResp> recoveries;
}
