package models import ( "IotAdmin/common/models" ) // IotGroup 分组实体 type IotGroup struct { models.Model ParentId int `json:"parentId" gorm:"type:bigint(20);comment:父ID"` Path string `json:"path" gorm:"type:varchar(255);comment:分组路径"` Name string `json:"name" gorm:"type:varchar(255);comment:分组名称"` Description string `json:"description" gorm:"type:varchar(255);comment:分组描述"` Children []IotGroup `json:"children,omitempty" gorm:"-"` models.ControlBy models.ModelTime } func (*IotGroup) TableName() string { return "iot_group" } func (e *IotGroup) Generate() models.ActiveRecord { o := *e return &o } func (e *IotGroup) GetId() interface{} { return e.Id }