package devices

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

type ScreensRouter struct{}

func (l *ScreensRouter) InitScreensRouter(Router *gin.RouterGroup, RouterPub *gin.RouterGroup) {
	screensRouter := Router.Group("screens").Use(middleware.OperationRecord())
	screensRouterWithoutRecord := Router.Group("screens")

	apiPublicRouterWithoutRecord := RouterPub.Group("screens")
	baseApi := v1.ApiGroupApp.DevicesApiGroup.ScreensApi
	{
		screensRouter.PUT("updateScreens", baseApi.UpdateScreens) //编辑显示屏
		screensRouter.POST("addScreens", baseApi.AddScreens)      //添加显示屏
		screensRouter.DELETE("delScreens", baseApi.DelScreens)    // 删除显示屏
	}
	{
		screensRouterWithoutRecord.POST("getScreensList", baseApi.ScreensList) // 分页获取网关列表
	}
	{
		apiPublicRouterWithoutRecord.GET("screensParms", baseApi.QueryScreensParms) //获取屏参
	}
}
