# SalesConfigDTO.java

    package cloud.wconnect.workperformance.pojo.dto.saleskpi.config;

    import cloud.wconnect.commonlib.annotation.validator.DigitsCustom;
    import cloud.wconnect.commonlib.pojo.dto.jsonview.Views;
    import cloud.wconnect.workperformance.pojo.dto.saleskpi.monthly.basic.MonthlyConfigItemDTO;
    import com.fasterxml.jackson.annotation.JsonView;
    import jakarta.validation.Valid;
    import jakarta.validation.constraints.DecimalMin;
    import jakarta.validation.constraints.Digits;
    import jakarta.validation.constraints.NotEmpty;
    import jakarta.validation.constraints.NotNull;
    import lombok.AllArgsConstructor;
    import lombok.Builder;
    import lombok.Data;
    import lombok.NoArgsConstructor;

    import java.math.BigDecimal;
    import java.util.List;

    /**
     * VO：Sales KPI Config
     *
     * @author zc
     * @date 2023/9/5
     */
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public class SalesConfigDTO {

        /**
         * id
         */
        @JsonView(Views.ListView.class)
        private Integer id;

        /**
         * Salesman id
         */
        @JsonView(Views.ListView.class)
        @NotNull(message = "The salesmanId cannot be null")
        private Integer salesmanId;

        /**
         * Salesman Name
         */
        @JsonView(Views.ListView.class)
        private String salesmanName;

        /**
         * Salesforce Account
         */
        @JsonView(Views.ListView.class)
        @NotEmpty(message = "The salesAccount cannot be empty")
        private List<String> salesAccount;

        /**
         * Market Segments
         */
        @JsonView(Views.ListView.class)
        private List<MonthlyConfigItemDTO> marketSegments;

        /**
         * Monthly Targets
         */
        @JsonView(Views.ListView.class)
        @Valid
        @NotNull(message = "The monthlyTargets cannot be null")
        private List<SalesConfigMonthlyTargetDTO> monthlyTargets;

        /**
         * Weekly Target
         */
        @JsonView(Views.ListView.class)
        @NotNull(message = "The weeklyTarget cannot be null")
        @DigitsCustom(integer = 8, message = "The weeklyTarget is wrong format")
        @DecimalMin(value = "0", message = "The weeklyTarget min is 0")
        private BigDecimal weeklyTarget;

        /**
         * 需要隐藏的 item id
         */
        @JsonView(Views.ListView.class)
        @NotNull(message = "The hiddenItemIds cannot be null")
        private List<Integer> hiddenItemIds;

        /**
         * 状态（false：off，true：on）
         */
        @JsonView(Views.ListView.class)
        private Boolean status;

        /**
         * 生效开始时间
         */
        @JsonView(Views.ListView.class)
        private Long monthlyEffectiveStartTime;

        /**
         * 生效开始时间
         */
        @JsonView(Views.ListView.class)
        private Long weeklyEffectiveStartTime;

    }