//
// 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 GameInvitations = newGameInvitationsTable("backend", "game_invitations", "")

type gameInvitationsTable struct {
	postgres.Table

	// Columns
	InvitationID         postgres.ColumnString
	InviterID            postgres.ColumnString
	Variant              postgres.ColumnString
	TurnTimeoutSecs      postgres.ColumnInteger
	HintsAllowed         postgres.ColumnBool
	HintsPerPlayer       postgres.ColumnInteger
	DropoutTiles         postgres.ColumnString
	MultipleWordsPerTurn postgres.ColumnBool
	Status               postgres.ColumnString
	GameID               postgres.ColumnString
	ExpiresAt            postgres.ColumnTimestampz
	CreatedAt            postgres.ColumnTimestampz
	UpdatedAt            postgres.ColumnTimestampz

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

type GameInvitationsTable struct {
	gameInvitationsTable

	EXCLUDED gameInvitationsTable
}

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

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

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

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

func newGameInvitationsTable(schemaName, tableName, alias string) *GameInvitationsTable {
	return &GameInvitationsTable{
		gameInvitationsTable: newGameInvitationsTableImpl(schemaName, tableName, alias),
		EXCLUDED:             newGameInvitationsTableImpl("", "excluded", ""),
	}
}

func newGameInvitationsTableImpl(schemaName, tableName, alias string) gameInvitationsTable {
	var (
		InvitationIDColumn         = postgres.StringColumn("invitation_id")
		InviterIDColumn            = postgres.StringColumn("inviter_id")
		VariantColumn              = postgres.StringColumn("variant")
		TurnTimeoutSecsColumn      = postgres.IntegerColumn("turn_timeout_secs")
		HintsAllowedColumn         = postgres.BoolColumn("hints_allowed")
		HintsPerPlayerColumn       = postgres.IntegerColumn("hints_per_player")
		DropoutTilesColumn         = postgres.StringColumn("dropout_tiles")
		MultipleWordsPerTurnColumn = postgres.BoolColumn("multiple_words_per_turn")
		StatusColumn               = postgres.StringColumn("status")
		GameIDColumn               = postgres.StringColumn("game_id")
		ExpiresAtColumn            = postgres.TimestampzColumn("expires_at")
		CreatedAtColumn            = postgres.TimestampzColumn("created_at")
		UpdatedAtColumn            = postgres.TimestampzColumn("updated_at")
		allColumns                 = postgres.ColumnList{InvitationIDColumn, InviterIDColumn, VariantColumn, TurnTimeoutSecsColumn, HintsAllowedColumn, HintsPerPlayerColumn, DropoutTilesColumn, MultipleWordsPerTurnColumn, StatusColumn, GameIDColumn, ExpiresAtColumn, CreatedAtColumn, UpdatedAtColumn}
		mutableColumns             = postgres.ColumnList{InviterIDColumn, VariantColumn, TurnTimeoutSecsColumn, HintsAllowedColumn, HintsPerPlayerColumn, DropoutTilesColumn, MultipleWordsPerTurnColumn, StatusColumn, GameIDColumn, ExpiresAtColumn, CreatedAtColumn, UpdatedAtColumn}
		defaultColumns             = postgres.ColumnList{HintsAllowedColumn, HintsPerPlayerColumn, DropoutTilesColumn, MultipleWordsPerTurnColumn, StatusColumn, CreatedAtColumn, UpdatedAtColumn}
	)

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

		//Columns
		InvitationID:         InvitationIDColumn,
		InviterID:            InviterIDColumn,
		Variant:              VariantColumn,
		TurnTimeoutSecs:      TurnTimeoutSecsColumn,
		HintsAllowed:         HintsAllowedColumn,
		HintsPerPlayer:       HintsPerPlayerColumn,
		DropoutTiles:         DropoutTilesColumn,
		MultipleWordsPerTurn: MultipleWordsPerTurnColumn,
		Status:               StatusColumn,
		GameID:               GameIDColumn,
		ExpiresAt:            ExpiresAtColumn,
		CreatedAt:            CreatedAtColumn,
		UpdatedAt:            UpdatedAtColumn,

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