device_router.go 869 字节
package routers

import (
	"github.com/beego/beego/v2/server/web"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/port/beego/controllers"
)

func init() {
	web.Router("/devices/", &controllers.DeviceController{}, "Post:CreateDevice")
	web.Router("/devices/:deviceId", &controllers.DeviceController{}, "Put:UpdateDevice")
	web.Router("/devices/:deviceId", &controllers.DeviceController{}, "Get:GetDevice")
	web.Router("/devices/:deviceId", &controllers.DeviceController{}, "Delete:RemoveDevice")
	web.Router("/devices/batch-remove", &controllers.DeviceController{}, "Post:BatchRemoveDevice")
	web.Router("/devices/", &controllers.DeviceController{}, "Get:ListDevice")
	web.Router("/devices/search", &controllers.DeviceController{}, "Post:SearchDevice")
	web.Router("/devices/batch-add", &controllers.DeviceController{}, "Post:BatchAddDevice")
}