package v1

import (
	dto "quyun/v2/app/http/super/v1/dto"
	v1_dto "quyun/v2/app/http/v1/dto"
	"quyun/v2/app/services"

	"github.com/gofiber/fiber/v3"
)

// @provider
type reports struct{}

// Report overview
//
// @Router /super/v1/reports/overview [get]
// @Summary Report overview
// @Description Get platform report overview
// @Tags Report
// @Accept json
// @Produce json
// @Success 200 {object} v1_dto.ReportOverviewResponse
// @Bind filter query
func (c *reports) Overview(ctx fiber.Ctx, filter *dto.SuperReportOverviewFilter) (*v1_dto.ReportOverviewResponse, error) {
	return services.Super.ReportOverview(ctx, filter)
}

// Export report
//
// @Router /super/v1/reports/export [post]
// @Summary Export report
// @Description Export platform report data
// @Tags Report
// @Accept json
// @Produce json
// @Param form body dto.SuperReportExportForm true "Export form"
// @Success 200 {object} v1_dto.ReportExportResponse
// @Bind form body
func (c *reports) Export(ctx fiber.Ctx, form *dto.SuperReportExportForm) (*v1_dto.ReportExportResponse, error) {
	return services.Super.ExportReport(ctx, form)
}
