package entity import ( "cid/model/config" "gitee.com/red-future---jilin-g/common/beans" ) const AdCreativeCollection = "ad_creative" // AdCreative 广告创意素材实体 type AdCreative struct { beans.MongoBaseDO `bson:",inline" json:",inline"` AdvertiserId string `bson:"advertiserId" json:"advertiserId"` // 广告主ID // 基本信息 Name string `bson:"name" json:"name"` // 创意名称 Title string `bson:"title" json:"title"` // 广告标题 Description string `bson:"description" json:"description"` // 广告描述 AdType string `bson:"adType" json:"adType"` // 广告类型:image、video、native、interstitial等 Format string `bson:"format" json:"format"` // 创意格式:jpg、png、mp4、html等 // 素材信息 MaterialURL string `bson:"materialUrl" json:"materialUrl"` // 素材URL ThumbnailURL string `bson:"thumbnailUrl" json:"thumbnailUrl"` // 缩略图URL LandingPageURL string `bson:"landingPageUrl" json:"landingPageUrl"` // 落地页URL DisplayURL string `bson:"displayUrl" json:"displayUrl"` // 显示URL // 尺寸和文件信息 Width int64 `bson:"width" json:"width"` // 宽度(px) Height int64 `bson:"height" json:"height"` // 高度(px) Size int64 `bson:"size" json:"size"` // 文件大小(bytes) Duration int64 `bson:"duration" json:"duration"` // 时长(秒) HasAudio bool `bson:"hasAudio" json:"hasAudio"` // 是否有音频 AspectRatio string `bson:"aspectRatio" json:"aspectRatio"` // 宽高比 // 技术信息 MimeType string `bson:"mimeType" json:"mimeType"` // MIME类型 Source string `bson:"source" json:"source"` // 来源:upload、sync、generate BackupURL string `bson:"backupUrl" json:"backupUrl"` // 备份URL CDNURL string `bson:"cdnUrl" json:"cdnUrl"` // CDN加速URL CompressInfo string `bson:"compressInfo" json:"compressInfo"` // 压缩信息(JSON格式) // 平台兼容性 SupportedPlatforms []string `bson:"supportedPlatforms" json:"supportedPlatforms"` // 支持的平台 PlatformSpecific string `bson:"platformSpecific" json:"platformSpecific"` // 平台特定配置(JSON格式) // 外部平台信息 ExternalCreativeId string `bson:"externalCreativeId" json:"externalCreativeId"` // 外部创意ID PlatformId string `bson:"platformId" json:"platformId"` // 平台ID SyncStatus string `bson:"syncStatus" json:"syncStatus"` // 同步状态 LastSyncTime int64 `bson:"lastSyncTime" json:"lastSyncTime"` // 最后同步时间 // 基础配置 config.BaseConfig `bson:",inline" json:",inline"` // 内联基础配置 // 限制配置 config.RestrictionConfig `bson:",inline" json:",inline"` // 内联限制配置 // 其他信息 Status string `bson:"status" json:"status"` // 状态:active、inactive、archived ExpireTime int64 `bson:"expireTime" json:"expireTime"` // 过期时间 } // GetCollectionName 获取集合名称 func (a *AdCreative) GetCollectionName() string { return AdCreativeCollection }