-
Notifications
You must be signed in to change notification settings - Fork 0
Schema
davidrichard23 edited this page Jan 22, 2019
·
4 revisions
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| username | string | not null, indexed, unique |
| string | not null, indexed, unique | |
| password_digest | string | not null |
| session_token | string | not null, indexed, unique |
| balance | float | not null |
| created_at | datetime | not null |
| updated_at | datetime | not null |
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| name | string | not null, indexed |
| ticker | string | not null, indexed, unique |
| description | string | |
| created_at | datetime | not null |
| updated_at | datetime | not null |
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| asset_id | integer | not null, foreign_key |
| user_id | integer | not null, foreign_key |
| shares | float | not null |
| action | string | not null, 'buy'/'sell' |
| price | float | not null |
| created_at | datetime | not null |
| updated_at | datetime | not null |
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| user_id | integer | not null, foreign_key |
| asset_id | integer | not null, foreign_key |
| created_at | datetime | not null |
| updated_at | datetime | not null |