Closed david-dickinson closed 5 years ago
@david-dickinson Great help David. One other question on amenities would be to ask if I should have two tables for amenities: one for the amenities themselves and one for linking the listings and the amenities table.
not null
constraints in theUsers
table: Airbnb will let you create an account with justfname
,lname
, andpassword_digest
username
with a uniqueemail
for account creation and logging inlocation_id
foreign keys or theLocation
table - users don't need a location, and listings should havelat
andlng
floats to integrate with Google MapsListings
table,amenities
should probably be a separate table that gets joined to listings, since those are common across the site. I'd save that for a bonus, though: for now you can list amenities in thedescription
pictures
arrayReviews
table a single foreign key forrental_id
: you can get information about the date of the booking for the review, confirm that the user finished a stay at the listing, and submit multiple reviews for multiple stays