mirror of
https://gitee.com/dcloud/opendb.git
synced 2024-11-10 11:09:44 +08:00
add opendb-notice-comment
This commit is contained in:
parent
86d82f56d8
commit
5404566751
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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user