Table Field Name Data Type
id INT
first_name VARCHAR(30)
last_name VARCHAR(150)
email VARCHAR(255)
phone_number VARCHAR(17)
date_joined DATETIME
CustomUser
is_active BOOLEAN
is_superadmin BOOLEAN
is_restaurant_staff BOOLEAN
is_delivery_agent BOOLEAN
is_restaurant_owner BOOLEAN
password VARCHAR(128)
Table Field Name Data Type
id INT
user_id INT
address_line VARCHAR(255)
Address city VARCHAR(50)
zip_code VARCHAR(20)
created_at DATETIME
updated_at DATETIME
Table Field Name Data Type
id INT
Category
name VARCHAR(100)
Table Field Name Data Type
id INT
name VARCHAR(255)
price DECIMAL(10, 2)
available BOOLEAN
Item
category_id INT
description TEXT
image VARCHAR(255)
is_deleted BOOLEAN
Table Field Name Data Type
id INT
user_id INT
Cart item_id INT
quantity INT
created_at DATETIME
Table Field Name Data Type
id INT
user_id INT
delivery_partner_id INT
Order order_date DATETIME
status ENUM
total_amount DECIMAL(10, 2)
address TEXT
Table Field Name Data Type
id INT
user_id INT
vehicle_info VARCHAR(255)
DeliveryPartner driving_license_no VARCHAR(50)
vehicle_number_plate VARCHAR(20)
is_deleted BOOLEAN
join_date DATETIME
Table Field Name Data Type
id INT
order_id INT
OrderItem item_id INT
quantity INT
price_at_order DECIMAL(10, 2)
Table Field Name Data Type
id INT
user_id INT
order_id INT
Feedback
feedback_text TEXT
created_at DATETIME
status ENUM
Constratint Example
Primary Key 1
Not Null John
Not Null Doe
Unique, Not Null ag1ent@gmail.com
Unique, Not Null 9198226543210.00
Default CURRENT_TIMESTAMP 26:19.6
Default TRUE 1
Default FALSE 0
Default FALSE 0
Default FALSE 0
Default FALSE 0
Not Null pbkdf2_sha256$870000$DyssjfYCuvjZXHbk0
Constratint Example
Primary Key 1
Foreign Key to CustomUser(id) 17
Not Null Satyesh residency
Not Null Juhapura
Not Null 382210.00
Default CURRENT_TIMESTAMP 11/20/2024 2:39
Default CURRENT_TIMESTAMP on update 11/20/2024 3:04
Constratint Example
Primary Key 2
Unique, Not Null CATEGORY_
Constratint Example
Primary Key 1
Unique, Not Null Spicy
Not Null 0
Default TRUE 1
Foreign Key to Category(id) 2
Supy Food
path/of/images
Default FALSE 1
Constratint Example
Primary Key 1
Foreign Key to CustomUser(id) 2
Foreign Key to Item(id) 1
Default 1 3
Default CURRENT_TIMESTAMP 45616.1108912037
Constratint Example
Primary Key 1
Foreign Key to CustomUser(id) 17
Foreign Key to DeliveryPartner(id) (NULL on delete) 1
Default CURRENT_TIMESTAMP 11/20/2024 3:10
Default 'pending' Completed
Default 0 137
Not Null Satyesh residency, Juhapura, 382210
Constratint Example
Primary Key 1
Foreign Key to CustomUser(id) 9
Not Null Honda Activa
Unique, Not Null DL123456789012
Unique, Not Null MH12AB1236
Default FALSE 0
Default CURRENT_TIMESTAMP 11/17/2024 17:26
Constratint Example
Primary Key 2
Foreign Key to Order(id) 2
Foreign Key to Item(id) 1
Default 1 2
Not Null 67
Constratint Example
Primary Key 1
Foreign Key to CustomUser(id) 2
Foreign Key to Order(id) 1
Not Null had best Meal
Default CURRENT_TIMESTAMP 11/20/2024 7:34
Default 'pending' pending