mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
[feat]网关子设备,直接上传,自动创建设备模型,无需手动创建
This commit is contained in:
@@ -11,14 +11,16 @@ import (
|
||||
// DeviceGroup 设备分组
|
||||
type DeviceGroup struct {
|
||||
global_model.BaseAuthModel
|
||||
Name string `json:"name" gorm:"type:varchar(128);comment:设备分组名称" validate:"required"`
|
||||
Pid string `json:"pid" gorm:"type:varchar(64);comment:设备分组类型"`
|
||||
Path string `json:"path" gorm:"type:varchar(255);comment:设备分组路径"`
|
||||
Description string `json:"description" gorm:"type:varchar(255);comment:设备分组说明"`
|
||||
Sort int64 `json:"sort" gorm:"type:int;comment:排序"`
|
||||
Status string `gorm:"status;type:varchar(1);comment:状态" json:"status"`
|
||||
Ext Ext `json:"ext" gorm:"type:json;comment:扩展"` //可扩展的kv map,承载设备组的外围信息
|
||||
Children []DeviceGroup `json:"children" gorm:"-"` //子节点
|
||||
Name string `json:"name" gorm:"type:varchar(128);comment:设备分组名称" validate:"required"`
|
||||
Pid string `json:"pid" gorm:"type:varchar(64);comment:设备分组类型"`
|
||||
Path string `json:"path" gorm:"type:varchar(255);comment:设备分组路径"`
|
||||
Description string `json:"description" gorm:"type:varchar(255);comment:设备分组说明"`
|
||||
Sort int64 `json:"sort" gorm:"type:int;comment:排序"`
|
||||
Status string `gorm:"type:varchar(1);comment:状态" json:"status"`
|
||||
Ext Ext `json:"ext" gorm:"type:json;comment:扩展"` //可扩展的kv map,承载设备组的外围信息
|
||||
IsDefault string `gorm:"type:varchar(1);comment:是否默认" json:"isDefault"`
|
||||
|
||||
Children []DeviceGroup `json:"children" gorm:"-"` //子节点
|
||||
|
||||
RoleId int64 `gorm:"-"` // 角色数据权限
|
||||
}
|
||||
|
||||
@@ -47,9 +47,9 @@ type Product struct {
|
||||
ProtocolName string `json:"protocolName" gorm:"type:varchar(64);comment:协议名称"` //MQTT COAP WebSocket LwM2M
|
||||
DeviceType string `json:"deviceType" gorm:"type:varchar(64);comment:设备类型"` // 直连设备 网关设备 网关子设备 监控设备
|
||||
RuleChainId string `json:"ruleChainId" gorm:"type:varchar(64);comment:规则链Id"` //可空,如果空就走根规则链
|
||||
Status string `gorm:"status;type:varchar(1);comment:状态" json:"status"`
|
||||
|
||||
RoleId int64 `gorm:"-"` // 角色数据权限
|
||||
Status string `gorm:"type:varchar(1);comment:状态" json:"status"`
|
||||
IsDefault string `gorm:"type:varchar(1);comment:是否默认" json:"isDefault"`
|
||||
RoleId int64 `gorm:"-"` // 角色数据权限
|
||||
}
|
||||
|
||||
type ProductRes struct {
|
||||
|
||||
Reference in New Issue
Block a user