2020-09-07 19:58:32 +08:00
|
|
|
|
{
|
|
|
|
|
"schema": {
|
|
|
|
|
"bsonType": "object",
|
2020-09-08 14:37:48 +08:00
|
|
|
|
"required": ["friend_uid", "follow_uid"],
|
2020-10-27 17:33:14 +08:00
|
|
|
|
"permission": {
|
2020-10-28 20:21:38 +08:00
|
|
|
|
"read": true,
|
|
|
|
|
"create": "auth.uid != null",
|
|
|
|
|
"update": false,
|
|
|
|
|
"delete": "auth.uid != null"
|
2020-10-27 17:33:14 +08:00
|
|
|
|
},
|
2020-09-07 19:58:32 +08:00
|
|
|
|
"properties": {
|
|
|
|
|
"_id": {
|
|
|
|
|
"description": "ID,系统自动生成"
|
|
|
|
|
},
|
2020-09-08 14:30:04 +08:00
|
|
|
|
"friend_uid": {
|
2020-09-07 19:58:32 +08:00
|
|
|
|
"bsonType": "string",
|
2020-09-08 14:30:04 +08:00
|
|
|
|
"description": "被关注者user_id,参考uni-id-users表"
|
2020-09-07 19:58:32 +08:00
|
|
|
|
},
|
2020-09-08 14:30:04 +08:00
|
|
|
|
"follow_uid": {
|
2020-09-07 19:58:32 +08:00
|
|
|
|
"bsonType": "string",
|
2020-10-27 17:51:10 +08:00
|
|
|
|
"description": "关注者user_id,参考uni-id-users表",
|
|
|
|
|
"forceDefaultValue": {
|
|
|
|
|
"$env": "uid"
|
|
|
|
|
}
|
2020-09-07 19:58:32 +08:00
|
|
|
|
},
|
|
|
|
|
"create_date": {
|
|
|
|
|
"bsonType": "timestamp",
|
2020-10-27 17:51:10 +08:00
|
|
|
|
"description": "创建时间",
|
|
|
|
|
"forceDefaultValue": {
|
|
|
|
|
"$env": "now"
|
|
|
|
|
}
|
2020-09-07 19:58:32 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
2020-10-27 17:51:10 +08:00
|
|
|
|
"index": [
|
|
|
|
|
{
|
|
|
|
|
"IndexName": "follow_user_",
|
|
|
|
|
"MgoKeySchema": {
|
|
|
|
|
"MgoIndexKeys": [
|
|
|
|
|
{
|
|
|
|
|
"Name": "friend_uid",
|
|
|
|
|
"Direction": "1"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"Name": "follow_uid",
|
|
|
|
|
"Direction": "1"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"MgoIsUnique": true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
2020-09-07 19:58:32 +08:00
|
|
|
|
}
|