database schema - 1a2b3c4dBobAn/Cyber-Wallet GitHub Wiki

Cyber-Wallet Schema Information

users

column name data type details
id integer not null, primary key
username string not null, indexed, unique
email string not null, unique
password_digest string not_null
session_token string not_null, index, unique

watchlistitems

column name data type details
id integer not null, primary key
stock_id integer not null, foreign key (references stocks), indexed
user_id integer not null, foreign key (references users), indexed

portfolios

column name data type details
id integer not null, primary key
user_id integer not null, foreign key (references users), indexed
purchase_power integer not_null

fills

column name data type details
id integer not null, primary key
user_id integer not null, foreign key (references users), indexed
stock_id integer not null, foreign key (references stocks), indexed
price float not null
size integer not null
side string not null
timestamp timestamp not null

stocks

column name data type details
id integer not null, primary key
symbol string not null, indexed, unique
name string not null, indexed, unique
last_sale integer not_null
market_cap string not_null
ipo_year string not_null
sector string not_null
industry string not_null
summary_quote string not_null