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": "" + } + ] + } +}