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

func registerAssetAllocationRecordRoutes(router fiber.Router, handler *admin.AssetAllocationRecordHandler, doc *openapi.Generator, basePath string) {
	records := router.Group("/asset-allocation-records")
	groupPath := basePath + "/asset-allocation-records"

	Register(records, doc, groupPath, "GET", "", handler.List, RouteSpec{
		Summary: "分配记录列表",
		Tags:    []string{"资产分配记录"},
		Input:   new(dto.ListAssetAllocationRecordRequest),
		Output:  new(dto.ListAssetAllocationRecordResponse),
		Auth:    true,
	})

	Register(records, doc, groupPath, "GET", "/:id", handler.GetByID, RouteSpec{
		Summary: "分配记录详情",
		Tags:    []string{"资产分配记录"},
		Input:   new(dto.GetAssetAllocationRecordRequest),
		Output:  new(dto.AssetAllocationRecordDetailResponse),
		Auth:    true,
	})
}
