初始化项目

This commit is contained in:
2025-12-09 13:32:43 +08:00
parent 46af4c6734
commit 2ccbf71b60
19 changed files with 784 additions and 621 deletions

View File

@@ -11,15 +11,14 @@ type Advertisement struct {
do.MongoBaseDO `bson:",inline"` // 嵌入基础字段Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
// 广告基本信息
Title string `bson:"title" json:"title"` // 广告标题
Description string `bson:"description" json:"description"` // 广告描述
AdvertiserId string `bson:"advertiserId" json:"advertiserId"` // 广告主ID
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
LinkUrl string `bson:"linkUrl" json:"linkUrl"` // 点击跳转链接
LandingPageUrl string `bson:"landingPageUrl" json:"landingPageUrl"` // 落地页URL
Title string `bson:"title" json:"title"` // 广告标题
Description string `bson:"description" json:"description"` // 广告描述
AdvertiserId string `bson:"advertiserId" json:"advertiserId"` // 广告主ID
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"` // 目标链接(点击跳转或落地页)
// 投放设置
StartDate int64 `bson:"startDate" json:"startDate"` // 开始投放时间
@@ -33,21 +32,16 @@ type Advertisement struct {
Targeting *Targeting `bson:"targeting" json:"targeting"` // 定向条件
// 状态信息
Status string `bson:"status" json:"status"` // 广告状态:待审核、审核、已拒绝、投放中、已暂停、已结束
AuditStatus string `bson:"auditStatus" json:"auditStatus"` // 审核状态
Status string `bson:"status" json:"status"` // 广告状态:待审核、审核中、已通过、已拒绝、投放中、已暂停、已结束
AuditReason string `bson:"auditReason" json:"auditReason"` // 审核不通过原因
AuditTime int64 `bson:"auditTime" json:"auditTime"` // 审核时间
AuditBy string `bson:"auditBy" json:"auditBy"` // 审核人
// 统计信息
Impressions int64 `bson:"impressions" json:"impressions"` // 展示次数
Clicks int64 `bson:"clicks" json:"clicks"` // 点击次数
Conversions int64 `bson:"conversions" json:"conversions"` // 转化次数
Cost int64 `bson:"cost" json:"cost"` // 消耗(分)
CTR float64 `bson:"ctr" json:"ctr"` // 点击率
CVR float64 `bson:"cvr" json:"cvr"` // 转化率
CPM int64 `bson:"cpm" json:"cpm"` // 千次展示成本
CPC int64 `bson:"cpc" json:"cpc"` // 单次点击成本
// 基础统计信息(比率字段通过计算得到,不持久化存储)
Impressions int64 `bson:"impressions" json:"impressions"` // 展示次数
Clicks int64 `bson:"clicks" json:"clicks"` // 点击次数
Conversions int64 `bson:"conversions" json:"conversions"` // 转化次数
Cost int64 `bson:"cost" json:"cost"` // 消耗(分)
}
// Targeting 广告定向条件

View File

@@ -37,8 +37,7 @@ type Advertiser struct {
ExpireDate int64 `bson:"expireDate" json:"expireDate"` // 到期日期
// 状态信息
Status string `bson:"status" json:"status"` // 广告主状态:待审核、审核、已拒绝、已冻结
AuditStatus string `bson:"auditStatus" json:"auditStatus"` // 审核状态
Status string `bson:"status" json:"status"` // 广告主状态:待审核、审核中、已通过、已拒绝、已冻结
AuditReason string `bson:"auditReason" json:"auditReason"` // 审核不通过原因
AuditTime int64 `bson:"auditTime" json:"auditTime"` // 审核时间
AuditBy string `bson:"auditBy" json:"auditBy"` // 审核人

View File

@@ -15,7 +15,7 @@ type StatReport struct {
IsDeleted bool `json:"isDeleted"` // 是否删除
// 报表基本信息
AppID int64 `json:"appId"` // 应用ID
AppID int64 `json:"appId"` // 应用ID (0表示所有应用)
ReportType string `json:"reportType"` // 报表类型daily, weekly, monthly, quarterly, yearly
ReportDate time.Time `json:"reportDate"` // 报表日期
GeneratedAt time.Time `json:"generatedAt"` // 生成时间