Add the event service

This commit is contained in:
Achim Rohn
2025-11-16 19:54:42 +01:00
parent bcc5c7493d
commit 049fefed75
26 changed files with 2656 additions and 9 deletions
+23
View File
@@ -0,0 +1,23 @@
package schema
import (
"time"
"entgo.io/ent"
"entgo.io/ent/schema/field"
)
type Event struct {
ent.Schema
}
func (Event) Fields() []ent.Field {
return []ent.Field{
field.String("name"),
field.JSON("data", map[string]interface{}{}),
field.Time("created_at").
Default(time.Now).
Immutable(),
field.Int("user_id"),
}
}
+1
View File
@@ -24,6 +24,7 @@ func (GeneralQueue) Fields() []ent.Field {
field.Time("created_at"),
field.Time("updated_at"),
field.Time("processed_at").Optional(),
field.Int("user_id"),
}
}