update: 表 opendb-news-articles 字段 article_status 改为 enum

This commit is contained in:
handongxun 2020-12-15 10:42:18 +08:00
parent 32929ff9b0
commit aafb5b9bcb

View File

@ -15,16 +15,16 @@
"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":"分类",
"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"
@ -51,9 +51,17 @@
"article_status": {
"bsonType": "int",
"title": "文章状态",
"minimum": 0,
"maximum": 1,
"description": "文章状态0 草稿箱 1 已发布"
"description": "文章状态0 草稿箱 1 已发布",
"enum": [
{
"value": 0,
"text": "草稿箱"
},
{
"value": 1,
"text": "已发布"
}
]
},
"view_count": {
"bsonType": "int",
@ -103,7 +111,7 @@
"last_comment_user_id": {
"bsonType": "string",
"description": "最后回复用户 id参考`uni-id-users` 表",
"foreignKey":"uni-id-users._id"
"foreignKey": "uni-id-users._id"
},
"avatar": {
"bsonType": "string",