# ExpenseCategoryDTO.java

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

    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 jakarta.validation.Valid;
    import jakarta.validation.constraints.NotBlank;
    import jakarta.validation.constraints.NotNull;
    import java.math.BigDecimal;
    import java.util.List;

    /**
     * 花销分类数据
     *
     * @author lichen
     * @date 2023/9/4
     */
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Builder
    public class ExpenseCategoryDTO {

        /**
         * 分类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;

        /**
         * 月差别值
         */
        @DigitsCustom(integer = 10, message = "The varBdgtMtd is wrong format")
        private BigDecimal varBdgtMtd;

        /**
         * 年差别值
         */
        @DigitsCustom(integer = 10, message = "The varBdgtYtd is wrong format")
        private BigDecimal varBdgtYtd;

        /**
         * 备注
         */
        private String comment;

        /**
         * 花销明细数据
         */
        @Valid
        private List<ExpenseCategoryItemDTO> expenseCategoryItems;
    }