asak

Tables (24)

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
  • Field

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