# BudgetDatabaseTitleEnum.java

    package cloud.wconnect.rateshop.cons.budgetdatabase;

    import lombok.AllArgsConstructor;
    import lombok.Getter;

    import java.util.HashMap;
    import java.util.Map;

    /**
     *
     * @author: yyt
     * 2025-09-11
     */
    @Getter
    @AllArgsConstructor
    public enum BudgetDatabaseTitleEnum {

        // 注意：增加类型时，需要修改 DESC_BY_CODE
        // rooms
        ROOM("room", "room"),
        // fb
        FB("fb", "fb"),
        // other
        OTHER("other", "other"),
        // total
        TOTAL("total", "budget-database.total"),
        // Total/Average
        TOTAL_AVERAGE("total/average", "total/average"),

        // {0} Budget Rooms
        // {0} Budget Rooms
        // % YOY Chg
        BUDGET_ROOMS("budget-rooms", "budget-rooms"),
        ACTUAL_ROOMS("actual-rooms", "actual-rooms"),
        YOY_CHG("yoy-chg", "yoy-chg"),

        // ${budgetYear} Budget ADR
        // ${actualYear} Actual ADR
        BUDGET_ADR("budget-adr", "budget-adr"),
        ACTUAL_ADR("actual-adr", "actual-adr"),

        // ${budgetYear} Budget Revenue
        // ${actualYear} Actual Revenue
        // % of Total
        BUDGET_REVENUE("budget-revenue", "budget-revenue"),
        ACTUAL_REVENUE("actual-revenue", "actual-revenue"),
        PERCENT_OF_TOTAL("percent-of-total", "percent-of-total"),

        // ${budgetYear} Budget Occ
        // ${actualYear} Actual Occ
        // Occ Change
        BUDGET_OCC("budget-occ", "budget-occ"),
        ACTUAL_OCC("actual-occ", "actual-occ"),
        OCC_CHANGE("occ-change", "occ-change"),

        // ${budgetYear} Budget RevPAR
        // ${actualYear} Actual RevPAR
        BUDGET_REVPAR("budget-revpar", "budget-revpar"),
        ACTUAL_REVPAR("actual-revpar", "actual-revpar"),

        // ${budgetYear} Budget RGI
        // ${actualYear} Actual RGI
        BUDGET_RGI("budget-rgi", "budget-rgi"),
        ACTUAL_RGI("actual-rgi", "actual-rgi"),

        // Projected ${actualYear} STR Revpar Index
        // Hotel RevPAR ${actualYear}
        // CS RevPAR ${actualYear}
        PROJECTED_STR_REVPAR_INDEX("projected-str-revpar-index", "projected-str-revpar-index"),
        HOTEL_REVPAR("hotel-revpar", "hotel-revpar"),
        CS_REVPAR("cs-revpar", "cs-revpar");

        private final String code;
        private final String desc;
        public static final Map<String, String> DESC_BY_CODE;
        static {
            DESC_BY_CODE = new HashMap<>();
            DESC_BY_CODE.put(ROOM.getCode(), ROOM.getDesc());
            DESC_BY_CODE.put(FB.getCode(), FB.getDesc());
            DESC_BY_CODE.put(OTHER.getCode(), OTHER.getDesc());
            DESC_BY_CODE.put(TOTAL.getCode(), TOTAL.getDesc());
        }

        public static String getDesc(String code) {
            return DESC_BY_CODE.get(code);
        }

    }