link_event.gen.go 1.8 KB

123456789101112131415161718192021222324252627282930313233
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package model
  5. import (
  6. "time"
  7. )
  8. const TableNameLinkEvent = "link_event"
  9. // LinkEvent mapped from table <link_event>
  10. type LinkEvent struct {
  11. ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` // 联动事件表
  12. Eventid int64 `gorm:"column:eventid" json:"eventid,string"` // 联动事件ID,全局唯一
  13. Eventdesc string `gorm:"column:eventdesc" json:"eventdesc"` // 联动事件描述
  14. Timestamp int64 `gorm:"column:timestamp" json:"timestamp,string"` // 事件产生时的时间戳
  15. Strategyid int64 `gorm:"column:strategyid" json:"strategyid,string"` // 关联的联动策略ID
  16. Linktoid int64 `gorm:"column:linktoid" json:"linktoid,string"` // 联动目标ID
  17. Beforestatus string `gorm:"column:beforestatus" json:"beforestatus"` // 联动前目标状态。变电采集设备状态为控制点关联的测点数据。视频设备状态为预置位名称
  18. Afterstatus string `gorm:"column:afterstatus" json:"afterstatus"` // 联动后目标状态
  19. Result string `gorm:"column:result" json:"result"` // 执行结果
  20. Srcappid int32 `gorm:"column:srcappid" json:"srcappid"` // 来源app id
  21. Dstappid int32 `gorm:"column:dstappid" json:"dstappid"` // 目标app id
  22. CreateAt time.Time `gorm:"->" json:"create_at" c:"-"` // 创建时间
  23. UpdateAt time.Time `gorm:"->" json:"update_at" c:"-"` // 更新时间
  24. }
  25. // TableName LinkEvent's table name
  26. func (*LinkEvent) TableName() string {
  27. return TableNameLinkEvent
  28. }