erDiagram
address {
Int id PK "autoincrement()"
String street_address_1
String street_address_2 "nullable"
String zip_code
String delivery_instructions "nullable"
Int user_id FK
Int city_id FK
DateTime created_at "now()"
DateTime updated_at "now()"
}
category {
Int id PK "autoincrement()"
String name
}
city {
Int id PK "autoincrement()"
String name
Int state_id FK
}
comment {
Int id PK "autoincrement()"
Int order_id FK
Int user_id FK
String comment_text
Boolean is_complaint
Boolean is_praise
DateTime created_at "now()"
DateTime updated_at "now()"
}
driver {
Int id PK "autoincrement()"
String car_make
String car_model
Int car_year
Int user_id FK
Boolean online
Boolean delivering
DateTime created_at "now()"
DateTime updated_at "now()"
}
menu_item {
Int id PK "autoincrement()"
String name
Int restaurant_id FK
Int category_id FK
String description
String ingredients
Decimal price
Boolean active
DateTime created_at "now()"
DateTime updated_at "now()"
}
order_menu_item {
Int id PK "autoincrement()"
Int order_id FK
Int menu_item_id FK
Int quantity
Decimal item_price
Decimal price
String comment "nullable"
}
order_status {
Int id PK "autoincrement()"
Int order_id FK
Int status_catalog_id FK
DateTime created_at "now()"
}
orders {
Int id PK "autoincrement()"
Int restaurant_id FK
DateTime estimated_delivery_time
DateTime actual_delivery_time "nullable"
Int delivery_address_id FK
Int user_id FK
Int driver_id FK "nullable"
Decimal price
Decimal discount
Decimal final_price
String comment "nullable"
DateTime created_at "now()"
DateTime updated_at "now()"
}
restaurant {
Int id PK "autoincrement()"
String name
String street_address
String zip_code
Int city_id FK
DateTime created_at "now()"
DateTime updated_at "now()"
}
state {
Int id PK "autoincrement()"
String name
String code
}
status_catalog {
Int id PK "autoincrement()"
String name
}
users {
Int id PK "autoincrement()"
String name
String contact_phone
Boolean phone_verified
String email
Boolean email_verified
String confirmation_code "nullable"
String password
DateTime created_at "now()"
DateTime updated_at "now()"
}
restaurant_owner {
Int id PK "autoincrement()"
Int restaurant_id FK
Int owner_id FK
}
address }o--|| city : city
address }o--|| users : users
city }o--|| state : state
comment }o--|| orders : orders
comment }o--|| users : users
driver }o--|| users : users
menu_item }o--|| category : category
menu_item }o--|| restaurant : restaurant
order_menu_item }o--|| menu_item : menu_item
order_menu_item }o--|| orders : orders
order_status }o--|| orders : orders
order_status }o--|| status_catalog : status_catalog
orders }o--|| address : address
orders }o--|| driver : driver
orders }o--|| restaurant : restaurant
orders }o--|| users : users
restaurant }o--|| city : city
restaurant_owner }o--|| users : users
restaurant_owner }o--|| restaurant : restaurant
-
Notifications
You must be signed in to change notification settings - Fork 0
License
coderboy-organization/digital-shop-api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published