-
Notifications
You must be signed in to change notification settings - Fork 2
Database Models
The leaderboard will undoubtedly require the concept of a User, the initial design for which may include:
| 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:
| 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.