This repository was archived by the owner on Jan 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Database Schemas and API Objects
Sebastian Mobo edited this page Oct 22, 2017
·
1 revision
Note that "ObjectIDs" refer to MongoDB Object IDs; usually, as 24-byte hex strings.
{
"_id": <ObjectID>,
"name": <String>,
"count": <Integer>,
"updated": <Date>,
"created": <Date>
}
{
"id": <ObjectID>,
"name": <String>,
"count": <Integer>,
"reserved": <Integer>,
"requested": <Integer>,
"available": <Integer>,
"created": <Date>,
"updated": <Date>
}
Note that the "reserved", "requested", and "available" fields are all computed using data from the Reservations collection; they aren't actually stored on the database.
{
"id": <ObjectID>,
"part": <Item ObjectID>,
"count": <Integer>,
"requester": <User ObjectID>,
"created": <Date>,
"updated": <Date>
}
{
"id": <ObjectID>,
"item": <Item ObjectID>,
"requester": <User ObjectID>,
"count": <Integer>,
"status": "waiting" | "in_progress" | "delayed" | "fulfilled",
"eta": <Date>,
"created": <Date>,
"updated": <Date>
}
{
"id": <ObjectID>
"title": <String>,
"description": <String>,
"startTime": <Date>,
"endTime": <Date>,
"maxHours": <Postive, Non-Zero Number>,
"userHours": [Array of Check-In Objects],
"created": <Date>,
"updated": <Date>,
}
{
"user": <User ObjectID>,
"hours": <Number>,
"checkIn": <Date>
}
{
"_id": <ObjectID>,
"username": <String>,
"realname": <String>,
"admin": <Boolean>,
"activityCreator": <Boolean>,
"disabled": <Boolean>,
"passwordHash": <String: Base64-Encoded Hash>,
"salt": <String>,
"created": <Date>,
"updated": <Date>,
}
{
"id": <ObjectID>,
"username": <String>,
"realname": <String>,
"admin": <Boolean>,
"activityCreator": <Boolean>,
"disabled": <Boolean>,
"created": <Date>,
"updated": <Date>,
}
For obvious reasons, user password hashes and salts aren't exposed to API clients.