# RateRuleDTO.java

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

    import cloud.wconnect.commonlib.annotation.validator.DigitsCustom;
    import lombok.Data;
    import org.hibernate.validator.constraints.Range;

    import jakarta.validation.constraints.DecimalMin;
    import jakarta.validation.constraints.NotNull;
    import java.math.BigDecimal;

    /**
     * alert-房价规则 DTO
     *
     * @author lichen
     * @date 2024/5/14
     */
    @Data
    public class RateRuleDTO {

        /**
         * 房价类型
         */
        @NotNull(message = "The rateType cannot be null")
        @Range(min = 1, max = 2, message = "The rateType must between in [1:early bird rate 2:best available rate]")
        private Integer rateType;

        /**
         * 状态
         */
        @NotNull(message = "The status cannot be null")
        @Range(min = 0, max = 1, message = "The status must between in [1:enable 0:disable]")
        private Integer status;

        /**
         * 价格变化幅度
         */
        @DigitsCustom(integer = 7, message = "The priceChangeRange is wrong format")
        @DecimalMin(value = "0", message = "The priceChangeRange must be greater than 0")
        private BigDecimal priceChangeRange;

    }