初始化项目
This commit is contained in:
163
model/dto/ad_position_dto.go
Normal file
163
model/dto/ad_position_dto.go
Normal file
@@ -0,0 +1,163 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidService/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AddAdPositionReq 添加广告位请求
|
||||
type AddAdPositionReq struct {
|
||||
g.Meta `path:"/adposition/add" method:"post" tags:"广告位管理" summary:"添加广告位" dc:"添加新的广告位"`
|
||||
|
||||
// 基本信息
|
||||
Name string `json:"name" v:"required"` // 广告位名称
|
||||
Description string `json:"description"` // 广告位描述
|
||||
PositionCode string `json:"positionCode" v:"required"` // 广告位编码,用于标识
|
||||
AdFormat string `json:"adFormat" v:"required"` // 支持的广告格式
|
||||
|
||||
// 尺寸信息
|
||||
Width int `json:"width" v:"required"` // 宽度(px)
|
||||
Height int `json:"height" v:"required"` // 高度(px)
|
||||
|
||||
// 位置信息
|
||||
Page string `json:"page" v:"required"` // 所属页面
|
||||
Section string `json:"section" v:"required"` // 页面区域
|
||||
Location string `json:"location" v:"required"` // 具体位置
|
||||
|
||||
// 展示设置
|
||||
MaxAds int `json:"maxAds"` // 最大广告数量
|
||||
RefreshInterval int `json:"refreshInterval"` // 刷新间隔(秒)
|
||||
IsLazyLoad bool `json:"isLazyLoad"` // 是否懒加载
|
||||
|
||||
// 定价设置
|
||||
PricingModel string `json:"pricingModel" v:"required"` // 计费模型:CPC、CPM、CPA等
|
||||
BasePrice int64 `json:"basePrice" v:"required"` // 基础价格(分)
|
||||
FloorPrice int64 `json:"floorPrice" v:"required"` // 底价(分)
|
||||
PriceUnit string `json:"priceUnit" v:"required"` // 价格单位:千次展示、单次点击、单次转化等
|
||||
|
||||
// 展示规则
|
||||
DisplayRules *entity.DisplayRules `json:"displayRules"` // 展示规则
|
||||
|
||||
// 状态信息
|
||||
Status string `json:"status" v:"required"` // 广告位状态:启用、禁用、测试
|
||||
IsExclusive bool `json:"isExclusive"` // 是否独占广告位
|
||||
}
|
||||
|
||||
type AddAdPositionRes struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// UpdateAdPositionReq 更新广告位请求
|
||||
type UpdateAdPositionReq struct {
|
||||
g.Meta `path:"/adposition/update" method:"post" tags:"广告位管理" summary:"更新广告位" dc:"更新广告位信息"`
|
||||
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
|
||||
// 基本信息
|
||||
Name string `json:"name"` // 广告位名称
|
||||
Description string `json:"description"` // 广告位描述
|
||||
PositionCode string `json:"positionCode"` // 广告位编码,用于标识
|
||||
AdFormat string `json:"adFormat"` // 支持的广告格式
|
||||
|
||||
// 尺寸信息
|
||||
Width *int `json:"width"` // 宽度(px)
|
||||
Height *int `json:"height"` // 高度(px)
|
||||
|
||||
// 位置信息
|
||||
Page string `json:"page"` // 所属页面
|
||||
Section string `json:"section"` // 页面区域
|
||||
Location string `json:"location"` // 具体位置
|
||||
|
||||
// 展示设置
|
||||
MaxAds *int `json:"maxAds"` // 最大广告数量
|
||||
RefreshInterval *int `json:"refreshInterval"` // 刷新间隔(秒)
|
||||
IsLazyLoad *bool `json:"isLazyLoad"` // 是否懒加载
|
||||
|
||||
// 定价设置
|
||||
PricingModel string `json:"pricingModel"` // 计费模型:CPC、CPM、CPA等
|
||||
BasePrice *int64 `json:"basePrice"` // 基础价格(分)
|
||||
FloorPrice *int64 `json:"floorPrice"` // 底价(分)
|
||||
PriceUnit string `json:"priceUnit"` // 价格单位:千次展示、单次点击、单次转化等
|
||||
|
||||
// 展示规则
|
||||
DisplayRules *entity.DisplayRules `json:"displayRules"` // 展示规则
|
||||
|
||||
// 状态信息
|
||||
Status *string `json:"status"` // 广告位状态:启用、禁用、测试
|
||||
IsExclusive *bool `json:"isExclusive"` // 是否独占广告位
|
||||
}
|
||||
|
||||
// GetAdPositionReq 获取广告位详情请求
|
||||
type GetAdPositionReq struct {
|
||||
g.Meta `path:"/adposition/one" method:"get" tags:"广告位管理" summary:"获取广告位详情" dc:"根据ID获取单个广告位详情"`
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
}
|
||||
|
||||
type GetAdPositionRes struct {
|
||||
*entity.AdPosition
|
||||
}
|
||||
|
||||
// ListAdPositionReq 获取广告位列表请求
|
||||
type ListAdPositionReq struct {
|
||||
g.Meta `path:"/adposition/list" method:"get" tags:"广告位管理" summary:"获取广告位列表" dc:"分页查询广告位列表,支持多条件筛选"`
|
||||
http.Page
|
||||
|
||||
Name string `json:"name"` // 广告位名称模糊查询
|
||||
PositionCode string `json:"positionCode"` // 广告位编码
|
||||
PageName string `json:"pageName"` // 所属页面
|
||||
Section string `json:"section"` // 页面区域
|
||||
Status string `json:"status"` // 广告位状态
|
||||
AdFormat string `json:"adFormat"` // 广告格式
|
||||
DateRange []string `json:"dateRange"` // 创建时间范围 [start, end]
|
||||
}
|
||||
|
||||
type ListAdPositionRes struct {
|
||||
List []*entity.AdPosition `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// UpdateAdPositionStatusReq 更新广告位状态请求
|
||||
type UpdateAdPositionStatusReq struct {
|
||||
g.Meta `path:"/adposition/status" method:"post" tags:"广告位管理" summary:"更新广告位状态" dc:"更新广告位状态"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告位ID
|
||||
Status string `json:"status" v:"required"` // 广告位状态:启用、禁用、测试
|
||||
}
|
||||
|
||||
// GetAdPositionStatisticsReq 获取广告位统计数据请求
|
||||
type GetAdPositionStatisticsReq struct {
|
||||
g.Meta `path:"/adposition/statistics" method:"get" tags:"广告位管理" summary:"获取广告位统计数据" dc:"获取广告位的统计数据"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告位ID
|
||||
StatType string `json:"statType" v:"required"` // 统计类型:天、周、月
|
||||
StartDate int64 `json:"startDate"` // 开始日期
|
||||
EndDate int64 `json:"endDate"` // 结束日期
|
||||
}
|
||||
|
||||
type GetAdPositionStatisticsRes struct {
|
||||
Statistics []*entity.AdStatistics `json:"statistics"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// GetAvailableAdPositionsReq 获取可用广告位请求
|
||||
type GetAvailableAdPositionsReq struct {
|
||||
g.Meta `path:"/adposition/available" method:"get" tags:"广告位管理" summary:"获取可用广告位列表" dc:"获取所有启用的广告位列表"`
|
||||
}
|
||||
|
||||
type GetAvailableAdPositionsRes struct {
|
||||
List []*entity.AdPosition `json:"list"`
|
||||
}
|
||||
|
||||
// MatchAdReq 匹配广告请求
|
||||
type MatchAdReq struct {
|
||||
g.Meta `path:"/adposition/match" method:"post" tags:"广告位管理" summary:"匹配广告" dc:"根据广告位编码和用户信息匹配适合的广告"`
|
||||
|
||||
PositionCode string `json:"positionCode" v:"required"` // 广告位编码
|
||||
UserInfo map[string]interface{} `json:"userInfo"` // 用户信息
|
||||
}
|
||||
|
||||
type MatchAdRes struct {
|
||||
*entity.Advertisement `json:"advertisement"`
|
||||
}
|
||||
113
model/dto/ad_statistics_dto.go
Normal file
113
model/dto/ad_statistics_dto.go
Normal file
@@ -0,0 +1,113 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidService/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// GetAdStatisticsReq 获取广告统计数据请求
|
||||
type GetAdStatisticsReq struct {
|
||||
g.Meta `path:"/statistics/list" method:"get" tags:"广告统计" summary:"获取广告统计数据" dc:"获取广告的统计数据"`
|
||||
|
||||
// 分页参数
|
||||
http.Page
|
||||
|
||||
// 维度信息
|
||||
StatType string `json:"statType" v:"required"` // 统计类型:广告主、广告、广告位等
|
||||
StatDimension string `json:"statDimension" v:"required"` // 统计维度:小时、天、周、月
|
||||
TargetId string `json:"targetId"` // 目标ID:广告主ID、广告ID、广告位ID等
|
||||
|
||||
// 时间范围
|
||||
StartDate int64 `json:"startDate" v:"required"` // 开始日期
|
||||
EndDate int64 `json:"endDate" v:"required"` // 结束日期
|
||||
|
||||
// 筛选条件
|
||||
DeviceType string `json:"deviceType"` // 设备类型
|
||||
Platform string `json:"platform"` // 平台
|
||||
Region string `json:"region"` // 地区
|
||||
Gender string `json:"gender"` // 性别
|
||||
AgeGroup string `json:"ageGroup"` // 年龄段
|
||||
|
||||
// 排序
|
||||
SortBy string `json:"sortBy"` // 排序字段
|
||||
SortDirection string `json:"sortDirection"` // 排序方向:asc、desc
|
||||
}
|
||||
|
||||
type GetAdStatisticsRes struct {
|
||||
Statistics []*entity.AdStatistics `json:"statistics"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// GetDashboardReq 获取仪表盘数据请求
|
||||
type GetDashboardReq struct {
|
||||
g.Meta `path:"/dashboard" method:"get" tags:"广告仪表盘" summary:"获取仪表盘数据" dc:"获取广告系统的仪表盘统计数据"`
|
||||
|
||||
// 时间范围
|
||||
StartDate int64 `json:"startDate" v:"required"` // 开始日期
|
||||
EndDate int64 `json:"endDate" v:"required"` // 结束日期
|
||||
|
||||
// 维度
|
||||
Dimension string `json:"dimension"` // 统计维度:天、周、月
|
||||
}
|
||||
|
||||
type GetDashboardRes struct {
|
||||
// 总览数据
|
||||
Overview OverviewData `json:"overview"`
|
||||
|
||||
// 趋势数据
|
||||
Trends []TrendData `json:"trends"`
|
||||
|
||||
// 排行数据
|
||||
TopAdvertisers []RankData `json:"topAdvertisers"` // 广告主排行
|
||||
TopAds []RankData `json:"topAds"` // 广告排行
|
||||
TopPositions []RankData `json:"topPositions"` // 广告位排行
|
||||
}
|
||||
|
||||
// OverviewData 总览数据
|
||||
type OverviewData struct {
|
||||
TotalAdvertisers int64 `json:"totalAdvertisers"` // 广告主总数
|
||||
TotalAds int64 `json:"totalAds"` // 广告总数
|
||||
TotalPositions int64 `json:"totalPositions"` // 广告位总数
|
||||
TotalImpressions int64 `json:"totalImpressions"` // 总展示次数
|
||||
TotalClicks int64 `json:"totalClicks"` // 总点击次数
|
||||
TotalCost int64 `json:"totalCost"` // 总消耗(分)
|
||||
TotalRevenue int64 `json:"totalRevenue"` // 总收入(分)
|
||||
AverageCTR float64 `json:"averageCTR"` // 平均点击率
|
||||
AverageCVR float64 `json:"averageCVR"` // 平均转化率
|
||||
}
|
||||
|
||||
// TrendData 趋势数据
|
||||
type TrendData struct {
|
||||
Date int64 `json:"date"` // 日期
|
||||
Impressions int64 `json:"impressions"` // 展示次数
|
||||
Clicks int64 `json:"clicks"` // 点击次数
|
||||
Conversions int64 `json:"conversions"` // 转化次数
|
||||
Cost int64 `json:"cost"` // 消耗(分)
|
||||
Revenue int64 `json:"revenue"` // 收入(分)
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
CVR float64 `json:"cvr"` // 转化率
|
||||
}
|
||||
|
||||
// RankData 排行数据
|
||||
type RankData struct {
|
||||
Id string `json:"id"` // ID
|
||||
Name string `json:"name"` // 名称
|
||||
Impressions int64 `json:"impressions"` // 展示次数
|
||||
Clicks int64 `json:"clicks"` // 点击次数
|
||||
Cost int64 `json:"cost"` // 消耗(分)
|
||||
Revenue int64 `json:"revenue"` // 收入(分)
|
||||
CTR float64 `json:"ctr"` // 点击率
|
||||
}
|
||||
|
||||
// GenerateDailyStatisticsReq 生成每日统计数据请求
|
||||
type GenerateDailyStatisticsReq struct {
|
||||
g.Meta `path:"/statistics/generate-daily" method:"post" tags:"广告统计" summary:"生成每日统计数据" dc:"手动生成指定日期的广告统计数据"`
|
||||
|
||||
Date int64 `json:"date" v:"required"` // 日期时间戳
|
||||
}
|
||||
|
||||
type GenerateDailyStatisticsRes struct {
|
||||
Success bool `json:"success"` // 是否成功
|
||||
}
|
||||
133
model/dto/advertisement_dto.go
Normal file
133
model/dto/advertisement_dto.go
Normal file
@@ -0,0 +1,133 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidService/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AddAdvertisementReq 添加广告请求
|
||||
type AddAdvertisementReq struct {
|
||||
g.Meta `path:"/advertisement/add" method:"post" tags:"广告管理" summary:"添加广告" dc:"添加新的广告"`
|
||||
|
||||
// 广告基本信息
|
||||
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
|
||||
LinkUrl string `json:"linkUrl"` // 点击跳转链接
|
||||
LandingPageUrl string `json:"landingPageUrl"` // 落地页URL
|
||||
|
||||
// 投放设置
|
||||
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 {
|
||||
g.Meta `path:"/advertisement/update" method:"post" tags:"广告管理" summary:"更新广告" dc:"更新广告信息"`
|
||||
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
|
||||
// 广告基本信息
|
||||
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
|
||||
LinkUrl string `json:"linkUrl"` // 点击跳转链接
|
||||
LandingPageUrl string `json:"landingPageUrl"` // 落地页URL
|
||||
|
||||
// 投放设置
|
||||
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"` // 定向条件
|
||||
|
||||
// 状态信息
|
||||
Status *string `json:"status"` // 广告状态:待审核、已审核、已拒绝、投放中、已暂停、已结束
|
||||
AuditStatus *string `json:"auditStatus"` // 审核状态
|
||||
AuditReason *string `json:"auditReason"` // 审核不通过原因
|
||||
}
|
||||
|
||||
// GetAdvertisementReq 获取广告详情请求
|
||||
type GetAdvertisementReq struct {
|
||||
g.Meta `path:"/advertisement/one" method:"get" tags:"广告管理" summary:"获取广告详情" dc:"根据ID获取单个广告详情"`
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
}
|
||||
|
||||
type GetAdvertisementRes struct {
|
||||
*entity.Advertisement
|
||||
}
|
||||
|
||||
// ListAdvertisementReq 获取广告列表请求
|
||||
type ListAdvertisementReq struct {
|
||||
g.Meta `path:"/advertisement/list" method:"get" tags:"广告管理" summary:"获取广告列表" dc:"分页查询广告列表,支持多条件筛选"`
|
||||
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 {
|
||||
g.Meta `path:"/advertisement/audit" method:"post" tags:"广告管理" summary:"审核广告" dc:"审核广告,通过或拒绝"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告ID
|
||||
AuditStatus string `json:"auditStatus" v:"required"` // 审核状态:通过、拒绝
|
||||
AuditReason string `json:"auditReason"` // 审核不通过原因
|
||||
}
|
||||
|
||||
// UpdateAdStatusReq 更新广告状态请求
|
||||
type UpdateAdStatusReq struct {
|
||||
g.Meta `path:"/advertisement/status" method:"post" tags:"广告管理" summary:"更新广告状态" dc:"更新广告状态"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告ID
|
||||
Status string `json:"status" v:"required"` // 广告状态:启用、禁用
|
||||
}
|
||||
|
||||
// GetAdStatisticsReq 获取广告统计数据请求
|
||||
type GetAdStatisticsForAdvertisementReq struct {
|
||||
g.Meta `path:"/advertisement/statistics" method:"get" tags:"广告管理" summary:"获取广告统计数据" dc:"获取广告的统计数据"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告ID
|
||||
StatType string `json:"statType" v:"required"` // 统计类型:天、周、月
|
||||
StartDate int64 `json:"startDate"` // 开始日期
|
||||
EndDate int64 `json:"endDate"` // 结束日期
|
||||
}
|
||||
|
||||
type GetAdStatisticsForAdvertisementRes struct {
|
||||
Statistics []*entity.AdStatistics `json:"statistics"`
|
||||
}
|
||||
167
model/dto/advertiser_dto.go
Normal file
167
model/dto/advertiser_dto.go
Normal file
@@ -0,0 +1,167 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidService/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AddAdvertiserReq 添加广告主请求
|
||||
type AddAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/add" method:"post" tags:"广告主管理" summary:"添加广告主" dc:"添加新的广告主"`
|
||||
|
||||
// 基本信息
|
||||
Name string `json:"name" v:"required"` // 广告主名称
|
||||
ContactName string `json:"contactName" v:"required"` // 联系人姓名
|
||||
ContactPhone string `json:"contactPhone" v:"required"` // 联系电话
|
||||
ContactEmail string `json:"contactEmail" v:"required"` // 联系邮箱
|
||||
Company string `json:"company" v:"required"` // 公司名称
|
||||
Industry string `json:"industry" v:"required"` // 所属行业
|
||||
Scale string `json:"scale"` // 公司规模
|
||||
|
||||
// 证件信息
|
||||
BusinessLicenseUrl string `json:"businessLicenseUrl" v:"required"` // 营业执照URL
|
||||
ICPLicenseUrl string `json:"icpLicenseUrl"` // ICP备案截图URL
|
||||
OtherLicenseUrls []string `json:"otherLicenseUrls"` // 其他证件URL
|
||||
|
||||
// 财务信息
|
||||
BankName string `json:"bankName" v:"required"` // 开户银行
|
||||
BankAccount string `json:"bankAccount" v:"required"` // 银行账号
|
||||
AccountName string `json:"accountName" v:"required"` // 账户名称
|
||||
|
||||
// 合同信息
|
||||
ContractId string `json:"contractId"` // 合同编号
|
||||
ContractType string `json:"contractType"` // 合同类型
|
||||
ContractUrl string `json:"contractUrl"` // 合同文件URL
|
||||
SignDate int64 `json:"signDate"` // 签约日期
|
||||
ExpireDate int64 `json:"expireDate"` // 到期日期
|
||||
|
||||
// 系统信息
|
||||
AccountBalance int64 `json:"accountBalance"` // 账户余额(分)
|
||||
CreditLimit int64 `json:"creditLimit"` // 授信额度(分)
|
||||
Remark string `json:"remark"` // 备注
|
||||
}
|
||||
|
||||
type AddAdvertiserRes struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// UpdateAdvertiserReq 更新广告主请求
|
||||
type UpdateAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/update" method:"post" tags:"广告主管理" summary:"更新广告主" dc:"更新广告主信息"`
|
||||
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
|
||||
// 基本信息
|
||||
Name string `json:"name"` // 广告主名称
|
||||
ContactName string `json:"contactName"` // 联系人姓名
|
||||
ContactPhone string `json:"contactPhone"` // 联系电话
|
||||
ContactEmail string `json:"contactEmail"` // 联系邮箱
|
||||
Company string `json:"company"` // 公司名称
|
||||
Industry string `json:"industry"` // 所属行业
|
||||
Scale string `json:"scale"` // 公司规模
|
||||
|
||||
// 证件信息
|
||||
BusinessLicenseUrl string `json:"businessLicenseUrl"` // 营业执照URL
|
||||
ICPLicenseUrl string `json:"icpLicenseUrl"` // ICP备案截图URL
|
||||
OtherLicenseUrls []string `json:"otherLicenseUrls"` // 其他证件URL
|
||||
|
||||
// 财务信息
|
||||
BankName string `json:"bankName"` // 开户银行
|
||||
BankAccount string `json:"bankAccount"` // 银行账号
|
||||
AccountName string `json:"accountName"` // 账户名称
|
||||
|
||||
// 合同信息
|
||||
ContractId string `json:"contractId"` // 合同编号
|
||||
ContractType string `json:"contractType"` // 合同类型
|
||||
ContractUrl string `json:"contractUrl"` // 合同文件URL
|
||||
SignDate *int64 `json:"signDate"` // 签约日期
|
||||
ExpireDate *int64 `json:"expireDate"` // 到期日期
|
||||
|
||||
// 系统信息
|
||||
AccountBalance *int64 `json:"accountBalance"` // 账户余额(分)
|
||||
CreditLimit *int64 `json:"creditLimit"` // 授信额度(分)
|
||||
Remark string `json:"remark"` // 备注
|
||||
|
||||
// 状态信息
|
||||
Status *string `json:"status"` // 广告主状态:待审核、已审核、已拒绝、已冻结
|
||||
AuditStatus *string `json:"auditStatus"` // 审核状态
|
||||
AuditReason *string `json:"auditReason"` // 审核不通过原因
|
||||
}
|
||||
|
||||
// GetAdvertiserReq 获取广告主详情请求
|
||||
type GetAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/one" method:"get" tags:"广告主管理" summary:"获取广告主详情" dc:"根据ID获取单个广告主详情"`
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
}
|
||||
|
||||
type GetAdvertiserRes struct {
|
||||
*entity.Advertiser
|
||||
}
|
||||
|
||||
// ListAdvertiserReq 获取广告主列表请求
|
||||
type ListAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/list" method:"get" tags:"广告主管理" summary:"获取广告主列表" dc:"分页查询广告主列表,支持多条件筛选"`
|
||||
http.Page
|
||||
|
||||
Name string `json:"name"` // 广告主名称模糊查询
|
||||
ContactName string `json:"contactName"` // 联系人模糊查询
|
||||
Company string `json:"company"` // 公司名称模糊查询
|
||||
Industry string `json:"industry"` // 所属行业
|
||||
Status string `json:"status"` // 广告主状态
|
||||
AuditStatus string `json:"auditStatus"` // 审核状态
|
||||
DateRange []string `json:"dateRange"` // 创建时间范围 [start, end]
|
||||
}
|
||||
|
||||
type ListAdvertiserRes struct {
|
||||
List []*entity.Advertiser `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// AuditAdvertiserReq 审核广告主请求
|
||||
type AuditAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/audit" method:"post" tags:"广告主管理" summary:"审核广告主" dc:"审核广告主,通过或拒绝"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告主ID
|
||||
AuditStatus string `json:"auditStatus" v:"required"` // 审核状态:通过、拒绝
|
||||
AuditReason string `json:"auditReason"` // 审核不通过原因
|
||||
}
|
||||
|
||||
// UpdateAdvertiserStatusReq 更新广告主状态请求
|
||||
type UpdateAdvertiserStatusReq struct {
|
||||
g.Meta `path:"/advertiser/status" method:"post" tags:"广告主管理" summary:"更新广告主状态" dc:"更新广告主状态"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告主ID
|
||||
Status string `json:"status" v:"required"` // 广告主状态:启用、禁用、冻结
|
||||
}
|
||||
|
||||
// RechargeAdvertiserReq 广告主充值请求
|
||||
type RechargeAdvertiserReq struct {
|
||||
g.Meta `path:"/advertiser/recharge" method:"post" tags:"广告主管理" summary:"广告主充值" dc:"为广告主账户充值"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告主ID
|
||||
Amount int64 `json:"amount" v:"required"` // 充值金额(分)
|
||||
Remark string `json:"remark"` // 充值备注
|
||||
}
|
||||
|
||||
// UpdateCreditLimitReq 更新授信额度请求
|
||||
type UpdateCreditLimitReq struct {
|
||||
g.Meta `path:"/advertiser/credit" method:"post" tags:"广告主管理" summary:"更新授信额度" dc:"更新广告主的授信额度"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 广告主ID
|
||||
CreditLimit int64 `json:"creditLimit" v:"required"` // 授信额度(分)
|
||||
Remark string `json:"remark"` // 备注说明
|
||||
}
|
||||
|
||||
// GetAdvertiserBalanceReq 获取广告主余额请求
|
||||
type GetAdvertiserBalanceReq struct {
|
||||
g.Meta `path:"/advertiser/balance" method:"get" tags:"广告主管理" summary:"获取广告主余额" dc:"根据ID获取广告主账户余额和授信额度"`
|
||||
Id string `json:"id" v:"required"` // 广告主ID
|
||||
}
|
||||
|
||||
// GetAdvertiserBalanceRes 获取广告主余额响应
|
||||
type GetAdvertiserBalanceRes struct {
|
||||
Balance int64 `json:"balance"` // 账户余额(分)
|
||||
CreditLimit int64 `json:"creditLimit"` // 授信额度(分)
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidService/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// AddDataReq 添加数据
|
||||
type AddDataReq struct {
|
||||
g.Meta `path:"/add" method:"post" tags:"数据管理" summary:"添加数据" dc:"记录客服与客户的交互数据"` // 路由: POST /data/add
|
||||
CustomerId string `json:"customerId" v:"required"` // 客户ID
|
||||
CustomerServiceId string `json:"customerServiceId" v:"required"` // 客服ID
|
||||
CustomerServicePlatform string `json:"customerServicePlatform" v:"required"` // 客服平台
|
||||
CustomerServiceName string `json:"customerServiceName" v:"required"` // 客服名称
|
||||
IsInbound bool `json:"isInbound"` // 是否进线
|
||||
IsActive bool `json:"isActive"` // 是否活跃
|
||||
IsServed bool `json:"isServed"` // 是否接待
|
||||
HasSentContactCard bool `json:"hasSentContactCard"` // 是否发联系卡
|
||||
HasSentNameCard bool `json:"hasSentNameCard"` // 是否发名片
|
||||
HasLeftContactInfo bool `json:"hasLeftContactInfo"` // 是否留资
|
||||
SessionStartTime int64 `json:"sessionStartTime"` // 会话开始时间
|
||||
MessageTime int64 `json:"messageTime"` // 消息时间
|
||||
}
|
||||
|
||||
type AddDataRes struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// UpdateDataReq 更新数据
|
||||
type UpdateDataReq struct {
|
||||
g.Meta `path:"/update" method:"post" tags:"数据管理" summary:"更新数据" dc:"更新客服交互数据"` // 路由: POST /data/update
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
CustomerId string `json:"customerId"`
|
||||
CustomerServiceId string `json:"customerServiceId"`
|
||||
CustomerServicePlatform string `json:"customerServicePlatform"`
|
||||
CustomerServiceName string `json:"customerServiceName"`
|
||||
IsInbound *bool `json:"isInbound"` // 使用指针以区分 false 和未传值
|
||||
IsActive *bool `json:"isActive"`
|
||||
IsServed *bool `json:"isServed"`
|
||||
HasSentContactCard *bool `json:"hasSentContactCard"`
|
||||
HasSentNameCard *bool `json:"hasSentNameCard"`
|
||||
HasLeftContactInfo *bool `json:"hasLeftContactInfo"`
|
||||
SessionStartTime int64 `json:"sessionStartTime"`
|
||||
MessageTime int64 `json:"messageTime"`
|
||||
}
|
||||
|
||||
// GetDataReq 获取单个数据
|
||||
type GetDataReq struct {
|
||||
g.Meta `path:"/one" method:"get" tags:"数据管理" summary:"获取数据详情" dc:"根据ID获取单条数据记录"` // 路由: GET /data/one
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
}
|
||||
|
||||
// ListDataReq 获取数据列表
|
||||
type ListDataReq struct {
|
||||
g.Meta `path:"/list" method:"get" tags:"数据管理" summary:"获取数据列表" dc:"分页查询交互数据,支持按客户、客服、时间筛选"` // 路由: GET /data/list
|
||||
http.Page
|
||||
CustomerId string `json:"customerId"` // 筛选:客户ID
|
||||
CustomerServiceId string `json:"customerServiceId"` // 筛选:客服ID
|
||||
DateRange []string `json:"dateRange"` // 筛选:时间范围 [start, end]
|
||||
}
|
||||
|
||||
type ListDataRes struct {
|
||||
List []*entity.Data `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
104
model/dto/report_dto.go
Normal file
104
model/dto/report_dto.go
Normal file
@@ -0,0 +1,104 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"cidService/model/entity"
|
||||
|
||||
"gitee.com/red-future---jilin-g/common/http"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// CreateReportReq 创建报表请求
|
||||
type CreateReportReq struct {
|
||||
g.Meta `path:"/report/create" method:"post" tags:"广告报表" summary:"创建报表" dc:"创建新的广告报表"`
|
||||
|
||||
// 报表信息
|
||||
ReportName string `json:"reportName" v:"required"` // 报表名称
|
||||
ReportType string `json:"reportType" v:"required"` // 报表类型:日报、周报、月报、自定义
|
||||
ReportPeriod string `json:"reportPeriod" v:"required"` // 报表周期
|
||||
StartDate int64 `json:"startDate" v:"required"` // 开始日期
|
||||
EndDate int64 `json:"endDate" v:"required"` // 结束日期
|
||||
ReportConfig map[string]interface{} `json:"reportConfig"` // 报表配置
|
||||
|
||||
// 其他信息
|
||||
FileFormat string `json:"fileFormat"` // 文件格式:CSV、Excel、PDF
|
||||
EmailRecipients []string `json:"emailRecipients"` // 邮件接收人列表
|
||||
Schedule string `json:"schedule"` // 定时设置
|
||||
}
|
||||
|
||||
type CreateReportRes struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// GetReportReq 获取报表详情请求
|
||||
type GetReportReq struct {
|
||||
g.Meta `path:"/report/one" method:"get" tags:"广告报表" summary:"获取报表详情" dc:"根据ID获取单个报表详情"`
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
}
|
||||
|
||||
type GetReportRes struct {
|
||||
*entity.AdReport
|
||||
}
|
||||
|
||||
// ListReportReq 获取报表列表请求
|
||||
type ListReportReq struct {
|
||||
g.Meta `path:"/report/list" method:"get" tags:"广告报表" summary:"获取报表列表" dc:"分页查询报表列表,支持多条件筛选"`
|
||||
http.Page
|
||||
|
||||
ReportName string `json:"reportName"` // 报表名称模糊查询
|
||||
ReportType string `json:"reportType"` // 报表类型
|
||||
Status string `json:"status"` // 报表状态
|
||||
Operator string `json:"operator"` // 操作人
|
||||
DateRange []string `json:"dateRange"` // 创建时间范围 [start, end]
|
||||
}
|
||||
|
||||
type ListReportRes struct {
|
||||
List []*entity.AdReport `json:"list"`
|
||||
Total int `json:"total"`
|
||||
}
|
||||
|
||||
// UpdateReportReq 更新报表请求
|
||||
type UpdateReportReq struct {
|
||||
g.Meta `path:"/report/update" method:"post" tags:"广告报表" summary:"更新报表" dc:"更新报表信息"`
|
||||
|
||||
Id string `json:"id" v:"required"` // ID
|
||||
|
||||
// 报表信息
|
||||
ReportName string `json:"reportName"` // 报表名称
|
||||
ReportType string `json:"reportType"` // 报表类型:日报、周报、月报、自定义
|
||||
ReportPeriod string `json:"reportPeriod"` // 报表周期
|
||||
StartDate *int64 `json:"startDate"` // 开始日期
|
||||
EndDate *int64 `json:"endDate"` // 结束日期
|
||||
ReportConfig map[string]interface{} `json:"reportConfig"` // 报表配置
|
||||
|
||||
// 其他信息
|
||||
FileFormat string `json:"fileFormat"` // 文件格式:CSV、Excel、PDF
|
||||
EmailRecipients []string `json:"emailRecipients"` // 邮件接收人列表
|
||||
Schedule string `json:"schedule"` // 定时设置
|
||||
}
|
||||
|
||||
// DeleteReportReq 删除报表请求
|
||||
type DeleteReportReq struct {
|
||||
g.Meta `path:"/report/delete" method:"post" tags:"广告报表" summary:"删除报表" dc:"删除指定的报表"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 报表ID
|
||||
}
|
||||
|
||||
// DownloadReportReq 下载报表请求
|
||||
type DownloadReportReq struct {
|
||||
g.Meta `path:"/report/download" method:"get" tags:"广告报表" summary:"下载报表" dc:"下载指定的报表文件"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 报表ID
|
||||
}
|
||||
|
||||
type DownloadReportRes struct {
|
||||
DownloadUrl string `json:"downloadUrl"` // 下载链接
|
||||
FileSize int64 `json:"fileSize"` // 文件大小(字节)
|
||||
FileFormat string `json:"fileFormat"` // 文件格式
|
||||
}
|
||||
|
||||
// GenerateReportReq 生成报表请求
|
||||
type GenerateReportReq struct {
|
||||
g.Meta `path:"/report/generate" method:"post" tags:"广告报表" summary:"生成报表" dc:"手动生成报表"`
|
||||
|
||||
Id string `json:"id" v:"required"` // 报表ID
|
||||
}
|
||||
82
model/entity/ad_position.go
Normal file
82
model/entity/ad_position.go
Normal file
@@ -0,0 +1,82 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
const AdPositionCollection = "ad_position"
|
||||
|
||||
// AdPosition 广告位实体
|
||||
type AdPosition struct {
|
||||
do.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
||||
|
||||
// 基本信息
|
||||
Name string `bson:"name" json:"name"` // 广告位名称
|
||||
Description string `bson:"description" json:"description"` // 广告位描述
|
||||
PositionCode string `bson:"positionCode" json:"positionCode"` // 广告位编码,用于标识
|
||||
AdFormat string `bson:"adFormat" json:"adFormat"` // 支持的广告格式
|
||||
|
||||
// 尺寸信息
|
||||
Width int `bson:"width" json:"width"` // 宽度(px)
|
||||
Height int `bson:"height" json:"height"` // 高度(px)
|
||||
|
||||
// 位置信息
|
||||
Page string `bson:"page" json:"page"` // 所属页面
|
||||
Section string `bson:"section" json:"section"` // 页面区域
|
||||
Location string `bson:"location" json:"location"` // 具体位置
|
||||
|
||||
// 展示设置
|
||||
MaxAds int `bson:"maxAds" json:"maxAds"` // 最大广告数量
|
||||
RefreshInterval int `bson:"refreshInterval" json:"refreshInterval"` // 刷新间隔(秒)
|
||||
IsLazyLoad bool `bson:"isLazyLoad" json:"isLazyLoad"` // 是否懒加载
|
||||
|
||||
// 定价设置
|
||||
PricingModel string `bson:"pricingModel" json:"pricingModel"` // 计费模型:CPC、CPM、CPA等
|
||||
BasePrice int64 `bson:"basePrice" json:"basePrice"` // 基础价格(分)
|
||||
FloorPrice int64 `bson:"floorPrice" json:"floorPrice"` // 底价(分)
|
||||
PriceUnit string `bson:"priceUnit" json:"priceUnit"` // 价格单位:千次展示、单次点击、单次转化等
|
||||
|
||||
// 展示规则
|
||||
DisplayRules *DisplayRules `bson:"displayRules" json:"displayRules"` // 展示规则
|
||||
|
||||
// 状态信息
|
||||
Status string `bson:"status" json:"status"` // 广告位状态:启用、禁用、测试
|
||||
IsExclusive bool `bson:"isExclusive" json:"isExclusive"` // 是否独占广告位
|
||||
|
||||
// 统计信息
|
||||
DailyImpressions int64 `bson:"dailyImpressions" json:"dailyImpressions"` // 日均展示量
|
||||
DailyClicks int64 `bson:"dailyClicks" json:"dailyClicks"` // 日均点击量
|
||||
DailyRevenue int64 `bson:"dailyRevenue" json:"dailyRevenue"` // 日均收入(分)
|
||||
CTR float64 `bson:"ctr" json:"ctr"` // 点击率
|
||||
eCPM int64 `bson:"ecpm" json:"ecpm"` // 有效千次展示收入
|
||||
}
|
||||
|
||||
// DisplayRules 广告位展示规则
|
||||
type DisplayRules struct {
|
||||
// 频次控制
|
||||
FrequencyCap *FrequencyCap `bson:"frequencyCap" json:"frequencyCap"` // 频次控制
|
||||
|
||||
// 展示条件
|
||||
DisplayConditions []DisplayCondition `bson:"displayConditions" json:"displayConditions"` // 展示条件
|
||||
|
||||
// 排除条件
|
||||
ExcludeConditions []ExcludeCondition `bson:"excludeConditions" json:"excludeConditions"` // 排除条件
|
||||
}
|
||||
|
||||
// FrequencyCap 频次控制
|
||||
type FrequencyCap struct {
|
||||
Impressions int `bson:"impressions" json:"impressions"` // 展示次数
|
||||
TimeWindow int `bson:"timeWindow" json:"timeWindow"` // 时间窗口(小时)
|
||||
}
|
||||
|
||||
// DisplayCondition 展示条件
|
||||
type DisplayCondition struct {
|
||||
Type string `bson:"type" json:"type"` // 条件类型
|
||||
Value interface{} `bson:"value" json:"value"` // 条件值
|
||||
}
|
||||
|
||||
// ExcludeCondition 排除条件
|
||||
type ExcludeCondition struct {
|
||||
Type string `bson:"type" json:"type"` // 条件类型
|
||||
Value interface{} `bson:"value" json:"value"` // 条件值
|
||||
}
|
||||
92
model/entity/ad_statistics.go
Normal file
92
model/entity/ad_statistics.go
Normal file
@@ -0,0 +1,92 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
const AdStatisticsCollection = "ad_statistics"
|
||||
|
||||
// AdStatistics 广告统计实体
|
||||
type AdStatistics struct {
|
||||
do.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
||||
|
||||
// 维度信息
|
||||
StatType string `bson:"statType" json:"statType"` // 统计类型:广告主、广告、广告位等
|
||||
StatDimension string `bson:"statDimension" json:"statDimension"` // 统计维度:小时、天、周、月
|
||||
TargetId string `bson:"targetId" json:"targetId"` // 目标ID:广告主ID、广告ID、广告位ID等
|
||||
TargetName string `bson:"targetName" json:"targetName"` // 目标名称:广告主名称、广告名称、广告位名称等
|
||||
StatDate int64 `bson:"statDate" json:"statDate"` // 统计日期(Unix时间戳)
|
||||
|
||||
// 基础数据
|
||||
Impressions int64 `bson:"impressions" json:"impressions"` // 展示次数
|
||||
Clicks int64 `bson:"clicks" json:"clicks"` // 点击次数
|
||||
Conversions int64 `bson:"conversions" json:"conversions"` // 转化次数
|
||||
UniqueUsers int64 `bson:"uniqueUsers" json:"uniqueUsers"` // 唯一用户数
|
||||
NewUsers int64 `bson:"newUsers" json:"newUsers"` // 新用户数
|
||||
ReturnUsers int64 `bson:"returnUsers" json:"returnUsers"` // 回访用户数
|
||||
ViewTime int64 `bson:"viewTime" json:"viewTime"` // 查看时间(秒)
|
||||
|
||||
// 财务数据
|
||||
Cost int64 `bson:"cost" json:"cost"` // 消耗(分)
|
||||
Revenue int64 `bson:"revenue" json:"revenue"` // 收入(分)
|
||||
Budget int64 `bson:"budget" json:"budget"` // 预算(分)
|
||||
RemainingBudget int64 `bson:"remainingBudget" json:"remainingBudget"` // 剩余预算(分)
|
||||
|
||||
// 比率数据
|
||||
CTR float64 `bson:"ctr" json:"ctr"` // 点击率
|
||||
CVR float64 `bson:"cvr" json:"cvr"` // 转化率
|
||||
BounceRate float64 `bson:"bounceRate" json:"bounceRate"` // 跳出率
|
||||
EngagementRate float64 `bson:"engagementRate" json:"engagementRate"` // 互动率
|
||||
|
||||
// 成本数据
|
||||
CPM int64 `bson:"cpm" json:"cpm"` // 千次展示成本
|
||||
CPC int64 `bson:"cpc" json:"cpc"` // 单次点击成本
|
||||
CPA int64 `bson:"cpa" json:"cpa"` // 单次转化成本
|
||||
eCPM int64 `bson:"ecpm" json:"ecpm"` // 有效千次展示收入
|
||||
eCPC int64 `bson:"ecpc" json:"ecpc"` // 有效单次点击收入
|
||||
eCPA int64 `bson:"ecpa" json:"ecpa"` // 有效单次转化收入
|
||||
|
||||
// 其他信息
|
||||
DeviceType string `bson:"deviceType" json:"deviceType"` // 设备类型
|
||||
Platform string `bson:"platform" json:"platform"` // 平台
|
||||
Region string `bson:"region" json:"region"` // 地区
|
||||
Gender string `bson:"gender" json:"gender"` // 性别
|
||||
AgeGroup string `bson:"ageGroup" json:"ageGroup"` // 年龄段
|
||||
Extra map[string]interface{} `bson:"extra" json:"extra"` // 扩展字段
|
||||
}
|
||||
|
||||
const AdReportCollection = "ad_report"
|
||||
|
||||
// AdReport 广告报表实体
|
||||
type AdReport struct {
|
||||
do.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
||||
|
||||
// 报表信息
|
||||
ReportName string `bson:"reportName" json:"reportName"` // 报表名称
|
||||
ReportType string `bson:"reportType" json:"reportType"` // 报表类型:日报、周报、月报、自定义
|
||||
ReportPeriod string `bson:"reportPeriod" json:"reportPeriod"` // 报表周期
|
||||
StartDate int64 `bson:"startDate" json:"startDate"` // 开始日期
|
||||
EndDate int64 `bson:"endDate" json:"endDate"` // 结束日期
|
||||
ReportData []ReportItem `bson:"reportData" json:"reportData"` // 报表数据
|
||||
|
||||
// 状态信息
|
||||
Status string `bson:"status" json:"status"` // 报表状态:生成中、已完成、失败
|
||||
GenerateTime int64 `bson:"generateTime" json:"generateTime"` // 生成时间
|
||||
DownloadUrl string `bson:"downloadUrl" json:"downloadUrl"` // 下载链接
|
||||
ExpiredTime int64 `bson:"expiredTime" json:"expiredTime"` // 过期时间
|
||||
FileSize int64 `bson:"fileSize" json:"fileSize"` // 文件大小(字节)
|
||||
FileFormat string `bson:"fileFormat" json:"fileFormat"` // 文件格式:CSV、Excel、PDF
|
||||
|
||||
// 其他信息
|
||||
Operator string `bson:"operator" json:"operator"` // 操作人
|
||||
EmailRecipients []string `bson:"emailRecipients" json:"emailRecipients"` // 邮件接收人列表
|
||||
Schedule string `bson:"schedule" json:"schedule"` // 定时设置
|
||||
LastSentTime int64 `bson:"lastSentTime" json:"lastSentTime"` // 上次发送时间
|
||||
NextSendTime int64 `bson:"nextSendTime" json:"nextSendTime"` // 下次发送时间
|
||||
}
|
||||
|
||||
// ReportItem 报表项
|
||||
type ReportItem struct {
|
||||
Dimension string `bson:"dimension" json:"dimension"` // 维度名称
|
||||
Data map[string]interface{} `bson:"data" json:"data"` // 数据
|
||||
}
|
||||
91
model/entity/advertisement.go
Normal file
91
model/entity/advertisement.go
Normal file
@@ -0,0 +1,91 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
const AdvertisementCollection = "advertisement"
|
||||
|
||||
// Advertisement 广告实体
|
||||
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
|
||||
|
||||
// 投放设置
|
||||
StartDate int64 `bson:"startDate" json:"startDate"` // 开始投放时间
|
||||
EndDate int64 `bson:"endDate" json:"endDate"` // 结束投放时间
|
||||
Budget int64 `bson:"budget" json:"budget"` // 预算(分)
|
||||
DailyBudget int64 `bson:"dailyBudget" json:"dailyBudget"` // 日预算(分)
|
||||
BidAmount int64 `bson:"bidAmount" json:"bidAmount"` // 出价(分)
|
||||
BillingType string `bson:"billingType" json:"billingType"` // 计费类型:CPC、CPM、CPA等
|
||||
|
||||
// 投放条件
|
||||
Targeting *Targeting `bson:"targeting" json:"targeting"` // 定向条件
|
||||
|
||||
// 状态信息
|
||||
Status string `bson:"status" json:"status"` // 广告状态:待审核、已审核、已拒绝、投放中、已暂停、已结束
|
||||
AuditStatus string `bson:"auditStatus" json:"auditStatus"` // 审核状态
|
||||
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"` // 单次点击成本
|
||||
}
|
||||
|
||||
// Targeting 广告定向条件
|
||||
type Targeting struct {
|
||||
// 地域定向
|
||||
Regions []string `bson:"regions" json:"regions"` // 地域列表
|
||||
|
||||
// 兴趣定向
|
||||
Interests []string `bson:"interests" json:"interests"` // 兴趣标签
|
||||
|
||||
// 年龄定向
|
||||
AgeRange *AgeRange `bson:"ageRange" json:"ageRange"` // 年龄范围
|
||||
|
||||
// 性别定向
|
||||
Gender []string `bson:"gender" json:"gender"` // 性别:男、女、全部
|
||||
|
||||
// 设备定向
|
||||
Devices []string `bson:"devices" json:"devices"` // 设备类型
|
||||
|
||||
// 操作系统定向
|
||||
OperatingSystems []string `bson:"operatingSystems" json:"operatingSystems"` // 操作系统
|
||||
|
||||
// 时间定向
|
||||
TimeSlots []TimeSlot `bson:"timeSlots" json:"timeSlots"` // 时间段
|
||||
|
||||
// 行为定向
|
||||
Behaviors []string `bson:"behaviors" json:"behaviors"` // 行为标签
|
||||
}
|
||||
|
||||
// AgeRange 年龄范围
|
||||
type AgeRange struct {
|
||||
Min int `bson:"min" json:"min"` // 最小年龄
|
||||
Max int `bson:"max" json:"max"` // 最大年龄
|
||||
}
|
||||
|
||||
// TimeSlot 时间段
|
||||
type TimeSlot struct {
|
||||
DayOfWeek int `bson:"dayOfWeek" json:"dayOfWeek"` // 星期几:0-6,0表示星期日
|
||||
StartTime string `bson:"startTime" json:"startTime"` // 开始时间,格式:HH:mm
|
||||
EndTime string `bson:"endTime" json:"endTime"` // 结束时间,格式:HH:mm
|
||||
}
|
||||
50
model/entity/advertiser.go
Normal file
50
model/entity/advertiser.go
Normal file
@@ -0,0 +1,50 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
const AdvertiserCollection = "advertiser"
|
||||
|
||||
// Advertiser 广告主实体
|
||||
type Advertiser struct {
|
||||
do.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
||||
|
||||
// 基本信息
|
||||
Name string `bson:"name" json:"name"` // 广告主名称
|
||||
ContactName string `bson:"contactName" json:"contactName"` // 联系人姓名
|
||||
ContactPhone string `bson:"contactPhone" json:"contactPhone"` // 联系电话
|
||||
ContactEmail string `bson:"contactEmail" json:"contactEmail"` // 联系邮箱
|
||||
Company string `bson:"company" json:"company"` // 公司名称
|
||||
Industry string `bson:"industry" json:"industry"` // 所属行业
|
||||
Scale string `bson:"scale" json:"scale"` // 公司规模
|
||||
|
||||
// 证件信息
|
||||
BusinessLicenseUrl string `bson:"businessLicenseUrl" json:"businessLicenseUrl"` // 营业执照URL
|
||||
ICPLicenseUrl string `bson:"icpLicenseUrl" json:"icpLicenseUrl"` // ICP备案截图URL
|
||||
OtherLicenseUrls []string `bson:"otherLicenseUrls" json:"otherLicenseUrls"` // 其他证件URL
|
||||
|
||||
// 财务信息
|
||||
BankName string `bson:"bankName" json:"bankName"` // 开户银行
|
||||
BankAccount string `bson:"bankAccount" json:"bankAccount"` // 银行账号
|
||||
AccountName string `bson:"accountName" json:"accountName"` // 账户名称
|
||||
|
||||
// 合同信息
|
||||
ContractId string `bson:"contractId" json:"contractId"` // 合同编号
|
||||
ContractType string `bson:"contractType" json:"contractType"` // 合同类型
|
||||
ContractUrl string `bson:"contractUrl" json:"contractUrl"` // 合同文件URL
|
||||
SignDate int64 `bson:"signDate" json:"signDate"` // 签约日期
|
||||
ExpireDate int64 `bson:"expireDate" json:"expireDate"` // 到期日期
|
||||
|
||||
// 状态信息
|
||||
Status string `bson:"status" json:"status"` // 广告主状态:待审核、已审核、已拒绝、已冻结
|
||||
AuditStatus string `bson:"auditStatus" json:"auditStatus"` // 审核状态
|
||||
AuditReason string `bson:"auditReason" json:"auditReason"` // 审核不通过原因
|
||||
AuditTime int64 `bson:"auditTime" json:"auditTime"` // 审核时间
|
||||
AuditBy string `bson:"auditBy" json:"auditBy"` // 审核人
|
||||
|
||||
// 系统信息
|
||||
AccountBalance int64 `bson:"accountBalance" json:"accountBalance"` // 账户余额(分)
|
||||
CreditLimit int64 `bson:"creditLimit" json:"creditLimit"` // 授信额度(分)
|
||||
Remark string `bson:"remark" json:"remark"` // 备注
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"gitee.com/red-future---jilin-g/common/do"
|
||||
)
|
||||
|
||||
const DataCollection = "data"
|
||||
|
||||
type Data struct {
|
||||
do.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
||||
|
||||
// 业务字段
|
||||
CustomerId string `bson:"customerId" json:"customerId"` // 客户ID
|
||||
CustomerServiceId string `bson:"customerServiceId" json:"customerServiceId"` // 客服ID
|
||||
CustomerServicePlatform string `bson:"customerServicePlatform" json:"customerServicePlatform"` // 客服平台
|
||||
CustomerServiceName string `bson:"customerServiceName" json:"customerServiceName"` // 客服名称
|
||||
IsInbound bool `bson:"isInbound" json:"isInbound"` // 用户是否点开了客服页面
|
||||
IsActive bool `bson:"isActive" json:"isActive"` // 用户是否开口询问
|
||||
IsServed bool `bson:"isServed" json:"isServed"` // 客服是否回答了用户
|
||||
HasSentContactCard bool `bson:"hasSentContactCard" json:"hasSentContactCard"` // 客服是否发送了联系卡
|
||||
HasSentNameCard bool `bson:"hasSentNameCard" json:"hasSentNameCard"` // 客服是否发送了名称卡
|
||||
HasLeftContactInfo bool `bson:"hasLeftContactInfo" json:"hasLeftContactInfo"` // 用户是否留下了联系信息
|
||||
SessionStartTime int64 `bson:"sessionStartTime" json:"sessionStartTime"` // 业务数据的时间
|
||||
MessageTime int64 `bson:"messageTime" json:"messageTime"` // 消息时间
|
||||
}
|
||||
Reference in New Issue
Block a user