First workflow implementation

This commit is contained in:
Achim Rohn
2026-03-21 16:11:24 +00:00
parent a15ca501b8
commit 413dbb72cf
13 changed files with 457 additions and 13 deletions
+8
View File
@@ -37,6 +37,8 @@ const (
FieldProcessedAt = "processed_at"
// FieldUserID holds the string denoting the user_id field in the database.
FieldUserID = "user_id"
// FieldWorkflowID holds the string denoting the workflow_id field in the database.
FieldWorkflowID = "workflow_id"
// Table holds the table name of the generalqueue in the database.
Table = "generalQueue"
)
@@ -56,6 +58,7 @@ var Columns = []string{
FieldUpdatedAt,
FieldProcessedAt,
FieldUserID,
FieldWorkflowID,
}
// ValidColumn reports if the column name is valid (part of the table columns).
@@ -152,3 +155,8 @@ func ByProcessedAt(opts ...sql.OrderTermOption) OrderOption {
func ByUserID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUserID, opts...).ToFunc()
}
// ByWorkflowID orders the results by the workflow_id field.
func ByWorkflowID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldWorkflowID, opts...).ToFunc()
}