【feature】添加组织数据读取权限

This commit is contained in:
XM-GO
2023-09-14 17:28:52 +08:00
parent bde42bfc9a
commit b5ee2a54b9
84 changed files with 1664 additions and 774 deletions

View File

@@ -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"`