//
// 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 GameSetupDraws = newGameSetupDrawsTable("backend", "game_setup_draws", "")

type gameSetupDrawsTable struct {
	postgres.Table

	// Columns
	GameID    postgres.ColumnString
	Round     postgres.ColumnInteger
	PickNo    postgres.ColumnInteger
	AccountID postgres.ColumnString
	Letter    postgres.ColumnString
	IsBlank   postgres.ColumnBool
	DrawRank  postgres.ColumnInteger
	CreatedAt postgres.ColumnTimestampz

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

type GameSetupDrawsTable struct {
	gameSetupDrawsTable

	EXCLUDED gameSetupDrawsTable
}

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

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

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

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

func newGameSetupDrawsTable(schemaName, tableName, alias string) *GameSetupDrawsTable {
	return &GameSetupDrawsTable{
		gameSetupDrawsTable: newGameSetupDrawsTableImpl(schemaName, tableName, alias),
		EXCLUDED:            newGameSetupDrawsTableImpl("", "excluded", ""),
	}
}

func newGameSetupDrawsTableImpl(schemaName, tableName, alias string) gameSetupDrawsTable {
	var (
		GameIDColumn    = postgres.StringColumn("game_id")
		RoundColumn     = postgres.IntegerColumn("round")
		PickNoColumn    = postgres.IntegerColumn("pick_no")
		AccountIDColumn = postgres.StringColumn("account_id")
		LetterColumn    = postgres.StringColumn("letter")
		IsBlankColumn   = postgres.BoolColumn("is_blank")
		DrawRankColumn  = postgres.IntegerColumn("draw_rank")
		CreatedAtColumn = postgres.TimestampzColumn("created_at")
		allColumns      = postgres.ColumnList{GameIDColumn, RoundColumn, PickNoColumn, AccountIDColumn, LetterColumn, IsBlankColumn, DrawRankColumn, CreatedAtColumn}
		mutableColumns  = postgres.ColumnList{AccountIDColumn, LetterColumn, IsBlankColumn, DrawRankColumn, CreatedAtColumn}
		defaultColumns  = postgres.ColumnList{IsBlankColumn, CreatedAtColumn}
	)

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

		//Columns
		GameID:    GameIDColumn,
		Round:     RoundColumn,
		PickNo:    PickNoColumn,
		AccountID: AccountIDColumn,
		Letter:    LetterColumn,
		IsBlank:   IsBlankColumn,
		DrawRank:  DrawRankColumn,
		CreatedAt: CreatedAtColumn,

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