event.go 706 B

123456789101112131415161718
  1. package app
  2. import "time"
  3. type Event struct {
  4. ID int `json:"id" gorm:"column:id;comment:id"`
  5. EventType string `json:"eventType" gorm:"column:event_type;comment:事件类型"`
  6. EventCode string `json:"eventCode" gorm:"column:event_code;comment:事件编码"`
  7. MacAddress string `json:"macAddress" gorm:"column:mac_address;comment:地址"`
  8. CreatedAt time.Time `json:"startTime" gorm:"column:start_time;comment:开始时间"`
  9. HandleTime time.Time `json:"handleTime" gorm:"column:handle_time;comment:处理时间"`
  10. HandleBy int `json:"handleBy" gorm:"column:handle_by;comment:handle_by"`
  11. }
  12. // TableName Event 表名
  13. func (Event) TableName() string {
  14. return "event"
  15. }