opendb/collection/opendb-mall-comments/collection.json

54 lines
1.2 KiB
JSON
Raw Normal View History

{
"schema": {
"bsonType": "object",
"required": ["goods_id", "user_id", "content"],
"properties": {
"_id": {
"description": "存储文档 ID文章 ID系统自动生成"
},
"goods_id": {
"bsonType": "string",
"description": "分类 id参考`opendb-mall-categories`表"
},
"user_id": {
"bsonType": "string",
"description": "评论者的uid参考 uni-id-users 表"
},
"content": {
"bsonType": "string",
"description": "评论内容",
"title":"评论内容"
},
"create_date": {
"bsonType": "timestamp",
"description": "评论发表时间",
"defaultValue": {
"$env": "now"
}
},
"publish_ip": {
"bsonType": "string",
"description": "评论发表时,客户端的 IP 地址",
"forceDefaultValue": {
"$env": "clientIP"
}
}
}
},
"data": [],
"index": [
{
"IndexName": "goods_id_",
"MgoKeySchema": {
"MgoIndexKeys": [
{
"Name": "goods_id",
"Direction": "1"
}
],
"MgoIsUnique": false
}
}
]
}