RobCoInc / server

API Server
0 stars 0 forks source link

Finalize columns for each table #2

Open tehp opened 6 years ago

tehp commented 6 years ago

We need to choose what fields each table will have so that I can structure the the API JSON.

MorganAriss commented 6 years ago

USER

_id NUMERIC/long <-- autogenerate password VARCHAR email VARCHAR <-- unique identifier plus login credential firstName VARCHAR lastName VARCHAR companyId NUMERIC <-- FORIEGN KEY REFERENCES _companyId TABLE companies cellNumber VARCHAR isAdmin BOOL isBasic BOOL <-- holder

MorganAriss commented 6 years ago

COMPANY

_id NUMERIC/long <-- autogenerate companyName VARCHAR <-- secureNum NUMERIC/long <--- for employee registration purposes level <-- subscription level (payment) location <-- email <-- contactEmail

MorganAriss commented 6 years ago

LOCATION

_id NUMERIC/long <--- autogenerate locationName VARCHAR <--- locationCity VARCHAR <--- locationAddress VARCHAR <---

MorganAriss commented 6 years ago

SHIFT

_id NUMERIC/long <--- autogenerate time VARCHAR <--- date VARCHAR <--- locationId NUMERIC/long <--- FOREIGN KEY locationId

tehp commented 6 years ago

Currently here: https://github.com/RobCoInc/server/blob/dev/db/db.sql

tehp commented 6 years ago

DESCRIPTION

_id NUMERIC/long <--- autogenerate picture <--- must figure out how to do this name VARCHAR height VARCHAR weight VARCHAR eyeColor VARCHAR skinColor VARCHAR hairColor VARCHAR hairStyle VARCHAR arrestId NUMERIC/long <--- FOREIGN KEY arrestId

tehp commented 6 years ago

ARREST

_id NUMERIC/long <--- autogenerate reason VARCHAR <--- law broken complacency NUMERIC <--- 1 to 5 how compliant they were after confronted time VARCHAR <--- taken from device date VARCHAR <--- taken from shift locationId NUMERIC/long <--- FOREIGN KEY locationId descriptionId NUMERIC/long <--- FOREIGN KEY descriptionId userId NUMERIC/long <-- FOREIGN KEY userId

MorganAriss commented 6 years ago

UserShift

This table is created when a supervisor assigns a shift to an employee. The associated shift becomes unavailable and the UserShift is associated with the selected user.

shiftId <--- FOREIGN KEY shift REFERENCES _id userId <--- FOREIGN KEY user REFERENCES _id