# AlertRuleDTO.java

    package cloud.wconnect.rateshop.pojo.dto.rateshop.alertmessage.alertrule;

    import jakarta.validation.Valid;
    import jakarta.validation.constraints.NotEmpty;
    import jakarta.validation.constraints.NotNull;
    import jakarta.validation.constraints.Size;
    import lombok.Data;

    import java.util.List;

    /**
     * alert 规则
     *
     * @author lichen
     * @date 2024/5/14
     */
    @Data
    public class AlertRuleDTO {

        /**
         * 需求趋势规则
         */
        @Valid
        @NotNull(message = "The marketDemandRule cannot be null")
        private MarketDemandRuleDTO marketDemandRule;

        /**
         * 最低房价价格变化的规则
         */
        @NotEmpty(message = "The rateRule cannot be empty")
        @Size(min = 1, max = 2, message = "The rateRule size must between in [1,2]")
        @Valid
        private List<RateRuleDTO> rateRule;

        /**
         * 酒店sold out的规则
         */
        @Valid
        @NotNull(message = "The soldOutRule cannot be null")
        private SoldOutRuleDTO soldOutRule;

        /**
         * iwc变化的规则
         */
        @Valid
        @NotNull(message = "The iwcRule cannot be null")
        private IwcRuleDTO iwcRule;

        /**
         * 状态1：启用 0：停用
         */
        public static final int ENABLE = 1;
        public static final int DISABLE = 0;

    }