//
// 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 ProgrammingLanguages = newProgrammingLanguagesTable("public", "programming_languages", "")

type programmingLanguagesTable struct {
	postgres.Table

	// Columns
	ID               postgres.ColumnString
	FullName         postgres.ColumnString
	CodeFilename     postgres.ColumnString
	CompileCmd       postgres.ColumnString
	ExecuteCmd       postgres.ColumnString
	EnvVersionCmd    postgres.ColumnString
	HelloWorldCode   postgres.ColumnString
	MonacoID         postgres.ColumnString
	CompiledFilename postgres.ColumnString
	Enabled          postgres.ColumnBool

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
}

type ProgrammingLanguagesTable struct {
	programmingLanguagesTable

	EXCLUDED programmingLanguagesTable
}

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

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

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

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

func newProgrammingLanguagesTable(schemaName, tableName, alias string) *ProgrammingLanguagesTable {
	return &ProgrammingLanguagesTable{
		programmingLanguagesTable: newProgrammingLanguagesTableImpl(schemaName, tableName, alias),
		EXCLUDED:                  newProgrammingLanguagesTableImpl("", "excluded", ""),
	}
}

func newProgrammingLanguagesTableImpl(schemaName, tableName, alias string) programmingLanguagesTable {
	var (
		IDColumn               = postgres.StringColumn("id")
		FullNameColumn         = postgres.StringColumn("full_name")
		CodeFilenameColumn     = postgres.StringColumn("code_filename")
		CompileCmdColumn       = postgres.StringColumn("compile_cmd")
		ExecuteCmdColumn       = postgres.StringColumn("execute_cmd")
		EnvVersionCmdColumn    = postgres.StringColumn("env_version_cmd")
		HelloWorldCodeColumn   = postgres.StringColumn("hello_world_code")
		MonacoIDColumn         = postgres.StringColumn("monaco_id")
		CompiledFilenameColumn = postgres.StringColumn("compiled_filename")
		EnabledColumn          = postgres.BoolColumn("enabled")
		allColumns             = postgres.ColumnList{IDColumn, FullNameColumn, CodeFilenameColumn, CompileCmdColumn, ExecuteCmdColumn, EnvVersionCmdColumn, HelloWorldCodeColumn, MonacoIDColumn, CompiledFilenameColumn, EnabledColumn}
		mutableColumns         = postgres.ColumnList{FullNameColumn, CodeFilenameColumn, CompileCmdColumn, ExecuteCmdColumn, EnvVersionCmdColumn, HelloWorldCodeColumn, MonacoIDColumn, CompiledFilenameColumn, EnabledColumn}
	)

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

		//Columns
		ID:               IDColumn,
		FullName:         FullNameColumn,
		CodeFilename:     CodeFilenameColumn,
		CompileCmd:       CompileCmdColumn,
		ExecuteCmd:       ExecuteCmdColumn,
		EnvVersionCmd:    EnvVersionCmdColumn,
		HelloWorldCode:   HelloWorldCodeColumn,
		MonacoID:         MonacoIDColumn,
		CompiledFilename: CompiledFilenameColumn,
		Enabled:          EnabledColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
	}
}
