package router

import (
	"github.com/gin-gonic/gin"
	"go-admin/app/admin/apis/basic"
	"go-admin/app/admin/middleware"
	jwt "go-admin/pkg/jwtauth"
)

func registerSupplierRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	r := v1.Group("/supplier").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
	r.POST("create", basic.SupplierCreate)
	r.POST("update", basic.SupplierUpdate)
	r.DELETE("delete/:id", basic.SupplierDel)
	r.GET("detail/:id", basic.SupplierDetail)
	r.POST("list", basic.SupplierList)
}
