Database Schema - AnthonyCost/tee-up GitHub Wiki

users
| column name |
data type |
details |
| id |
integer |
not null, primary key |
| username |
string |
not null, unique |
| email |
string |
not null, unique |
| hashedPassword |
string |
not null |
| created_at |
datetime |
not null |
| updated-at |
datetime |
not null |
reservation
| column name |
data type |
details |
| id |
integer |
not null, primary key |
| userId |
integer |
not null |
| status |
boolean |
not null |
| roundId |
integer |
not null |
| created_at |
datetime |
not null |
| updated-at |
datetime |
not null |
- 'roundId' references the round table
- 'userId' references the users table
userGroups
| column name |
data type |
details |
| id |
integer |
not null, primary key |
| userId |
integer |
not null |
| groupId |
integer |
not null |
| created_at |
datetime |
not null |
| updated-at |
datetime |
not null |
- 'groupId' references the group table
- 'userId' references the users table
group
| column name |
data type |
details |
| id |
integer |
not null, primary key |
| hostUserId |
integer |
not null |
| playStyle |
string(50) |
not null |
| description |
text |
|
| groupName |
string(50) |
not null |
| imageUrl |
string(255) |
|
| created_at |
datetime |
not null |
| updated-at |
datetime |
not null |
- 'hostUserId' references the users table (user whom creates the table)
golfCourse
| column name |
data type |
details |
| id |
integer |
not null, primary key |
| name |
string(50) |
not null |
| url |
string(100) |
not null |
| address |
string(50) |
not null |
| city |
string(50) |
not null |
| state |
string(50) |
not null |
| zipcode |
string(50) |
not null |
| lat |
decimal |
not null |
| lng |
decimal |
not null |
| created_at |
datetime |
not null |
| updated-at |
datetime |
not null |
round
| column name |
data type |
details |
| id |
integer |
not null, primary key |
| courseId |
integer |
not null |
| groupId |
integer |
not null |
| ruleset |
string(35) |
|
| startTime |
datetime |
not null |
| holes |
numeric |
not null |
| created_at |
datetime |
not null |
| updated-at |
datetime |
not null |
- 'groupId' references the group table
- 'courseId' references the course table