Files
cid/model/dto/report_dto.go
2025-12-06 15:41:38 +08:00

105 lines
3.9 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
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:"/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:"/getOne" 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:"/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:"/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:"/delete" method:"post" tags:"广告报表" summary:"删除报表" dc:"删除指定的报表"`
Id string `json:"id" v:"required"` // 报表ID
}
// DownloadReportReq 下载报表请求
type DownloadReportReq struct {
g.Meta `path:"/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:"/generate" method:"post" tags:"广告报表" summary:"生成报表" dc:"手动生成报表"`
Id string `json:"id" v:"required"` // 报表ID
}