# HotelKpiSettingCalculationFactorDTO.java

    package cloud.wconnect.workperformance.pojo.dto.hotelkpi.old.setting;

    import cloud.wconnect.commonlib.pojo.dto.jsonview.Views;
    import com.fasterxml.jackson.annotation.JsonView;
    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.Valid;
    import jakarta.validation.constraints.NotNull;

    /**
     * DTO: Hotel KPI Calculation Factor Title
     *
     * @author zc
     * @date 2024/08/06
     */
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public class HotelKpiSettingCalculationFactorDTO {

        /**
         * 坐标
         */
        @JsonView(Views.GeneralView.class)
        @NotNull(message = "The index cannot be null")
        @Range(min = 1, max = 2, message = "The index must be between [1, 2]")
        private Integer index;

        /**
         * 指标名称
         */
        @JsonView(Views.GeneralView.class)
        @Length(max = 50, message = "The title is limited 50 characters")
        private String title;

        /**
         * 值设置
         */
        @JsonView(Views.GeneralView.class)
        @Valid
        @NotNull(message = "The valueSetting cannot be null")
        private HotelKpiSettingCalculationFactorSettingDTO valueSetting;
    }