// Code generated by atomctl. DO NOT EDIT. // Package super provides HTTP route definitions and registration // for the quyun/v2 application. package super import ( "quyun/v2/app/http/super/dto" tenantdto "quyun/v2/app/http/tenant/dto" "quyun/v2/app/middlewares" "github.com/gofiber/fiber/v3" log "github.com/sirupsen/logrus" _ "go.ipao.vip/atom" _ "go.ipao.vip/atom/contracts" . "go.ipao.vip/atom/fen" ) // Routes implements the HttpRoute contract and provides route registration // for all controllers in the super module. // // @provider contracts.HttpRoute atom.GroupRoutes type Routes struct { log *log.Entry `inject:"false"` middlewares *middlewares.Middlewares // Controller instances auth *auth order *order tenant *tenant user *user } // Prepare initializes the routes provider with logging configuration. func (r *Routes) Prepare() error { r.log = log.WithField("module", "routes.super") r.log.Info("Initializing routes module") return nil } // Name returns the unique identifier for this routes provider. func (r *Routes) Name() string { return "super" } // Register registers all HTTP routes with the provided fiber router. // Each route is registered with its corresponding controller action and parameter bindings. func (r *Routes) Register(router fiber.Router) { // Register routes for controller: auth r.log.Debugf("Registering route: Get /super/v1/auth/token -> auth.token") router.Get("/super/v1/auth/token"[len(r.Path()):], DataFunc0( r.auth.token, )) r.log.Debugf("Registering route: Post /super/v1/auth/login -> auth.login") router.Post("/super/v1/auth/login"[len(r.Path()):], DataFunc1( r.auth.login, Body[dto.LoginForm]("form"), )) // Register routes for controller: order r.log.Debugf("Registering route: Get /super/v1/orders -> order.list") router.Get("/super/v1/orders"[len(r.Path()):], DataFunc1( r.order.list, Query[dto.OrderPageFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/orders/:orderID -> order.detail") router.Get("/super/v1/orders/:orderID"[len(r.Path()):], DataFunc1( r.order.detail, PathParam[int64]("orderID"), )) r.log.Debugf("Registering route: Get /super/v1/orders/statistics -> order.statistics") router.Get("/super/v1/orders/statistics"[len(r.Path()):], DataFunc0( r.order.statistics, )) r.log.Debugf("Registering route: Post /super/v1/orders/:orderID/refund -> order.refund") router.Post("/super/v1/orders/:orderID/refund"[len(r.Path()):], DataFunc2( r.order.refund, PathParam[int64]("orderID"), Body[dto.SuperOrderRefundForm]("form"), )) // Register routes for controller: tenant r.log.Debugf("Registering route: Get /super/v1/tenants -> tenant.list") router.Get("/super/v1/tenants"[len(r.Path()):], DataFunc1( r.tenant.list, Query[dto.TenantFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/tenants/:tenantID/users -> tenant.users") router.Get("/super/v1/tenants/:tenantID/users"[len(r.Path()):], DataFunc2( r.tenant.users, PathParam[int64]("tenantID"), Query[tenantdto.AdminTenantUserListFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/tenants/statuses -> tenant.statusList") router.Get("/super/v1/tenants/statuses"[len(r.Path()):], DataFunc0( r.tenant.statusList, )) r.log.Debugf("Registering route: Patch /super/v1/tenants/:tenantID -> tenant.updateExpire") router.Patch("/super/v1/tenants/:tenantID"[len(r.Path()):], Func2( r.tenant.updateExpire, PathParam[int64]("tenantID"), Body[dto.TenantExpireUpdateForm]("form"), )) r.log.Debugf("Registering route: Patch /super/v1/tenants/:tenantID/status -> tenant.updateStatus") router.Patch("/super/v1/tenants/:tenantID/status"[len(r.Path()):], Func2( r.tenant.updateStatus, PathParam[int64]("tenantID"), Body[dto.TenantStatusUpdateForm]("form"), )) r.log.Debugf("Registering route: Post /super/v1/tenants -> tenant.create") router.Post("/super/v1/tenants"[len(r.Path()):], DataFunc1( r.tenant.create, Body[dto.TenantCreateForm]("form"), )) // Register routes for controller: user r.log.Debugf("Registering route: Get /super/v1/users -> user.list") router.Get("/super/v1/users"[len(r.Path()):], DataFunc1( r.user.list, Query[dto.UserPageFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/users/:userID/tenants -> user.tenants") router.Get("/super/v1/users/:userID/tenants"[len(r.Path()):], DataFunc2( r.user.tenants, PathParam[int64]("userID"), Query[dto.UserTenantPageFilter]("filter"), )) r.log.Debugf("Registering route: Get /super/v1/users/statistics -> user.statistics") router.Get("/super/v1/users/statistics"[len(r.Path()):], DataFunc0( r.user.statistics, )) r.log.Debugf("Registering route: Get /super/v1/users/statuses -> user.statusList") router.Get("/super/v1/users/statuses"[len(r.Path()):], DataFunc0( r.user.statusList, )) r.log.Debugf("Registering route: Patch /super/v1/users/:userID/roles -> user.updateRoles") router.Patch("/super/v1/users/:userID/roles"[len(r.Path()):], Func2( r.user.updateRoles, PathParam[int64]("userID"), Body[dto.UserRolesUpdateForm]("form"), )) r.log.Debugf("Registering route: Patch /super/v1/users/:userID/status -> user.updateStatus") router.Patch("/super/v1/users/:userID/status"[len(r.Path()):], Func2( r.user.updateStatus, PathParam[int64]("userID"), Body[dto.UserStatusUpdateForm]("form"), )) r.log.Info("Successfully registered all routes") }