# LogbookQuery.java

    package cloud.wconnect.frontoffice.pojo.query.logbook;

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

    import jakarta.validation.constraints.NotNull;
    import jakarta.validation.constraints.Null;

    /**
     * Query：Logbook
     *
     * @author yyt
     * 2023/3/18
     */
    @Data
    public class LogbookQuery {

        /**
         * 开始日期
         */
        private Long fromDate;

        /**
         * 截止日期
         */
        private Long toDate;

        /**
         * 房间号
         */
        private String room;

        /**
         * 关键字
         */
        private String keyword;

        /**
         * 分类
         */
        private Integer category;

        /**
         * 状态
         */
        private Boolean status;

        /**
         * 排序列（1：创建时间， 2：房间号）
         */
        @NotNull(message = "the sortWay must not be null")
        @Range(min = 1, max = 2, message = "the sortWay must is 1~2")
        private Integer sortWay;

        public static int SORT_BY_CREATE_TIME = 1;

        public static int SORT_BY_ROOM = 2;

        /**
         * 1：正序，2：倒序
         */
        @NotNull(message = "the sort must not be null")
        @Range(min = 1, max = 2, message = "the sort must is 1~2")
        private Integer sort;

        public static int ASC = 1;

        public static int DESC = 2;

        /**
         * 页码
         */
        @NotNull(message = "the page must not be null")
        private Integer page;

        /**
         * 每页条数
         */
        @NotNull(message = "the size must not be null")
        private Integer size;

        /**
         * 优先级
         */
        private Integer priority;

        /**
         * 客户名称
         */
        private String customer;

        /**
         * 资产 id (xml 检索使用)
         */
        @Null(message = "the propertyId must be null")
        private Integer propertyId;

    }