# HotelKpiSettingMetricsDTO.java

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

    import cloud.wconnect.workperformance.pojo.dto.hotelkpi.kpi.HotelKpiComparisonRuleDTO;
    import jakarta.validation.Valid;
    import jakarta.validation.constraints.NotBlank;
    import jakarta.validation.constraints.NotNull;
    import lombok.AllArgsConstructor;
    import lombok.Builder;
    import lombok.Data;
    import lombok.NoArgsConstructor;
    import org.hibernate.validator.constraints.Length;

    /**
     * DTO: Hotel KPI Setting Metrics
     *
     * @author zc
     * @date 2024/06/24
     */
    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public class HotelKpiSettingMetricsDTO {

        /**
         * 指标 id
         */
        private Integer metricsId;

        /**
         * 指标类型
         */
        @NotNull(message = "The metricsType cannot be null")
        private Integer metricsType;

        /**
         * 指标名称
         */
        @NotBlank(message = "The title cannot be blank")
        @Length(max = 200, message = "The title is limited 200 characters")
        private String title;

        /**
         * 单位符号
         */
        @Length(max = 10, message = "The unit is limited 10 characters")
        private String unit;

        /**
         * 指标描述
         */
        @Length(max = 500, message = "The description is limited 500 characters")
        private String description;

        /**
         * Actual 计算规则
         */
        private Integer actualRuleCategory;

        /**
         * Target 计算规则
         */
        private Integer targetRuleCategory;

        /**
         * 比较设置
         */
        @Valid
        @NotNull(message = "The comparisonSetting cannot be null")
        private HotelKpiComparisonRuleDTO comparisonSetting;

        /**
         * 数据来源 json
         */
        private String dataSource;
    }