opendb/collection/uni-im-conversation/collection.json
2023-11-23 14:57:51 +08:00

80 lines
1.8 KiB
JSON
Raw 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.

{
"schema": {
"bsonType": "object",
"required": [],
"permission": {
"read": "doc.user_id == auth.uid",
"create": false,
"update": "doc.user_id == auth.uid",
"delete": false
},
"properties": {
"_id": {
"description": "ID系统自动生成"
},
"id": {
"description": "会话ID由会话双方用户的id按一定规律排序后的哈希值",
"permission": {
"write": false
}
},
"type": {
"description": "会话类型,区分:群聊和单聊",
"bsonType": "int",
"label": "",
"permission": {
"write": false
}
},
"user_id": {
"description": "所属用户id",
"bsonType": "string",
"permission": {
"write": false
}
},
"friend_uid": {
"description": "对话的好友的用户id",
"permission": {
"write": false
}
},
"group_id": {
"description": "对话的群id",
"permission": {
"write": false
}
},
"unread_count": {
"description": "未读消息数量",
"bsonType": "int",
"defaultValue": 0
},
"last_msg_note": {
"description": "最后一条消息概述文本消息的前n个字消息为多媒体时只描述类型"
},
"update_time": {
"bsonType": "timestamp",
"description": "最后一次会话时间",
"defaultValue": {
"$env": "now"
}
}
}
},
"index": [
{
"IndexName": "id",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "id",
"Direction": "1"
}
],
"MgoIsUnique": false
}
}
]
}