From 2e8c42b2c29970f8482c238b2eab30ff618b09fc Mon Sep 17 00:00:00 2001 From: linju Date: Mon, 23 Oct 2023 17:23:51 +0800 Subject: [PATCH] add opendb-notice --- collection/opendb-notice/collection.json | 52 ++++++++++++++++++++++++ collection/opendb-notice/package.json | 17 ++++++++ 2 files changed, 69 insertions(+) create mode 100644 collection/opendb-notice/collection.json create mode 100644 collection/opendb-notice/package.json diff --git a/collection/opendb-notice/collection.json b/collection/opendb-notice/collection.json new file mode 100644 index 0000000..b2a9331 --- /dev/null +++ b/collection/opendb-notice/collection.json @@ -0,0 +1,52 @@ +{ + "schema": { + "bsonType": "object", + "permission": { + "create": false, + "delete": false, + "read": true, + "update": false + }, + "required": [ + "data" + ], + "properties": { + "_id": { + "description": "ID,系统自动生成", + "foreignKey": "comment.notice_id" + }, + "data": { + "bsonType": "string", + "description": "内容数据", + "label": "内容数据", + "maxLength": 32, + "errorMessage": { + "maxLength": "{label}不能大于{maxLength}个字符" + } + }, + "view_count": { + "bsonType": "int", + "title": "阅读数量", + "description": "阅读数量", + "permission": { + "write": false + } + }, + "create_time": { + "description": "创建时间", + "bsonType": "timestamp", + "forceDefaultValue": { + "$env": "now" + } + }, + "update_time": { + "description": "更新时间", + "bsonType": "timestamp", + "forceDefaultValue": { + "$env": "now" + } + } + } + }, + "index": [] +} diff --git a/collection/opendb-notice/package.json b/collection/opendb-notice/package.json new file mode 100644 index 0000000..fb1d24c --- /dev/null +++ b/collection/opendb-notice/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/opendb-notice", + "version": "0.0.1", + "description": "opendb-notice", + "keywords": ["通知"], + "opendb": { + "title": "通知", + "type": "collection", + "contributors": [ + { + "name": "DCloud_JSON", + "email": "", + "homepage": "" + } + ] + } +}