You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
850 B

package router
import (
"gin-vue-admin/api/v1"
"gin-vue-admin/middleware"
"github.com/gin-gonic/gin"
)
func Init{{.StructName}}Router(Router *gin.RouterGroup) {
{{.StructName}}Router := Router.Group("{{.Abbreviation}}").Use(middleware.JWTAuth()).Use(middleware.CasbinHandler())
{
{{.StructName}}Router.POST("create{{.StructName}}", v1.Create{{.StructName}}) // {{.StructName}}
{{.StructName}}Router.POST("delete{{.StructName}}", v1.Delete{{.StructName}}) //{{.StructName}}
{{.StructName}}Router.POST("update{{.StructName}}", v1.Update{{.StructName}}) //{{.StructName}}
{{.StructName}}Router.POST("find{{.StructName}}", v1.Find{{.StructName}}) // ID获取{{.StructName}}
{{.StructName}}Router.POST("get{{.StructName}}List", v1.Get{{.StructName}}List) //{{.StructName}}
}
}