schema - Priya67/onetouchBnB GitHub Wiki

USERS

column name		data type	 details
id	        	integer	         not null, primary key
username		string	         not null, indexed
fname           	string           not null,
lname           	string           not null
email	        	string	         not null, indexed, unique
phone_number    	integer          not null
img_url         	string	         not null
password_digest		string	         not null
session_token		string	         not null, indexed, unique

SPOTS

column name     	data type	 details
id	      		integer	         not null, primary key
headline        	string           not null
description		string	         not null
location		string	         not null
img_url 		string   	 
rating	        	integer          not null  
number_of_beds		string 	         not null
number_of_guests 	integer         not null
number_of_bedroom 	integer        not null
number_of_bathroom 	integer       not null
user_id	        	integer	         not null, foreign_key
price			integer          not null
room_type		string	         not null
cancellations		string	         not null
house_rules		string
reviews	        	string
lat             	float            not null
lng             	float            not null
city            	string           not null

BOOKINGS

column name		data type	 details
id	        	integer	         not null, primary key
user_id	        	integer	         not null, foreign key
spot_id	        	integer	         not null, foreign key
start_date		date	         not null
end_date		date	         not null

REVIEWS

column name     	data type	details
id	        	integer	        not null, primary key
author_id		integer	        not null, foreign key, indexed
spot_id	        	integer	        not null, foreign key, indexed
rating	        	integer	        not null
body	        	string	        not null