1、文档规范化
2、增加cid核心功能entity
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package account
|
||||
|
||||
import (
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// Advertiser 广告主实体(客户,多级/单层账户模式的业务主体)
|
||||
type Advertiser struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
Name string `orm:"name" json:"name" description:"广告主名称"`
|
||||
Industry string `orm:"industry" json:"industry" description:"行业"`
|
||||
ContactName string `orm:"contact_name" json:"contactName" description:"联系人"`
|
||||
ContactPhone string `orm:"contact_phone" json:"contactPhone" description:"联系电话"`
|
||||
Status int `orm:"status" json:"status" description:"状态 1启用 0停用"`
|
||||
Extra string `orm:"extra" json:"extra" description:"扩展配置(JSON)"`
|
||||
}
|
||||
|
||||
// AdvertiserCol 广告主表字段定义
|
||||
type AdvertiserCol struct {
|
||||
beans.SQLBaseCol
|
||||
Name string
|
||||
Industry string
|
||||
ContactName string
|
||||
ContactPhone string
|
||||
Status string
|
||||
Extra string
|
||||
}
|
||||
|
||||
// AdvertiserCols 广告主表字段常量
|
||||
var AdvertiserCols = AdvertiserCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
Name: "name",
|
||||
Industry: "industry",
|
||||
ContactName: "contact_name",
|
||||
ContactPhone: "contact_phone",
|
||||
Status: "status",
|
||||
Extra: "extra",
|
||||
}
|
||||
@@ -10,59 +10,74 @@ import (
|
||||
type ClickLog struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
ClickID string `orm:"click_id" json:"clickId" description:"对外CID"`
|
||||
RequestID string `orm:"request_id" json:"requestId" description:"广告平台请求号(去重键)"`
|
||||
AdPlatform string `orm:"ad_platform" json:"adPlatform" description:"广告平台 douyin/xiaohongshu/kuaishou"`
|
||||
AccountID string `orm:"account_id" json:"accountId" description:"广告账户ID"`
|
||||
CampaignID string `orm:"campaign_id" json:"campaignId" description:"广告计划ID"`
|
||||
AdGroupID string `orm:"ad_group_id" json:"adGroupId" description:"广告组ID"`
|
||||
AdID string `orm:"ad_id" json:"adId" description:"广告ID"`
|
||||
CreativeID string `orm:"creative_id" json:"creativeId" description:"创意ID"`
|
||||
DeviceID string `orm:"device_id" json:"deviceId" description:"设备ID oaid/imei/idfa"`
|
||||
IP string `orm:"ip" json:"ip" description:"点击IP"`
|
||||
UA string `orm:"ua" json:"ua" description:"用户代理"`
|
||||
LandingURL string `orm:"landing_url" json:"landingUrl" description:"原始落地页URL"`
|
||||
RedirectURL string `orm:"redirect_url" json:"redirectUrl" description:"跳转下游URL(带click_id)"`
|
||||
Extra string `orm:"extra" json:"extra" description:"平台透传参数(JSON)"`
|
||||
Day *gtime.Time `orm:"day" json:"day" description:"分区日期"`
|
||||
ClickID string `orm:"click_id" json:"clickId" description:"对外CID"`
|
||||
RequestID string `orm:"request_id" json:"requestId" description:"广告平台请求号(去重键)"`
|
||||
Channel string `orm:"channel" json:"channel" description:"投放通道 external外投/self_dsp自有"`
|
||||
AdPlatform string `orm:"ad_platform" json:"adPlatform" description:"广告平台 douyin/xiaohongshu/kuaishou/self_dsp"`
|
||||
AccountID string `orm:"account_id" json:"accountId" description:"广告账户ID"`
|
||||
CampaignID string `orm:"campaign_id" json:"campaignId" description:"平台侧计划ID(透传)"`
|
||||
LocalCampaignID int64 `orm:"local_campaign_id" json:"localCampaignId" description:"本地计划ID(回传路由)"`
|
||||
LocalAdID int64 `orm:"local_ad_id" json:"localAdId" description:"本地广告ID(DSP必填,外投按映射回填)"`
|
||||
LocalCreativeID int64 `orm:"local_creative_id" json:"localCreativeId" description:"本地创意ID(DSP必填,外投按映射回填)"`
|
||||
SlotID int64 `orm:"slot_id" json:"slotId" description:"自有DSP广告位ID"`
|
||||
AdGroupID string `orm:"ad_group_id" json:"adGroupId" description:"广告组ID"`
|
||||
AdID string `orm:"ad_id" json:"adId" description:"广告ID"`
|
||||
CreativeID string `orm:"creative_id" json:"creativeId" description:"创意ID"`
|
||||
DeviceID string `orm:"device_id" json:"deviceId" description:"设备ID oaid/imei/idfa"`
|
||||
IP string `orm:"ip" json:"ip" description:"点击IP"`
|
||||
UA string `orm:"ua" json:"ua" description:"用户代理"`
|
||||
LandingURL string `orm:"landing_url" json:"landingUrl" description:"原始落地页URL"`
|
||||
RedirectURL string `orm:"redirect_url" json:"redirectUrl" description:"跳转下游URL(带click_id)"`
|
||||
Extra string `orm:"extra" json:"extra" description:"平台透传参数(JSON)"`
|
||||
Day *gtime.Time `orm:"day" json:"day" description:"分区日期"`
|
||||
}
|
||||
|
||||
// ClickLogCol 点击日志表字段定义
|
||||
type ClickLogCol struct {
|
||||
beans.SQLBaseCol
|
||||
ClickID string
|
||||
RequestID string
|
||||
AdPlatform string
|
||||
AccountID string
|
||||
CampaignID string
|
||||
AdGroupID string
|
||||
AdID string
|
||||
CreativeID string
|
||||
DeviceID string
|
||||
IP string
|
||||
UA string
|
||||
LandingURL string
|
||||
RedirectURL string
|
||||
Extra string
|
||||
Day string
|
||||
ClickID string
|
||||
RequestID string
|
||||
Channel string
|
||||
AdPlatform string
|
||||
AccountID string
|
||||
CampaignID string
|
||||
LocalCampaignID string
|
||||
LocalAdID string
|
||||
LocalCreativeID string
|
||||
SlotID string
|
||||
AdGroupID string
|
||||
AdID string
|
||||
CreativeID string
|
||||
DeviceID string
|
||||
IP string
|
||||
UA string
|
||||
LandingURL string
|
||||
RedirectURL string
|
||||
Extra string
|
||||
Day string
|
||||
}
|
||||
|
||||
// ClickLogCols 点击日志表字段常量
|
||||
var ClickLogCols = ClickLogCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
ClickID: "click_id",
|
||||
RequestID: "request_id",
|
||||
AdPlatform: "ad_platform",
|
||||
AccountID: "account_id",
|
||||
CampaignID: "campaign_id",
|
||||
AdGroupID: "ad_group_id",
|
||||
AdID: "ad_id",
|
||||
CreativeID: "creative_id",
|
||||
DeviceID: "device_id",
|
||||
IP: "ip",
|
||||
UA: "ua",
|
||||
LandingURL: "landing_url",
|
||||
RedirectURL: "redirect_url",
|
||||
Extra: "extra",
|
||||
Day: "day",
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
ClickID: "click_id",
|
||||
RequestID: "request_id",
|
||||
Channel: "channel",
|
||||
AdPlatform: "ad_platform",
|
||||
AccountID: "account_id",
|
||||
CampaignID: "campaign_id",
|
||||
LocalCampaignID: "local_campaign_id",
|
||||
LocalAdID: "local_ad_id",
|
||||
LocalCreativeID: "local_creative_id",
|
||||
SlotID: "slot_id",
|
||||
AdGroupID: "ad_group_id",
|
||||
AdID: "ad_id",
|
||||
CreativeID: "creative_id",
|
||||
DeviceID: "device_id",
|
||||
IP: "ip",
|
||||
UA: "ua",
|
||||
LandingURL: "landing_url",
|
||||
RedirectURL: "redirect_url",
|
||||
Extra: "extra",
|
||||
Day: "day",
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ type ConversionOrder struct {
|
||||
OrderID string `orm:"order_id" json:"orderId" description:"电商平台订单号"`
|
||||
CommercePlatform string `orm:"commerce_platform" json:"commercePlatform" description:"电商平台 jd/taobao"`
|
||||
ClickID string `orm:"click_id" json:"clickId" description:"关联点击CID"`
|
||||
LocalCampaignID int64 `orm:"local_campaign_id" json:"localCampaignId" description:"本地计划ID(回传路由)"`
|
||||
AdAccountID int64 `orm:"ad_account_id" json:"adAccountId" description:"广告账户ID(回传凭据)"`
|
||||
DeviceID string `orm:"device_id" json:"deviceId" description:"设备ID(无click_id时兜底归因)"`
|
||||
ItemID string `orm:"item_id" json:"itemId" description:"商品ID"`
|
||||
ItemName string `orm:"item_name" json:"itemName" description:"商品名称"`
|
||||
@@ -34,6 +36,8 @@ type ConversionOrderCol struct {
|
||||
OrderID string
|
||||
CommercePlatform string
|
||||
ClickID string
|
||||
LocalCampaignID string
|
||||
AdAccountID string
|
||||
DeviceID string
|
||||
ItemID string
|
||||
ItemName string
|
||||
@@ -56,6 +60,8 @@ var ConversionOrderCols = ConversionOrderCol{
|
||||
OrderID: "order_id",
|
||||
CommercePlatform: "commerce_platform",
|
||||
ClickID: "click_id",
|
||||
LocalCampaignID: "local_campaign_id",
|
||||
AdAccountID: "ad_account_id",
|
||||
DeviceID: "device_id",
|
||||
ItemID: "item_id",
|
||||
ItemName: "item_name",
|
||||
|
||||
@@ -11,6 +11,8 @@ type ReportTask struct {
|
||||
ConversionID string `orm:"conversion_id" json:"conversionId" description:"关联转化事件ID"`
|
||||
ClickID string `orm:"click_id" json:"clickId" description:"点击CID"`
|
||||
AdPlatform string `orm:"ad_platform" json:"adPlatform" description:"回传目标广告平台"`
|
||||
AdAccountID int64 `orm:"ad_account_id" json:"adAccountId" description:"广告账户ID(回传凭据)"`
|
||||
CampaignID int64 `orm:"campaign_id" json:"campaignId" description:"回传目标本地计划ID"`
|
||||
TaskType string `orm:"task_type" json:"taskType" description:"回传类型 conversion/refund"`
|
||||
Status int `orm:"status" json:"status" description:"状态 0待回传 1回传中 2成功 3失败"`
|
||||
RetryCount int `orm:"retry_count" json:"retryCount" description:"重试次数"`
|
||||
@@ -26,6 +28,8 @@ type ReportTaskCol struct {
|
||||
ConversionID string
|
||||
ClickID string
|
||||
AdPlatform string
|
||||
AdAccountID string
|
||||
CampaignID string
|
||||
TaskType string
|
||||
Status string
|
||||
RetryCount string
|
||||
@@ -41,6 +45,8 @@ var ReportTaskCols = ReportTaskCol{
|
||||
ConversionID: "conversion_id",
|
||||
ClickID: "click_id",
|
||||
AdPlatform: "ad_platform",
|
||||
AdAccountID: "ad_account_id",
|
||||
CampaignID: "campaign_id",
|
||||
TaskType: "task_type",
|
||||
Status: "status",
|
||||
RetryCount: "retry_count",
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package delivery
|
||||
|
||||
import (
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// Ad 广告实体(计划树第三层)
|
||||
type Ad struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
AdGroupID int64 `orm:"ad_group_id" json:"adGroupId" description:"所属单元ID"`
|
||||
Name string `orm:"name" json:"name" description:"广告名称"`
|
||||
PlatformAdID string `orm:"platform_ad_id" json:"platformAdId" description:"平台侧广告ID"`
|
||||
Status string `orm:"status" json:"status" description:"本地状态 draft/active/paused/ended/rejected"`
|
||||
PlatformStatus string `orm:"platform_status" json:"platformStatus" description:"平台侧状态快照"`
|
||||
SyncStatus string `orm:"sync_status" json:"syncStatus" description:"同步状态 none/pending/synced/failed"`
|
||||
Extra string `orm:"extra" json:"extra" description:"平台特有扩展(JSON)"`
|
||||
}
|
||||
|
||||
// AdCol 广告表字段定义
|
||||
type AdCol struct {
|
||||
beans.SQLBaseCol
|
||||
AdGroupID string
|
||||
Name string
|
||||
PlatformAdID string
|
||||
Status string
|
||||
PlatformStatus string
|
||||
SyncStatus string
|
||||
Extra string
|
||||
}
|
||||
|
||||
// AdCols 广告表字段常量
|
||||
var AdCols = AdCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdGroupID: "ad_group_id",
|
||||
Name: "name",
|
||||
PlatformAdID: "platform_ad_id",
|
||||
Status: "status",
|
||||
PlatformStatus: "platform_status",
|
||||
SyncStatus: "sync_status",
|
||||
Extra: "extra",
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package delivery
|
||||
|
||||
import (
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// AdGroup 广告单元实体(计划树第二层,定向+出价)
|
||||
type AdGroup struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
CampaignID int64 `orm:"campaign_id" json:"campaignId" description:"所属计划ID"`
|
||||
Name string `orm:"name" json:"name" description:"单元名称"`
|
||||
PlatformAdGroupID string `orm:"platform_ad_group_id" json:"platformAdGroupId" description:"平台侧单元ID"`
|
||||
Targeting string `orm:"targeting" json:"targeting" description:"定向(JSON) 地域/人群/时段"`
|
||||
BidType string `orm:"bid_type" json:"bidType" description:"出价方式 cpm/ocpm/cpc/ocpc"`
|
||||
BidAmount int64 `orm:"bid_amount" json:"bidAmount" description:"出价(分,cpm按千次展示)"`
|
||||
Status string `orm:"status" json:"status" description:"本地状态 draft/active/paused/ended/rejected"`
|
||||
PlatformStatus string `orm:"platform_status" json:"platformStatus" description:"平台侧状态快照"`
|
||||
SyncStatus string `orm:"sync_status" json:"syncStatus" description:"同步状态 none/pending/synced/failed"`
|
||||
Extra string `orm:"extra" json:"extra" description:"平台特有扩展(JSON)"`
|
||||
}
|
||||
|
||||
// AdGroupCol 广告单元表字段定义
|
||||
type AdGroupCol struct {
|
||||
beans.SQLBaseCol
|
||||
CampaignID string
|
||||
Name string
|
||||
PlatformAdGroupID string
|
||||
Targeting string
|
||||
BidType string
|
||||
BidAmount string
|
||||
Status string
|
||||
PlatformStatus string
|
||||
SyncStatus string
|
||||
Extra string
|
||||
}
|
||||
|
||||
// AdGroupCols 广告单元表字段常量
|
||||
var AdGroupCols = AdGroupCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
CampaignID: "campaign_id",
|
||||
Name: "name",
|
||||
PlatformAdGroupID: "platform_ad_group_id",
|
||||
Targeting: "targeting",
|
||||
BidType: "bid_type",
|
||||
BidAmount: "bid_amount",
|
||||
Status: "status",
|
||||
PlatformStatus: "platform_status",
|
||||
SyncStatus: "sync_status",
|
||||
Extra: "extra",
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package delivery
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// Campaign 广告计划实体(计划树第一层,外投/自有DSP共用,预算在计划层)
|
||||
type Campaign struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"广告主ID"`
|
||||
AdAccountID int64 `orm:"ad_account_id" json:"adAccountId" description:"本地广告账户ID"`
|
||||
Name string `orm:"name" json:"name" description:"计划名称"`
|
||||
Channel string `orm:"channel" json:"channel" description:"投放通道 external外投/self_dsp自有"`
|
||||
Platform string `orm:"platform" json:"platform" description:"广告平台 douyin/xiaohongshu/kuaishou"`
|
||||
PlatformCampaignID string `orm:"platform_campaign_id" json:"platformCampaignId" description:"平台侧计划ID"`
|
||||
Status string `orm:"status" json:"status" description:"本地状态 draft/active/paused/ended/rejected"`
|
||||
PlatformStatus string `orm:"platform_status" json:"platformStatus" description:"平台侧状态快照"`
|
||||
SyncStatus string `orm:"sync_status" json:"syncStatus" description:"同步状态 none/pending/synced/failed"`
|
||||
BudgetMode string `orm:"budget_mode" json:"budgetMode" description:"预算方式 free不限/daily日预算"`
|
||||
DailyBudget *int64 `orm:"daily_budget" json:"dailyBudget" description:"日预算(分),budget_mode=daily时必填,否则NULL"`
|
||||
TotalBudget *int64 `orm:"total_budget" json:"totalBudget" description:"总预算(分),NULL=不限"`
|
||||
OptimizeGoal string `orm:"optimize_goal" json:"optimizeGoal" description:"优化目标 conversion/click/exposure"`
|
||||
StartTime *gtime.Time `orm:"start_time" json:"startTime" description:"投放开始时间"`
|
||||
EndTime *gtime.Time `orm:"end_time" json:"endTime" description:"投放结束时间"`
|
||||
Extra string `orm:"extra" json:"extra" description:"平台特有扩展(JSON)"`
|
||||
}
|
||||
|
||||
// CampaignCol 广告计划表字段定义
|
||||
type CampaignCol struct {
|
||||
beans.SQLBaseCol
|
||||
AdvertiserID string
|
||||
AdAccountID string
|
||||
Name string
|
||||
Channel string
|
||||
Platform string
|
||||
PlatformCampaignID string
|
||||
Status string
|
||||
PlatformStatus string
|
||||
SyncStatus string
|
||||
BudgetMode string
|
||||
DailyBudget string
|
||||
TotalBudget string
|
||||
OptimizeGoal string
|
||||
StartTime string
|
||||
EndTime string
|
||||
Extra string
|
||||
}
|
||||
|
||||
// CampaignCols 广告计划表字段常量
|
||||
var CampaignCols = CampaignCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdvertiserID: "advertiser_id",
|
||||
AdAccountID: "ad_account_id",
|
||||
Name: "name",
|
||||
Channel: "channel",
|
||||
Platform: "platform",
|
||||
PlatformCampaignID: "platform_campaign_id",
|
||||
Status: "status",
|
||||
PlatformStatus: "platform_status",
|
||||
SyncStatus: "sync_status",
|
||||
BudgetMode: "budget_mode",
|
||||
DailyBudget: "daily_budget",
|
||||
TotalBudget: "total_budget",
|
||||
OptimizeGoal: "optimize_goal",
|
||||
StartTime: "start_time",
|
||||
EndTime: "end_time",
|
||||
Extra: "extra",
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package delivery
|
||||
|
||||
import (
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// Creative 创意实体(计划树第四层,引用素材库,落地页带click_id模板)
|
||||
type Creative struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
AdID int64 `orm:"ad_id" json:"adId" description:"所属广告ID(部分平台创意先于广告,可空)"`
|
||||
CampaignID int64 `orm:"campaign_id" json:"campaignId" description:"所属计划ID(冗余,ad_id为空时链路不断)"`
|
||||
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"广告主ID"`
|
||||
Name string `orm:"name" json:"name" description:"创意名称"`
|
||||
MaterialID int64 `orm:"material_id" json:"materialId" description:"素材ID(material.id)"`
|
||||
Title string `orm:"title" json:"title" description:"标题"`
|
||||
Description string `orm:"description" json:"description" description:"描述"`
|
||||
ClickURL string `orm:"click_url" json:"clickUrl" description:"落地页URL(含click_id模板)"`
|
||||
PlatformCreativeID string `orm:"platform_creative_id" json:"platformCreativeId" description:"平台侧创意ID"`
|
||||
PlatformMaterialID string `orm:"platform_material_id" json:"platformMaterialId" description:"平台侧素材ID"`
|
||||
AuditStatus string `orm:"audit_status" json:"auditStatus" description:"审核状态 pending/pass/reject"`
|
||||
Status string `orm:"status" json:"status" description:"本地状态 draft/active/paused/ended/rejected"`
|
||||
PlatformStatus string `orm:"platform_status" json:"platformStatus" description:"平台侧状态快照"`
|
||||
SyncStatus string `orm:"sync_status" json:"syncStatus" description:"同步状态 none/pending/synced/failed"`
|
||||
Extra string `orm:"extra" json:"extra" description:"平台特有扩展(JSON)"`
|
||||
}
|
||||
|
||||
// CreativeCol 创意表字段定义
|
||||
type CreativeCol struct {
|
||||
beans.SQLBaseCol
|
||||
AdID string
|
||||
CampaignID string
|
||||
AdvertiserID string
|
||||
Name string
|
||||
MaterialID string
|
||||
Title string
|
||||
Description string
|
||||
ClickURL string
|
||||
PlatformCreativeID string
|
||||
PlatformMaterialID string
|
||||
AuditStatus string
|
||||
Status string
|
||||
PlatformStatus string
|
||||
SyncStatus string
|
||||
Extra string
|
||||
}
|
||||
|
||||
// CreativeCols 创意表字段常量
|
||||
var CreativeCols = CreativeCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdID: "ad_id",
|
||||
CampaignID: "campaign_id",
|
||||
AdvertiserID: "advertiser_id",
|
||||
Name: "name",
|
||||
MaterialID: "material_id",
|
||||
Title: "title",
|
||||
Description: "description",
|
||||
ClickURL: "click_url",
|
||||
PlatformCreativeID: "platform_creative_id",
|
||||
PlatformMaterialID: "platform_material_id",
|
||||
AuditStatus: "audit_status",
|
||||
Status: "status",
|
||||
PlatformStatus: "platform_status",
|
||||
SyncStatus: "sync_status",
|
||||
Extra: "extra",
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package dsp
|
||||
|
||||
import (
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// AdSlot 广告位实体(自有媒体广告位,售卖给计划)
|
||||
type AdSlot struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
MediaID int64 `orm:"media_id" json:"mediaId" description:"媒体ID"`
|
||||
Name string `orm:"name" json:"name" description:"广告位名称"`
|
||||
SlotType string `orm:"slot_type" json:"slotType" description:"广告位类型 banner/feed/video/interstitial/reward"`
|
||||
Size string `orm:"size" json:"size" description:"尺寸"`
|
||||
Unit string `orm:"unit" json:"unit" description:"计费方式 cpm/cpc/cpa"`
|
||||
BasePrice int64 `orm:"base_price" json:"basePrice" description:"底价(分,cpm按千次)"`
|
||||
Status int `orm:"status" json:"status" description:"状态 1可售 0停售"`
|
||||
Extra string `orm:"extra" json:"extra" description:"扩展(JSON) 定向能力声明等"`
|
||||
}
|
||||
|
||||
// AdSlotCol 广告位表字段定义
|
||||
type AdSlotCol struct {
|
||||
beans.SQLBaseCol
|
||||
MediaID string
|
||||
Name string
|
||||
SlotType string
|
||||
Size string
|
||||
Unit string
|
||||
BasePrice string
|
||||
Status string
|
||||
Extra string
|
||||
}
|
||||
|
||||
// AdSlotCols 广告位表字段常量
|
||||
var AdSlotCols = AdSlotCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
MediaID: "media_id",
|
||||
Name: "name",
|
||||
SlotType: "slot_type",
|
||||
Size: "size",
|
||||
Unit: "unit",
|
||||
BasePrice: "base_price",
|
||||
Status: "status",
|
||||
Extra: "extra",
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package dsp
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// AuctionLog 展示计费日志实体(PD与RTB统一入口,按day分区)
|
||||
type AuctionLog struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
RequestID string `orm:"request_id" json:"requestId" description:"请求ID(RTB)/流水号(PD)"`
|
||||
CampaignID int64 `orm:"campaign_id" json:"campaignId" description:"本地计划ID"`
|
||||
AdID int64 `orm:"ad_id" json:"adId" description:"广告ID"`
|
||||
SlotID int64 `orm:"slot_id" json:"slotId" description:"广告位ID"`
|
||||
Event string `orm:"event" json:"event" description:"事件 show/click"`
|
||||
Price int64 `orm:"price" json:"price" description:"成交价(分,cpm按千次)"`
|
||||
Cost int64 `orm:"cost" json:"cost" description:"本次事件应计费用(分,写入时算好)"`
|
||||
DeviceID string `orm:"device_id" json:"deviceId" description:"设备ID"`
|
||||
IP string `orm:"ip" json:"ip" description:"请求IP"`
|
||||
Day *gtime.Time `orm:"day" json:"day" description:"分区日期"`
|
||||
}
|
||||
|
||||
// AuctionLogCol 展示计费日志表字段定义
|
||||
type AuctionLogCol struct {
|
||||
beans.SQLBaseCol
|
||||
RequestID string
|
||||
CampaignID string
|
||||
AdID string
|
||||
SlotID string
|
||||
Event string
|
||||
Price string
|
||||
Cost string
|
||||
DeviceID string
|
||||
IP string
|
||||
Day string
|
||||
}
|
||||
|
||||
// AuctionLogCols 展示计费日志表字段常量
|
||||
var AuctionLogCols = AuctionLogCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
RequestID: "request_id",
|
||||
CampaignID: "campaign_id",
|
||||
AdID: "ad_id",
|
||||
SlotID: "slot_id",
|
||||
Event: "event",
|
||||
Price: "price",
|
||||
Cost: "cost",
|
||||
DeviceID: "device_id",
|
||||
IP: "ip",
|
||||
Day: "day",
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package dsp
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// BidRequestLog RTB请求日志实体(高并发,按day分区,可裁剪)
|
||||
type BidRequestLog struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
RequestID string `orm:"request_id" json:"requestId" description:"请求ID(去重键)"`
|
||||
SlotID int64 `orm:"slot_id" json:"slotId" description:"广告位ID"`
|
||||
DeviceID string `orm:"device_id" json:"deviceId" description:"设备ID"`
|
||||
IP string `orm:"ip" json:"ip" description:"请求IP"`
|
||||
UA string `orm:"ua" json:"ua" description:"用户代理"`
|
||||
Extra string `orm:"extra" json:"extra" description:"上下文/定向特征(JSON)"`
|
||||
Day *gtime.Time `orm:"day" json:"day" description:"分区日期"`
|
||||
}
|
||||
|
||||
// BidRequestLogCol RTB请求日志表字段定义
|
||||
type BidRequestLogCol struct {
|
||||
beans.SQLBaseCol
|
||||
RequestID string
|
||||
SlotID string
|
||||
DeviceID string
|
||||
IP string
|
||||
UA string
|
||||
Extra string
|
||||
Day string
|
||||
}
|
||||
|
||||
// BidRequestLogCols RTB请求日志表字段常量
|
||||
var BidRequestLogCols = BidRequestLogCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
RequestID: "request_id",
|
||||
SlotID: "slot_id",
|
||||
DeviceID: "device_id",
|
||||
IP: "ip",
|
||||
UA: "ua",
|
||||
Extra: "extra",
|
||||
Day: "day",
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package dsp
|
||||
|
||||
import (
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// Media 媒体实体(自有媒体,公司流量侧)
|
||||
type Media struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
Name string `orm:"name" json:"name" description:"媒体名称"`
|
||||
Type string `orm:"type" json:"type" description:"媒体类型 app/web"`
|
||||
Domain string `orm:"domain" json:"domain" description:"域名"`
|
||||
Status int `orm:"status" json:"status" description:"状态 1启用 0停用"`
|
||||
}
|
||||
|
||||
// MediaCol 媒体表字段定义
|
||||
type MediaCol struct {
|
||||
beans.SQLBaseCol
|
||||
Name string
|
||||
Type string
|
||||
Domain string
|
||||
Status string
|
||||
}
|
||||
|
||||
// MediaCols 媒体表字段常量
|
||||
var MediaCols = MediaCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
Name: "name",
|
||||
Type: "type",
|
||||
Domain: "domain",
|
||||
Status: "status",
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package dsp
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// Placement 预订单实体(PD直投/程序化直购:计划×广告位预订)
|
||||
type Placement struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
AdSlotID int64 `orm:"ad_slot_id" json:"adSlotId" description:"广告位ID"`
|
||||
CampaignID int64 `orm:"campaign_id" json:"campaignId" description:"本地计划ID"`
|
||||
Quota int `orm:"quota" json:"quota" description:"预订量(展示次数)"`
|
||||
Price int64 `orm:"price" json:"price" description:"协议价(分,按unit口径)"`
|
||||
BookStart *gtime.Time `orm:"book_start" json:"bookStart" description:"预订开始时间"`
|
||||
BookEnd *gtime.Time `orm:"book_end" json:"bookEnd" description:"预订结束时间"`
|
||||
Status string `orm:"status" json:"status" description:"状态 pending/running/finished/ended"`
|
||||
DeliveredCount int `orm:"delivered_count" json:"deliveredCount" description:"已投展示数"`
|
||||
}
|
||||
|
||||
// PlacementCol 预订单表字段定义
|
||||
type PlacementCol struct {
|
||||
beans.SQLBaseCol
|
||||
AdSlotID string
|
||||
CampaignID string
|
||||
Quota string
|
||||
Price string
|
||||
BookStart string
|
||||
BookEnd string
|
||||
Status string
|
||||
DeliveredCount string
|
||||
}
|
||||
|
||||
// PlacementCols 预订单表字段常量
|
||||
var PlacementCols = PlacementCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdSlotID: "ad_slot_id",
|
||||
CampaignID: "campaign_id",
|
||||
Quota: "quota",
|
||||
Price: "price",
|
||||
BookStart: "book_start",
|
||||
BookEnd: "book_end",
|
||||
Status: "status",
|
||||
DeliveredCount: "delivered_count",
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package material
|
||||
|
||||
import (
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// Material 素材实体(素材文件库,md5去重)
|
||||
type Material struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"广告主ID"`
|
||||
Type string `orm:"type" json:"type" description:"素材类型 image/video/text"`
|
||||
Title string `orm:"title" json:"title" description:"素材标题"`
|
||||
FilePath string `orm:"file_path" json:"filePath" description:"本地存储路径"`
|
||||
FileSize int64 `orm:"file_size" json:"fileSize" description:"文件大小(字节)"`
|
||||
MD5 string `orm:"md5" json:"md5" description:"文件MD5(去重键)"`
|
||||
Width int `orm:"width" json:"width" description:"宽度(像素)"`
|
||||
Height int `orm:"height" json:"height" description:"高度(像素)"`
|
||||
Duration int `orm:"duration" json:"duration" description:"视频时长(秒)"`
|
||||
Format string `orm:"format" json:"format" description:"文件格式"`
|
||||
AuditStatus string `orm:"audit_status" json:"auditStatus" description:"审核状态 pending/auditing/pass/reject/disabled"`
|
||||
Status int `orm:"status" json:"status" description:"状态 1可用 0禁用"`
|
||||
Extra string `orm:"extra" json:"extra" description:"扩展(JSON) 如平台素材ID映射"`
|
||||
}
|
||||
|
||||
// MaterialCol 素材表字段定义
|
||||
type MaterialCol struct {
|
||||
beans.SQLBaseCol
|
||||
AdvertiserID string
|
||||
Type string
|
||||
Title string
|
||||
FilePath string
|
||||
FileSize string
|
||||
MD5 string
|
||||
Width string
|
||||
Height string
|
||||
Duration string
|
||||
Format string
|
||||
AuditStatus string
|
||||
Status string
|
||||
Extra string
|
||||
}
|
||||
|
||||
// MaterialCols 素材表字段常量
|
||||
var MaterialCols = MaterialCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdvertiserID: "advertiser_id",
|
||||
Type: "type",
|
||||
Title: "title",
|
||||
FilePath: "file_path",
|
||||
FileSize: "file_size",
|
||||
MD5: "md5",
|
||||
Width: "width",
|
||||
Height: "height",
|
||||
Duration: "duration",
|
||||
Format: "format",
|
||||
AuditStatus: "audit_status",
|
||||
Status: "status",
|
||||
Extra: "extra",
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package material
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// MaterialAudit 素材审核记录实体(审核状态机全量日志,多通道)
|
||||
type MaterialAudit struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
MaterialID int64 `orm:"material_id" json:"materialId" description:"素材ID"`
|
||||
AuditChannel string `orm:"audit_channel" json:"auditChannel" description:"审核通道 yidun/platform/manual"`
|
||||
AuditAction string `orm:"audit_action" json:"auditAction" description:"审核动作 submit/pass/reject/revoke"`
|
||||
AuditStatus string `orm:"audit_status" json:"auditStatus" description:"审核状态"`
|
||||
Result string `orm:"result" json:"result" description:"平台返回详情(JSON) 原因/违规项"`
|
||||
Operator string `orm:"operator" json:"operator" description:"操作人"`
|
||||
AuditTime *gtime.Time `orm:"audit_time" json:"auditTime" description:"审核时间"`
|
||||
}
|
||||
|
||||
// MaterialAuditCol 素材审核记录表字段定义
|
||||
type MaterialAuditCol struct {
|
||||
beans.SQLBaseCol
|
||||
MaterialID string
|
||||
AuditChannel string
|
||||
AuditAction string
|
||||
AuditStatus string
|
||||
Result string
|
||||
Operator string
|
||||
AuditTime string
|
||||
}
|
||||
|
||||
// MaterialAuditCols 素材审核记录表字段常量
|
||||
var MaterialAuditCols = MaterialAuditCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
MaterialID: "material_id",
|
||||
AuditChannel: "audit_channel",
|
||||
AuditAction: "audit_action",
|
||||
AuditStatus: "audit_status",
|
||||
Result: "result",
|
||||
Operator: "operator",
|
||||
AuditTime: "audit_time",
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package platform
|
||||
|
||||
import (
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// AdAccount 广告账户实体(平台凭据 + 多级层级 + API能力标识)
|
||||
type AdAccount struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"归属广告主ID"`
|
||||
Name string `orm:"name" json:"name" description:"账户显示名"`
|
||||
Platform string `orm:"platform" json:"platform" description:"广告平台 douyin/xiaohongshu/kuaishou"`
|
||||
AccountID string `orm:"account_id" json:"accountId" description:"平台侧账户ID"`
|
||||
ParentAccountID int64 `orm:"parent_account_id" json:"parentAccountId" description:"上级账户ID(多级代理层级,自引用)"`
|
||||
AccountRole string `orm:"account_role" json:"accountRole" description:"账户角色 agent/owner/sub"`
|
||||
Capabilities string `orm:"capabilities" json:"capabilities" description:"API能力(JSON) attribution/delivery/report"`
|
||||
AppID string `orm:"app_id" json:"appId" description:"应用ID"`
|
||||
AppSecret string `orm:"app_secret" json:"appSecret" description:"应用密钥"`
|
||||
AccessToken string `orm:"access_token" json:"accessToken" description:"访问令牌"`
|
||||
TokenExpireAt int64 `orm:"token_expire_at" json:"tokenExpireAt" description:"令牌过期时间戳"`
|
||||
Config string `orm:"config" json:"config" description:"平台特定配置(JSON) 含回传事件映射等"`
|
||||
Enabled bool `orm:"enabled" json:"enabled" description:"是否启用"`
|
||||
}
|
||||
|
||||
// AdAccountCol 广告账户表字段定义
|
||||
type AdAccountCol struct {
|
||||
beans.SQLBaseCol
|
||||
AdvertiserID string
|
||||
Name string
|
||||
Platform string
|
||||
AccountID string
|
||||
ParentAccountID string
|
||||
AccountRole string
|
||||
Capabilities string
|
||||
AppID string
|
||||
AppSecret string
|
||||
AccessToken string
|
||||
TokenExpireAt string
|
||||
Config string
|
||||
Enabled string
|
||||
}
|
||||
|
||||
// AdAccountCols 广告账户表字段常量
|
||||
var AdAccountCols = AdAccountCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdvertiserID: "advertiser_id",
|
||||
Name: "name",
|
||||
Platform: "platform",
|
||||
AccountID: "account_id",
|
||||
ParentAccountID: "parent_account_id",
|
||||
AccountRole: "account_role",
|
||||
Capabilities: "capabilities",
|
||||
AppID: "app_id",
|
||||
AppSecret: "app_secret",
|
||||
AccessToken: "access_token",
|
||||
TokenExpireAt: "token_expire_at",
|
||||
Config: "config",
|
||||
Enabled: "enabled",
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package platform
|
||||
|
||||
import (
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// AdPlatformAccount 广告平台账户配置实体(上游广告平台对接凭据)
|
||||
type AdPlatformAccount struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
Platform string `orm:"platform" json:"platform" description:"广告平台 douyin/xiaohongshu/kuaishou"`
|
||||
AccountID string `orm:"account_id" json:"accountId" description:"平台侧账户ID"`
|
||||
AppID string `orm:"app_id" json:"appId" description:"应用ID"`
|
||||
AppSecret string `orm:"app_secret" json:"appSecret" description:"应用密钥"`
|
||||
AccessToken string `orm:"access_token" json:"accessToken" description:"访问令牌"`
|
||||
TokenExpireAt int64 `orm:"token_expire_at" json:"tokenExpireAt" description:"令牌过期时间戳"`
|
||||
Config string `orm:"config" json:"config" description:"平台特定配置(JSON)"`
|
||||
Enabled bool `orm:"enabled" json:"enabled" description:"是否启用"`
|
||||
}
|
||||
|
||||
// AdPlatformAccountCol 广告平台账户表字段定义
|
||||
type AdPlatformAccountCol struct {
|
||||
beans.SQLBaseCol
|
||||
Platform string
|
||||
AccountID string
|
||||
AppID string
|
||||
AppSecret string
|
||||
AccessToken string
|
||||
TokenExpireAt string
|
||||
Config string
|
||||
Enabled string
|
||||
}
|
||||
|
||||
// AdPlatformAccountCols 广告平台账户表字段常量
|
||||
var AdPlatformAccountCols = AdPlatformAccountCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
Platform: "platform",
|
||||
AccountID: "account_id",
|
||||
AppID: "app_id",
|
||||
AppSecret: "app_secret",
|
||||
AccessToken: "access_token",
|
||||
TokenExpireAt: "token_expire_at",
|
||||
Config: "config",
|
||||
Enabled: "enabled",
|
||||
}
|
||||
@@ -8,32 +8,38 @@ import (
|
||||
type CommercePlatformConfig struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
Platform string `orm:"platform" json:"platform" description:"电商平台 jd/taobao"`
|
||||
AppKey string `orm:"app_key" json:"appKey" description:"应用Key"`
|
||||
AppSecret string `orm:"app_secret" json:"appSecret" description:"应用密钥"`
|
||||
CallbackURL string `orm:"callback_url" json:"callbackUrl" description:"订单回调接收URL"`
|
||||
Config string `orm:"config" json:"config" description:"平台特定配置(JSON)"`
|
||||
Enabled bool `orm:"enabled" json:"enabled" description:"是否启用"`
|
||||
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"归属广告主ID"`
|
||||
Name string `orm:"name" json:"name" description:"配置显示名"`
|
||||
Platform string `orm:"platform" json:"platform" description:"电商平台 jd/taobao"`
|
||||
AppKey string `orm:"app_key" json:"appKey" description:"应用Key"`
|
||||
AppSecret string `orm:"app_secret" json:"appSecret" description:"应用密钥"`
|
||||
CallbackURL string `orm:"callback_url" json:"callbackUrl" description:"订单回调接收URL"`
|
||||
Config string `orm:"config" json:"config" description:"平台特定配置(JSON)"`
|
||||
Enabled bool `orm:"enabled" json:"enabled" description:"是否启用"`
|
||||
}
|
||||
|
||||
// CommercePlatformConfigCol 电商平台配置表字段定义
|
||||
type CommercePlatformConfigCol struct {
|
||||
beans.SQLBaseCol
|
||||
Platform string
|
||||
AppKey string
|
||||
AppSecret string
|
||||
CallbackURL string
|
||||
Config string
|
||||
Enabled string
|
||||
AdvertiserID string
|
||||
Name string
|
||||
Platform string
|
||||
AppKey string
|
||||
AppSecret string
|
||||
CallbackURL string
|
||||
Config string
|
||||
Enabled string
|
||||
}
|
||||
|
||||
// CommercePlatformConfigCols 电商平台配置表字段常量
|
||||
var CommercePlatformConfigCols = CommercePlatformConfigCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
Platform: "platform",
|
||||
AppKey: "app_key",
|
||||
AppSecret: "app_secret",
|
||||
CallbackURL: "callback_url",
|
||||
Config: "config",
|
||||
Enabled: "enabled",
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdvertiserID: "advertiser_id",
|
||||
Name: "name",
|
||||
Platform: "platform",
|
||||
AppKey: "app_key",
|
||||
AppSecret: "app_secret",
|
||||
CallbackURL: "callback_url",
|
||||
Config: "config",
|
||||
Enabled: "enabled",
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import (
|
||||
type ItemMapping struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
AdvertiserID int64 `orm:"advertiser_id" json:"advertiserId" description:"归属广告主ID"`
|
||||
AdPlatform string `orm:"ad_platform" json:"adPlatform" description:"广告平台"`
|
||||
AdItemID string `orm:"ad_item_id" json:"adItemId" description:"广告平台侧商品ID"`
|
||||
CommercePlatform string `orm:"commerce_platform" json:"commercePlatform" description:"电商平台"`
|
||||
@@ -19,6 +20,7 @@ type ItemMapping struct {
|
||||
// ItemMappingCol 商品映射表字段定义
|
||||
type ItemMappingCol struct {
|
||||
beans.SQLBaseCol
|
||||
AdvertiserID string
|
||||
AdPlatform string
|
||||
AdItemID string
|
||||
CommercePlatform string
|
||||
@@ -30,6 +32,7 @@ type ItemMappingCol struct {
|
||||
// ItemMappingCols 商品映射表字段常量
|
||||
var ItemMappingCols = ItemMappingCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
AdvertiserID: "advertiser_id",
|
||||
AdPlatform: "ad_platform",
|
||||
AdItemID: "ad_item_id",
|
||||
CommercePlatform: "commerce_platform",
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package report
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
|
||||
"gitea.redpowerfuture.com/red-future/common/beans"
|
||||
)
|
||||
|
||||
// DailyReport 日报表实体(统一消耗/效果汇总:外投拉平台报表,DSP聚合auction_log)
|
||||
type DailyReport struct {
|
||||
beans.SQLBaseDO `orm:",inherit"`
|
||||
// 业务字段
|
||||
ReportDate *gtime.Time `orm:"report_date" json:"reportDate" description:"报表日期"`
|
||||
Channel string `orm:"channel" json:"channel" description:"投放通道 external外投/self_dsp自有"`
|
||||
AdAccountID int64 `orm:"ad_account_id" json:"adAccountId" description:"广告账户ID"`
|
||||
CampaignID int64 `orm:"campaign_id" json:"campaignId" description:"本地计划ID"`
|
||||
Platform string `orm:"platform" json:"platform" description:"广告平台 douyin/xiaohongshu/kuaishou"`
|
||||
Impressions int64 `orm:"impressions" json:"impressions" description:"展示数"`
|
||||
Clicks int64 `orm:"clicks" json:"clicks" description:"点击数"`
|
||||
Cost int64 `orm:"cost" json:"cost" description:"消耗(分)"`
|
||||
Conversions int64 `orm:"conversions" json:"conversions" description:"转化数"`
|
||||
Extra string `orm:"extra" json:"extra" description:"平台报表原始快照(JSON),对账用"`
|
||||
}
|
||||
|
||||
// DailyReportCol 日报表字段定义
|
||||
type DailyReportCol struct {
|
||||
beans.SQLBaseCol
|
||||
ReportDate string
|
||||
Channel string
|
||||
AdAccountID string
|
||||
CampaignID string
|
||||
Platform string
|
||||
Impressions string
|
||||
Clicks string
|
||||
Cost string
|
||||
Conversions string
|
||||
Extra string
|
||||
}
|
||||
|
||||
// DailyReportCols 日报表字段常量
|
||||
var DailyReportCols = DailyReportCol{
|
||||
SQLBaseCol: beans.DefSQLBaseCol,
|
||||
ReportDate: "report_date",
|
||||
Channel: "channel",
|
||||
AdAccountID: "ad_account_id",
|
||||
CampaignID: "campaign_id",
|
||||
Platform: "platform",
|
||||
Impressions: "impressions",
|
||||
Clicks: "clicks",
|
||||
Cost: "cost",
|
||||
Conversions: "conversions",
|
||||
Extra: "extra",
|
||||
}
|
||||
Reference in New Issue
Block a user