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