新增uni-push-message、uni-im-friend-invite,更新uni-im-conversation

This commit is contained in:
linju 2023-01-17 22:30:34 +08:00
parent 342b490f92
commit f1361e9f3f
6 changed files with 142 additions and 8 deletions

View File

@ -3,9 +3,9 @@
"bsonType": "object",
"required": [],
"permission": {
"read": "doc.owner_uid == auth.uid",
"read": "doc.user_id == auth.uid",
"create": false,
"update": "doc.owner_uid == auth.uid",
"update": "doc.user_id == auth.uid",
"delete": false
},
"properties": {
@ -26,15 +26,15 @@
"write": false
}
},
"owner_uid": {
"user_id": {
"description": "所属用户id",
"bsonType": "string",
"permission": {
"write": false
}
},
"user_id": {
"description": "对话的用户id",
"friend_uid": {
"description": "对话的好友的用户id",
"permission": {
"write": false
}
@ -47,14 +47,18 @@
},
"unread_count": {
"description": "未读消息数量",
"bsonType": "int"
"bsonType": "int",
"defaultValue": 0
},
"last_msg_note": {
"description": "最后一条消息概述文本消息的前n个字消息为多媒体时只描述类型"
},
"update_time": {
"bsonType": "timestamp",
"description": "最后一次会话时间"
"description": "最后一次会话时间",
"defaultValue": {
"$env": "now"
}
}
}
},

View File

@ -1,6 +1,6 @@
{
"name": "@opendb/uni-im-conversation",
"version": "0.0.1",
"version": "0.0.2",
"description": "uni-im-conversation",
"keywords": ["uni-im","即时通讯"],
"opendb": {

View File

@ -0,0 +1,71 @@
{
"schema": {
"bsonType": "object",
"required": [],
"permission": {
"read": "doc.to_uid == auth.uid || doc.from_uid == auth.uid",
"create": true,
"update": "doc.to_uid == auth.uid",
"delete": "doc.to_uid == auth.uid"
},
"properties": {
"_id": {
"description": "ID系统自动生成"
},
"from_uid": {
"description": "发出邀请的用户id",
"bsonType": "string",
"forceDefaultValue": {
"$env": "uid"
},
"foreignKey": "uni-id-users._id"
},
"to_uid": {
"defaultValue": "接收邀请的用户id",
"bsonType": "string",
"enum": {
"collection": "uni-id-users",
"field": "_id as value,username as text"
},
"foreignKey": "uni-id-users._id"
},
"message": {
"bsonType": "string",
"description": "申请加群的验证或请求信息"
},
"creat_time": {
"bsonType": "timestamp",
"description": "申请入群时间",
"forceDefaultValue": {
"$env": "now"
}
},
"state": {
"bsonType": "int",
"description": "状态",
"enum": [{
"text": "待处理",
"value": 0
},
{
"text": "已同意",
"value": 100
},
{
"text": "已拒绝",
"value": -100
}
],
"forceDefaultValue": 0
},
"update_time": {
"bsonType": "timestamp",
"description": "更新申请入群时间(多次申请加入更新此字段)",
"forceDefaultValue": {
"$env": "now"
}
}
}
},
"index": []
}

View File

@ -0,0 +1,17 @@
{
"name": "@opendb/uni-im-friend-invite",
"version": "0.0.1",
"description": "uni-im-friend-invite",
"keywords": ["uni-im","即时通讯"],
"opendb": {
"title": "uni-im邀请用户成为好友",
"type": "collection",
"contributors": [
{
"name": "DCloud_JSON",
"email": "",
"homepage": ""
}
]
}
}

View File

@ -0,0 +1,25 @@
{
"schema": {
"bsonType": "object",
"required": [],
"permission": {
"read": true,
"create": false,
"update": "doc.user_id == auth.uid",
"delete": false
},
"properties": {
"_id": {
"description": "ID系统自动生成"
},
"is_read": {
"bsonType": "bool",
"defaultValue": false
},
"payload": {
"state": {}
}
}
},
"index": []
}

View File

@ -0,0 +1,17 @@
{
"name": "@opendb/uni-push-message",
"version": "0.0.1",
"description": "uni-push-message",
"keywords": ["uni-push","即时通讯"],
"opendb": {
"title": "统一推送消息记录",
"type": "collection",
"contributors": [
{
"name": "DCloud_JSON",
"email": "",
"homepage": ""
}
]
}
}