//
// 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 SanctionActive = newSanctionActiveTable("backend", "sanction_active", "")

type sanctionActiveTable struct {
	postgres.Table

	// Columns
	UserID       postgres.ColumnString
	SanctionCode postgres.ColumnString
	RecordID     postgres.ColumnString

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

type SanctionActiveTable struct {
	sanctionActiveTable

	EXCLUDED sanctionActiveTable
}

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

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

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

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

func newSanctionActiveTable(schemaName, tableName, alias string) *SanctionActiveTable {
	return &SanctionActiveTable{
		sanctionActiveTable: newSanctionActiveTableImpl(schemaName, tableName, alias),
		EXCLUDED:            newSanctionActiveTableImpl("", "excluded", ""),
	}
}

func newSanctionActiveTableImpl(schemaName, tableName, alias string) sanctionActiveTable {
	var (
		UserIDColumn       = postgres.StringColumn("user_id")
		SanctionCodeColumn = postgres.StringColumn("sanction_code")
		RecordIDColumn     = postgres.StringColumn("record_id")
		allColumns         = postgres.ColumnList{UserIDColumn, SanctionCodeColumn, RecordIDColumn}
		mutableColumns     = postgres.ColumnList{RecordIDColumn}
		defaultColumns     = postgres.ColumnList{}
	)

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

		//Columns
		UserID:       UserIDColumn,
		SanctionCode: SanctionCodeColumn,
		RecordID:     RecordIDColumn,

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