-
Notifications
You must be signed in to change notification settings - Fork 1
Database Schema
stevenpicazo edited this page Feb 19, 2023
·
2 revisions
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
username | string | not null, |
string | not null, indexed, unique | |
created_at | datetime | not null |
updated-at | datetime | not null |
first_name | string | not null |
last_name | string | not null |
address | string | not null |
city | string | not null |
state | string | not null |
zip | string | not null |
country | string | not null |
trusted_seller | string | null |
gender_style | string | null |
shirt_size | string | null |
pant_size | string | null |
shoe_size | string | null |
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
seller_id | integer | not null, primary key |
name | string | not null, primary key |
size | integer | not null, foreign key |
gender_style | string | null |
color | string | not null |
condition | string | not null |
category_tags | string | null |
price | integer | not null |
shipping_cost | integer | not null |
sold | boolean | null |
-
user_id
referencesusers
table -
seller_id
referencesorders
table
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
user_id | integer | not null, foreign key |
item_id | integer | not null, foreign key |
-
user_id
referencesusers
table -
item_id
referencesitems
table
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
buyer_id | integer | not null, foreign key |
item_id | integer | not null, foreign key |
seller_id | integer | not null |
order_total | integer | not null |
expiry | integer | not null |
cvc | integer | not null |
country | string | not null |
card_zip | integer | not null |
shipping | string | not null |
-
buyer_id
referencesusers
table -
item_id
referencesitems
table
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
buyer_id | integer | not, foreign key |
item_id | integer | not, foreign key |
review_body | string | not null |
stars | integer | not null |
-
buyer_id
referencesusers
table -
item_id
references an item fromitems
table
column name | data type | details |
---|---|---|
id | integer | not null, primary key |
item_id | integer | not null, foreign key |
preview | boolean | not null |
url | string | not null |
image_num | string | not null |
-
item_id
referencesitems
table