Skip to content

DB SCHEMA

AmMonsoon edited this page Sep 21, 2021 · 1 revision

Users

column name data type details
id integer not null, primary key
username varchar not null
firstName varchar not null
lastName varchar not null
password varchar not null
email varchar not null , unique
created_at datetime not null
updated-at datetime not null

Bookings

column name data type details
id integer not null, primary key
userId integer not null
spotId integer not null
startDate datetime not null
endDate datetime not null
created_at datetime not null
updated-at datetime not null
  • userId references Users
  • spotId references Spots

Images

column name data type details
id integer not null, primary key
spotId integer not null
imageUrl varchar not null
created_at datetime not null
updated-at datetime not null
  • spotId references Users table

Spots

column name data type details
id integer not null, primary key
userId integer not null
address varchar not null
city varchar not null
state varchar not null
country varchar not null
name varchar not null
price decimal not null
created_at datetime not null
updated-at datetime not null
  • userId references Users table

Reviews

column name data type details
id integer not null, primary key
userId integer not null
spotId integer not null
review text not null
created_at datetime not null
updated-at datetime not null
  • userId references Users table
  • spotId references spots table
Clone this wiki locally