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