Compare commits

...

4 Commits

Author SHA1 Message Date
linju
5404566751 add opendb-notice-comment 2023-10-23 20:43:45 +08:00
linju
86d82f56d8 Update collection.json 2023-10-23 17:46:41 +08:00
linju
2e8c42b2c2 add opendb-notice 2023-10-23 17:23:51 +08:00
linju
274e5897ac update opendb-department 2023-10-23 17:08:50 +08:00
7 changed files with 198 additions and 60 deletions

View File

@ -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
}
}
]
}

View File

@ -1,6 +1,6 @@
{
"name": "@opendb/opendb-department",
"version": "0.1.0",
"version": "0.1.1",
"description": "部门表",
"keywords": ["部门", "组织机构"],
"opendb": {

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

View File

@ -0,0 +1 @@
[]

View 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"
}
]
}
}

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

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