test

Tables (10)

Customer

  • customer_id — INT — Primary key — NOT NULL
  • name — VARCHAR(255)
  • email — VARCHAR(255)

Delivery

  • delivery_id — INT — Primary key — NOT NULL
  • order_id — INT — NOT NULL
  • delivery_person_id — INT — NOT NULL
  • status — VARCHAR(50)

DeliveryPerson

  • delivery_person_id — INT — Primary key — NOT NULL
  • name — VARCHAR(255)

Menu

  • menu_id — INT — Primary key — NOT NULL
  • store_id — INT — NOT NULL
  • name — VARCHAR(255)
  • price — DECIMAL(10,2)
  • image — VARCHAR(255)

OrderItem

  • order_item_id — INT — Primary key — NOT NULL
  • order_id — INT — NOT NULL
  • menu_id — INT — NOT NULL
  • quantity — INT

Orders

  • order_id — INT — Primary key — NOT NULL
  • customer_id (customer_id2) — INT — Foreign key → Customer.customer_id — NOT NULL
  • customer_id — INT — NOT NULL
  • store_id — INT — NOT NULL
  • order_date — TIMESTAMP
  • status — VARCHAR(50)

Payment

  • payment_id — INT — Primary key — NOT NULL
  • order_id — INT — NOT NULL
  • amount — DECIMAL(10,2)
  • payment_date — TIMESTAMP

Review

  • review_id — INT — Primary key — NOT NULL
  • customer_id — INT — NOT NULL
  • store_id — INT — NOT NULL
  • owner_id — INT — NOT NULL
  • rating — INT
  • comment — TEXT — EX

Store

  • store_id — INT — Primary key — NOT NULL
  • owner_id — INT — NOT NULL
  • name — VARCHAR(255)

StoreOwner

  • owner_id — INT — Primary key — NOT NULL
  • name — VARCHAR(255)
  • email — VARCHAR(255)