From 5136de5baa3c03e1861edcbf6c238642fc721f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E7=BA=A2=E4=BF=9D?= Date: Mon, 26 Oct 2020 15:54:32 +0800 Subject: [PATCH] update collection/opendb-news-comments/collection.json. --- .../opendb-news-comments/collection.json | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/collection/opendb-news-comments/collection.json b/collection/opendb-news-comments/collection.json index d06213b..8ef591c 100644 --- a/collection/opendb-news-comments/collection.json +++ b/collection/opendb-news-comments/collection.json @@ -16,7 +16,8 @@ }, "comment_content": { "bsonType": "string", - "description": "评论内容" + "description": "评论内容", + "title": "评论内容" }, "like_count": { "bsonType": "int", @@ -40,10 +41,34 @@ }, "comment_ip": { "bsonType": "string", - "description": "评论发表时 IP 地址" + "description": "评论发表时 IP 地址", + "forceDefaultValue": { + "$env": "clientIP" + } } } }, "data": [], - "index": [] + "index": [ + { + "IndexName": "article_id_", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "article_id", + "Direction": "1" + }], + "MgoIsUnique": false + } + }, + { + "IndexName": "user_id_", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "user_id", + "Direction": "1" + }], + "MgoIsUnique": false + } + } + ] }