{ "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 } } ] }