Update collection.json

This commit is contained in:
崔红保 2020-12-04 17:22:25 +08:00
parent ebda8ad68b
commit 00edc91edb

View File

@ -15,36 +15,49 @@
"user_id": {
"bsonType": "string",
"description": "文章作者ID 参考`uni-id-users` 表",
"foreignKey":"uni-id-users._id"
"foreignKey":"uni-id-users._id",
"defaultValue": {
"$env": "uid"
}
},
"category_id": {
"bsonType": "string",
"title":"分类",
"description": "分类 id参考`uni-news-categories`表",
"foreignKey":"opendb-news-categories._id"
"foreignKey":"opendb-news-categories._id",
"enum": {
"collection": "opendb-news-categories",
"field": "name as text, _id as value"
}
},
"title": {
"bsonType": "string",
"title": "标题",
"description": "标题",
"label": "标题"
},
"content": {
"bsonType": "string",
"title": "文章内容",
"description": "文章内容",
"label": "文章内容"
},
"excerpt": {
"bsonType": "string",
"title": "文章摘录",
"description": "文章摘录",
"label": "摘要"
},
"article_status": {
"bsonType": "int",
"title": "文章状态",
"minimum": 0,
"maximum": 1,
"description": "文章状态0 草稿箱 1 已发布"
},
"view_count": {
"bsonType": "int",
"title": "阅读数量",
"description": "阅读数量",
"permission": {
"write": false
@ -59,6 +72,7 @@
},
"is_sticky": {
"bsonType": "bool",
"title": "是否置顶",
"description": "是否置顶",
"permission": {
"write": false
@ -66,6 +80,7 @@
},
"is_essence": {
"bsonType": "bool",
"title": "阅读加精",
"description": "阅读加精",
"permission": {
"write": false
@ -73,12 +88,14 @@
},
"comment_status": {
"bsonType": "int",
"title": "开放评论",
"minimum": 0,
"maximum": 1,
"description": "评论状态0 关闭 1 开放"
},
"comment_count": {
"bsonType": "int",
"title": "评论数量",
"description": "评论数量",
"permission": {
"write": false
@ -86,16 +103,19 @@
},
"last_comment_user_id": {
"bsonType": "string",
"title": "最新评论用户",
"description": "最后回复用户 id参考`uni-id-users` 表",
"foreignKey":"uni-id-users._id"
},
"avatar": {
"bsonType": "string",
"title": "封面大图",
"description": "缩略图地址",
"label": "封面大图"
},
"publish_date": {
"bsonType": "timestamp",
"title": "发表时间",
"description": "发表时间",
"defaultValue": {
"$env": "now"
@ -103,6 +123,7 @@
},
"publish_ip": {
"bsonType": "string",
"title": "发布文章时IP地址",
"description": "发表时 IP 地址",
"forceDefaultValue": {
"$env": "clientIP"
@ -110,15 +131,18 @@
},
"last_modify_date": {
"bsonType": "timestamp",
"title": "最后修改时间",
"description": "最后修改时间"
},
"last_modify_ip": {
"bsonType": "string",
"title": "最后修改IP地址",
"description": "最后修改时 IP 地址"
},
"mode": {
"bsonType": "number",
"description": "排版显示模式"
"title": "排版显示模式",
"description": "排版显示模式,如左图右文、上图下文等"
}
}
},