From 623beab227d87f1549c21f1178a651f7a7c3b716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E7=BA=A2=E4=BF=9D?= Date: Fri, 4 Dec 2020 18:50:58 +0800 Subject: [PATCH] Update collection.json --- collection/opendb-news-articles/collection.json | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/collection/opendb-news-articles/collection.json b/collection/opendb-news-articles/collection.json index ec2449a..15aa3e8 100644 --- a/collection/opendb-news-articles/collection.json +++ b/collection/opendb-news-articles/collection.json @@ -1,7 +1,7 @@ { "schema": { "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": { "read": true, "create": "auth.uid != null", @@ -95,7 +95,6 @@ }, "comment_count": { "bsonType": "int", - "title": "评论数量", "description": "评论数量", "permission": { "write": false @@ -103,7 +102,6 @@ }, "last_comment_user_id": { "bsonType": "string", - "title": "最新评论用户", "description": "最后回复用户 id,参考`uni-id-users` 表", "foreignKey":"uni-id-users._id" }, @@ -132,12 +130,17 @@ "last_modify_date": { "bsonType": "timestamp", "title": "最后修改时间", - "description": "最后修改时间" + "description": "最后修改时间", + "defaultValue": { + "$env": "now" + } }, "last_modify_ip": { "bsonType": "string", - "title": "最后修改IP地址", - "description": "最后修改时 IP 地址" + "description": "最后修改时 IP 地址", + "forceDefaultValue": { + "$env": "clientIP" + } }, "mode": { "bsonType": "number",