Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| booking_id | int4 | 10 | null |
|
|
|||||||||||||||
| booking_seq | int4 | 10 | null |
|
|
|||||||||||||||
| rateplan_id | int4 | 10 | null |
|
|
|||||||||||||||
| roomtype_id | int4 | 10 | null |
|
|
|||||||||||||||
| bedtype_id | int4 | 10 | √ | null |
|
|
||||||||||||||
| arrival | date | 13 | null |
|
|
|||||||||||||||
| departure | date | 13 | null |
|
|
|||||||||||||||
| qty | int2 | 5 | null |
|
|
|||||||||||||||
| adult | int2 | 5 | 2 |
|
|
|||||||||||||||
| child | int2 | 5 | 0 |
|
|
|||||||||||||||
| infant | int2 | 5 | 0 |
|
|
|||||||||||||||
| allot_qty | int2 | 5 | √ | 0 |
|
|
||||||||||||||
| block_qty | int2 | 5 | 0 |
|
|
|||||||||||||||
| inhouse_qty | int2 | 5 | 0 |
|
|
|||||||||||||||
| charge_to | bpchar | 1 | 'B'::bpchar |
|
|
|||||||||||||||
| extra_adult | int2 | 5 | 0 |
|
|
|||||||||||||||
| extra_child | int2 | 5 | 0 |
|
|
|||||||||||||||
| extra_infant | int2 | 5 | 0 |
|
|
|||||||||||||||
| no_amend | bool | 1 | √ | false |
|
|
||||||||||||||
| no_cancel | bool | 1 | √ | false |
|
|
||||||||||||||
| no_refund | bool | 1 | √ | false |
|
|
||||||||||||||
| room_numbers | text | 2147483647 | √ | null |
|
|
||||||||||||||
| rate_id | int4 | 10 | √ | null |
|
|
||||||||||||||
| item_id | int4 | 10 | √ | null |
|
|
||||||||||||||
| rooms | _text | 2147483647 | √ | null |
|
|
||||||||||||||
| promotion_id | int4 | 10 | √ | null |
|
|
||||||||||||||
| noshow_qty | int2 | 5 | 0 |
|
|
|||||||||||||||
| pax | text | 2147483647 | √ | fn_pax((adult + extra_adult), (child + extra_child), (infant + extra_infant)) |
|
|
||||||||||||||
| mealtype_id | int4 | 10 | √ | null |
|
|
||||||||||||||
| included_adult | int2 | 5 | √ | (adult - extra_adult) |
|
|
||||||||||||||
| included_child | int2 | 5 | √ | (child - extra_child) |
|
|
||||||||||||||
| included_infant | int2 | 5 | √ | (infant - extra_infant) |
|
|
||||||||||||||
| room_charge | t_money | 15,2 | √ | null |
|
|
||||||||||||||
| other_charge | t_money | 15,2 | √ | null |
|
|
||||||||||||||
| extra_charge | t_money | 15,2 | √ | null |
|
|
||||||||||||||
| total_charge | t_money | 15,2 | √ | ((COALESCE((room_charge)::numeric, (0)::numeric) + COALESCE((other_charge)::numeric, (0)::numeric)) + COALESCE((extra_charge)::numeric, (0)::numeric)) |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| pk_booking_items | Primary key | Asc | item_id |
| idx_booking_items_bedtype_id | Performance | Asc | bedtype_id |
| idx_booking_items_booking_id | Performance | Asc | booking_id |
| idx_booking_items_mealtype_id | Performance | Asc | mealtype_id |
| idx_booking_items_promotion_id | Performance | Asc | promotion_id |
| idx_booking_items_rateplan_id | Performance | Asc | rateplan_id |
| idx_booking_items_roomtype_id | Performance | Asc | roomtype_id |
| unq_booking_items | Must be unique | Asc/Asc | booking_id + booking_seq |

