mirror of
https://gitee.com/dcloud/opendb.git
synced 2024-09-20 11:33:01 +08:00
Compare commits
4 Commits
42b09d2b5b
...
5404566751
Author | SHA1 | Date | |
---|---|---|---|
|
5404566751 | ||
|
86d82f56d8 | ||
|
2e8c42b2c2 | ||
|
274e5897ac |
@ -21,41 +21,45 @@
|
||||
"bsonType": "string",
|
||||
"description": "部门名称",
|
||||
"title": "部门名称",
|
||||
"trim":"both"
|
||||
"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"
|
||||
},
|
||||
"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
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@opendb/opendb-department",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"description": "部门表",
|
||||
"keywords": ["部门", "组织机构"],
|
||||
"opendb": {
|
||||
|
48
collection/opendb-notice-comment/collection.json
Normal file
48
collection/opendb-notice-comment/collection.json
Normal file
@ -0,0 +1,48 @@
|
||||
{
|
||||
"schema": {
|
||||
"bsonType": "object",
|
||||
"required": ["notice_id"],
|
||||
"permission": {
|
||||
"read": "doc.state == 1 || auth.uid == doc.user_id",
|
||||
"create": "auth.uid != null",
|
||||
"update": false,
|
||||
"delete": "auth.uid == doc.user_id"
|
||||
},
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "ID,系统自动生成"
|
||||
},
|
||||
"notice_id": {
|
||||
"description": "通知的id",
|
||||
"foreignKey": "opendb-notice._id"
|
||||
},
|
||||
"text": {
|
||||
"bsonType": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"forceDefaultValue": {
|
||||
"$env": "uid"
|
||||
},
|
||||
"foreignKey": "uni-id-users._id"
|
||||
},
|
||||
"ip": {
|
||||
"forceDefaultValue": {
|
||||
"$env": "clientIP"
|
||||
}
|
||||
},
|
||||
"create_time": {
|
||||
"forceDefaultValue": {
|
||||
"$env": "now"
|
||||
}
|
||||
},
|
||||
"state": {
|
||||
"bsonType": "int",
|
||||
"defaultValue": 0,
|
||||
"permission": {
|
||||
"write": "'AUDITOR' in auth.role"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"index": []
|
||||
}
|
1
collection/opendb-notice-comment/data.json
Normal file
1
collection/opendb-notice-comment/data.json
Normal file
@ -0,0 +1 @@
|
||||
[]
|
17
collection/opendb-notice-comment/package.json
Normal file
17
collection/opendb-notice-comment/package.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "@opendb/opendb-notice-comment",
|
||||
"version": "0.0.1",
|
||||
"description": "关于通知的评论",
|
||||
"keywords": ["关于通知的评论"],
|
||||
"opendb": {
|
||||
"title": "关于通知的评论",
|
||||
"type": "collection",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "DCloud",
|
||||
"email": "service@dcloud.io",
|
||||
"homepage": "https://gitee.com/dcloud/opendb"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
51
collection/opendb-notice/collection.json
Normal file
51
collection/opendb-notice/collection.json
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
"schema": {
|
||||
"bsonType": "object",
|
||||
"permission": {
|
||||
"create": false,
|
||||
"delete": false,
|
||||
"read": true,
|
||||
"update": false
|
||||
},
|
||||
"required": [
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"_id": {
|
||||
"description": "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": []
|
||||
}
|
17
collection/opendb-notice/package.json
Normal file
17
collection/opendb-notice/package.json
Normal file
@ -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": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user