-
Notifications
You must be signed in to change notification settings - Fork 0
Schema
P. Dexter Assaf edited this page Dec 18, 2022
·
2 revisions
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
firstName |
string | not null, indexed, unique |
lastName |
string | not null, indexed, unique |
username |
string | not null, indexed, unique |
email |
string | not null, indexed, unique |
hashedpassword |
string | not null |
session_token |
string | not null, indexed, unique |
created_at |
datetime | not null |
updated_at |
datetime | not null |
has_many Reviews
has_many Spots
- belongstoMany spots through booking **bonus
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
ownnerid |
integer | not null |
address |
string | not null |
city |
string | not null |
state |
string | not null |
country |
string | not null |
lat |
integer | not null |
lng |
integer | not null |
name |
string | not null |
description |
string | not null |
price |
string | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
-
ownerid
referencesusers
has_many Reviews
has_many SpotImages
belongsto users
belongstoMany users through booking **bonus
column name | data type | details |
---|---|---|
id |
integer | not null, primary key |
spotid |
integer | not null, indexed, foreign key |
userid |
integer | not null, indexed, foreign key |
review |
string | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
stars |
integer | not null |
created_at |
datetime | not null |
updated_at |
datetime | not null |
belongsto Ssers
belongsto Spots
has_many ReviewImages
belongs_to chirp
belongs_to user
-
spotid
referencesspots
-
userid
referencesusers