-
Notifications
You must be signed in to change notification settings - Fork 2
/
Schema.json
42 lines (42 loc) · 1.41 KB
/
Schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
"models": {
"user-model": {
"email": "String, required, not-null, not-blank",
"username": "String, required, not-null, not-blank",
"password": "String, Hash-type, required, not-null, not-blank"
},
"user-profile": {
"user": "Object id of User model",
"first_name": "String",
"last_name": "String",
"bio": "string"
},
"group": {
"name": "string, required",
"description": "string, required",
"type": ["PRIVATE", "PUBLIC", "CLOSED"],
"users": "Array of user model Object id"
},
"group-meta":{
"admins":"Array of user model Object id",
"moderator": "Array of user model Object id",
"group": "Object id of group id"
},
"posts": {
"content": "string, required",
"user": "Object id of User model",
"group": "Object id of group"
},
"comments": {
"content": "string, required",
"user": "Object id of User model",
"group": "Object id of group",
"post": "Object id of post"
}
},
"actions":{
"user":["create && user-profile", "get && user-profile", "update"],
"user-profile": ["create", "get", "update"],
"group": ["create", "get", "Add user", "Remove user", ""]
}
}