package cn.iocoder.lyzsys.module.tjt.controller.admin.planningquarter.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Schema(description = "Admin - project planning quarter save Request VO")
@Data
public class ProjectPlanningQuarterSaveReqVO {

    @Schema(description = "Quarter distribution ID", example = "1")
    private Long id;

    @Schema(description = "Planning ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "planningId cannot be null")
    private Long planningId;

    @Schema(description = "Distribution year", requiredMode = Schema.RequiredMode.REQUIRED, example = "2026")
    @NotNull(message = "distributionYear cannot be null")
    private Integer distributionYear;

    @Schema(description = "Quarter number", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "quarterNo cannot be null")
    @Min(value = 1, message = "quarterNo must be between 1 and 4")
    @Max(value = 4, message = "quarterNo must be between 1 and 4")
    private Integer quarterNo;

    @Schema(description = "Distribution ratio", example = "0.2500")
    private BigDecimal distributionRatio;

}
