-
Notifications
You must be signed in to change notification settings - Fork 0
Schema
Chris Kim edited this page Sep 18, 2017
·
8 revisions
| Column Name | Datatype | Details |
|---|---|---|
| id | integer | not null, primary key |
| name | string | not null, indexed |
| string | not null, indexed | |
| password_digest | string | not null |
| session_token | string | not null |
| created_at | datetime | not null |
| updated_at | datetime | not null |
| image_url | string | not null |
| address | string | not null |
| about | text |
| Column Name | Datatype | Details |
|---|---|---|
| id | integer | not null, primary key |
| created_at | datetime | not null |
| updated_at | datetime | not null |
| name | string | not null, indexed |
| address | string | not null |
| image_url | string | not null |
| owner_id | integer | not null, foreign key |
| about | string | not null |
| rate | integer | not null |
| room_type | string | not null |
| beds | integer | not null |
| bedrooms | integer | not null |
| guests | integer | not null |
| bathrooms | integer | not null |
| check_in | string | not null |
| amenities | string | array true, default [] |
| Column Name | Datatype | Details |
|---|---|---|
| id | integer | not null, primary key |
| created_at | datetime | not null |
| updated_at | datetime | not null |
| start_date | date | not null, not over end_date and cannot overlap with other dates |
| end_date | date | not null, not before start_date and cannot overlap with other dates |
| lodging_id | integer | not null, foreign key, indexed |
| booker_id | integer | not null, foreign key, indexed |
| Column Name | Datatype | Details |
|---|---|---|
| id | integer | not null, primary key |
| created_at | datetime | not null |
| updated_at | datetime | not null |
| title | string | not null |
| body | text | not null |
| lodging_id | integer | not null, foreign key |
| author_id | integer | not null, foreign key |