mirror of
https://gitee.com/dcloud/opendb.git
synced 2024-11-10 11:09:44 +08:00
54 lines
1.1 KiB
JSON
54 lines
1.1 KiB
JSON
{
|
||
"schema": {
|
||
"bsonType": "object",
|
||
"required": ["friend_uid", "follow_uid"],
|
||
"permission": {
|
||
"read": true,
|
||
"create": "auth.uid != null",
|
||
"update": false,
|
||
"delete": "auth.uid != null"
|
||
},
|
||
"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
|
||
}
|
||
}
|
||
]
|
||
}
|