Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| id | int4 | 10 | √ | null |
|
|
|||||
| date_ref | date | 13 | null |
|
|
||||||
| room_id | int4 | 10 | √ | null |
|
|
|||||
| room_number | t_room_number | 2147483647 | √ | null |
|
|
|||||
| room_status | bpchar | 3 | null |
|
|
||||||
| hk_status | bpchar | 2 | √ | null |
|
|
|||||
| roomtype_id | int4 | 10 | √ | null |
|
|
|||||
| bedtype_id | int4 | 10 | √ | null |
|
|
|||||
| location_id | int4 | 10 | √ | null |
|
|
|||||
| building_id | int4 | 10 | √ | null |
|
|
|||||
| exposure_id | int4 | 10 | √ | null |
|
|
|||||
| register_id | int4 | 10 | √ | null |
|
|
|||||
| booking_id | int4 | 10 | √ | null |
|
|
|||||
| book_type | bpchar | 1 | √ | null |
|
|
|||||
| bool | 1 | √ | false |
|
|
||||||
| house_used | bool | 1 | √ | false |
|
|
|||||
| walk_in | bool | 1 | √ | false |
|
|
|||||
| comp | bool | 1 | √ | false |
|
|
|||||
| day_used | bool | 1 | √ | false |
|
|
|||||
| rateplan_id | int4 | 10 | √ | null |
|
|
|||||
| stay_type | bpchar | 1 | √ | null |
|
|
|||||
| start_date | date | 13 | √ | null |
|
|
|||||
| end_date | date | 13 | √ | null |
|
|
|||||
| in_house_qty | int2 | 5 | √ | 0 |
|
|
|||||
| day_used_qty | int2 | 5 | √ | 0 |
|
|
|||||
| adult | int2 | 5 | √ | 0 |
|
|
|||||
| child | int2 | 5 | √ | 0 |
|
|
|||||
| infant | int2 | 5 | √ | 0 |
|
|
|||||
| extra_adult | int2 | 5 | √ | 0 |
|
|
|||||
| extra_child | int2 | 5 | √ | 0 |
|
|
|||||
| extra_infant | int2 | 5 | √ | 0 |
|
|
|||||
| room_rate | t_money | 15,2 | √ | null |
|
|
|||||
| extra_adult_rate | t_money | 15,2 | √ | null |
|
|
|||||
| extra_child_rate | t_money | 15,2 | √ | null |
|
|
|||||
| extra_infant_rate | t_money | 15,2 | √ | null |
|
|
|||||
| promotion_id | int4 | 10 | √ | null |
|
|
|||||
| channel_id | int4 | 10 | √ | null |
|
|
|||||
| origin_id | int4 | 10 | √ | null |
|
|
|||||
| sales_id | int4 | 10 | √ | null |
|
|
|||||
| market_id | int4 | 10 | √ | null |
|
|
|||||
| rsvtype_id | int4 | 10 | √ | null |
|
|
|||||
| advance_book_period | int4 | 10 | √ | 0 |
|
|
|||||
| return_guest | bool | 1 | √ | false |
|
|
|||||
| guest_id | int4 | 10 | √ | null |
|
|
|||||
| guest_sex | bpchar | 1 | √ | null |
|
|
|||||
| guest_age | int4 | 10 | √ | null |
|
|
|||||
| guest_nation_id | int4 | 10 | √ | null |
|
|
|||||
| guest_lang_id | int4 | 10 | √ | null |
|
|
|||||
| guest_country_id | int4 | 10 | √ | null |
|
|
|||||
| guest_country_res_id | int4 | 10 | √ | null |
|
|
|||||
| guest_city_id | int4 | 10 | √ | null |
|
|
|||||
| guest_occupation_id | int4 | 10 | √ | null |
|
|
|||||
| guest_vip_id | int4 | 10 | √ | null |
|
|
|||||
| guest_name | text | 2147483647 | √ | null |
|
|
|||||
| guest_member_code | text | 2147483647 | √ | null |
|
|
|||||
| accno | varchar | 2147483647 | √ | null |
|
|
|||||
| mealtype_id | int4 | 10 | √ | null |
|
|
|||||
| room_charge | t_money | 15,2 | √ | null |
|
|
|||||
| rate_breakdown | jsonb | 2147483647 | √ | null |
|
|
|||||
| revenue_breakdown | jsonb | 2147483647 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_room_summary | Primary key | Asc | id |
| idx_room_summary_bedtype_id | Performance | Asc | bedtype_id |
| idx_room_summary_building_id | Performance | Asc | building_id |
| idx_room_summary_channel_id | Performance | Asc | channel_id |
| idx_room_summary_date_ref | Performance | Asc | date_ref |
| idx_room_summary_exposure_id | Performance | Asc | exposure_id |
| idx_room_summary_guest_city_id | Performance | Asc | guest_city_id |
| idx_room_summary_guest_country_id | Performance | Asc | guest_country_id |
| idx_room_summary_guest_country_res_id | Performance | Asc | guest_country_res_id |
| idx_room_summary_guest_lang_id | Performance | Asc | guest_lang_id |
| idx_room_summary_guest_nation_id | Performance | Asc | guest_nation_id |
| idx_room_summary_guest_occupation_id | Performance | Asc | guest_occupation_id |
| idx_room_summary_guest_vip_id | Performance | Asc | guest_vip_id |
| idx_room_summary_location_id | Performance | Asc | location_id |
| idx_room_summary_market_id | Performance | Asc | market_id |
| idx_room_summary_origin_id | Performance | Asc | origin_id |
| idx_room_summary_promotion_id | Performance | Asc | promotion_id |
| idx_room_summary_rateplan_id | Performance | Asc | rateplan_id |
| idx_room_summary_room_id | Performance | Asc | room_id |
| idx_room_summary_room_staus | Performance | Asc | room_status |
| idx_room_summary_roomtype_id | Performance | Asc | roomtype_id |
| idx_room_summary_rsvtype_id | Performance | Asc | rsvtype_id |
| idx_room_summary_sales_id | Performance | Asc | sales_id |
| unq_room_summary | Must be unique | Asc/Asc/Asc | date_ref + register_id + guest_id |



