package dto import ( "github.com/gogf/gf/v2/frame/g" ) // GenerateCIDReq 生成CID请求 type GenerateCIDReq struct { g.Meta `path:"/generateCID" method:"post" tags:"CID服务" summary:"生成CID广告" dc:"为当前用户生成CID广告"` UserId int64 `json:"user_id"` // 用户ID(可选,如果不提供则从token获取) RequestType string `json:"request_type"` // 请求类型 Parameters map[string]interface{} `json:"parameters"` // 请求参数 Position string `json:"position"` // 广告位置 Count int `json:"count"` // 广告数量 } // AdInfo 广告信息 type AdInfo struct { Id int64 `json:"id"` // 广告ID Title string `json:"title"` // 广告标题 Description string `json:"description"` // 广告描述 ImageUrl string `json:"image_url"` // 广告图片URL TargetUrl string `json:"target_url"` // 目标链接 ConversionRate float64 `json:"conversion_rate"` // 转化率 Source string `json:"source"` // 广告源 Bid int `json:"bid"` // 出价(分) } // GenerateCIDRes 生成CID响应 type GenerateCIDRes struct { CID string `json:"cid"` // 唯一CID Ads []*AdInfo `json:"ads"` // 广告列表 TotalAds int `json:"total_ads"` // 总广告数 TenantId interface{} `json:"tenant_id"` // 租户ID TenantName string `json:"tenant_name"` // 租户名称 GeneratedAt string `json:"generated_at"` // 生成时间 } // CIDRequestHistory CID请求历史记录 type CIDRequestHistory struct { Id int64 `json:"id"` // 记录ID TenantId interface{} `json:"tenant_id"` // 租户ID UserId int64 `json:"user_id"` // 用户ID RequestType string `json:"request_type"` // 请求类型 Status string `json:"status"` // 状态 ProcessTime int `json:"process_time"` // 处理时间(ms) CreatedAt string `json:"created_at"` // 创建时间 } // GetCIDHistoryReq 获取CID历史请求 type GetCIDHistoryReq struct { g.Meta `path:"/getCidHistory" method:"get" tags:"CID服务" summary:"获取CID历史记录" dc:"分页获取用户的CID请求历史"` Page int `json:"page" v:"required|min:1"` // 页码 Size int `json:"size" v:"required|min:1|max:100"` // 每页数量 } // GetCIDHistoryRes 获取CID历史响应 type GetCIDHistoryRes struct { List []*CIDRequestHistory `json:"list"` // 历史记录列表 Total int64 `json:"total"` // 总数 Page int `json:"page"` // 当前页 Size int `json:"size"` // 每页数量 } // TenantInfo 租户信息 type TenantInfo struct { Id string `json:"id"` // 租户ID Name string `json:"name"` // 租户名称 Level string `json:"level"` // 租户级别 }