2025-12-06 09:10:24 +08:00
|
|
|
|
package dto
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2025-12-09 16:10:45 +08:00
|
|
|
|
"cid/model/entity"
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
|
|
|
|
|
"gitee.com/red-future---jilin-g/common/http"
|
|
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// AddAdvertisementReq 添加广告请求
|
|
|
|
|
|
type AddAdvertisementReq struct {
|
2025-12-06 15:41:38 +08:00
|
|
|
|
g.Meta `path:"/add" method:"post" tags:"广告管理" summary:"添加广告" dc:"添加新的广告"`
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
|
|
|
|
|
// 广告基本信息
|
2025-12-09 13:32:43 +08:00
|
|
|
|
Title string `json:"title" v:"required"` // 广告标题
|
|
|
|
|
|
Description string `json:"description"` // 广告描述
|
|
|
|
|
|
AdvertiserId string `json:"advertiserId" v:"required"` // 广告主ID
|
|
|
|
|
|
AdPositionId string `json:"adPositionId" v:"required"` // 广告位ID
|
|
|
|
|
|
AdType string `json:"adType" v:"required"` // 广告类型:图片、视频、文字等
|
|
|
|
|
|
AdFormat string `json:"adFormat" v:"required"` // 广告格式
|
|
|
|
|
|
MaterialUrl string `json:"materialUrl" v:"required"` // 广告素材URL
|
|
|
|
|
|
TargetUrl string `json:"targetUrl" v:"required"` // 目标链接
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
|
|
|
|
|
// 投放设置
|
|
|
|
|
|
StartDate int64 `json:"startDate" v:"required"` // 开始投放时间
|
|
|
|
|
|
EndDate int64 `json:"endDate" v:"required"` // 结束投放时间
|
|
|
|
|
|
Budget int64 `json:"budget" v:"required"` // 预算(分)
|
|
|
|
|
|
DailyBudget int64 `json:"dailyBudget"` // 日预算(分)
|
|
|
|
|
|
BidAmount int64 `json:"bidAmount" v:"required"` // 出价(分)
|
|
|
|
|
|
BillingType string `json:"billingType" v:"required"` // 计费类型:CPC、CPM、CPA等
|
|
|
|
|
|
|
|
|
|
|
|
// 投放条件
|
|
|
|
|
|
Targeting *entity.Targeting `json:"targeting"` // 定向条件
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type AddAdvertisementRes struct {
|
|
|
|
|
|
Id string `json:"id"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// UpdateAdvertisementReq 更新广告请求
|
|
|
|
|
|
type UpdateAdvertisementReq struct {
|
2025-12-06 15:41:38 +08:00
|
|
|
|
g.Meta `path:"/update" method:"put" tags:"广告管理" summary:"更新广告" dc:"更新广告信息"`
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
|
|
|
|
|
Id string `json:"id" v:"required"` // ID
|
|
|
|
|
|
|
|
|
|
|
|
// 广告基本信息
|
2025-12-09 13:32:43 +08:00
|
|
|
|
Title string `json:"title"` // 广告标题
|
|
|
|
|
|
Description string `json:"description"` // 广告描述
|
|
|
|
|
|
AdvertiserId string `json:"advertiserId"` // 广告主ID
|
|
|
|
|
|
AdPositionId string `json:"adPositionId"` // 广告位ID
|
|
|
|
|
|
AdType string `json:"adType"` // 广告类型:图片、视频、文字等
|
|
|
|
|
|
AdFormat string `json:"adFormat"` // 广告格式
|
|
|
|
|
|
MaterialUrl string `json:"materialUrl"` // 广告素材URL
|
|
|
|
|
|
TargetUrl string `json:"targetUrl"` // 目标链接
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
|
|
|
|
|
// 投放设置
|
|
|
|
|
|
StartDate *int64 `json:"startDate"` // 开始投放时间
|
|
|
|
|
|
EndDate *int64 `json:"endDate"` // 结束投放时间
|
|
|
|
|
|
Budget *int64 `json:"budget"` // 预算(分)
|
|
|
|
|
|
DailyBudget *int64 `json:"dailyBudget"` // 日预算(分)
|
|
|
|
|
|
BidAmount *int64 `json:"bidAmount"` // 出价(分)
|
|
|
|
|
|
BillingType string `json:"billingType"` // 计费类型:CPC、CPM、CPA等
|
|
|
|
|
|
|
|
|
|
|
|
// 投放条件
|
|
|
|
|
|
Targeting *entity.Targeting `json:"targeting"` // 定向条件
|
|
|
|
|
|
|
|
|
|
|
|
// 状态信息
|
2025-12-09 13:32:43 +08:00
|
|
|
|
Status *string `json:"status"` // 广告状态:待审核、审核中、已通过、已拒绝、投放中、已暂停、已结束
|
|
|
|
|
|
AuditStatus *string `json:"auditStatus"` // 审核状态:通过、拒绝
|
2025-12-06 09:10:24 +08:00
|
|
|
|
AuditReason *string `json:"auditReason"` // 审核不通过原因
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetAdvertisementReq 获取广告详情请求
|
|
|
|
|
|
type GetAdvertisementReq struct {
|
2025-12-06 15:41:38 +08:00
|
|
|
|
g.Meta `path:"/getOne" method:"get" tags:"广告管理" summary:"获取广告详情" dc:"根据ID获取单个广告详情"`
|
2025-12-06 09:10:24 +08:00
|
|
|
|
Id string `json:"id" v:"required"` // ID
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type GetAdvertisementRes struct {
|
|
|
|
|
|
*entity.Advertisement
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ListAdvertisementReq 获取广告列表请求
|
|
|
|
|
|
type ListAdvertisementReq struct {
|
2025-12-06 15:41:38 +08:00
|
|
|
|
g.Meta `path:"/list" method:"get" tags:"广告管理" summary:"获取广告列表" dc:"分页查询广告列表,支持多条件筛选"`
|
2025-12-06 09:10:24 +08:00
|
|
|
|
http.Page
|
|
|
|
|
|
|
|
|
|
|
|
AdvertiserId string `json:"advertiserId"` // 广告主ID
|
|
|
|
|
|
AdPositionId string `json:"adPositionId"` // 广告位ID
|
|
|
|
|
|
AdType string `json:"adType"` // 广告类型
|
|
|
|
|
|
Status string `json:"status"` // 广告状态
|
|
|
|
|
|
AuditStatus string `json:"auditStatus"` // 审核状态
|
|
|
|
|
|
Title string `json:"title"` // 广告标题模糊查询
|
|
|
|
|
|
DateRange []string `json:"dateRange"` // 创建时间范围 [start, end]
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type ListAdvertisementRes struct {
|
|
|
|
|
|
List []*entity.Advertisement `json:"list"`
|
|
|
|
|
|
Total int `json:"total"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// AuditAdvertisementReq 审核广告请求
|
|
|
|
|
|
type AuditAdvertisementReq struct {
|
2025-12-06 15:41:38 +08:00
|
|
|
|
g.Meta `path:"/audit" method:"post" tags:"广告管理" summary:"审核广告" dc:"审核广告,通过或拒绝"`
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
|
|
|
|
|
Id string `json:"id" v:"required"` // 广告ID
|
|
|
|
|
|
AuditStatus string `json:"auditStatus" v:"required"` // 审核状态:通过、拒绝
|
|
|
|
|
|
AuditReason string `json:"auditReason"` // 审核不通过原因
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// UpdateAdStatusReq 更新广告状态请求
|
|
|
|
|
|
type UpdateAdStatusReq struct {
|
2025-12-06 15:41:38 +08:00
|
|
|
|
g.Meta `path:"/updateStatus" method:"patch" tags:"广告管理" summary:"更新广告状态" dc:"更新广告状态"`
|
2025-12-06 09:10:24 +08:00
|
|
|
|
|
|
|
|
|
|
Id string `json:"id" v:"required"` // 广告ID
|
|
|
|
|
|
Status string `json:"status" v:"required"` // 广告状态:启用、禁用
|
|
|
|
|
|
}
|