//
// 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 DiplomailMessages = newDiplomailMessagesTable("backend", "diplomail_messages", "")

type diplomailMessagesTable struct {
	postgres.Table

	// Columns
	MessageID      postgres.ColumnString
	GameID         postgres.ColumnString
	GameName       postgres.ColumnString
	Kind           postgres.ColumnString
	SenderKind     postgres.ColumnString
	SenderUserID   postgres.ColumnString
	SenderUsername postgres.ColumnString
	SenderIP       postgres.ColumnString
	Subject        postgres.ColumnString
	Body           postgres.ColumnString
	BodyLang       postgres.ColumnString
	BroadcastScope postgres.ColumnString
	CreatedAt      postgres.ColumnTimestampz

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

type DiplomailMessagesTable struct {
	diplomailMessagesTable

	EXCLUDED diplomailMessagesTable
}

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

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

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

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

func newDiplomailMessagesTable(schemaName, tableName, alias string) *DiplomailMessagesTable {
	return &DiplomailMessagesTable{
		diplomailMessagesTable: newDiplomailMessagesTableImpl(schemaName, tableName, alias),
		EXCLUDED:               newDiplomailMessagesTableImpl("", "excluded", ""),
	}
}

func newDiplomailMessagesTableImpl(schemaName, tableName, alias string) diplomailMessagesTable {
	var (
		MessageIDColumn      = postgres.StringColumn("message_id")
		GameIDColumn         = postgres.StringColumn("game_id")
		GameNameColumn       = postgres.StringColumn("game_name")
		KindColumn           = postgres.StringColumn("kind")
		SenderKindColumn     = postgres.StringColumn("sender_kind")
		SenderUserIDColumn   = postgres.StringColumn("sender_user_id")
		SenderUsernameColumn = postgres.StringColumn("sender_username")
		SenderIPColumn       = postgres.StringColumn("sender_ip")
		SubjectColumn        = postgres.StringColumn("subject")
		BodyColumn           = postgres.StringColumn("body")
		BodyLangColumn       = postgres.StringColumn("body_lang")
		BroadcastScopeColumn = postgres.StringColumn("broadcast_scope")
		CreatedAtColumn      = postgres.TimestampzColumn("created_at")
		allColumns           = postgres.ColumnList{MessageIDColumn, GameIDColumn, GameNameColumn, KindColumn, SenderKindColumn, SenderUserIDColumn, SenderUsernameColumn, SenderIPColumn, SubjectColumn, BodyColumn, BodyLangColumn, BroadcastScopeColumn, CreatedAtColumn}
		mutableColumns       = postgres.ColumnList{GameIDColumn, GameNameColumn, KindColumn, SenderKindColumn, SenderUserIDColumn, SenderUsernameColumn, SenderIPColumn, SubjectColumn, BodyColumn, BodyLangColumn, BroadcastScopeColumn, CreatedAtColumn}
		defaultColumns       = postgres.ColumnList{SenderIPColumn, SubjectColumn, BodyLangColumn, BroadcastScopeColumn, CreatedAtColumn}
	)

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

		//Columns
		MessageID:      MessageIDColumn,
		GameID:         GameIDColumn,
		GameName:       GameNameColumn,
		Kind:           KindColumn,
		SenderKind:     SenderKindColumn,
		SenderUserID:   SenderUserIDColumn,
		SenderUsername: SenderUsernameColumn,
		SenderIP:       SenderIPColumn,
		Subject:        SubjectColumn,
		Body:           BodyColumn,
		BodyLang:       BodyLangColumn,
		BroadcastScope: BroadcastScopeColumn,
		CreatedAt:      CreatedAtColumn,

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