TtalKkak
Tables (15)
accounts
- id — BIGINT
- email — VARCHAR(255) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- created_at — TIMESTAMP
deliveries
- id — BIGINT
- order_id — BIGINT — Foreign key → orders.id — NOT NULL
- rider_id — BIGINT — Foreign key → riders.account_id
- delivery_status — VARCHAR(20)
delivery_status_history
- id — BIGINT
- delivery_id — BIGINT — Foreign key → deliveries.id — NOT NULL
- status — VARCHAR(20) — NOT NULL
- changed_at — TIMESTAMP
menu_option_group_options
- id — BIGINT
- menu_option_group_id — BIGINT — Foreign key → menu_option_groups.id — NOT NULL
- name — VARCHAR(100) — NOT NULL
- extra_price — DECIMAL(10, 2)
menu_option_groups
- id — BIGINT
- menu_id — BIGINT — Foreign key → menus.id — NOT NULL
- name — VARCHAR(100) — NOT NULL
- is_required — BOOLEAN
menus
- id — BIGINT
- store_id — BIGINT — Foreign key → stores.id — NOT NULL
- name — VARCHAR(100) — NOT NULL
- price — DECIMAL(10, 2) — NOT NULL
order_menus
- id — BIGINT
- order_id — BIGINT — Foreign key → orders.id — NOT NULL
- menu_id — BIGINT — NOT NULL
- quantity — INT — NOT NULL
orders
- id — BIGINT
- store_id — BIGINT — Foreign key → stores.id — NOT NULL
- user_id — BIGINT — Foreign key → users.account_id — NOT NULL
- total_price — DECIMAL(10, 2)
- order_status — VARCHAR(20)
- created_at — TIMESTAMP
riders
- account_id — BIGINT — Foreign key → accounts.id
- vehicle_type — VARCHAR(50)
- is_available — BOOLEAN
store_business_hours
- id — BIGINT
- store_id — BIGINT — Foreign key → stores.id — NOT NULL
- day_of_week — VARCHAR(10) — NOT NULL
- open_time — TIME
- close_time — TIME
store_review_images
- id — BIGINT
- store_review_id — BIGINT — Foreign key → store_reviews.id — NOT NULL
- image_url — VARCHAR(500) — NOT NULL
store_reviews
- id — BIGINT
- store_id — BIGINT — Foreign key → stores.id — NOT NULL
- user_id — BIGINT — Foreign key → users.account_id — NOT NULL
- rating — INT
- content — TEXT
- created_at — TIMESTAMP
stores
- id — BIGINT
- name — VARCHAR(100) — NOT NULL
- category — VARCHAR(50)
- address — VARCHAR(255)
- created_at — TIMESTAMP
user_addresses
- id — BIGINT
- user_id — BIGINT — Foreign key → users.account_id — NOT NULL
- address — VARCHAR(255) — NOT NULL
- address_detail — VARCHAR(255)
- is_default — BOOLEAN
users
- account_id — BIGINT — Foreign key → accounts.id
- name — VARCHAR(50) — NOT NULL
- phone — VARCHAR(20)