84 lines
3.5 KiB
Go
84 lines
3.5 KiB
Go
package attribution
|
|
|
|
import (
|
|
"github.com/gogf/gf/v2/os/gtime"
|
|
|
|
"gitea.redpowerfuture.com/red-future/common/beans"
|
|
)
|
|
|
|
// ClickLog 点击日志实体(CID核心表,按 day 分区)
|
|
type ClickLog struct {
|
|
beans.SQLBaseDO `orm:",inherit"`
|
|
// 业务字段
|
|
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
|
|
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",
|
|
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",
|
|
}
|