// 文档教程: https://uniapp.dcloud.net.cn/uniCloud/schema { "bsonType": "object", "required": [], "permission": { "read": "doc.state || auth.uid == doc.uid || 'AUDITOR' in auth.role", "create": "auth.uid != null", "update": true, "delete": "auth.uid == doc.uid" }, "properties": { "_id": { "description": "ID,系统自动生成" }, "text": { "bsonType": "string", "permission":{ "update":"'AUDITOR' in auth.role" } }, "uid": { "forceDefaultValue": { "$env": "uid" }, "foreignKey": "uni-id-users._id" }, "ip": { "forceDefaultValue": { "$env": "clientIP" } }, "create_time": { "forceDefaultValue": { "$env": "now" } }, "state": { "bsonType": "bool", "forceDefaultValue":false, "permission":{ "write":"'AUDITOR' in auth.role" } } } }