//
// 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 TaskVersionTests = newTaskVersionTestsTable("public", "task_version_tests", "")

type taskVersionTestsTable struct {
	postgres.Table

	// Columns
	ID               postgres.ColumnInteger
	TestFilename     postgres.ColumnString
	TaskVersionID    postgres.ColumnInteger
	InputTextFileID  postgres.ColumnInteger
	AnswerTextFileID postgres.ColumnInteger

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
}

type TaskVersionTestsTable struct {
	taskVersionTestsTable

	EXCLUDED taskVersionTestsTable
}

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

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

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

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

func newTaskVersionTestsTable(schemaName, tableName, alias string) *TaskVersionTestsTable {
	return &TaskVersionTestsTable{
		taskVersionTestsTable: newTaskVersionTestsTableImpl(schemaName, tableName, alias),
		EXCLUDED:              newTaskVersionTestsTableImpl("", "excluded", ""),
	}
}

func newTaskVersionTestsTableImpl(schemaName, tableName, alias string) taskVersionTestsTable {
	var (
		IDColumn               = postgres.IntegerColumn("id")
		TestFilenameColumn     = postgres.StringColumn("test_filename")
		TaskVersionIDColumn    = postgres.IntegerColumn("task_version_id")
		InputTextFileIDColumn  = postgres.IntegerColumn("input_text_file_id")
		AnswerTextFileIDColumn = postgres.IntegerColumn("answer_text_file_id")
		allColumns             = postgres.ColumnList{IDColumn, TestFilenameColumn, TaskVersionIDColumn, InputTextFileIDColumn, AnswerTextFileIDColumn}
		mutableColumns         = postgres.ColumnList{TestFilenameColumn, TaskVersionIDColumn, InputTextFileIDColumn, AnswerTextFileIDColumn}
	)

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

		//Columns
		ID:               IDColumn,
		TestFilename:     TestFilenameColumn,
		TaskVersionID:    TaskVersionIDColumn,
		InputTextFileID:  InputTextFileIDColumn,
		AnswerTextFileID: AnswerTextFileIDColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
	}
}
