//
// 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 RuntimeRecords = newRuntimeRecordsTable("backend", "runtime_records", "")

type runtimeRecordsTable struct {
	postgres.Table

	// Columns
	GameID               postgres.ColumnString
	Status               postgres.ColumnString
	CurrentContainerID   postgres.ColumnString
	CurrentImageRef      postgres.ColumnString
	CurrentEngineVersion postgres.ColumnString
	EngineEndpoint       postgres.ColumnString
	StatePath            postgres.ColumnString
	DockerNetwork        postgres.ColumnString
	TurnSchedule         postgres.ColumnString
	CurrentTurn          postgres.ColumnInteger
	NextGenerationAt     postgres.ColumnTimestampz
	SkipNextTick         postgres.ColumnBool
	Paused               postgres.ColumnBool
	PausedAt             postgres.ColumnTimestampz
	EngineHealth         postgres.ColumnString
	CreatedAt            postgres.ColumnTimestampz
	UpdatedAt            postgres.ColumnTimestampz
	StartedAt            postgres.ColumnTimestampz
	StoppedAt            postgres.ColumnTimestampz
	FinishedAt           postgres.ColumnTimestampz
	RemovedAt            postgres.ColumnTimestampz
	LastObservedAt       postgres.ColumnTimestampz

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
	DefaultColumns postgres.ColumnList
}

type RuntimeRecordsTable struct {
	runtimeRecordsTable

	EXCLUDED runtimeRecordsTable
}

// AS creates new RuntimeRecordsTable with assigned alias
func (a RuntimeRecordsTable) AS(alias string) *RuntimeRecordsTable {
	return newRuntimeRecordsTable(a.SchemaName(), a.TableName(), alias)
}

// Schema creates new RuntimeRecordsTable with assigned schema name
func (a RuntimeRecordsTable) FromSchema(schemaName string) *RuntimeRecordsTable {
	return newRuntimeRecordsTable(schemaName, a.TableName(), a.Alias())
}

// WithPrefix creates new RuntimeRecordsTable with assigned table prefix
func (a RuntimeRecordsTable) WithPrefix(prefix string) *RuntimeRecordsTable {
	return newRuntimeRecordsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}

// WithSuffix creates new RuntimeRecordsTable with assigned table suffix
func (a RuntimeRecordsTable) WithSuffix(suffix string) *RuntimeRecordsTable {
	return newRuntimeRecordsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}

func newRuntimeRecordsTable(schemaName, tableName, alias string) *RuntimeRecordsTable {
	return &RuntimeRecordsTable{
		runtimeRecordsTable: newRuntimeRecordsTableImpl(schemaName, tableName, alias),
		EXCLUDED:            newRuntimeRecordsTableImpl("", "excluded", ""),
	}
}

func newRuntimeRecordsTableImpl(schemaName, tableName, alias string) runtimeRecordsTable {
	var (
		GameIDColumn               = postgres.StringColumn("game_id")
		StatusColumn               = postgres.StringColumn("status")
		CurrentContainerIDColumn   = postgres.StringColumn("current_container_id")
		CurrentImageRefColumn      = postgres.StringColumn("current_image_ref")
		CurrentEngineVersionColumn = postgres.StringColumn("current_engine_version")
		EngineEndpointColumn       = postgres.StringColumn("engine_endpoint")
		StatePathColumn            = postgres.StringColumn("state_path")
		DockerNetworkColumn        = postgres.StringColumn("docker_network")
		TurnScheduleColumn         = postgres.StringColumn("turn_schedule")
		CurrentTurnColumn          = postgres.IntegerColumn("current_turn")
		NextGenerationAtColumn     = postgres.TimestampzColumn("next_generation_at")
		SkipNextTickColumn         = postgres.BoolColumn("skip_next_tick")
		PausedColumn               = postgres.BoolColumn("paused")
		PausedAtColumn             = postgres.TimestampzColumn("paused_at")
		EngineHealthColumn         = postgres.StringColumn("engine_health")
		CreatedAtColumn            = postgres.TimestampzColumn("created_at")
		UpdatedAtColumn            = postgres.TimestampzColumn("updated_at")
		StartedAtColumn            = postgres.TimestampzColumn("started_at")
		StoppedAtColumn            = postgres.TimestampzColumn("stopped_at")
		FinishedAtColumn           = postgres.TimestampzColumn("finished_at")
		RemovedAtColumn            = postgres.TimestampzColumn("removed_at")
		LastObservedAtColumn       = postgres.TimestampzColumn("last_observed_at")
		allColumns                 = postgres.ColumnList{GameIDColumn, StatusColumn, CurrentContainerIDColumn, CurrentImageRefColumn, CurrentEngineVersionColumn, EngineEndpointColumn, StatePathColumn, DockerNetworkColumn, TurnScheduleColumn, CurrentTurnColumn, NextGenerationAtColumn, SkipNextTickColumn, PausedColumn, PausedAtColumn, EngineHealthColumn, CreatedAtColumn, UpdatedAtColumn, StartedAtColumn, StoppedAtColumn, FinishedAtColumn, RemovedAtColumn, LastObservedAtColumn}
		mutableColumns             = postgres.ColumnList{StatusColumn, CurrentContainerIDColumn, CurrentImageRefColumn, CurrentEngineVersionColumn, EngineEndpointColumn, StatePathColumn, DockerNetworkColumn, TurnScheduleColumn, CurrentTurnColumn, NextGenerationAtColumn, SkipNextTickColumn, PausedColumn, PausedAtColumn, EngineHealthColumn, CreatedAtColumn, UpdatedAtColumn, StartedAtColumn, StoppedAtColumn, FinishedAtColumn, RemovedAtColumn, LastObservedAtColumn}
		defaultColumns             = postgres.ColumnList{CurrentTurnColumn, SkipNextTickColumn, PausedColumn, EngineHealthColumn, CreatedAtColumn, UpdatedAtColumn}
	)

	return runtimeRecordsTable{
		Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),

		//Columns
		GameID:               GameIDColumn,
		Status:               StatusColumn,
		CurrentContainerID:   CurrentContainerIDColumn,
		CurrentImageRef:      CurrentImageRefColumn,
		CurrentEngineVersion: CurrentEngineVersionColumn,
		EngineEndpoint:       EngineEndpointColumn,
		StatePath:            StatePathColumn,
		DockerNetwork:        DockerNetworkColumn,
		TurnSchedule:         TurnScheduleColumn,
		CurrentTurn:          CurrentTurnColumn,
		NextGenerationAt:     NextGenerationAtColumn,
		SkipNextTick:         SkipNextTickColumn,
		Paused:               PausedColumn,
		PausedAt:             PausedAtColumn,
		EngineHealth:         EngineHealthColumn,
		CreatedAt:            CreatedAtColumn,
		UpdatedAt:            UpdatedAtColumn,
		StartedAt:            StartedAtColumn,
		StoppedAt:            StoppedAtColumn,
		FinishedAt:           FinishedAtColumn,
		RemovedAt:            RemovedAtColumn,
		LastObservedAt:       LastObservedAtColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
		DefaultColumns: defaultColumns,
	}
}
