Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| status | bpchar | 1 | 'R'::bpchar |
|
|
R = Reserved C = Confirmed W = Waiting List X = Cancelled N = No-Show I = In-house O = Checked Out |
||||||||||||||||||||||||||||||||
| rsvtype_id | int4 | 10 | null |
|
|
|||||||||||||||||||||||||||||||||
| book_type | bpchar | 1 | 'I'::bpchar |
|
|
I = Individual, G = Group |
||||||||||||||||||||||||||||||||
| book_by | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| guest_id | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| group_id | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| party_id | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| member_code | citext | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| channel_id | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| origin_id | int4 | 10 | null |
|
|
|||||||||||||||||||||||||||||||||
| arrival | date | 13 | null |
|
|
|||||||||||||||||||||||||||||||||
| arrival_time | time | 15,6 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| arrive_by | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| arrive_from | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| departure | date | 13 | null |
|
|
|||||||||||||||||||||||||||||||||
| departure_time | time | 15,6 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| depart_by | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| depart_to | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| folio_pattern_id | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| voucher_no | citext | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| promo_code | citext | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| payment_method | bpchar | 3 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| flags | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| sales_id | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| market_id | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| create_user | citext | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| create_time | timestamptz | 35,6 | √ | CURRENT_TIMESTAMP |
|
|
||||||||||||||||||||||||||||||||
| modify_user | citext | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| modify_time | timestamptz | 35,6 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| cancel_user | citext | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| cancel_time | timestamptz | 35,6 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| msg_count | int4 | 10 | √ | 0 |
|
|
||||||||||||||||||||||||||||||||
| flag_count | int4 | 10 | √ | 0 |
|
|
||||||||||||||||||||||||||||||||
| stay_type | bpchar | 1 | √ | 'D'::bpchar |
|
|
D=Daily, W=Weekly, M=Monthly |
|||||||||||||||||||||||||||||||
| accno | int4 | 10 | √ | null |
|
|
reference to old Fromas system |
|||||||||||||||||||||||||||||||
| confirm_no | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| folio_id | int4 | 10 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| credit_limit | t_money | 15,2 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| confirm_remark | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| confirm_user | citext | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| confirm_time | timestamptz | 35,6 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| note | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| book_date | date | 13 | √ | fn_system_date() |
|
|
||||||||||||||||||||||||||||||||
| cancel_reason | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| booking_name | text | 2147483647 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| 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)) |
|
|
||||||||||||||||||||||||||||||||
| total_deposit | t_money | 15,2 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| cancel_date | date | 13 | √ | null |
|
|
||||||||||||||||||||||||||||||||
| channel_booking_id | text | 2147483647 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| booking_pkey | Primary key | Asc | id |
| idx_booking_accno | Performance | Asc | accno |
| idx_booking_channel_id | Performance | Asc | channel_id |
| idx_booking_folpat_id | Performance | Asc | folio_pattern_id |
| idx_booking_group_id | Performance | Asc | group_id |
| idx_booking_guest_id | Performance | Asc | guest_id |
| idx_booking_market_id | Performance | Asc | market_id |
| idx_booking_origin_id | Performance | Asc | origin_id |
| idx_booking_party_id | Performance | Asc | party_id |
| idx_booking_rsvtype_id | Performance | Asc | rsvtype_id |
| idx_booking_sales_id | Performance | Asc | sales_id |

