# ProfitDTO.java

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

    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;

    /**
     * Profit 区域dto
     *
     * @author lichen
     * @date 2023/9/1
     */
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public class ProfitDTO {

        /**
         * 分类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 budget is wrong format")
        private BigDecimal budget;

        /**
         * 实际
         */
        @DigitsCustom(integer = 10, message = "The actual is wrong format")
        private BigDecimal actual;

    }