# HistoryRateNextNDaysManual.java

    package cloud.wconnect.rateshop.entity.revenue;

    import com.baomidou.mybatisplus.annotation.*;

    import java.io.Serializable;
    import java.math.BigDecimal;
    import java.util.List;

    import com.google.common.collect.Lists;
    import lombok.Getter;
    import lombok.Setter;
    import lombok.experimental.Accessors;
    import org.apache.commons.lang3.StringUtils;

    /**
     * <p>
     * 酒店当日的未来N天的历史房价
     * </p>
     *
     * @author lichen
     * @since 2024-03-25
     */
    @Getter
    @Setter
    @Accessors(chain = true)
    @TableName("history_rate_next_n_days_manual")
    public class HistoryRateNextNDaysManual implements Serializable {

        private static final long serialVersionUID = 1L;

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

        /**
         * 所属租户id
         */
        private Integer tenantId;

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

        /**
         * 目标酒店id
         */
        private Integer hotelId;

        /**
         * 币种id
         */
        private Integer currencyId;

        /**
         * 原点日期（YYYYMMDD）
         */
        private Integer targetDate;

        /**
         * 入住日期（YYYYMMDD）
         */
        private Integer checkInDate;

        /**
         * 平台id
         */
        @TableField(updateStrategy = FieldStrategy.ALWAYS)
        private Integer platformId;

        /**
         * 税前(不含税)房价
         */
        @TableField(updateStrategy = FieldStrategy.ALWAYS)
        private String rate;

        /**
         * 税后(含税)房价
         */
        @TableField(updateStrategy = FieldStrategy.ALWAYS)
        private String afterTaxRate;

        /**
         * [{uid: 1, timestamp:11111},…]
         */
        private String updateLog;

        /**
         * 房价类型 1-早鸟价 2-BAR房价
         */
        private Integer rateType;

        /**
         * 来源 1:本资产录入 2:其他资产录入
         */
        private Integer source;

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

        /**
         * 根据唯一索引生成key
         *
         * @return java.lang.String
         * @author lichen
         * @date 2024/5/17
         */
        public String generate() {
            List<String> list = Lists.newArrayList(targetDate, hotelId, checkInDate, propertyId, currencyId, rateType, pos)
                    .stream().map(Object::toString).toList();
            return StringUtils.join(list, "_");
        }
    }