//
// 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 GameInvitationInvitees = newGameInvitationInviteesTable("backend", "game_invitation_invitees", "")

type gameInvitationInviteesTable struct {
	postgres.Table

	// Columns
	InvitationID postgres.ColumnString
	AccountID    postgres.ColumnString
	Seat         postgres.ColumnInteger
	Response     postgres.ColumnString
	RespondedAt  postgres.ColumnTimestampz

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

type GameInvitationInviteesTable struct {
	gameInvitationInviteesTable

	EXCLUDED gameInvitationInviteesTable
}

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

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

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

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

func newGameInvitationInviteesTable(schemaName, tableName, alias string) *GameInvitationInviteesTable {
	return &GameInvitationInviteesTable{
		gameInvitationInviteesTable: newGameInvitationInviteesTableImpl(schemaName, tableName, alias),
		EXCLUDED:                    newGameInvitationInviteesTableImpl("", "excluded", ""),
	}
}

func newGameInvitationInviteesTableImpl(schemaName, tableName, alias string) gameInvitationInviteesTable {
	var (
		InvitationIDColumn = postgres.StringColumn("invitation_id")
		AccountIDColumn    = postgres.StringColumn("account_id")
		SeatColumn         = postgres.IntegerColumn("seat")
		ResponseColumn     = postgres.StringColumn("response")
		RespondedAtColumn  = postgres.TimestampzColumn("responded_at")
		allColumns         = postgres.ColumnList{InvitationIDColumn, AccountIDColumn, SeatColumn, ResponseColumn, RespondedAtColumn}
		mutableColumns     = postgres.ColumnList{SeatColumn, ResponseColumn, RespondedAtColumn}
		defaultColumns     = postgres.ColumnList{ResponseColumn}
	)

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

		//Columns
		InvitationID: InvitationIDColumn,
		AccountID:    AccountIDColumn,
		Seat:         SeatColumn,
		Response:     ResponseColumn,
		RespondedAt:  RespondedAtColumn,

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