Files
quyun-v2/backend/app/http/v1/dto/creator_report.go
2026-01-15 17:50:37 +08:00

108 lines
4.8 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 dto
type ReportOverviewFilter struct {
// StartAt 统计开始时间RFC3339可选默认当前时间往前 7 天)。
StartAt *string `query:"start_at"`
// EndAt 统计结束时间RFC3339可选默认当前时间
EndAt *string `query:"end_at"`
// Granularity 统计粒度day目前仅支持 day
Granularity *string `query:"granularity"`
}
type ReportOverviewResponse struct {
// Summary 汇总指标。
Summary ReportSummary `json:"summary"`
// Items 按日期拆分的趋势数据。
Items []ReportOverviewItem `json:"items"`
}
type ReportSummary struct {
// TotalViews 内容累计曝光(全量累计值,用于粗略换算)。
TotalViews int64 `json:"total_views"`
// ContentCount 内容总量(当前快照)。
ContentCount int64 `json:"content_count"`
// ContentCreated 统计区间内新增内容数。
ContentCreated int64 `json:"content_created"`
// LikeActions 统计区间内新增点赞数(基于互动记录)。
LikeActions int64 `json:"like_actions"`
// FavoriteActions 统计区间内新增收藏数(基于互动记录)。
FavoriteActions int64 `json:"favorite_actions"`
// CommentCount 统计区间内新增评论数。
CommentCount int64 `json:"comment_count"`
// PaidOrders 统计区间内已支付订单数。
PaidOrders int64 `json:"paid_orders"`
// PaidAmount 统计区间内已支付金额(单位元)。
PaidAmount float64 `json:"paid_amount"`
// RefundOrders 统计区间内退款订单数。
RefundOrders int64 `json:"refund_orders"`
// RefundAmount 统计区间内退款金额(单位元)。
RefundAmount float64 `json:"refund_amount"`
// WithdrawalApplyOrders 统计区间内提现申请订单数。
WithdrawalApplyOrders int64 `json:"withdrawal_apply_orders"`
// WithdrawalApplyAmount 统计区间内提现申请金额(单位元)。
WithdrawalApplyAmount float64 `json:"withdrawal_apply_amount"`
// WithdrawalPaidOrders 统计区间内提现完成订单数。
WithdrawalPaidOrders int64 `json:"withdrawal_paid_orders"`
// WithdrawalPaidAmount 统计区间内提现完成金额(单位元)。
WithdrawalPaidAmount float64 `json:"withdrawal_paid_amount"`
// WithdrawalFailedOrders 统计区间内提现失败订单数。
WithdrawalFailedOrders int64 `json:"withdrawal_failed_orders"`
// WithdrawalFailedAmount 统计区间内提现失败金额(单位元)。
WithdrawalFailedAmount float64 `json:"withdrawal_failed_amount"`
// ConversionRate 转化率(已支付订单数 / 累计曝光)。
ConversionRate float64 `json:"conversion_rate"`
}
type ReportOverviewItem struct {
// Date 日期YYYY-MM-DD
Date string `json:"date"`
// PaidOrders 当日已支付订单数。
PaidOrders int64 `json:"paid_orders"`
// PaidAmount 当日已支付金额(单位元)。
PaidAmount float64 `json:"paid_amount"`
// RefundOrders 当日退款订单数。
RefundOrders int64 `json:"refund_orders"`
// RefundAmount 当日退款金额(单位元)。
RefundAmount float64 `json:"refund_amount"`
// WithdrawalApplyOrders 当日提现申请订单数。
WithdrawalApplyOrders int64 `json:"withdrawal_apply_orders"`
// WithdrawalApplyAmount 当日提现申请金额(单位元)。
WithdrawalApplyAmount float64 `json:"withdrawal_apply_amount"`
// WithdrawalPaidOrders 当日提现完成订单数。
WithdrawalPaidOrders int64 `json:"withdrawal_paid_orders"`
// WithdrawalPaidAmount 当日提现完成金额(单位元)。
WithdrawalPaidAmount float64 `json:"withdrawal_paid_amount"`
// WithdrawalFailedOrders 当日提现失败订单数。
WithdrawalFailedOrders int64 `json:"withdrawal_failed_orders"`
// WithdrawalFailedAmount 当日提现失败金额(单位元)。
WithdrawalFailedAmount float64 `json:"withdrawal_failed_amount"`
// ContentCreated 当日新增内容数。
ContentCreated int64 `json:"content_created"`
// LikeActions 当日新增点赞数(基于互动记录)。
LikeActions int64 `json:"like_actions"`
// FavoriteActions 当日新增收藏数(基于互动记录)。
FavoriteActions int64 `json:"favorite_actions"`
// CommentCount 当日新增评论数。
CommentCount int64 `json:"comment_count"`
}
type ReportExportForm struct {
// StartAt 统计开始时间RFC3339可选默认当前时间往前 7 天)。
StartAt *string `json:"start_at"`
// EndAt 统计结束时间RFC3339可选默认当前时间
EndAt *string `json:"end_at"`
// Granularity 统计粒度day目前仅支持 day
Granularity *string `json:"granularity"`
// Format 导出格式(仅支持 csv
Format string `json:"format"`
}
type ReportExportResponse struct {
// Filename 导出文件名。
Filename string `json:"filename"`
// MimeType 导出内容类型。
MimeType string `json:"mime_type"`
// Content 导出内容CSV 文本)。
Content string `json:"content"`
}