ㅇㅇㅇ
Tables (39)
allergen
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
category
- id — BIGINT — Primary key — NOT NULL
- sort_no — INT — NOT NULL
- active — TINYINT(1) — NOT NULL
- name — VARCHAR(50) — NOT NULL
code_group
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(50) — NOT NULL
- group_code — VARCHAR(50) — NOT NULL
common_code
- id — BIGINT — Primary key — NOT NULL
- sort_no — INT — NOT NULL
- name — VARCHAR(50) — NOT NULL
- code — VARCHAR(50) — NOT NULL
- code_grp_id — BIGINT — Foreign key → code_group.id — NOT NULL
- active — TINYINT(1) — NOT NULL
ing
- id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- type_id — BIGINT — Foreign key → common_code.id — NOT NULL
- sold_out — TINYINT(1) — NOT NULL
- kcal — DECIMAL(8,2)
- protein_g — DECIMAL(8,2)
ing_allergen
- id — BIGINT — Primary key — NOT NULL
- ing_id — BIGINT — NOT NULL
- allergen_id — BIGINT — Foreign key → allergen.id — NOT NULL
item_exclusion
- id — BIGINT — Primary key — NOT NULL
- order_item_id — BIGINT — Foreign key → order_item.id — NOT NULL
- ing_id — BIGINT — NOT NULL
menu
- id — BIGINT — Primary key — NOT NULL
- price — INT — NOT NULL
- description — TEXT
- created_at — TIMESTAMP — NOT NULL
- sold_out — TINYINT(1) — NOT NULL
- name — VARCHAR(100) — NOT NULL
- image_url — TEXT
- updated_at — TIMESTAMP — NOT NULL
- cat_id — BIGINT — Foreign key → category.id — NOT NULL
menu_ing
- id — BIGINT — Primary key — NOT NULL
- unit_id — BIGINT — Foreign key → common_code.id
- is_default — TINYINT(1) — NOT NULL
- sort_no — INT — NOT NULL
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- role_id — BIGINT — Foreign key → common_code.id — NOT NULL
- can_remove — TINYINT(1) — NOT NULL
- ing_id — BIGINT — NOT NULL
- quantity — DECIMAL(8,2)
menu_nutr
- id — BIGINT — Primary key — NOT NULL
- protein_g — DECIMAL(8,2)
- fat_g — DECIMAL(8,2)
- source_id — BIGINT — Foreign key → common_code.id
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- kcal — DECIMAL(8,2)
- carb_g — DECIMAL(8,2)
- sodium_mg — DECIMAL(8,2)
menu_opt_override
- id — BIGINT — Primary key — NOT NULL
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- note — VARCHAR(255)
- is_default — TINYINT(1)
- opt_item_id — BIGINT — NOT NULL
- sort_no — INT
- active — TINYINT(1)
- recommended — TINYINT(1)
menu_opt_policy
- id — BIGINT — Primary key — NOT NULL
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- policy_id — BIGINT — NOT NULL
- priority — INT — NOT NULL
- required — TINYINT(1) — NOT NULL
- sort_no — INT — NOT NULL
menu_tag
- id — BIGINT — Primary key — NOT NULL
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- tag_id — BIGINT — Foreign key → tag.id — NOT NULL
opt_group
- id — BIGINT — Primary key — NOT NULL
- group_type_id — BIGINT — Foreign key → common_code.id — NOT NULL
- max_select — INT — NOT NULL
- name — VARCHAR(100) — NOT NULL
- min_select — INT — NOT NULL
opt_item
- id — BIGINT — Primary key — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- amount — DECIMAL(8,2)
- unit_id — BIGINT — Foreign key → common_code.id
- add_price — INT — NOT NULL
- color_hex — VARCHAR(20)
- opt_group_id — BIGINT — NOT NULL
- sold_out — TINYINT(1) — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- list_price — INT
- name — VARCHAR(100) — NOT NULL
- icon_url — TEXT
- ing_id — BIGINT
opt_item_comp
- id — BIGINT — Primary key — NOT NULL
- sort_no — INT — NOT NULL
- quantity — DECIMAL(8,2)
- ing_id — BIGINT
- opt_item_id — BIGINT — NOT NULL
- name — VARCHAR(100) — NOT NULL
- unit_id — BIGINT — Foreign key → common_code.id
opt_policy
- id — BIGINT — Primary key — NOT NULL
- policy_key — CHAR(64) — NOT NULL
- name — VARCHAR(120) — NOT NULL
- min_select — INT — NOT NULL
- max_select — INT — NOT NULL
- item_count — INT — NOT NULL
- menu_count — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- active — TINYINT(1) — NOT NULL
- required — TINYINT(1) — NOT NULL
- opt_group_id — BIGINT — NOT NULL
- sort_no — INT — NOT NULL
opt_policy_item
- id — BIGINT — Primary key — NOT NULL
- policy_id — BIGINT — NOT NULL
- active — TINYINT(1) — NOT NULL
- is_default — TINYINT(1) — NOT NULL
- opt_item_id — BIGINT — NOT NULL
- sort_no — INT — NOT NULL
- recommended — TINYINT(1) — NOT NULL
order_item
- id — BIGINT — Primary key — NOT NULL
- order_id — BIGINT — Foreign key → orders.id — NOT NULL
- quantity — INT — NOT NULL
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- price — INT — NOT NULL
order_item_option
- id — BIGINT — Primary key — NOT NULL
- order_item_id — BIGINT — Foreign key → order_item.id — NOT NULL
- quantity — INT — NOT NULL
- price — INT — NOT NULL
- opt_item_id — BIGINT — NOT NULL
orders
- id — BIGINT — Primary key — NOT NULL
- canceled_at — TIMESTAMP
- status_id — BIGINT — Foreign key → common_code.id — NOT NULL
- total_price — INT — NOT NULL
- order_no — VARCHAR(50) — NOT NULL
- order_type_id — BIGINT — Foreign key → common_code.id — NOT NULL
- created_at — TIMESTAMP — NOT NULL
pay_method_cfg
- id — BIGINT — Primary key — NOT NULL
- sort_no — INT — NOT NULL
- name — VARCHAR(50) — NOT NULL
- method_id — BIGINT — Foreign key → common_code.id — NOT NULL
- active — TINYINT(1) — NOT NULL
payment
- id — BIGINT — Primary key — NOT NULL
- refunded_at — TIMESTAMP
- order_id — BIGINT — Foreign key → orders.id — NOT NULL
- status_id — BIGINT — Foreign key → common_code.id — NOT NULL
- paid_at — TIMESTAMP
- method_id — BIGINT — Foreign key → common_code.id — NOT NULL
- amount — INT — NOT NULL
tag
- id — BIGINT — Primary key — NOT NULL
- code — VARCHAR(50) — NOT NULL
- color_hex — VARCHAR(20)
- name — VARCHAR(50) — NOT NULL
- active — TINYINT(1) — NOT NULL
vw_menu_availability
- menu_id — BIGINT — Foreign key → menu.id
- direct_sold_out — TINYINT
- has_core_sold_out — INT — NOT NULL
- base_ing_exhausted — INT — NOT NULL
- base_opt_exhausted — INT — NOT NULL
- has_blocking_standard — INT — NOT NULL
- has_exhausted_required_group — INT — NOT NULL
vw_menu_ing_detail
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- ing_id — BIGINT — Foreign key → ing.id — NOT NULL
- ing_name — VARCHAR(100) — NOT NULL
- ing_sold_out — TINYINT — NOT NULL
- role_id — BIGINT — Foreign key → common_code.id — NOT NULL
- quantity — DECIMAL(8,2)
- unit_id — BIGINT — Foreign key → common_code.id
- is_default — TINYINT — NOT NULL
- can_remove — TINYINT — NOT NULL
- sort_no — INT — NOT NULL
- allergen_id — BIGINT — Foreign key → allergen.id
- allergen_name — VARCHAR(50)
vw_menu_ing_json
- is_default — TINYINT — NOT NULL
- can_remove — TINYINT — NOT NULL
- sort_no — INT — NOT NULL
- allergens — JSON
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- ing_name — VARCHAR(100)
- ing_sold_out — TINYINT
- quantity — DECIMAL(8,2)
- role — VARCHAR(50) — NOT NULL
- ingredient_id — BIGINT — Foreign key → ing.id — NOT NULL
- unit — VARCHAR(50)
vw_menu_list
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- name — VARCHAR(100) — NOT NULL
- price — INT — NOT NULL
- image_url — TEXT
- base_kcal — DECIMAL(8,2)
- is_sold_out — TINYINT — NOT NULL
- has_sold_out_ingredient — INT — NOT NULL
- is_orderable — INT
- category_id — BIGINT — Foreign key → category.id — NOT NULL
vw_menu_opt_policy_json
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- min_select — INT — NOT NULL
- max_select — INT — NOT NULL
- name — VARCHAR(120) — NOT NULL
- group_type — VARCHAR(50) — NOT NULL
- sort_order — INT — NOT NULL
- select_type — VARCHAR(6) — NOT NULL
- is_required — INT — NOT NULL
- items — JSON
- option_group_id — BIGINT — Foreign key → opt_policy.id — NOT NULL
vw_menu_opt_resolved
- sort_no — BIGINT — NOT NULL
- active — INT — NOT NULL
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- policy_id — BIGINT — Foreign key → opt_policy.id — NOT NULL
- policy_name — VARCHAR(120) — NOT NULL
- min_select — INT — NOT NULL
- max_select — INT — NOT NULL
- policy_required — TINYINT — NOT NULL
- opt_item_id — BIGINT — Foreign key → opt_item.id — NOT NULL
- opt_item_name — VARCHAR(100) — NOT NULL
- add_price — INT — NOT NULL
- opt_item_sold_out — TINYINT — NOT NULL
- recommended — INT — NOT NULL
- is_default — INT — NOT NULL
vw_order_item_base_dressing
- order_item_id — BIGINT — Foreign key → order_item.id — NOT NULL
- base_name — VARCHAR(100)
- dressing_name — VARCHAR(100)
vw_order_item_detail
- order_id — BIGINT — Foreign key → orders.id — NOT NULL
- order_no — VARCHAR(50) — NOT NULL
- order_item_id — BIGINT — Foreign key → order_item.id — NOT NULL
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- menu_name — VARCHAR(100) — NOT NULL
- quantity — INT — NOT NULL
- price — INT — NOT NULL
vw_order_item_exclusion
- order_item_id — BIGINT — Foreign key → order_item.id — NOT NULL
- ing_id — BIGINT — Foreign key → ing.id — NOT NULL
- ing_name — VARCHAR(100) — NOT NULL
vw_order_item_option
- opt_item_id — BIGINT — Foreign key → opt_item.id — NOT NULL
- opt_item_name — VARCHAR(100) — NOT NULL
- order_item_id — BIGINT — Foreign key → order_item.id — NOT NULL
- quantity — INT — NOT NULL
- price — INT — NOT NULL
vw_order_item_tag
- order_item_id — BIGINT — Foreign key → order_item.id — NOT NULL
- tone — VARCHAR(7) — NOT NULL
- label — VARCHAR(100) — NOT NULL
vw_payment_result
- payment_id — BIGINT — Foreign key → payment.id — NOT NULL
- order_id — BIGINT — Foreign key → orders.id — NOT NULL
- order_no — VARCHAR(50) — NOT NULL
- payment_status — VARCHAR(50) — NOT NULL
- approved_amount — INT — NOT NULL
- approved_at — TIMESTAMP
- waiting_order_count — BIGINT — NOT NULL
vw_soldout_catalog
- target_type — VARCHAR(11) — NOT NULL
- target_id — BIGINT — NOT NULL
- name — VARCHAR(100) — NOT NULL
- category — VARCHAR(100) — NOT NULL
- is_sold_out — TINYINT — NOT NULL
- price — INT
vw_top_menu_daily
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- menu_name — VARCHAR(100) — NOT NULL
- sales_date — DATE
- order_count — BIGINT — NOT NULL
- sales_amount — DECIMAL(42,0)
- quantity — DECIMAL(32,0)
vw_top_menu_hourly
- menu_id — BIGINT — Foreign key → menu.id — NOT NULL
- menu_name — VARCHAR(100) — NOT NULL
- sales_hour — INT
- order_count — BIGINT — NOT NULL
- quantity — DECIMAL(32,0)
- sales_date — DATE
- sales_amount — DECIMAL(42,0)