package router

import (
	"github.com/gin-gonic/gin"
	"server-go/service"
)

type ServerRouter struct {
}

var ServerRouterAPP = new(ServerRouter)

func (s *ServerRouter) InitServerRouter(Router *gin.RouterGroup) {

	serverRouter := Router.Group("/server")

	serverAPIService := service.ServerAPIService
	{
		serverRouter.GET("/info/fake", serverAPIService.FakeAPI)

		// 服务器 CRUD接口及方法
		serverRouter.GET("/info/all", serverAPIService.QueryAPI)
		serverRouter.POST("/create/one", serverAPIService.CreateAPI)
		serverRouter.POST("/update/one", serverAPIService.UpdateAPI)
		serverRouter.POST("/delete/one", serverAPIService.DeleteAPI)

	}

}
