logoChakra
Infra

Database

Overview

A restaurant food delivery service database implemented with drizzle.

View the dbdocs diagram here.

address autoincrement() PK Int id String street_address_1 nullable String street_address_2 String zip_code nullable String delivery_instructions FK Int user_id FK Int city_id now() DateTime created_at now() DateTime updated_at category autoincrement() PK Int id String name city autoincrement() PK Int id String name FK Int state_id comment autoincrement() PK Int id FK Int order_id FK Int user_id String comment_text Boolean is_complaint Boolean is_praise now() DateTime created_at now() DateTime updated_at driver autoincrement() PK Int id String car_make String car_model Int car_year FK Int user_id Boolean online Boolean delivering now() DateTime created_at now() DateTime updated_at menu_item autoincrement() PK Int id String name FK Int restaurant_id FK Int category_id String description String ingredients Decimal price Boolean active now() DateTime created_at now() DateTime updated_at order_menu_item autoincrement() PK Int id FK Int order_id FK Int menu_item_id Int quantity Decimal item_price Decimal price nullable String comment order_status autoincrement() PK Int id FK Int order_id FK Int status_catalog_id now() DateTime created_at orders autoincrement() PK Int id FK Int restaurant_id DateTime estimated_delivery_time nullable DateTime actual_delivery_time FK Int delivery_address_id FK Int user_id nullable FK Int driver_id Decimal price Decimal discount Decimal final_price nullable String comment now() DateTime created_at now() DateTime updated_at restaurant autoincrement() PK Int id String name String street_address String zip_code FK Int city_id now() DateTime created_at now() DateTime updated_at state autoincrement() PK Int id String name String code status_catalog autoincrement() PK Int id String name users autoincrement() PK Int id String name String contact_phone Boolean phone_verified String email Boolean email_verified nullable String confirmation_code String password now() DateTime created_at now() DateTime updated_at restaurant_owner autoincrement() PK Int id FK Int restaurant_id FK Int owner_id

Last updated on

On this page