From f8acdc292528ce82329eada28fdfd76931401a91 Mon Sep 17 00:00:00 2001 From: linju Date: Mon, 20 Feb 2023 17:24:53 +0800 Subject: [PATCH] add uni-notification-center collection --- .../uni-notification-center/collection.json | 38 +++++++++++++++++++ .../uni-notification-center/package.json | 17 +++++++++ 2 files changed, 55 insertions(+) create mode 100644 collection/uni-notification-center/collection.json create mode 100644 collection/uni-notification-center/package.json diff --git a/collection/uni-notification-center/collection.json b/collection/uni-notification-center/collection.json new file mode 100644 index 0000000..565d4c5 --- /dev/null +++ b/collection/uni-notification-center/collection.json @@ -0,0 +1,38 @@ +{ + "schema": { + "bsonType": "object", + "permission": { + "create": false, + "delete": false, + "read": "auth.uid == doc.user_id", + "update": false + }, + "required": [ + "user_id", + "content" + ], + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "title":{ + "description": "标题", + "bsonType": "string" + }, + "content":{ + "description": "内容", + "bsonType": "string" + }, + "user_id":{ + "description": "消息接收者的用户id" + }, + "create_time":{ + "description": "创建时间", + "forceDefaultValue":{ + "$env": "now" + } + } + } + }, + "index": [] +} diff --git a/collection/uni-notification-center/package.json b/collection/uni-notification-center/package.json new file mode 100644 index 0000000..0a1db31 --- /dev/null +++ b/collection/uni-notification-center/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-notification-center", + "version": "0.0.1", + "description": "uni-notification-center", + "keywords": ["消息中心"], + "opendb": { + "title": "统一消息中心", + "type": "collection", + "contributors": [ + { + "name": "DCloud_JSON", + "email": "", + "homepage": "" + } + ] + } +}