mirror of
https://gitee.com/dcloud/opendb.git
synced 2024-11-10 11:09:44 +08:00
add opendb-department
This commit is contained in:
parent
f4ce8662bb
commit
61ef724818
61
collection/opendb-department/collection.json
Normal file
61
collection/opendb-department/collection.json
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
{
|
||||||
|
"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":"显示顺序"
|
||||||
|
},
|
||||||
|
"dep_manager":{
|
||||||
|
"bsonType": "string",
|
||||||
|
"description": "部门主管的userid, 参考`uni-id-users` 表",
|
||||||
|
"foreignKey": "uni-id-users._id"
|
||||||
|
},
|
||||||
|
"create_date": {
|
||||||
|
"bsonType": "timestamp",
|
||||||
|
"description": "部门创建时间",
|
||||||
|
"forceDefaultValue": {
|
||||||
|
"$env": "now"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"index": [
|
||||||
|
{
|
||||||
|
"IndexName": "name",
|
||||||
|
"MgoKeySchema": {
|
||||||
|
"MgoIndexKeys": [{
|
||||||
|
"Name": "name",
|
||||||
|
"Direction": "1"
|
||||||
|
}],
|
||||||
|
"MgoIsUnique": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
1
collection/opendb-department/data.json
Normal file
1
collection/opendb-department/data.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
[]
|
17
collection/opendb-department/package.json
Normal file
17
collection/opendb-department/package.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"name": "@opendb/opendb-department",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"description": "部门表",
|
||||||
|
"keywords": ["部门", "组织机构"],
|
||||||
|
"opendb": {
|
||||||
|
"title": "部门表",
|
||||||
|
"type": "collection",
|
||||||
|
"contributors": [
|
||||||
|
{
|
||||||
|
"name": "DCloud",
|
||||||
|
"email": "service@dcloud.io",
|
||||||
|
"homepage": "https://gitee.com/dcloud/opendb"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
"opendb-admin-menus": {},
|
"opendb-admin-menus": {},
|
||||||
"opendb-admin-log":{}
|
"opendb-admin-log":{},
|
||||||
|
"opendb-department":{}
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,6 @@
|
|||||||
"uni-id-task": {},
|
"uni-id-task": {},
|
||||||
"uni-id-task-log": {},
|
"uni-id-task-log": {},
|
||||||
"uni-id-followers": {},
|
"uni-id-followers": {},
|
||||||
"opendb-verify-codes": {}
|
"opendb-verify-codes": {},
|
||||||
|
"opendb-department":{}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user