From 14ba7b910ae90221c9149767e52fc7e4f522f9ab Mon Sep 17 00:00:00 2001 From: liyanchao Date: Sat, 11 May 2024 15:12:31 +0800 Subject: [PATCH] add uni-ad-admin --- .../uni-ad-adp-revenues/collection.json | 190 ++++++++++++++++++ collection/uni-ad-adp-revenues/package.json | 17 ++ .../uni-ad-app-revenues/collection.json | 69 +++++++ collection/uni-ad-app-revenues/package.json | 17 ++ collection/uni-ad-positions/collection.json | 102 ++++++++++ collection/uni-ad-positions/package.json | 17 ++ collection/uni-ad-sync-logs/collection.json | 89 ++++++++ collection/uni-ad-sync-logs/package.json | 17 ++ database/opendb-admin/db_init.json | 6 +- 9 files changed, 523 insertions(+), 1 deletion(-) create mode 100644 collection/uni-ad-adp-revenues/collection.json create mode 100644 collection/uni-ad-adp-revenues/package.json create mode 100644 collection/uni-ad-app-revenues/collection.json create mode 100644 collection/uni-ad-app-revenues/package.json create mode 100644 collection/uni-ad-positions/collection.json create mode 100644 collection/uni-ad-positions/package.json create mode 100644 collection/uni-ad-sync-logs/collection.json create mode 100644 collection/uni-ad-sync-logs/package.json diff --git a/collection/uni-ad-adp-revenues/collection.json b/collection/uni-ad-adp-revenues/collection.json new file mode 100644 index 0000000..c31fe66 --- /dev/null +++ b/collection/uni-ad-adp-revenues/collection.json @@ -0,0 +1,190 @@ +{ + "schema": { + "bsonType": "object", + "permission": { + "read": true, + "create": false, + "update": false, + "delete": false + }, + "properties": { + "_id": { + "description": "存储文档 ID,系统自动生成" + }, + "ad_region": { + "bsonType": "int", + "description": "数据来源,1 国内广告,2国际广告", + "default": 1, + "enum": [{ + "text": "国内广告", + "value": 1 + }, + { + "text": "国际广告", + "value": 2 + } + ] + }, + "revenue_date": { + "bsonType": "int", + "description": "收益日期,格式:yyyymmdd,例:20240415" + }, + "appid": { + "bsonType": "string", + "description": "应用ID", + "foreignKey": "opendb-app-list.appid" + }, + "adp_id": { + "bsonType": "string", + "description": "广告位ID", + "foreignKey": "uni-ad-positions.adp_id" + }, + "ad_platform": { + "bsonType": "int", + "description": "平台 1:APP-Dcloud快捷广告 2:APP-渠道SDK广告 3:Web 4:小程序", + "enum": [{ + "text": "APP-Dcloud快捷广告", + "value": 1 + }, + { + "text": "APP-渠道SDK广告", + "value": 2 + }, + { + "text": "Web广告", + "value": 3 + }, + { + "text": "小程序广告", + "value": 4 + } + ] + }, + "show_count": { + "bsonType": "int", + "description": "展示量" + }, + "click_count": { + "bsonType": "int", + "description": "点击量" + }, + "click_rate": { + "bsonType": "double", + "description": "点击率" + }, + "revenue": { + "bsonType": "int", + "description": "预估收益,单位: 厘" + }, + "cpc": { + "bsonType": "double", + "description": "每次点击收益(单位:元,如:1.25)" + }, + "cpm": { + "bsonType": "double", + "description": "千次展现收益(单位:元,如:5.25)" + }, + "ad_type": { + "bsonType": "int", + "description": "广告类型", + "enum": [{ + "text": "DCloud快捷广告-开屏", + "value": 91 + }, + { + "text": "DCloud快捷广告-红包", + "value": 92 + }, + { + "text": "DCloud快捷广告-PUSH", + "value": 93 + }, + { + "text": "DCloud快捷广告-uniMP" + }, + { + "text": "开屏", + "value": 1 + }, + { + "text": "信息流", + "value": 4 + }, + { + "text": "全屏视频", + "value": 7 + }, + { + "text": "激励视频", + "value": 9 + }, + { + "text": "Draw视频广告", + "value": 10 + }, + { + "text": "互动游戏", + "value": 13 + }, + { + "text": "内容联盟", + "value": 14 + }, + { + "text": "插屏广告", + "value": 15 + }, + { + "text": "小程序格子广告", + "value": 17 + }, + { + "text": "互动红包", + "value": 18 + } + ] + }, + "os": { + "bsonType": "string", + "defaultValue": "", + "description": "系统类型 android 或 ios 只有platform_id=2(渠道SDK广告)时才有该字段" + }, + "create_time": { + "bsonType": "timestamp", + "description": "创建时间" + } + }, + "required": [] + }, + "index": [{ + "IndexName": "revenue_date", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "revenue_date", + "Direction": "1" + }], + "MgoIsUnique": false + } + }, + { + "IndexName": "appid", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "appid", + "Direction": "1" + }], + "MgoIsUnique": false + } + }, + { + "IndexName": "ad_type", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "ad_type", + "Direction": "1" + }], + "MgoIsUnique": false + } + } + ] +} diff --git a/collection/uni-ad-adp-revenues/package.json b/collection/uni-ad-adp-revenues/package.json new file mode 100644 index 0000000..002d0d4 --- /dev/null +++ b/collection/uni-ad-adp-revenues/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-ad-adp-revenues", + "version": "0.0.1", + "description": "uni-ad-adp-revenues", + "keywords": ["广告位收益数据表"], + "opendb": { + "title": "广告位收益数据表", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} diff --git a/collection/uni-ad-app-revenues/collection.json b/collection/uni-ad-app-revenues/collection.json new file mode 100644 index 0000000..0e1df56 --- /dev/null +++ b/collection/uni-ad-app-revenues/collection.json @@ -0,0 +1,69 @@ +{ + "schema": { + "bsonType": "object", + "permission": { + "read": true, + "create": false, + "update": false, + "delete": false + }, + "properties": { + "_id": { + "description": "ID,系统自动生成" + }, + "ad_region": { + "bsonType": "int", + "description": "数据来源,1国内广告,2国际广告", + "default": 1, + "enum": [{ + "text": "国内广告", + "value": 1 + }, + { + "text": "国际广告", + "value": 2 + } + ] + }, + "revenue_date": { + "bsonType": "int", + "description": "收益日期,格式:yyyymmdd,例:20240415" + }, + "appid": { + "bsonType": "string", + "description": "应用ID", + "foreignKey": "opendb-app-list.appid" + }, + "revenue": { + "bsonType": "int", + "description": "预估收益,单位: 厘" + }, + "create_time": { + "bsonType": "timestamp", + "description": "创建时间" + } + }, + "required": [] + }, + "index": [{ + "IndexName": "revenue_date", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "revenue_date", + "Direction": "1" + }], + "MgoIsUnique": false + } + }, + { + "IndexName": "appid", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "appid", + "Direction": "1" + }], + "MgoIsUnique": false + } + } + ] +} diff --git a/collection/uni-ad-app-revenues/package.json b/collection/uni-ad-app-revenues/package.json new file mode 100644 index 0000000..67a1493 --- /dev/null +++ b/collection/uni-ad-app-revenues/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-ad-app-revenues", + "version": "0.0.1", + "description": "uni-ad-app-revenues", + "keywords": ["应用汇总日收益"], + "opendb": { + "title": "应用汇总日收益", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} diff --git a/collection/uni-ad-positions/collection.json b/collection/uni-ad-positions/collection.json new file mode 100644 index 0000000..ceb69d4 --- /dev/null +++ b/collection/uni-ad-positions/collection.json @@ -0,0 +1,102 @@ +{ + "schema": { + "bsonType": "object", + "permission": { + "read": true, + "create": false, + "update": false, + "delete": false + }, + "properties": { + "_id": { + "description": "存储文档 ID,系统自动生成" + }, + "appid": { + "bsonType": "string", + "description": "应用ID" + }, + "ad_region": { + "bsonType": "int", + "description": "数据来源,1 国内广告,2国际广告", + "default": 1, + "enum": [{ + "text": "国内广告", + "value": 1 + }, + { + "text": "国际广告", + "value": 2 + } + ] + }, + "adp_id": { + "bsonType": "string", + "description": "广告位ID" + }, + "adp_name": { + "bsonType": "string", + "description": "广告位名称" + }, + "adp_type": { + "bsonType": "int", + "description": "广告位类型", + "enum": [{ + "text": "开屏", + "value": 1 + }, + { + "text": "信息流", + "value": 4 + }, + { + "text": "全屏视频", + "value": 7 + }, + { + "text": "激励视频", + "value": 9 + }, + { + "text": "Draw视频广告", + "value": 10 + }, + { + "text": "互动游戏", + "value": 13 + }, + { + "text": "内容联盟", + "value": 14 + }, + { + "text": "插屏广告", + "value": 15 + }, + { + "text": "小程序格子广告", + "value": 17 + }, + { + "text": "互动红包", + "value": 18 + } + ] + }, + "create_time": { + "bsonType": "timestamp", + "description": "创建时间" + } + }, + "required": [] + }, + "index": [{ + "IndexName": "appid", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "appid", + "Direction": "1" + }], + "MgoIsUnique": false + } + }] +} diff --git a/collection/uni-ad-positions/package.json b/collection/uni-ad-positions/package.json new file mode 100644 index 0000000..1e214bd --- /dev/null +++ b/collection/uni-ad-positions/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-ad-positions", + "version": "0.0.1", + "description": "uni-ad-positions", + "keywords": ["应用广告位"], + "opendb": { + "title": "应用广告位", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} diff --git a/collection/uni-ad-sync-logs/collection.json b/collection/uni-ad-sync-logs/collection.json new file mode 100644 index 0000000..1872069 --- /dev/null +++ b/collection/uni-ad-sync-logs/collection.json @@ -0,0 +1,89 @@ +{ + "schema": { + "bsonType": "object", + "permission": { + "read": true, + "create": true, + "update": true, + "delete": false + }, + "properties": { + "_id": { + "description": "存储文档 ID,系统自动生成" + }, + "sync_date": { + "bsonType": "int", + "description": "收益推送日期,格式:yyyymmdd,例:20240415" + }, + "appid": { + "bsonType": "string", + "description": "应用ID" + }, + "ad_region": { + "bsonType": "int", + "description": "数据来源,1国内广告,2国际广告", + "default": 1, + "enum": [{ + "text": "国内广告", + "value": 1 + }, + { + "text": "国际广告", + "value": 2 + } + ] + }, + "status": { + "bsonType": "int", + "description": "推送状态", + "enum": [{ + "text": "未推送", + "value": 0 + }, + { + "text": "推送完成", + "value": 1 + }, + { + "text": "正在推送", + "value": 2 + }, + { + "text": "推送失败", + "value": 3 + } + ] + }, + "create_time": { + "bsonType": "timestamp", + "description": "创建时间" + }, + "update_time": { + "bsontype": "timestamp", + "description": "更新时间" + } + }, + "required": [] + }, + "index": [{ + "IndexName": "sync_date", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "sync_date", + "Direction": "1" + }], + "MgoIsUnique": false + } + }, + { + "IndexName": "appid", + "MgoKeySchema": { + "MgoIndexKeys": [{ + "Name": "appid", + "Direction": "1" + }], + "MgoIsUnique": false + } + } + ] +} diff --git a/collection/uni-ad-sync-logs/package.json b/collection/uni-ad-sync-logs/package.json new file mode 100644 index 0000000..2abd6bd --- /dev/null +++ b/collection/uni-ad-sync-logs/package.json @@ -0,0 +1,17 @@ +{ + "name": "@opendb/uni-ad-sync-logs", + "version": "0.0.1", + "description": "uni-ad-sync-logs", + "keywords": ["数据同步日志"], + "opendb": { + "title": "数据同步日志", + "type": "collection", + "contributors": [ + { + "name": "DCloud", + "email": "", + "homepage": "https://gitee.com/dcloud/opendb" + } + ] + } +} diff --git a/database/opendb-admin/db_init.json b/database/opendb-admin/db_init.json index 2f3e52a..dbe60aa 100644 --- a/database/opendb-admin/db_init.json +++ b/database/opendb-admin/db_init.json @@ -31,5 +31,9 @@ "uni-stat-pay-result": {}, "uni-batch-sms-template": {}, "uni-batch-sms-task": {}, - "uni-batch-sms-result": {} + "uni-batch-sms-result": {}, + "uni-ad-adp-revenues": {}, + "uni-ad-app-revenues": {}, + "uni-ad-positions": {}, + "uni-ad-sync-logs": {} }