61 lines
2.1 KiB
Go
61 lines
2.1 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package migrate
|
|
|
|
import (
|
|
"entgo.io/ent/dialect/entsql"
|
|
"entgo.io/ent/dialect/sql/schema"
|
|
"entgo.io/ent/schema/field"
|
|
)
|
|
|
|
var (
|
|
// GeneralQueueColumns holds the columns for the "generalQueue" table.
|
|
GeneralQueueColumns = []*schema.Column{
|
|
{Name: "id", Type: field.TypeInt, Increment: true},
|
|
{Name: "name", Type: field.TypeString},
|
|
{Name: "payload", Type: field.TypeJSON},
|
|
{Name: "status", Type: field.TypeEnum, Enums: []string{"pending", "in_progress", "completed", "failed"}},
|
|
{Name: "number_of_tries", Type: field.TypeInt, Default: 0},
|
|
{Name: "max_retries", Type: field.TypeInt, Default: 3},
|
|
{Name: "error_message", Type: field.TypeString, Nullable: true},
|
|
{Name: "failure_payload", Type: field.TypeJSON, Nullable: true},
|
|
{Name: "result_payload", Type: field.TypeJSON, Nullable: true},
|
|
{Name: "created_at", Type: field.TypeTime},
|
|
{Name: "updated_at", Type: field.TypeTime},
|
|
{Name: "processed_at", Type: field.TypeTime, Nullable: true},
|
|
}
|
|
// GeneralQueueTable holds the schema information for the "generalQueue" table.
|
|
GeneralQueueTable = &schema.Table{
|
|
Name: "generalQueue",
|
|
Columns: GeneralQueueColumns,
|
|
PrimaryKey: []*schema.Column{GeneralQueueColumns[0]},
|
|
}
|
|
// GeneralQueueStateColumns holds the columns for the "generalQueueState" table.
|
|
GeneralQueueStateColumns = []*schema.Column{
|
|
{Name: "id", Type: field.TypeInt, Increment: true},
|
|
{Name: "name", Type: field.TypeString, Unique: true},
|
|
{Name: "running", Type: field.TypeBool, Default: false},
|
|
{Name: "updated_at", Type: field.TypeTime},
|
|
}
|
|
// GeneralQueueStateTable holds the schema information for the "generalQueueState" table.
|
|
GeneralQueueStateTable = &schema.Table{
|
|
Name: "generalQueueState",
|
|
Columns: GeneralQueueStateColumns,
|
|
PrimaryKey: []*schema.Column{GeneralQueueStateColumns[0]},
|
|
}
|
|
// Tables holds all the tables in the schema.
|
|
Tables = []*schema.Table{
|
|
GeneralQueueTable,
|
|
GeneralQueueStateTable,
|
|
}
|
|
)
|
|
|
|
func init() {
|
|
GeneralQueueTable.Annotation = &entsql.Annotation{
|
|
Table: "generalQueue",
|
|
}
|
|
GeneralQueueStateTable.Annotation = &entsql.Annotation{
|
|
Table: "generalQueueState",
|
|
}
|
|
}
|