From 274e5897ac61f95dc42c691f030479858f37bd92 Mon Sep 17 00:00:00 2001 From: linju Date: Mon, 23 Oct 2023 17:08:50 +0800 Subject: [PATCH] update opendb-department --- collection/opendb-department/collection.json | 122 ++++++++++--------- collection/opendb-department/package.json | 2 +- 2 files changed, 64 insertions(+), 60 deletions(-) diff --git a/collection/opendb-department/collection.json b/collection/opendb-department/collection.json index 12befe3..e99af2f 100644 --- a/collection/opendb-department/collection.json +++ b/collection/opendb-department/collection.json @@ -1,61 +1,65 @@ -{ - "schema": { - "bsonType": "object", - "required": ["name"], - "permission": { - "read": true, - "create": false, - "update": false, - "delete": false - }, - "properties": { - "_id": { - "description": "ID,系统自动生成" - }, - "parent_id": { - "bsonType": "string", - "description": "父级部门ID", - "parentKey": "_id" - }, - "name": { - "bsonType": "string", - "description": "部门名称", - "title": "部门名称", - "trim":"both" - }, - "level": { - "bsonType": "int", - "description": "部门层级,为提升检索效率而作的冗余设计" - }, - "sort": { - "bsonType": "int", - "description": "部门在当前层级下的顺序,由小到大", - "title":"显示顺序" - }, - "manager_uid":{ - "bsonType": "string", - "description": "部门主管的userid, 参考`uni-id-users` 表", - "foreignKey": "uni-id-users._id" - }, - "create_date": { - "bsonType": "timestamp", - "description": "部门创建时间", - "forceDefaultValue": { - "$env": "now" - } - } - } - }, +{ + "schema": { + "bsonType": "object", + "required": ["name"], + "permission": { + "read": true, + "create": false, + "update": false, + "delete": false + }, + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "parent_id": { + "bsonType": "string", + "description": "父级部门ID", + "parentKey": "_id" + }, + "name": { + "bsonType": "string", + "description": "部门名称", + "title": "部门名称", + "trim": "both" + }, + "level": { + "bsonType": "int", + "description": "部门层级,为提升检索效率而作的冗余设计" + }, + "sort": { + "bsonType": "int", + "description": "部门在当前层级下的顺序,由小到大", + "title": "显示顺序" + }, + "manager_uid": { + "bsonType": "string", + "description": "部门主管的userid, 参考`uni-id-users` 表", + "foreignKey": "uni-id-users._id" + }, + "create_date": { + "bsonType": "timestamp", + "description": "部门创建时间", + "forceDefaultValue": { + "$env": "now" + } + }, + "status": { + "bsonType": "int", + "description": "部门状态,0-正常、1-禁用" + } + } + }, "index": [ - { - "IndexName": "name", - "MgoKeySchema": { - "MgoIndexKeys": [{ - "Name": "name", - "Direction": "1" - }], - "MgoIsUnique": false - } - } - ] + { + "IndexName": "name", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "name", + "Direction": "1" + }], + "MgoIsUnique": false + } + } + ] } diff --git a/collection/opendb-department/package.json b/collection/opendb-department/package.json index f0fa804..5d2b6bc 100644 --- a/collection/opendb-department/package.json +++ b/collection/opendb-department/package.json @@ -1,6 +1,6 @@ { "name": "@opendb/opendb-department", - "version": "0.1.0", + "version": "0.1.1", "description": "部门表", "keywords": ["部门", "组织机构"], "opendb": {