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
+8
View File
@@ -35,6 +35,8 @@ const (
FieldUpdatedAt = "updated_at"
// FieldProcessedAt holds the string denoting the processed_at field in the database.
FieldProcessedAt = "processed_at"
// FieldUserID holds the string denoting the user_id field in the database.
FieldUserID = "user_id"
// Table holds the table name of the generalqueue in the database.
Table = "generalQueue"
)
@@ -53,6 +55,7 @@ var Columns = []string{
FieldCreatedAt,
FieldUpdatedAt,
FieldProcessedAt,
FieldUserID,
}
// ValidColumn reports if the column name is valid (part of the table columns).
@@ -144,3 +147,8 @@ func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
func ByProcessedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProcessedAt, opts...).ToFunc()
}
// ByUserID orders the results by the user_id field.
func ByUserID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUserID, opts...).ToFunc()
}