package log

import (
	"github.com/gin-gonic/gin"
	v1 "log-server/api/v1"
	"log-server/middleware"
)

type ComputerRouter struct {
}

func (e *ComputerRouter) InitComputerRouter(Router *gin.RouterGroup) {
	computerRouter := Router.Group("computer")
	computerApi := v1.ApiGroupApp.LogApiGroup.ApiComputer
	{
		computerRouter.POST("getPcList", computerApi.GetPcList)
		computerRouter.POST("getPcById", computerApi.GetPcById)
		computerRouter.POST("importExcel", computerApi.ImportExcel)
	}
	computerRouter1 := Router.Group("computer").Use(middleware.OperationRecord())
	{
		computerRouter1.POST("createPc", computerApi.CreatePc)
		computerRouter1.POST("updatePc", computerApi.UpdatePc)
		computerRouter1.POST("statusOperation", computerApi.PcStatusOperation)
	}
}
