-
Notifications
You must be signed in to change notification settings - Fork 6
Models
Amitvikram Dwivedi edited this page Oct 2, 2021
·
4 revisions
Information about the models is provided in this wiki. Based on the direction in which the project moves, the actual attributes may be different from those mentioned below.
The User model is for the participants taking part in the CTF and admins maintaining it. The Admin and Participants are distinguished by the isAdmin attribute of the model.
Attribute | Type | Description |
---|---|---|
username | String | Username of the user |
String | Email of the user | |
password | String | Password of the user (encrypted) |
isAdmin | Boolean | Boolean indicating whether a user is an admin or not |
levelsCompleted | Array[Number] | Array of question ids which user has completed |
score | Number | Score of the user |
lastSubmit | Date | Timestamp of last submit, used for cooldown |
lastSuccess | Date | Timestamp of last correct answer |
verificationStatus | String | User's email has been verified or not |
verificationCode | String | Verification code sent with email |
The Question model is made for storing the questions, which have been created for the CTF.
Attribute | Type | Description |
---|---|---|
text | String | Description/Text related to the question |
image | String | URL of the image associated with the question (optional) |
id | Number | ID of the question |
points | Number | Points associated with the question |
answer | String | Answer of the question |
link | String | External Link to a website (optional) |
category | String | The Category of the question |