From 827afca9069a71c1d026dc824d866ff2a14e4912 Mon Sep 17 00:00:00 2001 From: linju-json Date: Fri, 14 May 2021 20:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Euni-id-roles.schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../database/opendb-news-favorite.schema.json | 12 ++--- .../database/uni-id-permissions.schema.json | 46 +++++++++++++++++++ .../database/uni-id-roles.schema.json | 46 +++++++++++++++++++ .../database/uni-id-scores.schema.json | 2 +- .../database/opendb-feedback.schema.json | 12 ++--- 5 files changed, 104 insertions(+), 14 deletions(-) create mode 100644 uniCloud-aliyun/database/uni-id-permissions.schema.json create mode 100644 uniCloud-aliyun/database/uni-id-roles.schema.json diff --git a/uniCloud-aliyun/database/opendb-news-favorite.schema.json b/uniCloud-aliyun/database/opendb-news-favorite.schema.json index 0cb88c4..0c9376b 100644 --- a/uniCloud-aliyun/database/opendb-news-favorite.schema.json +++ b/uniCloud-aliyun/database/opendb-news-favorite.schema.json @@ -10,15 +10,15 @@ "properties": { "_id": { "description": "ID,系统自动生成" - }, + }, "article_id": { "bsonType": "string", "description": "文章id,参考opendb-news-articles表", "foreignKey": "opendb-news-articles._id" - }, - "article_title":{ - "bsonType": "string", - "description": "文章标题" + }, + "article_title": { + "bsonType": "string", + "description": "文章标题" }, "user_id": { "bsonType": "string", @@ -37,7 +37,7 @@ }, "update_date": { "bsonType": "timestamp", - "description": "更新/修改时间", + "description": "更新\/修改时间", "forceDefaultValue": { "$env": "now" } diff --git a/uniCloud-aliyun/database/uni-id-permissions.schema.json b/uniCloud-aliyun/database/uni-id-permissions.schema.json new file mode 100644 index 0000000..c5dba1e --- /dev/null +++ b/uniCloud-aliyun/database/uni-id-permissions.schema.json @@ -0,0 +1,46 @@ +{ + "bsonType": "object", + "required": ["permission_id", "permission_name"], + "properties": { + "_id": { + "description": "存储文档 ID,系统自动生成" + }, + "permission_id": { + "bsonType": "string", + "description": "权限唯一标识,不可修改,不允许重复", + "label": "权限标识", + "trim": "both", + "title": "权限ID", + "component": { + "name": "input" + } + }, + "permission_name": { + "bsonType": "string", + "description": "权限名称", + "label": "权限名称", + "title": "权限名称", + "trim": "both", + "component": { + "name": "input" + } + }, + "comment": { + "bsonType": "string", + "description": "备注", + "label": "备注", + "title": "备注", + "trim": "both", + "component": { + "name": "textarea" + } + }, + "create_date": { + "bsonType": "timestamp", + "description": "创建时间", + "forceDefaultValue": { + "$env": "now" + } + } + } +} diff --git a/uniCloud-aliyun/database/uni-id-roles.schema.json b/uniCloud-aliyun/database/uni-id-roles.schema.json new file mode 100644 index 0000000..c07ebf7 --- /dev/null +++ b/uniCloud-aliyun/database/uni-id-roles.schema.json @@ -0,0 +1,46 @@ +{ + "bsonType": "object", + "required": ["role_id"], + "permission": { + "read": false, + "create": false, + "update": false, + "delete": false + }, + "properties": { + "_id": { + "description": "存储文档 ID,系统自动生成" + }, + "role_id": { + "title": "唯一ID", + "bsonType": "string", + "description": "角色唯一标识,不可修改,不允许重复", + "trim": "both" + }, + "role_name": { + "title": "名称", + "bsonType": "string", + "description": "角色名称", + "trim": "both" + }, + "permission": { + "title": "权限", + "bsonType": "array", + "foreignKey": "uni-id-permissions.permission_id", + "description": "角色拥有的权限列表" + }, + "comment": { + "title": "备注", + "bsonType": "string", + "description": "备注", + "trim": "both" + }, + "create_date": { + "bsonType": "timestamp", + "description": "创建时间", + "forceDefaultValue": { + "$env": "now" + } + } + } +} diff --git a/uniCloud-aliyun/database/uni-id-scores.schema.json b/uniCloud-aliyun/database/uni-id-scores.schema.json index db8ede7..cbcb093 100644 --- a/uniCloud-aliyun/database/uni-id-scores.schema.json +++ b/uniCloud-aliyun/database/uni-id-scores.schema.json @@ -41,4 +41,4 @@ } } } -} +} diff --git a/uni_modules/uni-feedback/uniCloud/database/opendb-feedback.schema.json b/uni_modules/uni-feedback/uniCloud/database/opendb-feedback.schema.json index 702ab99..d64b865 100644 --- a/uni_modules/uni-feedback/uniCloud/database/opendb-feedback.schema.json +++ b/uni_modules/uni-feedback/uniCloud/database/opendb-feedback.schema.json @@ -1,8 +1,6 @@ { "bsonType": "object", - "required": [ - "content" - ], + "required": ["content"], "permission": { "create": "auth.uid != null", "read": true, @@ -15,7 +13,7 @@ }, "user_id": { "bsonType": "string", - "description": "留言反馈用户ID/回复留言用户ID,参考uni-id-users表", + "description": "留言反馈用户ID\/回复留言用户ID,参考uni-id-users表", "foreignKey": "uni-id-users._id", "forceDefaultValue": { "$env": "uid" @@ -23,14 +21,14 @@ }, "create_date": { "bsonType": "timestamp", - "title": "留言时间/回复留言时间", + "title": "留言时间\/回复留言时间", "forceDefaultValue": { "$env": "now" } }, "content": { "bsonType": "string", - "title": "留言内容/回复内容", + "title": "留言内容\/回复内容", "componentForEdit": { "name": "textarea" }, @@ -71,4 +69,4 @@ "defaultValue": 0 } } -} \ No newline at end of file +} -- GitLab