//
// 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 TestingTypes = newTestingTypesTable("public", "testing_types", "")

type testingTypesTable struct {
	postgres.Table

	// Columns
	ID            postgres.ColumnString
	DescriptionEn postgres.ColumnString

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
}

type TestingTypesTable struct {
	testingTypesTable

	EXCLUDED testingTypesTable
}

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

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

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

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

func newTestingTypesTable(schemaName, tableName, alias string) *TestingTypesTable {
	return &TestingTypesTable{
		testingTypesTable: newTestingTypesTableImpl(schemaName, tableName, alias),
		EXCLUDED:          newTestingTypesTableImpl("", "excluded", ""),
	}
}

func newTestingTypesTableImpl(schemaName, tableName, alias string) testingTypesTable {
	var (
		IDColumn            = postgres.StringColumn("id")
		DescriptionEnColumn = postgres.StringColumn("description_en")
		allColumns          = postgres.ColumnList{IDColumn, DescriptionEnColumn}
		mutableColumns      = postgres.ColumnList{DescriptionEnColumn}
	)

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

		//Columns
		ID:            IDColumn,
		DescriptionEn: DescriptionEnColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
	}
}
