2025-12-06 09:10:24 +08:00
|
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2025-12-19 10:20:30 +08:00
|
|
|
|
"cid/model/config"
|
|
|
|
|
|
|
2025-12-31 11:04:55 +08:00
|
|
|
|
"gitee.com/red-future---jilin-g/common/beans"
|
2025-12-06 09:10:24 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const AdvertisementCollection = "advertisement"
|
|
|
|
|
|
|
|
|
|
|
|
// Advertisement 广告实体
|
|
|
|
|
|
type Advertisement struct {
|
2025-12-31 11:04:55 +08:00
|
|
|
|
beans.MongoBaseDO `bson:",inline" json:",inline"`
|
|
|
|
|
|
AdvertiserId string `bson:"advertiserId" json:"advertiserId"` // 广告主ID
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
|
|
|
|
|
// 广告基本信息
|
2025-12-09 13:32:43 +08:00
|
|
|
|
Title string `bson:"title" json:"title"` // 广告标题
|
|
|
|
|
|
Description string `bson:"description" json:"description"` // 广告描述
|
|
|
|
|
|
AdPositionId string `bson:"adPositionId" json:"adPositionId"` // 广告位ID
|
|
|
|
|
|
AdType string `bson:"adType" json:"adType"` // 广告类型:图片、视频、文字等
|
|
|
|
|
|
AdFormat string `bson:"adFormat" json:"adFormat"` // 广告格式
|
|
|
|
|
|
MaterialUrl string `bson:"materialUrl" json:"materialUrl"` // 广告素材URL
|
|
|
|
|
|
TargetUrl string `bson:"targetUrl" json:"targetUrl"` // 目标链接(点击跳转或落地页)
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
2025-12-19 09:42:39 +08:00
|
|
|
|
// 平台和广告源信息
|
|
|
|
|
|
AdSourceId string `bson:"adSourceId" json:"adSourceId"` // 广告源ID
|
|
|
|
|
|
AdPlatformId string `bson:"adPlatformId" json:"adPlatformId"` // 广告平台ID(当广告来自第三方平台时)
|
|
|
|
|
|
ExternalAdId string `bson:"externalAdId" json:"externalAdId"` // 外部广告ID(第三方平台的广告ID)
|
|
|
|
|
|
AdProvider string `bson:"adProvider" json:"adProvider"` // 广告提供者:self、chuanshanjia、xiaohongshu、douyin等
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
2025-12-19 09:42:39 +08:00
|
|
|
|
// 投放配置
|
2025-12-19 10:20:30 +08:00
|
|
|
|
config.BudgetConfig `bson:",inline" json:",inline"` // 内联预算配置
|
|
|
|
|
|
BidAmount int64 `bson:"bidAmount" json:"bidAmount"` // 出价(分)
|
|
|
|
|
|
BillingType string `bson:"billingType" json:"billingType"` // 计费类型:CPC、CPM、CPA等
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
2025-12-19 09:42:39 +08:00
|
|
|
|
// 定向条件
|
|
|
|
|
|
Targeting *UnifiedTargeting `bson:"targeting" json:"targeting"` // 统一定向条件
|
|
|
|
|
|
|
|
|
|
|
|
// 审核状态
|
|
|
|
|
|
AuditStatus string `bson:"auditStatus" json:"auditStatus"` // 广告状态:待审核、审核中、已通过、已拒绝、投放中、已暂停、已结束
|
2025-12-06 09:10:24 +08:00
|
|
|
|
AuditReason string `bson:"auditReason" json:"auditReason"` // 审核不通过原因
|
|
|
|
|
|
AuditTime int64 `bson:"auditTime" json:"auditTime"` // 审核时间
|
|
|
|
|
|
AuditBy string `bson:"auditBy" json:"auditBy"` // 审核人
|
|
|
|
|
|
|
2025-12-19 09:42:39 +08:00
|
|
|
|
// 限制配置
|
2025-12-19 10:20:30 +08:00
|
|
|
|
config.RestrictionConfig `bson:",inline" json:",inline"` // 内联限制配置
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
2025-12-19 09:42:39 +08:00
|
|
|
|
// 其他状态信息
|
|
|
|
|
|
Status string `bson:"status" json:"status"` // 业务状态:active、inactive、archived
|
2025-12-06 09:10:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-12-19 09:42:39 +08:00
|
|
|
|
// GetCollectionName 获取集合名称
|
|
|
|
|
|
func (a *Advertisement) GetCollectionName() string {
|
|
|
|
|
|
return AdvertisementCollection
|
2025-12-06 09:10:24 +08:00
|
|
|
|
}
|