opendb/collection/uni-id-followers/collection.json
2021-12-17 18:13:09 +08:00

54 lines
1.2 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"schema": {
"bsonType": "object",
"required": ["friend_uid", "follow_uid"],
"permission": {
"read": true,
"create": "auth.uid != null",
"update": false,
"delete": "doc.follow_uid == auth.uid || doc.friend_uid == auth.uid"
},
"properties": {
"_id": {
"description": "ID系统自动生成"
},
"friend_uid": {
"bsonType": "string",
"description": "被关注者user_id参考uni-id-users表"
},
"follow_uid": {
"bsonType": "string",
"description": "关注者user_id参考uni-id-users表",
"forceDefaultValue": {
"$env": "uid"
}
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间",
"forceDefaultValue": {
"$env": "now"
}
}
}
},
"index": [
{
"IndexName": "follow_user_",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "friend_uid",
"Direction": "1"
},
{
"Name": "follow_uid",
"Direction": "1"
}
],
"MgoIsUnique": true
}
}
]
}