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 registerMyPackageRoutes(router fiber.Router, handler *admin.MyPackageHandler, doc *openapi.Generator, basePath string) { Register(router, doc, basePath, "GET", "/my-packages", handler.ListMyPackages, RouteSpec{ Summary: "我的可售套餐列表", Tags: []string{"代理可售套餐"}, Input: new(dto.MyPackageListRequest), Output: new(dto.MyPackagePageResult), Auth: true, }) Register(router, doc, basePath, "GET", "/my-packages/:id", handler.GetMyPackage, RouteSpec{ Summary: "获取可售套餐详情", Tags: []string{"代理可售套餐"}, Input: new(dto.IDReq), Output: new(dto.MyPackageDetailResponse), Auth: true, }) Register(router, doc, basePath, "GET", "/my-series-allocations", handler.ListMySeriesAllocations, RouteSpec{ Summary: "我的被分配系列列表", Tags: []string{"代理可售套餐"}, Input: new(dto.MySeriesAllocationListRequest), Output: new(dto.MySeriesAllocationPageResult), Auth: true, }) }