Skip to content

Database Models

Nolan Prescott edited this page Jun 7, 2016 · 4 revisions

The leaderboard will undoubtedly require the concept of a User, the initial design for which may include:

User

Field Type
id UUID
email String
name String
password String
locked Boolean
lastLogin Date
lastUpdatedBy String
lastUpdated Date
createdDate Date
isAdmin Boolean
badges [Badge ID]

Be mindful of protecting user passwords with best practices such as hashing and salting.

Users have a badges array that maps to a Badges table:

Badges

Field Type
id UUID
image Blob

the idea with the image blob is we will include the entire thumbnail/svg/whatever image within the database itself and avoid having to share and migrate filesystem paths.

Clone this wiki locally