package routes

import (
	"github.com/gofiber/fiber/v2"

	"github.com/break/junhong_cmp_fiber/internal/handler/admin"
	"github.com/break/junhong_cmp_fiber/internal/model/dto"
	"github.com/break/junhong_cmp_fiber/pkg/openapi"
)

// registerPackageUsageRoutes 注册套餐使用记录相关路由
func registerPackageUsageRoutes(router fiber.Router, handler *admin.PackageUsageHandler, doc *openapi.Generator, basePath string) {
	packageUsage := router.Group("/package-usage")
	groupPath := basePath + "/package-usage"

	Register(packageUsage, doc, groupPath, "GET", "/:id/daily-records", handler.GetDailyRecords, RouteSpec{
		Summary: "获取套餐流量详单",
		Tags:    []string{"套餐使用记录"},
		Input:   new(dto.IDReq),
		Output:  new(dto.PackageUsageDetailResponse),
		Auth:    true,
	})
}
