# SiteDataBO.java

    package cloud.wconnect.frontoffice.pojo.bo.clc;

    import cloud.wconnect.commonlib.annotation.validator.DigitsCustom;
    import cloud.wconnect.commonlib.annotation.validator.DigitsInteger;
    import cloud.wconnect.frontoffice.pojo.group.General;
    import lombok.Data;
    import org.hibernate.validator.constraints.Length;
    import org.hibernate.validator.constraints.Range;

    import jakarta.validation.constraints.*;
    import java.math.BigDecimal;

    /**
     * BO: Site Data
     *
     * @author yyt
     * 2023/7/27
     */
    @Data
    public class SiteDataBO {

        /**
         * 入住日期，格式（2023-07-01）
         */
        @NotBlank(message = "the checkInDate must not be blank")
        @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "The checkInDate format is incorrect, right format is [yyyy-MM-dd]")
        private String checkInDate;

        /**
         * 离开日期，格式（2023-07-01）
         */
        @NotBlank(message = "the checkOutDate must not be blank")
        @Pattern(regexp = "^\\d{4}-\\d{2}-\\d{2}$", message = "The checkOutDate format is incorrect, right format is [yyyy-MM-dd]")
        private String checkOutDate;

        /**
         * 房间号
         */
        @NotNull(message = "the roomNumber must not be null")
        @Length(max = 10, message = "the roomNumber max length is 10")
        private String roomNumber;

        /**
         * 客户姓名
         */
        @NotNull(message = "the customer must not be null")
        @Length(max = 60, message = "the customer max length is 60")
        private String customer;

        /**
         * Folio No.
         */
        @NotNull(message = "the folioNumber must not be null")
        @Length(max = 50, message = "the folioNumber max length is 50")
        private String folioNumber;

        /**
         * 房价（长度限制：整数位6，小数位2）
         */
        @DigitsInteger(integer = 8, message = "the rate is wrong format")
        @DigitsCustom(integer = 8, message = "the rate is wrong format", groups = General.class)
        private BigDecimal rate;

        /**
         * 过夜次数
         */
        @NotNull(message = "the nights must not be null")
        @Range(min = 0, max = 999, message = "the nights must be [0~999]")
        private Integer nights;

        /**
         * 是否退房
         */
        @NotNull(message = "the checkOut must not be null", groups = General.class)
        private Boolean checkOut;

    }