-
Notifications
You must be signed in to change notification settings - Fork 1
Database Schema
Simonvargas edited this page Aug 24, 2021
·
1 revision
| column name | data type | details |
|---|---|---|
| id | integer | not null, PK |
| string | not null, unique | |
| user_name | string | not null, unique |
| hashed_password | string | not null |
| created_at | date | not null |
| updated_at | date | not null |
- User hasMany Projects
- User hasMany Backings
| column name | datatype | details |
|---|---|---|
| id | integer | not null, PK |
| user_id | integer | not null |
| category_id | integer | not null |
| name | string | not null |
| description | string | not null |
| funding_goal | integer | not null |
| funding_raised | integer | not null |
| funders | Integer | not null |
| deadline | date | not null |
| created_at | date | not null |
| updated_at | date | not null |
- Projects belongsTo Users
- Projects hasMany Categories
- Projects hasMany Backings
| column name | data type | details |
|---|---|---|
| id | integer | not null, PK |
| project_id | integer | not null |
| title | String | not null |
| details | String | not null |
| amount | Integer | not null |
| created_at | date | not null |
| updated_at | date | not null |
- Rewards belongs to Projects
| column name | datatype | details |
|---|---|---|
| id | integer | not null, PK |
| project_id | integer | not null |
| user_id | integer | not null |
| amount | integer | not null |
| comment | string | |
| reward_id | integer | not null |
| created_at | date | not null |
| updated_at | date | not null |
- Backing belongsTo Users
- Backing belongsTo Projects
| column name | datatype | details |
|---|---|---|
| id | integer | not null, PK |
| type | string | not null |
| created_at | date | not null |
| updated_at | date | not null |
- Categories belongsTo Projects