init project

This commit is contained in:
yanghao05
2023-01-28 11:09:11 +08:00
parent 11a561bdd7
commit 114c003b2b
38 changed files with 2011 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package routes
import (
"app/contracts"
"app/modules/system/controller"
"app/providers/http"
"github.com/rogeecn/gen"
)
type Route struct {
controller controller.Controller
svc *http.Service
}
func NewRoute(c controller.Controller, svc *http.Service) contracts.Route {
return &Route{controller: c, svc: svc}
}
func (r *Route) Register() {
r.svc.Engine.GET("/name", gen.DataFunc(r.controller.GetName))
}