Skip to content

Database Schema

ZaviarBrown edited this page Jun 28, 2021 · 3 revisions

Users

Column name data type details
id int PK, not null
username string not null
hashedPassword string not null
email string not null, unique
cashBalance numeric

Planets

Column name data type details
id int PK, not null
name string not null
price numeric not null
description text not null
laborForce int not null
ticker string not null
crypto string not null
planet_leader string not null
top_export string not null

Assets

Column name data type details
id int PK, not null
userId int not null
planetId int not null
shares int not null
planetName string not null
ticker string not null
crypto string not null
  • userId references users table
  • planetId references planets table

Transactions

Column name data type details
id int PK, not null
userId int not null
planetId int not null
shares int not null
price_paid numeric not null
orderType string not null
  • userId references users table
  • planetId references planets table

Clone this wiki locally