Event retention (#23)

Signed-off-by: link <a624669980@163.com>
This commit is contained in:
link
2022-11-30 12:16:11 +08:00
committed by GitHub
parent b41ab1ecce
commit dab1fdd6be
15 changed files with 601 additions and 35 deletions
+13
View File
@@ -0,0 +1,13 @@
package model
type EventModel struct {
UUID string `gorm:"primaryKey" json:"uuid"`
SourceID string `gorm:"index" json:"source_id"`
Name string `json:"name"`
Properties string `gorm:"serializer:json" json:"properties"`
Timestamp int64 `gorm:"autoCreateTime:milli" json:"timestamp"`
}
func (p *EventModel) TableName() string {
return "events"
}