Files
im-system/uni-im示例/uni_modules/uni-im/uniCloud/database/uni-im-group.schema.json
2023-09-24 17:55:19 +08:00

69 lines
1.3 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.
// 文档教程: https://uniapp.dcloud.net.cn/uniCloud/schema
{
"bsonType": "object",
"required": ["name","join_option"],
"permission": {
"read": true,
"create": true,
"update": "auth.uid == doc.user_id",
"delete": "auth.uid == doc.user_id"
},
"properties": {
"_id": {
"description": "ID系统自动生成"
},
"user_id":{
"bsonType": "string",
"description": "群主id",
"forceDefaultValue":{
"$env":"uid"
}
},
"name":{
"bsonType": "string",
"label": "群名称",
"maxLength": 30
},
"introduction":{
"bsonType": "string",
"label": "群简介",
"maxLength": 240
},
"notification":{
"bsonType": "string",
"label": "群公告",
"maxLength": 240
},
"avatar_file":{
"bsonType": "file",
"label": "群头像"
},
"join_option":{
"bsonType": "string",
"description": "申请加群选项",
"label": "申请加群方式",
"defaultValue":"needPermission",
"enum":[
{
"text": "需要验证权限",
"value": "needPermission"
},
{
"text": "自由加入",
"value": "freeAccess"
},
{
"text": "禁止加入",
"value": "disableApply"
}
]
},
"create_time": {
"bsonType": "timestamp",
"description": "群创建的时间戳",
"forceDefaultValue": {
"$env": "now"
}
}
}
}