freeCodeCamp/common/models/user.json

240 lines
5.0 KiB
JSON

{
"name": "user",
"base": "User",
"strict": true,
"emailVerificationRequired": false,
"idInjection": true,
"trackChanges": false,
"properties": {
"email": {
"type": "string",
"index": {
"mongodb": {
"unique": true,
"background": true,
"sparse": true
}
}
},
"password": {
"type": "string"
},
"progressTimestamps": {
"type": "array",
"default": []
},
"isBanned": {
"type": "boolean",
"default": false,
"description": "User is banned from posting to camper news"
},
"isCheater": {
"type": "boolean",
"default": false,
"description": "Users who are confirmed to break academic honesty policy are marked as cheaters"
},
"isGithubCool": {
"type": "boolean",
"default": false
},
"githubId": {
"type": "string"
},
"githubURL": {
"type": "string"
},
"githubEmail": {
"type": "string"
},
"joinedGithubOn": {
"type": "date"
},
"isMigrationGrandfathered": {
"type": "boolean",
"default": false
},
"username": {
"type": "string",
"require": true,
"index": {
"mongodb": {
"unique": true,
"background": true
}
}
},
"bio": {
"type": "string",
"default": ""
},
"name": {
"type": "string",
"default": ""
},
"gender": {
"type": "string",
"default": ""
},
"location": {
"type": "string",
"default": ""
},
"picture": {
"type": "string",
"default": ""
},
"linkedin": {
"type": "string"
},
"codepen": {
"type": "string"
},
"twitter": {
"type": "string"
},
"facebook": {
"type": "string"
},
"google": {
"type": "string"
},
"currentStreak": {
"type": "number",
"default": 0
},
"longestStreak": {
"type": "number",
"default": 0
},
"sendMonthlyEmail": {
"type": "boolean",
"default": true
},
"isLocked": {
"type": "boolean",
"default": false,
"description": "Campers profile does not show challenges/certificates to the public"
},
"currentChallenge": {
"type": {}
},
"isUniqMigrated": {
"type": "boolean",
"default": false,
"description": "Campers completedChallenges array is free of duplicates"
},
"isHonest": {
"type": "boolean",
"default": false,
"description": "Camper has signed academic honesty policy"
},
"isFrontEndCert": {
"type": "boolean",
"defaut": false,
"description": "Camper is front end certified"
},
"isDataVisCert": {
"type": "boolean",
"defaut": false,
"description": "Camper is data visualization certified"
},
"isBackEndCert": {
"type": "boolean",
"default": false,
"description": "Campers is back end certified"
},
"isFullStackCert": {
"type": "boolean",
"default": false,
"description": "Campers is full stack certified"
},
"isChallengeMapMigrated": {
"type": "boolean",
"default": false,
"description": "Migrate completedChallenges array to challenge map"
},
"challengeMap": {
"type": "object",
"default": {},
"description": "A map by id of all the user completed challenges"
},
"completedChallenges": {
"type": [
{
"completedDate": "number",
"lastUpdated": "number",
"id": "string",
"name": "string",
"completedWith": "string",
"solution": "string",
"githubLink": "string",
"verified": "boolean",
"challengeType": {
"type": "number",
"default": 0
}
}
],
"default": []
},
"rand": {
"type": "number",
"index": true
},
"tshirtVote": {
"type": "number"
},
"timezone": {
"type": "string"
}
},
"validations": [],
"relations": {
"credentials": {
"type": "hasMany",
"model": "userCredential",
"foreignKey": ""
},
"identities": {
"type": "hasMany",
"model": "userIdentity",
"foreignKey": ""
},
"pledge": {
"type": "hasOne",
"model": "pledge",
"foreignKey": ""
}
},
"acls": [
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "doesExist"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "about"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW",
"property": "giveBrowniePoints"
}
],
"methods": []
}