# ExportQuery.java

    package cloud.wconnect.rateshop.pojo.query.rateshop;

    import lombok.Data;
    import org.hibernate.validator.constraints.Range;

    import jakarta.validation.constraints.NotBlank;
    import jakarta.validation.constraints.NotNull;
    import jakarta.validation.constraints.Pattern;

    /**
     * 房价查询query
     *
     * @author lichen
     * @date 2023/6/9
     */
    @Data
    public class ExportQuery {

        /**
         * 起始日期
         */
        @NotBlank(message = "The fromDate cannot be blank")
        @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "The fromDate format is incorrect, right format is [yyyy-MM-dd]")
        private String fromDate;

        /**
         * 结束日期
         */
        @NotBlank(message = "The toDate cannot be blank")
        @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "The toDate format is incorrect, right format is [yyyy-MM-dd")
        private String toDate;

        /**
         * 房价类型
         */
        @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;

        /**
         * 数据源ID
         */
        @Range(min = 1, max = 5, message = "the datasourceId must between in [1:google 2:Expedia 3:Optimand 4:Merlin 5:Lighthouse]")
        private Integer datasourceId;

        /**
         * 平台id
         */
        private Integer platform;

        /**
         * 类型编号（0标识any）
         */
        @NotNull(message = "The type cannot be null")
        private Integer type;

    }