# ClcGuestInh.java

    package cloud.wconnect.frontoffice.entity.clc;

    import com.baomidou.mybatisplus.annotation.IdType;
    import com.baomidou.mybatisplus.annotation.TableField;
    import com.baomidou.mybatisplus.annotation.TableId;
    import com.baomidou.mybatisplus.annotation.TableName;
    import lombok.Data;
    import lombok.EqualsAndHashCode;
    import lombok.experimental.Accessors;

    import java.io.Serializable;

    /**
     * <p>
     *
     * </p>
     *
     * @author yyt
     * @since 2023-07-24
     */
    @Data
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    @TableName("clc_op_guest_inh")
    public class ClcGuestInh implements Serializable {

        private static final long serialVersionUID = 1L;

        /**
         * 每日人员入住信息
         */
        @TableId(value = "id", type = IdType.AUTO)
        private Long id;

        /**
         * 资产 id
         */
        @TableField("hotel_id")
        private Integer propertyId;

        /**
         * rate code
         */
        private String rateCode;

        /**
         * 入住日期
         */
        private Long checkInDate;

        /**
         * 退房日期
         */
        private Long checkOutDate;

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

        /**
         * first name
         */
        private String firstName;

        /**
         * last name
         */
        private String lastName;

        /**
         * 公司名称
         */
        private String companyName;

        /**
         * 创建人
         */
        private Integer createdBy;

        /**
         * 创建时间
         */
        private Long createdTime;

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

        public String getUniKeyForNameReversal() {
            return this.roomNumber + "&" + this.checkInDate + "&" + getFullNameReversal();
        }

        public String getFullName(){
            return this.firstName.toLowerCase().trim() + "," + this.lastName.toLowerCase().trim();
        }

        public String getFullNameReversal(){
            return this.lastName.toLowerCase().trim()+ "," + this.firstName.toLowerCase().trim();
        }

    }