update uni-cms-categories、uni-cms-unlock-record

This commit is contained in:
VK 2023-06-12 19:49:35 +08:00
parent 87f713598c
commit d5b74f9ab8
4 changed files with 56 additions and 11 deletions

View File

@ -6,9 +6,9 @@
], ],
"permission": { "permission": {
"read": true, "read": true,
"create": true, "create": false,
"update": true, "update": false,
"delete": true "delete": false
}, },
"properties": { "properties": {
"_id": { "_id": {
@ -36,12 +36,33 @@
"sort": { "sort": {
"bsonType": "int", "bsonType": "int",
"description": "类别显示顺序", "description": "类别显示顺序",
"label": "排序" "label": "排序",
"defaultValue": 0
}, },
"article_count": { "article_count": {
"bsonType": "int", "bsonType": "int",
"description": "该类别下文章数量" "description": "该类别下文章数量"
}, },
"image_count": {
"bsonType": "int",
"description": "该类别下图片数量"
},
"video_count": {
"bsonType": "int",
"description": "该类别下视频数量"
},
"type": {
"bsonType": "string",
"title": "内容类型",
"description": "内容类型article 文章 image 图片 video 视频",
"label": "内容id",
"trim": "both",
"enum": [
"article",
"image",
"video"
]
},
"create_date": { "create_date": {
"bsonType": "timestamp", "bsonType": "timestamp",
"description": "创建时间", "description": "创建时间",

View File

@ -2,9 +2,9 @@
"name": "@opendb/uni-cms-categories", "name": "@opendb/uni-cms-categories",
"version": "0.0.1", "version": "0.0.1",
"description": "uni-cms-categories", "description": "uni-cms-categories",
"keywords": ["文章&评论", "文章类别", "uni-CMS", "CMS"], "keywords": ["文章&评论", "文章、图片、视频类别", "uni-CMS", "CMS"],
"opendb": { "opendb": {
"title": "文章类别表", "title": "CMS内容类别表",
"type": "collection", "type": "collection",
"contributors": [ "contributors": [
{ {

View File

@ -8,7 +8,7 @@
], ],
"permission": { "permission": {
"read": true, "read": true,
"create": true, "create": false,
"update": false, "update": false,
"delete": false "delete": false
}, },
@ -34,10 +34,22 @@
"content_id": { "content_id": {
"bsonType": "string", "bsonType": "string",
"title": "内容id", "title": "内容id",
"description": "内容(文章)ID", "description": "内容(文章、图片、视频)ID",
"label": "内容id", "label": "内容id",
"trim": "both" "trim": "both"
}, },
"content_type": {
"bsonType": "string",
"title": "内容类型",
"description": "内容类型article 文章 image 图片 video 视频",
"label": "内容id",
"trim": "both",
"enum": [
"article",
"image",
"video"
]
},
"create_date": { "create_date": {
"bsonType": "timestamp", "bsonType": "timestamp",
"title": "创建时间", "title": "创建时间",
@ -45,6 +57,18 @@
"defaultValue": { "defaultValue": {
"$env": "now" "$env": "now"
} }
},
"adpid": {
"bsonType": "string",
"description": "广告id"
},
"provider": {
"bsonType": "string",
"description": "广告供应商"
},
"platform": {
"bsonType": "string",
"description": "客户端平台"
} }
} }
}, },
@ -54,10 +78,10 @@
"MgoIndexKeys": [{ "MgoIndexKeys": [{
"Name": "unique_id", "Name": "unique_id",
"Direction": "1" "Direction": "1"
},{ }, {
"Name": "article_id", "Name": "article_id",
"Direction": "1" "Direction": "1"
},{ }, {
"Name": "trans_id", "Name": "trans_id",
"Direction": "1" "Direction": "1"
}], }],

View File

@ -4,7 +4,7 @@
"description": "uni-cms-unlock-record", "description": "uni-cms-unlock-record",
"keywords": ["解锁记录", "内容解锁表", "uni-CMS", "CMS"], "keywords": ["解锁记录", "内容解锁表", "uni-CMS", "CMS"],
"opendb": { "opendb": {
"title": "文章解锁记录表", "title": "CMS内容解锁记录表",
"type": "collection", "type": "collection",
"contributors": [ "contributors": [
{ {