group.go 681 B

12345678910111213141516171819202122232425262728293031
  1. package models
  2. import (
  3. "IotAdmin/common/models"
  4. )
  5. // IotGroup 分组实体
  6. type IotGroup struct {
  7. models.Model
  8. ParentId string `json:"parentId" gorm:"type:bigint(20);comment:父ID"`
  9. Path string `json:"path" gorm:"type:varchar(255);comment:分组路径"`
  10. Name string `json:"name" gorm:"type:varchar(255);comment:分组名称"`
  11. Description string `json:"description" gorm:"type:varchar(255);comment:分组描述"`
  12. models.ControlBy
  13. models.ModelTime
  14. }
  15. func (*IotGroup) TableName() string {
  16. return "iot_group"
  17. }
  18. func (e *IotGroup) Generate() models.ActiveRecord {
  19. o := *e
  20. return &o
  21. }
  22. func (e *IotGroup) GetId() interface{} {
  23. return e.Id
  24. }