# SaveSalesDTO.java

    package cloud.wconnect.workperformance.pojo.dto.mor.sales;

    import cloud.wconnect.commonlib.annotation.validator.DigitsCustom;
    import jakarta.validation.constraints.Digits;
    import jakarta.validation.constraints.NotNull;
    import lombok.Data;
    import org.hibernate.validator.constraints.Range;

    import java.math.BigDecimal;

    /**
     * 保存 sales
     *
     * @author zc
     * @date 2023/4/4
     */
    @Data
    public class SaveSalesDTO {
        /**
         * 年份
         */
        @NotNull(message = "The year cannot be null.")
        private Integer year;

        /**
         * 月份
         */
        @NotNull(message = "The month cannot be null.")
        @Range(min = 1, max = 12, message = "The month must between 1 and 12.")
        private Integer month;

        /**
         * 金额
         */
        @NotNull(message = "The total cannot be null.")
        @DigitsCustom(integer = 10, message = "The total is wrong format")
        private BigDecimal total;
    }