As a user,
So that I can list spaces,
I would like to register.
As a host,
So that I can rent multiple spaces,
I want to list mulptiple spaces at the same time.
Users should be able to name their space, provide a short description of the space, and a price per night.
As a host,
So that guests can read my space details,
I want to give my space a name, description and price.
As a host,
So that guests can see when my space is available,
I want to list the dates when my space is available.
Any signed-up user can request to hire any space for one night, and this should be approved by the user that owns that space.
As a guest,
So that I can rent a space for a night,
I want to send a booking request to the host.
As a host
So that I can approve a request,
I want to see who requests to hire my space.
Nights for which a space has already been booked should not be available for users to book that space.
As a host,
So that my space isn't double booked,
I expect only available dates to be shown for spaces.
As a host,
So that I can manage my bookings,
I need my spaces to be available until I confirm booking requests.
Run the following:
bundle install
To create databases for production and test enviroments, run the following on psql:
CREATE DATABASE cherbnb;
CREATE DATABASE cherbnb_test;
Connect to each database and create the following tables:
CREATE TABLE users(
id SERIAL PRIMARY KEY,
email VARCHAR(60),
password VARCHAR(60),
name VARCHAR(60),
username VARCHAR(20)
);
CREATE TABLE spaces(
id SERIAL PRIMARY KEY,
description VARCHAR(280),
name VARCHAR(60),
price VARCHAR(60)
);