Tables


SchemaSpy Analysis of aonestar.public

Generated on Mon Jul 27 23:00 ICT 2026

XML Representation
Insertion Order Deletion Order
TABLES 171
VIEWS 5
COLUMNS 2279
Constraints 240
Anomalies 39
Routines 632

Database Properties

Database Type: PostgreSQL - 18.3 (Debian 18.3-1.pgdg12+1)

Schema public

standard public schema

Tables

Table / View Children Parents Columns Rows Type Comments
calendar_event 0 2 13 0 Table

An event / holiday in a calendar. end_date NULL = single day; set for ranges (season / multi-day).

settings_log 0 0 18 96284 Table
tax_details 0 2 3 5 Table
followup_status 1 0 2 2 Table

Create by KenG (2020/03/10), Status of follow up

rate_daily 0 2 14 53987 Table
flyway_schema_history 0 0 10 343 Table
registration_rates 0 6 31 26863 Table
deposit 0 3 26 179 Table
registration_history 0 0 60 0 Table
guest_request 0 5 16 14547 Table
z_region 0 0 4 3887 Table
yield_rule 2 0 6 0 Table
z_country 0 0 3 230 Table
channel_mapping 0 0 7 1 Table
rate_channels 0 2 2 0 Table
guest_signature 0 4 10 0 Table

Signature per stay/transaction: register_id=register card, folio_item_id=folio payment, booking_id=pre-check-in/tablet before check-in.

inclusion 3 2 10 18 Table
channel_type 1 0 2 13 Table
registration 17 16 74 12123 Table
x_recap 0 0 40 4712 Table
age_range 0 0 4 5 Table
guest_consent_logs 0 2 7 0 Table

ตารางบันทึกประวัติประทับตราเวลาการกดยอมรับนโยบายของแขกแต่ละคนตามกฎหมาย PDPA

language 5 0 5 92 Table
folio_details 0 2 3 394529 Table
room_type 11 1 26 8 Table

max_adult, max_child, max_infant, max_pax: * 0 = not allow for booking * NULL = always allow (no maximum check)

market 8 0 3 15 Table
guest_log 0 0 18 1 Table
cash_sale 0 1 10 53 Table
department 11 2 12 58 Table
intf_sync_channel_logs 0 1 14 230019 Table
channel 10 7 30 3912 Table
registration_recent 0 0 60 0 Table
room_restriction 0 1 9 64 Table
wakeup_call 0 2 9 0 Table

PMS wakeup-call source records for PABX integration.

outstanding 0 0 20 3 Table
room_activity 0 0 14 2501 Table
rate_inclusion 0 3 5 9 Table
calendar 2 0 8 0 Table

A named calendar (e.g. “Thai Public Holidays”). Groups calendar_event rows.

booking_msg_guests 0 1 5 0 Table
regis 0 0 60 0 Table
nationality 5 2 12 266 Table
party 1 0 3 0 Table
channel_rates 0 4 12 0 Table
roomactivity 0 0 51 0 Table
rate_group 1 0 2 7 Table
room_status 0 1 13 287 Table
inventory_log 0 0 18 266 Table
reservation_type 4 0 3 7 Table
precheckin_legal_document 0 1 10 24 Table

Localized terms/privacy document content for the pre-checkin page. is_translated=false marks rows that are an English fallback copy, not yet translated.

guest_social 0 2 3 37 Table
room_block 0 3 13 545 Table
yield_rule_tier 0 1 7 0 Table

Matrix occupancy × DBA. match เมื่อ occ_percent ∈ [occ_from, occ_to) และ dba ∈ [lead_from, lead_to]; tier บนสุด (occ_to = 100) เป็น catch-all รวม occ >= 100 (overbook)

[occ_from, occ_to) และ dba ∈ [lead_from, lead_to]: ./null

guest_document 1 3 21 359 Table
room_usage 0 0 7 10543 Table
z_sysmsg 0 0 5 96 Table
ipu_agent 0 0 17 6 Table
origin 7 0 4 12 Table
booking_rates_bak 0 0 29 6629 Table
room_location 2 0 3 14 Table
guest_messages 0 2 7 89 Table
itemizer_summary 0 0 6 39 Table
ipu_roominfo 0 0 13 6618 Table
room_exposure 2 0 3 4 Table
charge_schedule 0 4 13 33539 Table
property_info 0 0 19 1 Table
draft 0 0 7 6 Table
credit_card 1 1 7 48 Table
rate_logs 0 0 14 16 Table
chart 0 0 5 4 Table
user_alerts 0 2 9 1049 Table
department_group 1 0 5 18 Table
room_image 0 1 3 0 Table
notification 0 0 9 461 Table

Create by KenG (2020/03/17), Notify to user, Base on user

city 3 1 4 4057 Table
rate_details 6 5 40 267 Table

Max occupant (max_XXX): * 0 = not allow for booking * NULL = always allow (no maximum check)

rate_restriction 0 1 7 0 Table
booking_guests 0 4 6 13837 Table
x_city 0 0 3 4090 Table
room_group 1 0 3 4 Table
x_country 0 1 3 258 Table
occupation 2 0 3 150 Table
room_summary 0 20 60 227907 Table
intf_rate_state 0 0 11 0 Table
sys_message_category 0 0 2 2 Table
contact 0 1 11 0 Table
followup_comments 0 1 7 38 Table

Create by KenG (2020/03/11), Detail table for follow up

booking_rates 0 4 30 16605 Table
precheckin_consent_logs 0 4 10 0 Table

Consent choices captured on the guest pre-checkin form, before a registration_id exists. Written by rpc.precheckin_guest_consents_save.

registration_log 0 0 18 2027 Table
tax 4 0 3 3 Table
alert 1 1 4 31 Table

Create by KenG (2020/03/17), Alert to page of front-end

intf_agent 1 0 14 7 Table
booking_log 0 0 18 5143 Table
cashier_log 0 0 18 1818 Table
country 10 1 7 253 Table
inventory 0 0 16 342 Table
social_media 1 0 6 5 Table
currencies 4 0 3 0 Table
group_info 2 5 18 8 Table
notification_followup 0 0 2 445 Table

Create by KenG (2020/03/23)

tax_item 1 0 5 3 Table
ooo_reason 1 0 3 406 Table
followup_seen 0 1 4 100 Table

Create by KenG (2020/03/12), This table for users_seen of topic(followup)

consent_master 3 0 6 4 Table

ตารางหลักเก็บหัวข้อความยินยอมและนโยบาย (PDPA/Hotel Policies)

intf_keycard_logs 0 3 13 22 Table
booking 13 9 56 14160 Table
transaction_summary 0 1 11 36 Table
allotment 0 2 4 0 Table
folio_pattern_seq 2 1 3 11 Table
leadtime_range 0 0 4 8 Table
room_log 0 0 18 1876 Table
exchange_rate 0 0 9 0 Table

Currency exchange rate

guest 10 8 50 211609 Table
files 4 0 6 2 Table
meal_inclusion 0 2 2 0 Table
alert_page 2 0 2 6 Table

Create by KenG (2020/03/17), Masterfile Alert on Page of front-end, Front-End read here only, if want add data must add by developer

followup 3 2 16 113 Table

Create by KenG (2020/03/11), Master table for follow up

room_layout 0 0 3 14 Table
precheckin_legal_acceptance 0 3 9 0 Table

Audit trail of terms/privacy acceptance captured on the guest pre-checkin form, written by rpc.precheckin_legal_accept.

json_cache 0 0 3 4 Table
rsv_pickup 0 17 51 19267 Table
x_iso_country 0 0 4 249 Table
intf_room 0 2 11 936 Table
channel_restriction 0 3 9 0 Table
rate_plan_channels 0 2 3 3907 Table
record_lock 0 0 9 3 Table
x_block 0 0 11 59 Table
channel_group 1 0 2 3 Table
endday_tasks 0 0 5 23 Table
attachment 0 3 13 0 Table

ไฟล์แนบของ booking/registration — เก็บบน S3 (file_path) mint signed URL ตอน list; file_id (uuid -> public.files) เป็น legacy ไม่ใช้แล้ว; orphan S3 objects ถูกเก็บกวาดรายวันผ่าน fn_attachment_cleanup_orphans

yield_assignment 0 2 12 0 Table

ผูก yield_rule เข้ากับ rate_plan ตามช่วงวัน (from/to แบบ D/M/Y; ไม่ระบุปี = recurring ทุกปี) + DOW filter

endday 0 0 6 2 Table
intf_doorlock_logs 0 0 14 0 Table
contact_category 1 0 2 0 Table
transactions 5 8 38 1430 Table
alert_user 0 1 3 131 Table

Create by KenG (2020/03/17), alert to user (detail of alert)

sys_log 0 0 5 90 Table
consent_details 0 1 7 48 Table

ตารางเก็บรายละเอียดเนื้อหาข้อตกลง แยกตามรหัสภาษา (Localization)

building 2 0 3 3 Table
alert_followup 0 0 2 31 Table

Create by KenG (2020/03/20), Authorize between followup with alert table, Do not make foreign key because use trigger instead

room_upgrade 0 0 7 118 Table
ipu_agentcommand 0 0 2 23 Table
room_facility 0 0 3 15 Table
print_form 2 0 17 0 Table
bed_type 4 0 7 5 Table
recapitulate 0 0 69 4518 Table
followup_category 1 0 2 3 Table

Create by KenG (2020/03/10), Category of follow up

folio_items 2 2 18 39335 Table
sales_staff 5 0 3 4 Table
booking_items 5 7 43 16663 Table
x_room 0 0 11 258 Table
rate_plan 13 5 53 39 Table
itemizer 0 1 9 10 Table
x_booking 0 0 29 16160 Table
register_guests 0 2 2 138 Table
channel_market 0 2 2 10 Table
sys_messageXXX 0 0 3 285 Table
calendar_source 1 1 11 0 Table

External calendar feed config. source_type=ics_url pulls a Google/Outlook .ics URL into calendar_event.

folio_pattern 5 0 4 7 Table
folio 6 3 14 12207 Table
promotion 6 0 34 0 Table
interfaces 0 0 5 14 Table
meal_type 7 0 15 9 Table
precheckin_language 3 0 6 12 Table

Language options (code, display name, flag) shown on the guest pre-checkin page. Replaces the hardcoded VALUES(…) list previously in rpc.precheckin_lang_list.

title 1 0 6 11 Table
out_of_order 0 2 12 235 Table
x_countries 0 0 4 246 Table
folio_pattern_details 0 3 3 207 Table
vip 4 0 6 15 Table
room 9 6 12 287 Table
room_rate 0 1 6 0 Table
v_auto_post_result 0 0 15 0 View
sys_params 0 0 4 0 View
v_rate_details 0 0 38 0 View
v_room_activity 0 0 11 0 View
v_rateplan_link_paths 0 0 3 0 View