First workflow implementation
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user