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 lombok.Data;

import java.math.BigDecimal;

/**
 * joint_contract 저장 요청.
 * share_rate 합=1 은 Service 레이어에서 검증.
 */
@Data
public class JointContractSaveReq {

    @NotNull
    private Long contractId;

    @NotNull
    private Long agentId;

    @NotBlank
    private String role;

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