# ForecastDTO.java

    package cloud.wconnect.workperformance.pojo.dto.monthlyreport.forecast;

    import cloud.wconnect.commonlib.annotation.validator.DigitsCustom;
    import lombok.AllArgsConstructor;
    import lombok.Builder;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    import org.hibernate.validator.constraints.Length;
    import org.hibernate.validator.constraints.Range;

    import jakarta.validation.constraints.NotBlank;
    import jakarta.validation.constraints.NotNull;
    import java.math.BigDecimal;

    /**
     * Forecast 区域dto
     *
     * @author lichen
     * @date 2023/9/2
     */
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public class ForecastDTO {

        /**
         * 数据月份
         */
        @NotNull(message = "The date cannot be null")
        private Integer date;

        /**
         * 分类id
         */
        @NotNull(message = "The categoryId cannot be null")
        private Integer categoryId;

        /**
         * 分类名称
         */
        @NotBlank(message = "The categoryName cannot be blank")
        @Length(max = 255, message = "The categoryName is limited 255 characters")
        private String categoryName;

        /**
         * 内容类型 1：百分比 2：金额
         */
        @NotNull(message = "The contentType cannot be null")
        @Range(min = 1, max = 2, message = "The contentType must between in [1:percentage 2:money]")
        private Integer contentType;

        /**
         * 上一年
         */
        @DigitsCustom(integer = 10, message = "The lastYear is wrong format")
        private BigDecimal lastYear;

        /**
         * 记录在案
         */
        @DigitsCustom(integer = 10, message = "The onTheBooks is wrong format")
        private BigDecimal onTheBooks;

        /**
         * 预测
         */
        @DigitsCustom(integer = 10, message = "The forecast is wrong format")
        private BigDecimal forecast;

        /**
         * 预算
         */
        @DigitsCustom(integer = 10, message = "The budget is wrong format")
        private BigDecimal budget;
    }