gomod引用
This commit is contained in:
@@ -8,7 +8,8 @@ const AdPositionCollection = "ad_position"
|
||||
|
||||
// AdPosition 广告位实体
|
||||
type AdPosition struct {
|
||||
do.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
||||
do.MongoBaseDO `bson:",inline" json:",inline"`
|
||||
Status string `bson:"status" json:"status"` // 状态:active、inactive、maintenance等
|
||||
|
||||
// 基本信息
|
||||
Name string `bson:"name" json:"name"` // 广告位名称
|
||||
@@ -17,8 +18,8 @@ type AdPosition struct {
|
||||
AdFormat string `bson:"adFormat" json:"adFormat"` // 支持的广告格式
|
||||
|
||||
// 尺寸信息
|
||||
Width int `bson:"width" json:"width"` // 宽度(px)
|
||||
Height int `bson:"height" json:"height"` // 高度(px)
|
||||
Width int64 `bson:"width" json:"width"` // 宽度(px)
|
||||
Height int64 `bson:"height" json:"height"` // 高度(px)
|
||||
|
||||
// 位置信息
|
||||
Page string `bson:"page" json:"page"` // 所属页面
|
||||
@@ -39,16 +40,11 @@ type AdPosition struct {
|
||||
// 展示规则
|
||||
DisplayRules *DisplayRules `bson:"displayRules" json:"displayRules"` // 展示规则
|
||||
|
||||
// 状态信息
|
||||
Status string `bson:"status" json:"status"` // 广告位状态:启用、禁用、测试
|
||||
IsExclusive bool `bson:"isExclusive" json:"isExclusive"` // 是否独占广告位
|
||||
// 限制配置
|
||||
RestrictionConfig `bson:",inline" json:",inline"` // 内联限制配置
|
||||
|
||||
// 统计信息
|
||||
DailyImpressions int64 `bson:"dailyImpressions" json:"dailyImpressions"` // 日均展示量
|
||||
DailyClicks int64 `bson:"dailyClicks" json:"dailyClicks"` // 日均点击量
|
||||
DailyRevenue int64 `bson:"dailyRevenue" json:"dailyRevenue"` // 日均收入(分)
|
||||
CTR float64 `bson:"ctr" json:"ctr"` // 点击率
|
||||
eCPM int64 `bson:"ecpm" json:"ecpm"` // 有效千次展示收入
|
||||
// 其他状态
|
||||
IsExclusive bool `bson:"isExclusive" json:"isExclusive"` // 是否独占广告位
|
||||
}
|
||||
|
||||
// DisplayRules 广告位展示规则
|
||||
@@ -80,3 +76,8 @@ type ExcludeCondition struct {
|
||||
Type string `bson:"type" json:"type"` // 条件类型
|
||||
Value interface{} `bson:"value" json:"value"` // 条件值
|
||||
}
|
||||
|
||||
// GetCollectionName 获取集合名称
|
||||
func (a *AdPosition) GetCollectionName() string {
|
||||
return AdPositionCollection
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user