Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| code | citext | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| name | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| plan_type | int2 | 5 | √ | null |
|
|
1: Manual Rate |
||||||||||||||||||||||||||||||||||
| start_date | date | 13 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| end_date | date | 13 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| description | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| link_plan_id | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| link_adjust_type | int2 | 5 | √ | null |
|
|
1 = Same rate 2 = Adjust percent 3 = Adjust amount 4 = Adjust percent then amount 5 = Asjust amount then percent |
||||||||||||||||||||||||||||||||||
| link_adjust_amt | t_money | 15,2 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| min_stay | int2 | 5 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| max_stay | int2 | 5 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| min_adv_book | int2 | 5 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| max_adv_book | int2 | 5 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| rate_child | t_money | 15,2 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| rate_infant | t_money | 15,2 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| rate_extrabed | t_money | 15,2 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| rate_abf | t_money | 15,2 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| rate_lunch | t_money | 15,2 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| rate_dinner | t_money | 15,2 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| origin_id | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| market_id | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| enabled | bool | 1 | √ | true |
|
|
|||||||||||||||||||||||||||||||||||
| order_seq | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| link_adjust_percent | t_money | 15,2 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| occ_based | bool | 1 | √ | false |
|
|
|||||||||||||||||||||||||||||||||||
| no_amend | bool | 1 | √ | false |
|
|
|||||||||||||||||||||||||||||||||||
| no_cancel | bool | 1 | √ | false |
|
|
|||||||||||||||||||||||||||||||||||
| no_refund | bool | 1 | √ | false |
|
|
|||||||||||||||||||||||||||||||||||
| book_start_date | date | 13 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| book_end_date | date | 13 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| stay_start_date | date | 13 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| stay_end_date | date | 13 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| days | _bool | 1 | √ | ARRAY[true, true, true, true, true, true, true] |
|
|
|||||||||||||||||||||||||||||||||||
| room_charge_dept | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| comp | bool | 1 | false |
|
|
||||||||||||||||||||||||||||||||||||
| comp_abf | bool | 1 | false |
|
|
||||||||||||||||||||||||||||||||||||
| day_sun | bool | 1 | √ | COALESCE(days[1], true) |
|
|
|||||||||||||||||||||||||||||||||||
| day_mon | bool | 1 | √ | COALESCE(days[2], true) |
|
|
|||||||||||||||||||||||||||||||||||
| day_tue | bool | 1 | √ | COALESCE(days[3], true) |
|
|
|||||||||||||||||||||||||||||||||||
| day_wed | bool | 1 | √ | COALESCE(days[4], true) |
|
|
|||||||||||||||||||||||||||||||||||
| day_thu | bool | 1 | √ | COALESCE(days[5], true) |
|
|
|||||||||||||||||||||||||||||||||||
| day_fri | bool | 1 | √ | COALESCE(days[6], true) |
|
|
|||||||||||||||||||||||||||||||||||
| day_sat | bool | 1 | √ | COALESCE(days[7], true) |
|
|
|||||||||||||||||||||||||||||||||||
| rate_type | bpchar | 2147483647 | √ | 'D'::bpchar |
|
|
D = Daily M = Monthly W = Weekly |
||||||||||||||||||||||||||||||||||
| min_rate | t_money | 15,2 | √ | null |
|
|
minimum rate amount |
||||||||||||||||||||||||||||||||||
| rategroup_id | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| channel_linked | bool | 1 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| channel_code | text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| mealtype_id | int4 | 10 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| channel_codes | _text | 2147483647 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| has_active_child | bool | 1 | √ | null |
|
|
|||||||||||||||||||||||||||||||||||
| mapped_channels | int4 | 10 | √ | 0 |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| rateplan_pkey | Primary key | Asc | id |
| idx_rate_plan_mealtype_id | Performance | Asc | mealtype_id |
| idx_rate_plan_rategroup_id | Performance | Asc | rategroup_id |
| rate_plan_link_plan_id_idx | Performance | Asc | link_plan_id |
| rate_plan_market_id_idx | Performance | Asc | market_id |
| rate_plan_origin_id_id_idx | Performance | Asc | origin_id |
| rateplan_code_key | Must be unique | Asc | code |

