opendb/collection/uni-id-followers/collection.json

54 lines
1.2 KiB
JSON
Raw Normal View History

2020-09-07 19:58:32 +08:00
{
"schema": {
"bsonType": "object",
2020-09-08 14:37:48 +08:00
"required": ["friend_uid", "follow_uid"],
"permission": {
2020-10-28 20:21:38 +08:00
"read": true,
"create": "auth.uid != null",
"update": false,
2021-12-17 18:13:09 +08:00
"delete": "doc.follow_uid == auth.uid || doc.friend_uid == auth.uid"
},
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",
"description": "关注者user_id参考uni-id-users表",
"forceDefaultValue": {
"$env": "uid"
}
2020-09-07 19:58:32 +08:00
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间",
"forceDefaultValue": {
"$env": "now"
}
2020-09-07 19:58:32 +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
}