//
// 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 AccountSuspensions = newAccountSuspensionsTable("backend", "account_suspensions", "")

type accountSuspensionsTable struct {
	postgres.Table

	// Columns
	SuspensionID postgres.ColumnString
	AccountID    postgres.ColumnString
	BlockedAt    postgres.ColumnTimestampz
	BlockedUntil postgres.ColumnTimestampz
	ReasonEn     postgres.ColumnString
	ReasonRu     postgres.ColumnString
	ReasonID     postgres.ColumnString
	LiftedAt     postgres.ColumnTimestampz

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

type AccountSuspensionsTable struct {
	accountSuspensionsTable

	EXCLUDED accountSuspensionsTable
}

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

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

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

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

func newAccountSuspensionsTable(schemaName, tableName, alias string) *AccountSuspensionsTable {
	return &AccountSuspensionsTable{
		accountSuspensionsTable: newAccountSuspensionsTableImpl(schemaName, tableName, alias),
		EXCLUDED:                newAccountSuspensionsTableImpl("", "excluded", ""),
	}
}

func newAccountSuspensionsTableImpl(schemaName, tableName, alias string) accountSuspensionsTable {
	var (
		SuspensionIDColumn = postgres.StringColumn("suspension_id")
		AccountIDColumn    = postgres.StringColumn("account_id")
		BlockedAtColumn    = postgres.TimestampzColumn("blocked_at")
		BlockedUntilColumn = postgres.TimestampzColumn("blocked_until")
		ReasonEnColumn     = postgres.StringColumn("reason_en")
		ReasonRuColumn     = postgres.StringColumn("reason_ru")
		ReasonIDColumn     = postgres.StringColumn("reason_id")
		LiftedAtColumn     = postgres.TimestampzColumn("lifted_at")
		allColumns         = postgres.ColumnList{SuspensionIDColumn, AccountIDColumn, BlockedAtColumn, BlockedUntilColumn, ReasonEnColumn, ReasonRuColumn, ReasonIDColumn, LiftedAtColumn}
		mutableColumns     = postgres.ColumnList{AccountIDColumn, BlockedAtColumn, BlockedUntilColumn, ReasonEnColumn, ReasonRuColumn, ReasonIDColumn, LiftedAtColumn}
		defaultColumns     = postgres.ColumnList{BlockedAtColumn}
	)

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

		//Columns
		SuspensionID: SuspensionIDColumn,
		AccountID:    AccountIDColumn,
		BlockedAt:    BlockedAtColumn,
		BlockedUntil: BlockedUntilColumn,
		ReasonEn:     ReasonEnColumn,
		ReasonRu:     ReasonRuColumn,
		ReasonID:     ReasonIDColumn,
		LiftedAt:     LiftedAtColumn,

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