freeCodeCamp/common/models/comment.json

62 lines
1.1 KiB
JSON

{
"name": "comment",
"base": "PersistedModel",
"idInjection": true,
"trackChanges": false,
"properties": {
"associatedPost": {
"type": "string",
"required": true
},
"originalStoryLink": {
"type": "string",
"default": ""
},
"originalStoryAuthorEmail": {
"type": "string",
"default": ""
},
"body": {
"type": "string",
"default": ""
},
"rank": {
"type": "number",
"default": "-Infinity"
},
"upvotes": {
"type": "array",
"default": []
},
"author": {
"type": {}
},
"comments": {
"type": "array",
"default": []
},
"commentOn": {
"type": "number",
"defaultFn": "now"
}
},
"validations": [],
"relations": {},
"acls": [
{
"accessType": "*",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "DENY"
},
{
"accessType": "EXECUTE",
"principalType": "ROLE",
"principalId": "$authenticated",
"permission": "ALLOW",
"property": "create"
}
],
"methods": []
}