Files
galaxy-game/backend/internal/postgres/jet/backend/table/runtime_operation_log.go
T
2026-05-06 10:14:55 +03:00

109 lines
4.1 KiB
Go

//
// Code generated by go-jet DO NOT EDIT.
//
// WARNING: Changes to this file may cause incorrect behavior
// and will be lost if the code is regenerated
//
package table
import (
"github.com/go-jet/jet/v2/postgres"
)
var RuntimeOperationLog = newRuntimeOperationLogTable("backend", "runtime_operation_log", "")
type runtimeOperationLogTable struct {
postgres.Table
// Columns
OperationID postgres.ColumnString
GameID postgres.ColumnString
Op postgres.ColumnString
Source postgres.ColumnString
Status postgres.ColumnString
ImageRef postgres.ColumnString
ContainerID postgres.ColumnString
ErrorCode postgres.ColumnString
ErrorMessage postgres.ColumnString
StartedAt postgres.ColumnTimestampz
FinishedAt postgres.ColumnTimestampz
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
DefaultColumns postgres.ColumnList
}
type RuntimeOperationLogTable struct {
runtimeOperationLogTable
EXCLUDED runtimeOperationLogTable
}
// AS creates new RuntimeOperationLogTable with assigned alias
func (a RuntimeOperationLogTable) AS(alias string) *RuntimeOperationLogTable {
return newRuntimeOperationLogTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new RuntimeOperationLogTable with assigned schema name
func (a RuntimeOperationLogTable) FromSchema(schemaName string) *RuntimeOperationLogTable {
return newRuntimeOperationLogTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new RuntimeOperationLogTable with assigned table prefix
func (a RuntimeOperationLogTable) WithPrefix(prefix string) *RuntimeOperationLogTable {
return newRuntimeOperationLogTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new RuntimeOperationLogTable with assigned table suffix
func (a RuntimeOperationLogTable) WithSuffix(suffix string) *RuntimeOperationLogTable {
return newRuntimeOperationLogTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newRuntimeOperationLogTable(schemaName, tableName, alias string) *RuntimeOperationLogTable {
return &RuntimeOperationLogTable{
runtimeOperationLogTable: newRuntimeOperationLogTableImpl(schemaName, tableName, alias),
EXCLUDED: newRuntimeOperationLogTableImpl("", "excluded", ""),
}
}
func newRuntimeOperationLogTableImpl(schemaName, tableName, alias string) runtimeOperationLogTable {
var (
OperationIDColumn = postgres.StringColumn("operation_id")
GameIDColumn = postgres.StringColumn("game_id")
OpColumn = postgres.StringColumn("op")
SourceColumn = postgres.StringColumn("source")
StatusColumn = postgres.StringColumn("status")
ImageRefColumn = postgres.StringColumn("image_ref")
ContainerIDColumn = postgres.StringColumn("container_id")
ErrorCodeColumn = postgres.StringColumn("error_code")
ErrorMessageColumn = postgres.StringColumn("error_message")
StartedAtColumn = postgres.TimestampzColumn("started_at")
FinishedAtColumn = postgres.TimestampzColumn("finished_at")
allColumns = postgres.ColumnList{OperationIDColumn, GameIDColumn, OpColumn, SourceColumn, StatusColumn, ImageRefColumn, ContainerIDColumn, ErrorCodeColumn, ErrorMessageColumn, StartedAtColumn, FinishedAtColumn}
mutableColumns = postgres.ColumnList{GameIDColumn, OpColumn, SourceColumn, StatusColumn, ImageRefColumn, ContainerIDColumn, ErrorCodeColumn, ErrorMessageColumn, StartedAtColumn, FinishedAtColumn}
defaultColumns = postgres.ColumnList{ImageRefColumn, ContainerIDColumn, ErrorCodeColumn, ErrorMessageColumn, StartedAtColumn}
)
return runtimeOperationLogTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
OperationID: OperationIDColumn,
GameID: GameIDColumn,
Op: OpColumn,
Source: SourceColumn,
Status: StatusColumn,
ImageRef: ImageRefColumn,
ContainerID: ContainerIDColumn,
ErrorCode: ErrorCodeColumn,
ErrorMessage: ErrorMessageColumn,
StartedAt: StartedAtColumn,
FinishedAt: FinishedAtColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
DefaultColumns: defaultColumns,
}
}