Add the event service
This commit is contained in:
@@ -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"),
|
||||
}
|
||||
}
|
||||
@@ -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"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user