You are on page 1of 21

Table of contents

1 addreses Page number: 2


2 admins Page number: 3
3 brands Page number: 4
4 carts Page number: 5
5 catagories Page number: 6
6 cities Page number: 7
7 coupons Page number: 8
8 favs Page number: 9
9 offers Page number: 10
10 offers_products Page number: 11
11 orders Page number: 12
12 orders_products Page number: 13
13 products Page number: 14
14 proudcts_spacs Page number: 15
15 regions Page number: 16
16 reviews Page number: 17
17 spacs Page number: 18
18 subcatagories Page number: 19
19 users Page number: 20
20 Relational schema Page number: 21

Page number: 1/21 Aug 19, 2022 at 05:20 PM


1 addreses

Creation: Aug 19, 2022 at 02:44 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


street varchar(255 No
)
building varchar(255 No
)
floor varchar(255 No
)
flat varchar(255 No
)
type varchar(255 No
)
notes text No
created_at timestamp No current_tim
estamp()
updated_at timestamp Yes NULL on update curre
nt_timestamp()

user_id bigint(20) UNSIGNED No -> users.id


ON UPDATE RESTRICT
ON DELETE RESTRICT
region_id bigint(20) UNSIGNED No -> regions.id
ON UPDATE RESTRICT
ON DELETE RESTRICT

Page number: 2/21 Aug 19, 2022 at 05:20 PM


2 admins

Creation: Aug 19, 2022 at 03:16 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


email varchar(255 No
)
name varchar(255 No
)
password varchar(255 No
)
email_verified_a timestamp No current_tim
t estamp()
created_at timestamp No current_tim
estamp()
updated_at timestamp Yes NULL on update curre
nt_timestamp()

Page number: 3/21 Aug 19, 2022 at 05:20 PM


3 brands

Creation: Aug 19, 2022 at 02:25 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


name_en varchar(32) No
name_ar varchar(32) No
status tinyint(1) No 1
image varchar(255 Yes photo.png
)
created_at timestamp No current_tim
estamp()
updated_at timestamp Yes NULL on update curre
nt_timestamp()

Page number: 4/21 Aug 19, 2022 at 05:20 PM


4 carts

Creation: Aug 19, 2022 at 04:49 PM

Column Type Attributes Null Default Extra Links to Comments MIME

product_id bigint(20) UNSIGNED No -> products.id


ON UPDATE RESTRICT
ON DELETE RESTRICT
address_id bigint(20) UNSIGNED No -> addreses.id
ON UPDATE RESTRICT
ON DELETE RESTRICT
quantity mediumint( No
3)

Page number: 5/21 Aug 19, 2022 at 05:20 PM


5 catagories

Creation: Aug 19, 2022 at 02:22 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


name_en varchar(32) No
name_ar varchar(32) No
status tinyint(1) No 1
image varchar(255 Yes photo.png
)
updated_at timestamp Yes NULL on update curre
nt_timestamp()

created_at timestamp No current_tim


estamp()

Page number: 6/21 Aug 19, 2022 at 05:20 PM


6 cities

Creation: Aug 19, 2022 at 02:50 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


name_en varchar(32) No
name_ar varchar(32) No
status tinyint(1) No 1
created_at timestamp No current_tim
estamp()
updated_at timestamp Yes NULL on update curre
nt_timestamp()

Page number: 7/21 Aug 19, 2022 at 05:20 PM


7 coupons

Creation: Aug 19, 2022 at 03:03 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


code mediumint( No
6)
discount decimal(5,0) No
discount_type varchar(255 No
)
started_at timestamp No current_tim
estamp()
end_at timestamp Yes NULL on update curre
nt_timestamp()

created_at timestamp No current_tim


estamp()
updated_at timestamp Yes NULL on update curre
nt_timestamp()

max_discount_v mediumint( No
alue 5)
min_order_valu mediumint( No
e 5)
max_usage mediumint( No
5)
max_usage_per mediumint( No
_user 5)

Page number: 8/21 Aug 19, 2022 at 05:20 PM


8 favs

Creation: Aug 19, 2022 at 04:52 PM

Column Type Attributes Null Default Extra Links to Comments MIME

product_id bigint(20) UNSIGNED No -> products.id


ON UPDATE RESTRICT
ON DELETE RESTRICT
user_id bigint(20) UNSIGNED No -> users.id
ON UPDATE RESTRICT
ON DELETE RESTRICT

Page number: 9/21 Aug 19, 2022 at 05:20 PM


9 offers

Creation: Aug 19, 2022 at 02:37 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


title varchar(255 No
)
image varchar(255 No
)
status tinyint(1) No 1
start_at timestamp No current_tim
estamp()
end_at timestamp Yes NULL on update curre
nt_timestamp()

created_at timestamp No current_tim


estamp()
updated_at timestamp Yes NULL on update curre
nt_timestamp()

discount smallint(3) No
discount_type varchar(255 No
)

Page number: 10/21 Aug 19, 2022 at 05:20 PM


10 offers_products

Creation: Aug 19, 2022 at 04:46 PM

Column Type Attributes Null Default Extra Links to Comments MIME

product_id bigint(20) UNSIGNED No -> products.id


ON UPDATE RESTRICT
ON DELETE RESTRICT
offer_id bigint(20) UNSIGNED No -> offers.id
ON UPDATE RESTRICT
ON DELETE RESTRICT
price_after_disc decimal(7,0) No
ount

Page number: 11/21 Aug 19, 2022 at 05:20 PM


11 orders

Creation: Aug 19, 2022 at 03:10 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


name_en varchar(32) No
name_ar varchar(32) No
status tinyint(1) No 1
image varchar(255 Yes photo.png
)
created_at timestamp No current_tim
estamp()
updated_at timestamp Yes NULL on update curre
nt_timestamp()

address_id bigint(20) UNSIGNED No -> addreses.id


ON UPDATE RESTRICT
ON DELETE RESTRICT
coupon_id bigint(20) UNSIGNED No -> coupons.id
ON UPDATE RESTRICT
ON DELETE RESTRICT

Page number: 12/21 Aug 19, 2022 at 05:20 PM


12 orders_products

Creation: Aug 19, 2022 at 05:17 PM

Column Type Attributes Null Default Extra Links to Comments MIME

user_id bigint(20) UNSIGNED No -> users.id


ON UPDATE RESTRICT
ON DELETE RESTRICT
order_id bigint(20) UNSIGNED No -> orders.id
ON UPDATE RESTRICT
ON DELETE RESTRICT
quantity decimal(7,0) No
price decimal(7,0) No

Page number: 13/21 Aug 19, 2022 at 05:20 PM


13 products

Creation: Aug 19, 2022 at 11:56 AM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


name_en varchar(512 No
)
name_ar varchar(512 No
)
price decimal(7,0) No
quantity smallint(3) No 1
status tinyint(1) No 1=>active
0=>not active
image varchar(255 No
)
code mediumint( No
6)
created_at timestamp No current_tim
estamp()
updated_at timestamp Yes NULL on update curre
nt_timestamp()

details_ar text No
details_en text No
subcatagory_id bigint(20) UNSIGNED No -> subcatagories.id
ON UPDATE RESTRICT
ON DELETE RESTRICT
brand_id bigint(20) UNSIGNED No -> brands.id
ON UPDATE RESTRICT
ON DELETE RESTRICT

Page number: 14/21 Aug 19, 2022 at 05:20 PM


14 proudcts_spacs

Creation: Aug 19, 2022 at 04:32 PM

Column Type Attributes Null Default Extra Links to Comments MIME

spac_id bigint(20) UNSIGNED No -> spacs.id


ON UPDATE RESTRICT
ON DELETE RESTRICT
product_id bigint(20) UNSIGNED No -> products.id
ON UPDATE RESTRICT
ON DELETE RESTRICT
value varchar(255 No
)

Page number: 15/21 Aug 19, 2022 at 05:20 PM


15 regions

Creation: Aug 19, 2022 at 02:47 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


name_ar varchar(32) No
name_en varchar(32) No
status tinyint(1) No 1
created_at timestamp No current_tim
estamp()
updated_at timestamp Yes NULL on update curre
nt_timestamp()

city_id bigint(20) UNSIGNED No -> cities.id


ON UPDATE RESTRICT
ON DELETE RESTRICT

Page number: 16/21 Aug 19, 2022 at 05:20 PM


16 reviews

Creation: Aug 19, 2022 at 05:14 PM

Column Type Attributes Null Default Extra Links to Comments MIME

product_id bigint(20) UNSIGNED No -> products.id


ON UPDATE RESTRICT
ON DELETE RESTRICT
user_id bigint(20) UNSIGNED No -> users.id
ON UPDATE RESTRICT
ON DELETE RESTRICT
rate int(1) No 0
comment text No

Page number: 17/21 Aug 19, 2022 at 05:20 PM


17 spacs

Creation: Aug 19, 2022 at 02:39 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


name varchar(32) No

Page number: 18/21 Aug 19, 2022 at 05:20 PM


18 subcatagories

Creation: Aug 19, 2022 at 02:12 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


name_en varchar(32) No
name_ar varchar(32) No
image varchar(255 Yes photo.png
)
created_at timestamp No current_tim
estamp()
updated_at timestamp Yes NULL on update curre
nt_timestamp()

status tinyint(1) No 1
catogory_id bigint(20) UNSIGNED No -> catagories.id
ON UPDATE RESTRICT
ON DELETE RESTRICT

Page number: 19/21 Aug 19, 2022 at 05:20 PM


19 users

Creation: Aug 19, 2022 at 12:43 PM

Column Type Attributes Null Default Extra Links to Comments MIME

id bigint(20) UNSIGNED No auto_increment


first_name varchar(32) No
last_name varchar(32) No
email varchar(255 No
)
password varchar(255 No
)
phone varchar(11) No
gender varchar(6) No
image varchar(255 Yes photo.png
)
verification_cod mediumint( Yes NULL
e 6)
email_verified_a timestamp Yes NULL
t
created_at timestamp No current_tim
estamp()
updated_at timestamp Yes NULL
status tinyint(1) No
code_expired_a timestamp Yes NULL
t

Page number: 20/21 Aug 19, 2022 at 05:20 PM


admins
id
email
name
password
email_verified_at
created_at
updated_at

products
id
name_en
name_ar
price
quantity
status
image
code
created_at cities
updated_at favs id
details_arproduct_id name_en
details_enuser_id name_ar
subcatagory_id status
brand_id created_at
updated_at
spacs
id subcatagories
name id
name_en
name_ar
image
created_at
updated_at
status
catogory_id

addreses
id
carts street
catagories product_id building
id address_id floor
orders_products
name_en quantity flat
name_aruser_id type
status order_id notes
image quantity created_at
price
updated_at updated_at
created_at user_id
region_id
users regions
id id
orders
first_name name_ar
id
last_name name_en
name_en
email status
name_ar
password created_at
status
phone updated_at
image
gender city_id
brands created_at
image
id updated_at
verification_code
name_en address_id
email_verified_at
name_ar coupon_id
created_at
updated_at status
status image
code_expired_at created_at
updated_at

coupons
id
code
discount
discount_type
started_at
offers_products
end_at
product_id
created_at
proudcts_spacs offer_id
updated_at
reviews spac_id price_after_discount
max_discount_value
product_id product_id
offers min_order_value
user_id value
id max_usage
rate
title max_usage_per_user
comment
image
status
start_at
end_at
created_at
updated_at
discount
discount_type

Page number: 21/21 Aug 19, 2022 at 05:20 PM


Powered by TCPDF (www.tcpdf.org)

You might also like