//
// 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 TestlibInteractors = newTestlibInteractorsTable("public", "testlib_interactors", "")

type testlibInteractorsTable struct {
	postgres.Table

	// Columns
	ID   postgres.ColumnInteger
	Code postgres.ColumnString

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
}

type TestlibInteractorsTable struct {
	testlibInteractorsTable

	EXCLUDED testlibInteractorsTable
}

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

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

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

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

func newTestlibInteractorsTable(schemaName, tableName, alias string) *TestlibInteractorsTable {
	return &TestlibInteractorsTable{
		testlibInteractorsTable: newTestlibInteractorsTableImpl(schemaName, tableName, alias),
		EXCLUDED:                newTestlibInteractorsTableImpl("", "excluded", ""),
	}
}

func newTestlibInteractorsTableImpl(schemaName, tableName, alias string) testlibInteractorsTable {
	var (
		IDColumn       = postgres.IntegerColumn("id")
		CodeColumn     = postgres.StringColumn("code")
		allColumns     = postgres.ColumnList{IDColumn, CodeColumn}
		mutableColumns = postgres.ColumnList{CodeColumn}
	)

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

		//Columns
		ID:   IDColumn,
		Code: CodeColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
	}
}
