[优化] 优化缓存

This commit is contained in:
PandaX
2023-10-17 14:39:01 +08:00
parent 5db1db8289
commit 10b98df33c
17 changed files with 158 additions and 85 deletions

View File

@@ -18,7 +18,6 @@ type DeviceGroup struct {
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:"-"` //子节点
@@ -47,7 +46,8 @@ type Device struct {
OtaVersion string `json:"otaVersion" gorm:"type:varchar(64);comment:固件版本" ` //上一次固件升级的版本
Ext Ext `json:"ext" gorm:"type:json;comment:扩展"` //可扩展的kv map,承载设备组的外围信息
RoleId int64 `gorm:"-"` // 角色数据权限
Protocol string `json:"protocol" gorm:"-"`
RoleId int64 `gorm:"-"` // 角色数据权限
}
type DeviceRes struct {

View File

@@ -48,7 +48,6 @@ type Product struct {
DeviceType string `json:"deviceType" gorm:"type:varchar(64);comment:设备类型"` // 直连设备 网关设备 网关子设备 监控设备
RuleChainId string `json:"ruleChainId" gorm:"type:varchar(64);comment:规则链Id"` //可空,如果空就走根规则链
Status string `gorm:"type:varchar(1);comment:状态" json:"status"`
IsDefault string `gorm:"type:varchar(1);comment:是否默认" json:"isDefault"`
RoleId int64 `gorm:"-"` // 角色数据权限
}