mirror of
https://gitee.com/dcloud/opendb.git
synced 2024-11-14 23:12:59 +08:00
63 lines
1.5 KiB
JSON
63 lines
1.5 KiB
JSON
|
{
|
|||
|
"schema": {
|
|||
|
"bsonType": "object",
|
|||
|
"required": [],
|
|||
|
"permission": {
|
|||
|
"read": "doc.owner_uid == auth.uid",
|
|||
|
"create": false,
|
|||
|
"update": "doc.owner_uid == auth.uid",
|
|||
|
"delete": false
|
|||
|
},
|
|||
|
"properties": {
|
|||
|
"_id": {
|
|||
|
"description": "ID,系统自动生成"
|
|||
|
},
|
|||
|
"id": {
|
|||
|
"description": "会话ID,由会话双方用户的id按一定规律排序后的哈希值",
|
|||
|
"permission": {
|
|||
|
"write": false
|
|||
|
}
|
|||
|
},
|
|||
|
"type": {
|
|||
|
"description": "会话类型,区分:群聊和单聊",
|
|||
|
"bsonType": "int",
|
|||
|
"label": "",
|
|||
|
"permission": {
|
|||
|
"write": false
|
|||
|
}
|
|||
|
},
|
|||
|
"owner_uid": {
|
|||
|
"description": "所属用户id",
|
|||
|
"bsonType": "string",
|
|||
|
"permission": {
|
|||
|
"write": false
|
|||
|
}
|
|||
|
},
|
|||
|
"user_id": {
|
|||
|
"description": "对话的用户id",
|
|||
|
"permission": {
|
|||
|
"write": false
|
|||
|
}
|
|||
|
},
|
|||
|
"group_id": {
|
|||
|
"description": "对话的群id",
|
|||
|
"permission": {
|
|||
|
"write": false
|
|||
|
}
|
|||
|
},
|
|||
|
"unread_count": {
|
|||
|
"description": "未读消息数量",
|
|||
|
"bsonType": "int"
|
|||
|
},
|
|||
|
"last_msg_note": {
|
|||
|
"description": "最后一条消息概述(文本消息的前n个字,消息为多媒体时只描述类型)"
|
|||
|
},
|
|||
|
"update_time": {
|
|||
|
"bsonType": "timestamp",
|
|||
|
"description": "最后一次会话时间"
|
|||
|
}
|
|||
|
}
|
|||
|
},
|
|||
|
"index": []
|
|||
|
}
|