package routes import ( "github.com/gofiber/fiber/v2" "github.com/break/junhong_cmp_fiber/internal/handler/h5" "github.com/break/junhong_cmp_fiber/internal/model/dto" "github.com/break/junhong_cmp_fiber/pkg/openapi" ) // registerH5RechargeRoutes 注册H5充值路由 func registerH5RechargeRoutes(router fiber.Router, handler *h5.RechargeHandler, doc *openapi.Generator, basePath string) { Register(router, doc, basePath, "POST", "/wallets/recharge", handler.Create, RouteSpec{ Summary: "创建充值订单", Tags: []string{"H5 充值"}, Input: new(dto.CreateRechargeRequest), Output: new(dto.RechargeResponse), Auth: true, }) Register(router, doc, basePath, "GET", "/wallets/recharge-check", handler.RechargeCheck, RouteSpec{ Summary: "充值预检", Tags: []string{"H5 充值"}, Input: new(dto.RechargeCheckRequest), Output: new(dto.RechargeCheckResponse), Auth: true, }) Register(router, doc, basePath, "GET", "/wallets/recharges", handler.List, RouteSpec{ Summary: "获取充值订单列表", Tags: []string{"H5 充值"}, Input: new(dto.RechargeListRequest), Output: new(dto.RechargeListResponse), Auth: true, }) Register(router, doc, basePath, "GET", "/wallets/recharges/:id", handler.Get, RouteSpec{ Summary: "获取充值订单详情", Tags: []string{"H5 充值"}, Input: new(dto.GetRechargeRequest), Output: new(dto.RechargeResponse), Auth: true, }) }