# HotelKpiV2ComparisonRuleDetailDTO.java

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

    import cloud.wconnect.commonlib.annotation.validator.DigitsCustom;
    import cloud.wconnect.commonlib.annotation.validator.inlist.InList;
    import cloud.wconnect.workperformance.cons.hotelkpi.comparison.HotelKpiJudgmentCons;
    import jakarta.validation.constraints.NotBlank;
    import jakarta.validation.constraints.NotNull;
    import lombok.Data;

    import java.math.BigDecimal;

    /**
     * DTO: Hotel KPI V2 Comparison Rule Detail
     *
     * @author zc
     * @date 2025/08/19
     */
    @Data
    public class HotelKpiV2ComparisonRuleDetailDTO {

        /**
         * Threshold
         */
        @NotNull(message = "The threshold cannot be null")
        @DigitsCustom(integer = 3, message = "The threshold is wrong format")
        private BigDecimal threshold;

        /**
         * % Chg Greater threshold is good or bad
         */
        @NotBlank(message = "The greaterJudgment cannot be blank")
        @InList(stringValue = {HotelKpiJudgmentCons.GOOD, HotelKpiJudgmentCons.BAD}, message = "The greaterJudgment is wrong")
        private String greaterJudgment;
    }