-
Notifications
You must be signed in to change notification settings - Fork 1
Database Schema
88joonyc edited this page Aug 15, 2021
·
22 revisions
| column name | data type | details |
|---|---|---|
| id | integer | not null, PK |
| string | not null, unique | |
| first_name | string | not null, unique |
| last_name | string | not null, unique |
| user_name | string | not null, unique |
| hashed_password | string | not null |
| date_of_birth | date | not null |
| wallet | integer | |
| created_at | date | not null |
| updated_at | date | not null |
- User hasMany Shares
- User hasMany watchlist
- User hasMany Tokens
| column name | datatype | details |
|---|---|---|
| id | integer | not null, PK |
| name | string | not null |
| market_price | int | not null |
| image | string | not null |
| details | string | not null |
| brand_name | string | not null |
| created_at | date | not null |
| updated_at | date | not null |
- SneaX belongsTo shares
- Sneax belongsTo watch
| column name | data type | details |
|---|---|---|
| id | integer | not null, PK |
| user_id | integer | not null |
| sneax_id | integer | not null |
| price_per_share | Integer | not null |
| number_of_shares | Integer | not null |
| created_at | date | not null |
| updated_at | date | not null |
- Shares belongs to User
| column name | datatype | details |
|---|---|---|
| id | integer | not null, PK |
| list_name | string | not null |
| user_id | integer | not null |
| created_at | date | not null |
| updated_at | date | not null |
- Watchlist belongsTo User
- Watchlist hasMany watch
| column name | datatype | details |
|---|---|---|
| id | integer | not null, PK |
| watchlist_id | integer | not null |
| sneax_id | integer | not null |
| created_at | date | not null |
| updated_at | date | not null |
- Watch belongsTo Watchlist
- Watch belongsTo Sneax