Files
cid/model/entity/ad_creative.go
2025-12-19 09:42:39 +08:00

68 lines
3.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package entity
import (
"gitee.com/red-future---jilin-g/common/do"
)
const AdCreativeCollection = "ad_creative"
// AdCreative 广告创意素材实体
type AdCreative struct {
do.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类型
FileHash string `bson:"fileHash" json:"fileHash"` // 文件哈希值
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"` // 最后同步时间
// 基础配置
BaseConfig `bson:",inline" json:",inline"` // 内联基础配置
// 限制配置
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
}