41 lines
835 B
Go
41 lines
835 B
Go
// Code generated by the atomctl ; DO NOT EDIT.
|
|
|
|
package orders
|
|
|
|
import (
|
|
"backend/app/requests"
|
|
. "backend/pkg/f"
|
|
"backend/providers/jwt"
|
|
|
|
_ "git.ipao.vip/rogeecn/atom"
|
|
_ "git.ipao.vip/rogeecn/atom/contracts"
|
|
"github.com/gofiber/fiber/v3"
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
// @provider contracts.HttpRoute atom.GroupRoutes
|
|
type Routes struct {
|
|
log *log.Entry `inject:"false"`
|
|
controller *Controller
|
|
}
|
|
|
|
func (r *Routes) Prepare() error {
|
|
r.log = log.WithField("module", "routes.orders")
|
|
return nil
|
|
}
|
|
|
|
func (r *Routes) Name() string {
|
|
return "orders"
|
|
}
|
|
|
|
func (r *Routes) Register(router fiber.Router) {
|
|
// 注册路由组: Controller
|
|
router.Get("/api/v1/orders", DataFunc3(
|
|
r.controller.List,
|
|
Local[*jwt.Claims]("claim"),
|
|
Query[requests.Pagination]("pagination"),
|
|
Query[UserOrderFilter]("filter"),
|
|
))
|
|
|
|
}
|