Update collection.json

This commit is contained in:
崔红保 2020-12-04 18:50:58 +08:00
parent 00edc91edb
commit 623beab227

View File

@ -1,7 +1,7 @@
{ {
"schema": { "schema": {
"bsonType": "object", "bsonType": "object",
"required": ["user_id", "title", "content", "article_status", "view_count", "like_count", "is_sticky", "is_essence", "comment_status", "comment_count","mode"], "required": ["user_id", "title", "content", "article_status", "view_count", "like_count", "is_sticky", "is_essence", "comment_status", "comment_count"],
"permission": { "permission": {
"read": true, "read": true,
"create": "auth.uid != null", "create": "auth.uid != null",
@ -95,7 +95,6 @@
}, },
"comment_count": { "comment_count": {
"bsonType": "int", "bsonType": "int",
"title": "评论数量",
"description": "评论数量", "description": "评论数量",
"permission": { "permission": {
"write": false "write": false
@ -103,7 +102,6 @@
}, },
"last_comment_user_id": { "last_comment_user_id": {
"bsonType": "string", "bsonType": "string",
"title": "最新评论用户",
"description": "最后回复用户 id参考`uni-id-users` 表", "description": "最后回复用户 id参考`uni-id-users` 表",
"foreignKey":"uni-id-users._id" "foreignKey":"uni-id-users._id"
}, },
@ -132,12 +130,17 @@
"last_modify_date": { "last_modify_date": {
"bsonType": "timestamp", "bsonType": "timestamp",
"title": "最后修改时间", "title": "最后修改时间",
"description": "最后修改时间" "description": "最后修改时间",
"defaultValue": {
"$env": "now"
}
}, },
"last_modify_ip": { "last_modify_ip": {
"bsonType": "string", "bsonType": "string",
"title": "最后修改IP地址", "description": "最后修改时 IP 地址",
"description": "最后修改时 IP 地址" "forceDefaultValue": {
"$env": "clientIP"
}
}, },
"mode": { "mode": {
"bsonType": "number", "bsonType": "number",