coffee-ordering

Tables (5)

menu

  • menu_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • price — BIGINT — NOT NULL

order_items

  • order_item_id — BIGINT — Primary key — NOT NULL
  • order_id — BIGINT — Foreign key → orders.order_id — NOT NULL
  • menu_id — BIGINT — Foreign key → menu.menu_id — NOT NULL
  • amount — BIGINT — NOT NULL
  • quantity — INT — NOT NULL

orders

  • order_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • total_amount — BIGINT — NOT NULL
  • ordered_at — DATETIME — NOT NULL

user_point

  • user_point_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • balance — BIGINT — NOT NULL
  • updated_at — DATETIME — NOT NULL

users

  • user_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • created_at — DATETIME — NOT NULL