gomod引用
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"cid/model/config"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
@@ -51,10 +53,10 @@ type AdCreative struct {
|
||||
LastSyncTime int64 `bson:"lastSyncTime" json:"lastSyncTime"` // 最后同步时间
|
||||
|
||||
// 基础配置
|
||||
BaseConfig `bson:",inline" json:",inline"` // 内联基础配置
|
||||
config.BaseConfig `bson:",inline" json:",inline"` // 内联基础配置
|
||||
|
||||
// 限制配置
|
||||
RestrictionConfig `bson:",inline" json:",inline"` // 内联限制配置
|
||||
config.RestrictionConfig `bson:",inline" json:",inline"` // 内联限制配置
|
||||
|
||||
// 其他信息
|
||||
Status string `bson:"status" json:"status"` // 状态:active、inactive、archived
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"cid/model/config"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
@@ -29,13 +31,13 @@ type AdPlatform struct {
|
||||
HeaderBidding bool `bson:"headerBidding" json:"headerBidding"` // 是否支持Header Bidding
|
||||
|
||||
// API配置
|
||||
APIConfig `bson:",inline" json:",inline"` // 内联API配置
|
||||
config.APIConfig `bson:",inline" json:",inline"` // 内联API配置
|
||||
|
||||
// 竞价配置
|
||||
BiddingConfig `bson:",inline" json:",inline"` // 内联竞价配置
|
||||
config.BiddingConfig `bson:",inline" json:",inline"` // 内联竞价配置
|
||||
|
||||
// 支付配置
|
||||
PaymentConfig `bson:",inline" json:",inline"` // 内联支付配置
|
||||
config.PaymentConfig `bson:",inline" json:",inline"` // 内联支付配置
|
||||
|
||||
// 限流配置
|
||||
RateLimit int64 `bson:"rateLimit" json:"rateLimit"` // 速率限制
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"cid/model/config"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
@@ -41,7 +43,7 @@ type AdPosition struct {
|
||||
DisplayRules *DisplayRules `bson:"displayRules" json:"displayRules"` // 展示规则
|
||||
|
||||
// 限制配置
|
||||
RestrictionConfig `bson:",inline" json:",inline"` // 内联限制配置
|
||||
config.RestrictionConfig `bson:",inline" json:",inline"` // 内联限制配置
|
||||
|
||||
// 其他状态
|
||||
IsExclusive bool `bson:"isExclusive" json:"isExclusive"` // 是否独占广告位
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"cid/model/config"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
@@ -22,16 +24,16 @@ type AdSource struct {
|
||||
Config string `bson:"config" json:"config"` // 广告源配置(JSON字符串)
|
||||
|
||||
// API配置
|
||||
APIConfig `bson:",inline" json:",inline"` // 内联API配置
|
||||
config.APIConfig `bson:",inline" json:",inline"` // 内联API配置
|
||||
|
||||
// 创意配置
|
||||
CreativeConfig `bson:",inline" json:",inline"` // 内联创意配置
|
||||
config.CreativeConfig `bson:",inline" json:",inline"` // 内联创意配置
|
||||
|
||||
// 广告源能力
|
||||
Capabilities *AdSourceCapabilities `bson:"capabilities" json:"capabilities"` // 广告源能力
|
||||
|
||||
// 支付配置
|
||||
PaymentConfig `bson:",inline" json:",inline"` // 内联支付配置
|
||||
config.PaymentConfig `bson:",inline" json:",inline"` // 内联支付配置
|
||||
}
|
||||
|
||||
// AdSourceCapabilities 广告源能力
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"cid/model/config"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
@@ -27,9 +29,9 @@ type Advertisement struct {
|
||||
AdProvider string `bson:"adProvider" json:"adProvider"` // 广告提供者:self、chuanshanjia、xiaohongshu、douyin等
|
||||
|
||||
// 投放配置
|
||||
BudgetConfig `bson:",inline" json:",inline"` // 内联预算配置
|
||||
BidAmount int64 `bson:"bidAmount" json:"bidAmount"` // 出价(分)
|
||||
BillingType string `bson:"billingType" json:"billingType"` // 计费类型:CPC、CPM、CPA等
|
||||
config.BudgetConfig `bson:",inline" json:",inline"` // 内联预算配置
|
||||
BidAmount int64 `bson:"bidAmount" json:"bidAmount"` // 出价(分)
|
||||
BillingType string `bson:"billingType" json:"billingType"` // 计费类型:CPC、CPM、CPA等
|
||||
|
||||
// 定向条件
|
||||
Targeting *UnifiedTargeting `bson:"targeting" json:"targeting"` // 统一定向条件
|
||||
@@ -41,7 +43,7 @@ type Advertisement struct {
|
||||
AuditBy string `bson:"auditBy" json:"auditBy"` // 审核人
|
||||
|
||||
// 限制配置
|
||||
RestrictionConfig `bson:",inline" json:",inline"` // 内联限制配置
|
||||
config.RestrictionConfig `bson:",inline" json:",inline"` // 内联限制配置
|
||||
|
||||
// 其他状态信息
|
||||
Status string `bson:"status" json:"status"` // 业务状态:active、inactive、archived
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
package entity
|
||||
|
||||
// BaseConfig 基础配置结构
|
||||
type BaseConfig struct {
|
||||
// 优先级和权重
|
||||
Priority int `bson:"priority" json:"priority"` // 优先级
|
||||
Weight float64 `bson:"weight" json:"weight"` // 权重
|
||||
Order int `bson:"order" json:"order"` // 排序顺序
|
||||
|
||||
// 标签和分类
|
||||
Tags []string `bson:"tags" json:"tags"` // 标签
|
||||
Category string `bson:"category" json:"category"` // 分类
|
||||
Industry string `bson:"industry" json:"industry"` // 行业
|
||||
|
||||
// 配置信息
|
||||
Config string `bson:"config" json:"config"` // 配置信息(JSON格式)
|
||||
Extra map[string]interface{} `bson:"extra" json:"extra"` // 扩展字段
|
||||
Remark string `bson:"remark" json:"remark"` // 备注
|
||||
}
|
||||
|
||||
// BiddingConfig 竞价配置
|
||||
type BiddingConfig struct {
|
||||
// 竞价类型
|
||||
BiddingType string `bson:"biddingType" json:"biddingType"` // 竞价类型:cpm、cpc、cpa、rtb
|
||||
BiddingStrategy string `bson:"biddingStrategy" json:"biddingStrategy"` // 出价策略:manual、auto、target_cpa、target_roas等
|
||||
|
||||
// 出价范围
|
||||
MinBidAmount int64 `bson:"minBidAmount" json:"minBidAmount"` // 最小出价(分)
|
||||
MaxBidAmount int64 `bson:"maxBidAmount" json:"maxBidAmount"` // 最大出价(分)
|
||||
DefaultBidAmount int64 `bson:"defaultBidAmount" json:"defaultBidAmount"` // 默认出价(分)
|
||||
BidIncrement int64 `bson:"bidIncrement" json:"bidIncrement"` // 出价增量(分)
|
||||
|
||||
// 自动优化
|
||||
AutoOptimization bool `bson:"autoOptimization" json:"autoOptimization"` // 是否自动优化
|
||||
TargetCPA int64 `bson:"targetCPA" json:"targetCPA"` // 目标CPA(分)
|
||||
TargetROAS float64 `bson:"targetROAS" json:"targetROAS"` // 目标ROAS
|
||||
ConversionValue int64 `bson:"conversionValue" json:"conversionValue"` // 转化价值
|
||||
AttributionWindow string `bson:"attributionWindow" json:"attributionWindow"` // 归因窗口
|
||||
OptimizationGoal string `bson:"optimizationGoal" json:"optimizationGoal"` // 优化目标:impressions、clicks、conversions、revenue等
|
||||
}
|
||||
|
||||
// BudgetConfig 预算配置
|
||||
type BudgetConfig struct {
|
||||
// 预算设置
|
||||
TotalBudget int64 `bson:"totalBudget" json:"totalBudget"` // 总预算(分)
|
||||
DailyBudget int64 `bson:"dailyBudget" json:"dailyBudget"` // 日预算(分)
|
||||
HourlyBudget int64 `bson:"hourlyBudget" json:"hourlyBudget"` // 小时预算(分)
|
||||
|
||||
// 投放节奏
|
||||
PaceType string `bson:"paceType" json:"paceType"` // 投放节奏:even、accelerated、standard
|
||||
IsBudgetPacing bool `bson:"isBudgetPacing" json:"isBudgetPacing"` // 是否预算匀速投放
|
||||
|
||||
// 时间配置
|
||||
StartDate int64 `bson:"startDate" json:"startDate"` // 开始投放时间
|
||||
EndDate int64 `bson:"endDate" json:"endDate"` // 结束投放时间
|
||||
TimeSlots []string `bson:"timeSlots" json:"timeSlots"` // 投放时间段
|
||||
DaysOfWeek []int `bson:"daysOfWeek" json:"daysOfWeek"` // 投放日期(0-6,0表示周日)
|
||||
Timezone string `bson:"timezone" json:"timezone"` // 时区
|
||||
IsTimeLimited bool `bson:"isTimeLimited" json:"isTimeLimited"` // 是否限时投放
|
||||
}
|
||||
|
||||
// APIConfig API配置
|
||||
type APIConfig struct {
|
||||
// 基础配置
|
||||
Endpoint string `bson:"endpoint" json:"endpoint"` // API端点
|
||||
Version string `bson:"version" json:"version"` // API版本
|
||||
Timeout int `bson:"timeout" json:"timeout"` // 超时时间(毫秒)
|
||||
RetryCount int `bson:"retryCount" json:"retryCount"` // 重试次数
|
||||
|
||||
// 认证配置
|
||||
AuthType string `bson:"authType" json:"authType"` // 认证类型:api_key、oauth、basic
|
||||
AuthConfig string `bson:"authConfig" json:"authConfig"` // 认证配置(JSON字符串)
|
||||
|
||||
// 请求配置
|
||||
Headers string `bson:"headers" json:"headers"` // 请求头配置(JSON字符串)
|
||||
|
||||
// 限流配置
|
||||
RateLimit int64 `bson:"rateLimit" json:"rateLimit"` // 速率限制
|
||||
MaxRequestsPerHour int64 `bson:"maxRequestsPerHour" json:"maxRequestsPerHour"` // 每小时最大请求数
|
||||
}
|
||||
|
||||
// CreativeConfig 创意配置
|
||||
type CreativeConfig struct {
|
||||
// 轮播设置
|
||||
CreativeRotation string `bson:"creativeRotation" json:"creativeRotation"` // 创意轮播方式:optimize、even、random
|
||||
SelectedCreatives []string `bson:"selectedCreatives" json:"selectedCreatives"` // 选中的创意列表
|
||||
ExcludedCreatives []string `bson:"excludedCreatives" json:"excludedCreatives"` // 排除的创意列表
|
||||
|
||||
// 技术要求
|
||||
MaxFileSize int64 `bson:"maxFileSize" json:"maxFileSize"` // 最大文件大小(bytes)
|
||||
MaxDuration int64 `bson:"maxDuration" json:"maxDuration"` // 最大时长(秒)
|
||||
SupportedMimeTypes []string `bson:"supportedMimeTypes" json:"supportedMimeTypes"` // 支持的MIME类型
|
||||
|
||||
// 支持的格式
|
||||
SupportedFormats []string `bson:"supportedFormats" json:"supportedFormats"` // 支持的格式
|
||||
SupportedSizes []string `bson:"supportedSizes" json:"supportedSizes"` // 支持的尺寸
|
||||
}
|
||||
|
||||
// PaymentConfig 支付配置
|
||||
type PaymentConfig struct {
|
||||
// 计费模式
|
||||
BillingModel string `bson:"billingModel" json:"billingModel"` // 计费模式:CPC、CPM、CPA等
|
||||
CommissionRate float64 `bson:"commissionRate" json:"commissionRate"` // 佣金比例
|
||||
MinimumBudget int64 `bson:"minimumBudget" json:"minimumBudget"` // 最低预算(分)
|
||||
|
||||
// 结算配置
|
||||
SettlementCycle string `bson:"settlementCycle" json:"settlementCycle"` // 结算周期:daily、weekly、monthly
|
||||
PaymentTerms string `bson:"paymentTerms" json:"paymentTerms"` // 支付条款
|
||||
Currency string `bson:"currency" json:"currency"` // 货币单位
|
||||
|
||||
// 收入分成
|
||||
RevShareRate float64 `bson:"revShareRate" json:"revShareRate"` // 收入分成比例(0-1)
|
||||
MinPayment int64 `bson:"minPayment" json:"minPayment"` // 最小支付金额(分)
|
||||
TaxInclusive bool `bson:"taxInclusive" json:"taxInclusive"` // 是否含税
|
||||
EarlyPaymentDiscount float64 `bson:"earlyPaymentDiscount" json:"earlyPaymentDiscount"` // 提前付款折扣
|
||||
}
|
||||
|
||||
// FrequencyCapConfig 频次控制配置
|
||||
type FrequencyCapConfig struct {
|
||||
// 频次限制
|
||||
Impressions int `bson:"impressions" json:"impressions"` // 展示次数
|
||||
TimeWindow int `bson:"timeWindow" json:"timeWindow"` // 时间窗口(小时)
|
||||
PerUser int `bson:"perUser" json:"perUser"` // 每用户频次
|
||||
PerHour int `bson:"perHour" json:"perHour"` // 每小时频次
|
||||
PerDay int `bson:"perDay" json:"perDay"` // 每日频次
|
||||
|
||||
// 频次控制规则
|
||||
CapType string `bson:"capType" json:"capType"` // 频次类型:lifetime、daily、hourly
|
||||
CapScope string `bson:"capScope" json:"capScope"` // 频次范围:user、device、ip
|
||||
ResetRule string `bson:"resetRule" json:"resetRule"` // 重置规则:daily、weekly、monthly
|
||||
}
|
||||
|
||||
// RestrictionConfig 限制配置
|
||||
type RestrictionConfig struct {
|
||||
// 年龄限制
|
||||
AgeRestriction bool `bson:"ageRestriction" json:"ageRestriction"` // 年龄限制
|
||||
MinAge int `bson:"minAge" json:"minAge"` // 最小年龄
|
||||
MaxAge int `bson:"maxAge" json:"maxAge"` // 最大年龄
|
||||
|
||||
// 地域限制
|
||||
GeoRestrictions []string `bson:"geoRestrictions" json:"geoRestrictions"` // 地域限制
|
||||
|
||||
// 设备限制
|
||||
DeviceRestrictions []string `bson:"deviceRestrictions" json:"deviceRestrictions"` // 设备限制
|
||||
|
||||
// 分类限制
|
||||
CategoryRestrictions []string `bson:"categoryRestrictions" json:"categoryRestrictions"` // 分类限制
|
||||
|
||||
// 内容限制
|
||||
ContentRestrictions []string `bson:"contentRestrictions" json:"contentRestrictions"` // 内容限制
|
||||
|
||||
// 品牌安全
|
||||
BrandSafety bool `bson:"brandSafety" json:"brandSafety"` // 品牌安全
|
||||
BlockedCategories []string `bson:"blockedCategories" json:"blockedCategories"` // 阻止的分类
|
||||
AllowedCategories []string `bson:"allowedCategories" json:"allowedCategories"` // 允许的分类
|
||||
ExcludedKeywords []string `bson:"excludedKeywords" json:"excludedKeywords"` // 排除的关键词
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"cid/model/config"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
@@ -21,10 +23,10 @@ type PlatformDeliveryRule struct {
|
||||
RuleType string `bson:"ruleType" json:"ruleType"` // 规则类型:budget、targeting、bidding、frequency等
|
||||
|
||||
// 预算配置
|
||||
BudgetConfig `bson:",inline" json:",inline"` // 内联预算配置
|
||||
config.BudgetConfig `bson:",inline" json:",inline"` // 内联预算配置
|
||||
|
||||
// 出价配置
|
||||
BiddingConfig `bson:",inline" json:",inline"` // 内联竞价配置
|
||||
config.BiddingConfig `bson:",inline" json:",inline"` // 内联竞价配置
|
||||
|
||||
// 定向配置
|
||||
TargetingConfig string `bson:"targetingConfig" json:"targetingConfig"` // 定向配置(JSON格式)
|
||||
@@ -32,7 +34,7 @@ type PlatformDeliveryRule struct {
|
||||
ExcludeAudience []string `bson:"excludeAudience" json:"excludeAudience"` // 排除受众
|
||||
|
||||
// 频次控制配置
|
||||
FrequencyCapConfig `bson:",inline" json:",inline"` // 内联频次控制配置
|
||||
config.FrequencyCapConfig `bson:",inline" json:",inline"` // 内联频次控制配置
|
||||
|
||||
// 创意配置
|
||||
CreativeRotation string `bson:"creativeRotation" json:"creativeRotation"` // 创意轮播方式:optimize、even、random
|
||||
|
||||
Reference in New Issue
Block a user