event.go 578 B

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