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 TaxInvoiceSaveReq {

    @NotBlank(message = "발행 번호는 필수입니다")
    @Size(max = 50)
    private String invoiceNo;

    @NotBlank(message = "세금계산서 유형은 필수입니다")
    private String invoiceType;            // SUPPLY / PURCHASE

    @NotNull(message = "발행일은 필수입니다")
    private LocalDate issueDate;

    @NotNull(message = "공급가액은 필수입니다")
    private BigDecimal supplyAmount;

    @NotNull(message = "세액은 필수입니다")
    private BigDecimal taxAmount;

    @NotBlank(message = "거래 상대방 상호는 필수입니다")
    @Size(max = 200)
    private String counterpartName;

    @NotBlank(message = "거래 상대방 사업자번호는 필수입니다")
    @Size(max = 20)
    private String counterpartBizNo;

    @Size(max = 100)
    private String counterpartRep;

    @Size(max = 500)
    private String counterpartAddr;

    private Long agentId;

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

    private Long settleId;

    @Size(max = 500)
    private String description;
}
