# RoomInfo.java

    package cloud.wconnect.rateshop.entity.rateshop;

    import com.baomidou.mybatisplus.annotation.IdType;
    import com.baomidou.mybatisplus.annotation.TableId;
    import java.io.Serializable;
    import lombok.Data;
    import lombok.EqualsAndHashCode;
    import lombok.experimental.Accessors;

    /**
     * <p>
     * 房型 实体类
     * </p>
     *
     * @author lichen
     * @since 2023-06-06
     */
    @Data
    @EqualsAndHashCode(callSuper = false)
    @Accessors(chain = true)
    public class RoomInfo implements Serializable {

        private static final long serialVersionUID = 1L;

        @TableId(value = "id", type = IdType.AUTO)
        private Integer id;

        private Integer hotelId;

        private Integer platformId;

        /**
         * 实际房型名称
         */
        private String room;

        /**
         * 销售地区。us：美国 tw：台湾
         */
        private String pos;

        /**
         * 用hotelId + platformId + room 生成唯一的key
         *
         * @return java.lang.String
         * @author lichen
         * @date 2023/6/6
         */
        public String generateKey(){
            StringBuilder stringBuilder = new StringBuilder();
            return stringBuilder
                    .append(hotelId.toString())
                    .append("_")
                    .append(platformId.toString())
                    .append("_")
                    .append(pos)
                    .append("_")
                    .append(room.toLowerCase())
                    .toString();
        }

    }