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
+16
View File
@@ -9,6 +9,20 @@ import (
)
var (
// EventsColumns holds the columns for the "events" table.
EventsColumns = []*schema.Column{
{Name: "id", Type: field.TypeInt, Increment: true},
{Name: "name", Type: field.TypeString},
{Name: "data", Type: field.TypeJSON},
{Name: "created_at", Type: field.TypeTime},
{Name: "user_id", Type: field.TypeInt},
}
// EventsTable holds the schema information for the "events" table.
EventsTable = &schema.Table{
Name: "events",
Columns: EventsColumns,
PrimaryKey: []*schema.Column{EventsColumns[0]},
}
// GeneralQueueColumns holds the columns for the "generalQueue" table.
GeneralQueueColumns = []*schema.Column{
{Name: "id", Type: field.TypeInt, Increment: true},
@@ -23,6 +37,7 @@ var (
{Name: "created_at", Type: field.TypeTime},
{Name: "updated_at", Type: field.TypeTime},
{Name: "processed_at", Type: field.TypeTime, Nullable: true},
{Name: "user_id", Type: field.TypeInt},
}
// GeneralQueueTable holds the schema information for the "generalQueue" table.
GeneralQueueTable = &schema.Table{
@@ -45,6 +60,7 @@ var (
}
// Tables holds all the tables in the schema.
Tables = []*schema.Table{
EventsTable,
GeneralQueueTable,
GeneralQueueStateTable,
}