# GuestInHouseBO.java

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

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

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

    /**
     * BO: Guest In House
     *
     * @author yyt
     * 2023/7/28
     */
    @Data
    public class GuestInHouseBO {

        /**
         * rate code
         */
        @NotBlank(message = "the rateCode must not be blank")
        @Length(max = 10, message = "the rateCode max length 10")
        private String rateCode;

        /**
         * 公司名称
         */
        @NotBlank(message = "the companyName must not be blank")
        @Length(max = 60, message = "the companyName max length 60")
        private String companyName;

        /**
         * 入住日期，格式（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 checkInDate format is incorrect, right format is [yyyy-MM-dd]")
        private String checkOutDate;

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

        /**
         * first name
         */
        @NotBlank(message = "the firstName must not be blank")
        @Length(max = 60, message = "the firstName max length 60")
        private String firstName;

        /**
         * last name
         */
        @NotBlank(message = "the lastName must not be blank")
        @Length(max = 60, message = "the lastName max length 60")
        private String lastName;

        public String getFirstName() {
            return this.firstName.trim();
        }

        public String getLastName() {
            return this.lastName.trim();
        }

        public String getUniKey() {
            return this.firstName + "&" + this.lastName + "&" + this.roomNumber + "&" + this.checkInDate;
        }

    }