booking

14162 rows


Columns

Column Type Size Nulls Auto Default Children Parents Comments
id int4 10 √ null
attachment.booking_id fk_attachment_booking_id C
booking_guests.booking_id fk_booking_guests_booking_id C
booking_items.booking_id fk_booking_items_booking_id C
booking_msg_guests.booking_id booking_msg_guests_fk C
charge_schedule.booking_id fk_charge_schedule_booking_id C
deposit.booking_id fk_deposit_booking_id C
folio.booking_id fk_folio_booking_id R
guest_messages.booking_id fk_guest_messages_booking_id C
guest_request.booking_id fk_guest_request_booking_id C
guest_signature.booking_id guest_signature_booking_id_fkey C
intf_keycard_logs.booking_id intf_room_booking_id_fk C
precheckin_consent_logs.booking_id precheckin_consent_logs_booking_id_fkey R
precheckin_legal_acceptance.booking_id precheckin_legal_acceptance_booking_id_fkey R
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
reservation_type.id fk_booking_rsvtype_id R
book_type bpchar 1 'I'::bpchar

I = Individual, G = Group

book_by text 2147483647 √ null
guest_id int4 10 √ null
guest.id fk_booking_guest_id R
group_id int4 10 √ null
group_info.id fk_booking_group_id R
party_id int4 10 √ null
party.id fk_booking_party_id R
member_code citext 2147483647 √ null
channel_id int4 10 √ null
channel.id fk_booking_channel_id R
origin_id int4 10 null
origin.id fk_booking_origin_id R
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
folio_pattern.id fk_booking_folpat_id R
voucher_no citext 2147483647 √ null
promo_code citext 2147483647 √ null
payment_method bpchar 3 √ null
flags text 2147483647 √ null
sales_id int4 10 √ null
sales_staff.id fk_booking_sales_id N
market_id int4 10 √ null
market.id fk_booking_market_id N
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
rebook_date date 13 √ null
noshow_date date 13 √ null
namelist_created bool 1 false

true = name list has been created for this group booking

precheckin_reminder_date date 13 √ null

วัน arrival ที่ส่งอีเมล pre-check-in reminder ไปแล้ว (ไม่ใช่วันที่ส่ง) — ค่าที่ต่างจาก arrival ปัจจุบัน = ยังไม่ได้ส่งสำหรับวันนั้น เขียนโดย sp_send_precheckin_reminder

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

Relationships