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"
)

// registerAssetPackageBatchOrderRoutes 注册资产套餐批量订购任务路由。
func registerAssetPackageBatchOrderRoutes(router fiber.Router, handler *admin.AssetPackageBatchOrderHandler, doc *openapi.Generator, basePath string) {
	Register(router, doc, basePath, "POST", "/asset-package-batch-orders", handler.Create, RouteSpec{
		Summary: "创建资产套餐批量订购任务", Description: "上传单列CSV对象存储Key，并为整批选择一个套餐和支付方式；不选择代理。",
		Tags: []string{"批量订购套餐"}, Input: new(dto.CreateAssetPackageBatchOrderRequest), Output: new(dto.AssetPackageBatchOrderTaskResponse), Auth: true,
	})
	Register(router, doc, basePath, "GET", "/asset-package-batch-orders", handler.List, RouteSpec{
		Summary: "查询资产套餐批量订购任务列表", Tags: []string{"批量订购套餐"},
		Input: new(dto.ListAssetPackageBatchOrderRequest), Output: new(dto.AssetPackageBatchOrderTaskListResponse), Auth: true,
	})
	Register(router, doc, basePath, "GET", "/asset-package-batch-orders/:id", handler.Get, RouteSpec{
		Summary: "查询资产套餐批量订购任务详情", Tags: []string{"批量订购套餐"},
		Input: new(dto.GetAssetPackageBatchOrderRequest), Output: new(dto.AssetPackageBatchOrderTaskDetailResponse), Auth: true,
	})
}
