//
// 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 GameHidden = newGameHiddenTable("backend", "game_hidden", "")

type gameHiddenTable struct {
	postgres.Table

	// Columns
	AccountID postgres.ColumnString
	GameID    postgres.ColumnString
	CreatedAt postgres.ColumnTimestampz

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

type GameHiddenTable struct {
	gameHiddenTable

	EXCLUDED gameHiddenTable
}

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

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

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

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

func newGameHiddenTable(schemaName, tableName, alias string) *GameHiddenTable {
	return &GameHiddenTable{
		gameHiddenTable: newGameHiddenTableImpl(schemaName, tableName, alias),
		EXCLUDED:        newGameHiddenTableImpl("", "excluded", ""),
	}
}

func newGameHiddenTableImpl(schemaName, tableName, alias string) gameHiddenTable {
	var (
		AccountIDColumn = postgres.StringColumn("account_id")
		GameIDColumn    = postgres.StringColumn("game_id")
		CreatedAtColumn = postgres.TimestampzColumn("created_at")
		allColumns      = postgres.ColumnList{AccountIDColumn, GameIDColumn, CreatedAtColumn}
		mutableColumns  = postgres.ColumnList{CreatedAtColumn}
		defaultColumns  = postgres.ColumnList{CreatedAtColumn}
	)

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

		//Columns
		AccountID: AccountIDColumn,
		GameID:    GameIDColumn,
		CreatedAt: CreatedAtColumn,

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