mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
【feature】添加组织数据读取权限
This commit is contained in:
@@ -19,6 +19,8 @@ type DeviceGroup struct {
|
||||
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:"-"` //子节点
|
||||
|
||||
RoleId int64 `gorm:"-"` // 角色数据权限
|
||||
}
|
||||
|
||||
type DeviceGroupLabel struct {
|
||||
@@ -42,7 +44,10 @@ type Device struct {
|
||||
LastAt time.Time `gorm:"column:last_time;comment:最后一次在线时间" json:"lastTime"`
|
||||
OtaVersion string `json:"otaVersion" gorm:"type:varchar(64);comment:固件版本" ` //上一次固件升级的版本
|
||||
Ext Ext `json:"ext" gorm:"type:json;comment:扩展"` //可扩展的kv map,承载设备组的外围信息
|
||||
|
||||
RoleId int64 `gorm:"-"` // 角色数据权限
|
||||
}
|
||||
|
||||
type DeviceRes struct {
|
||||
Device
|
||||
DeviceGroup DeviceGroup `json:"deviceGroup" gorm:"foreignKey:Gid;references:Id"`
|
||||
|
||||
Reference in New Issue
Block a user