# PastReservationOpGuestinHouse.java

    package cloud.wconnect.frontoffice.entity.pastreservation;

    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.Getter;
    import lombok.Setter;
    import lombok.experimental.Accessors;

    import java.io.Serializable;

    /**
     * <p>
     * 酒店在住客人信息
     * </p>
     *
     * @author yyt
     * @since 2024-10-01
     */
    @Getter
    @Setter
    @Accessors(chain = true)
    @TableName("past_reservation_op_guestin_house")
    public class PastReservationOpGuestinHouse implements Serializable {

        private static final long serialVersionUID = 1L;

        /**
         * 主键id
         */
        @TableId(value = "id", type = IdType.AUTO)
        private Long id;

        /**
         * 资产 id
         */
        private Integer propertyId;

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

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

        /**
         * full name
         */
        private String fullName;

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

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

        /**
         * 离店日期
         */
        private Long checkOutDate;

        /**
         * 关联组Key
         */
        private String groupKey;

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

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

        /**
         * 修改人
         */
        private Integer updatedBy;

        /**
         * 修改时间
         */
        private Long updatedTime;

        /**
         * '删除（0：否，1：是）
         */
        private Boolean deleted;

        /**
         * 删除人
         */
        private Integer deletedBy;

        /**
         * 删除时间
         */
        private Long deletedTime;

        /**
         * 状态
         */
        private Integer status;

        /**
         * 状态操作人
         */
        private Integer statusSetBy;

        /**
         * 状态操作时间
         */
        private Long statusSetTime;

        /**
         * 新组id
         */
        @TableField(exist = false)
        private String newGroupKey;

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

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

        public String getUniKey() {
            return formatFirstName() + "&" + formatLastName() + "&" + this.getRoomNumber().trim() + "&" + this.getCheckInDate() + "&" + this.getCheckOutDate();
        }

        public String getNameAndRoomNumber() {
            return formatFirstName() + "&" + formatLastName() + "&" + this.getRoomNumber().trim();
        }

        public String getNameReversalAndRoomNumber() {
            return formatLastName() + "&" + formatFirstName() + "&" + this.getRoomNumber().trim();
        }

        public String getUniKeyForNameReversal() {
            return formatLastName() + "&" + formatFirstName() + "&" + this.getRoomNumber().trim() + "&" + this.getCheckInDate() + "&" + this.getCheckOutDate();
        }

        public String getGuestName() {
            return formatFirstName() + "," + formatLastName();
        }

        public String getGuestNameReversal() {
            return formatLastName() + "," + formatFirstName();
        }

    }