//
// 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 EvaluationTestResults = newEvaluationTestResultsTable("public", "evaluation_test_results", "")

type evaluationTestResultsTable struct {
	postgres.Table

	// Columns
	ID             postgres.ColumnInteger
	EvaluationID   postgres.ColumnInteger
	EvalStatusID   postgres.ColumnString
	TaskVTestID    postgres.ColumnInteger
	ExecRDataID    postgres.ColumnInteger
	CheckerRDataID postgres.ColumnInteger

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
}

type EvaluationTestResultsTable struct {
	evaluationTestResultsTable

	EXCLUDED evaluationTestResultsTable
}

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

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

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

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

func newEvaluationTestResultsTable(schemaName, tableName, alias string) *EvaluationTestResultsTable {
	return &EvaluationTestResultsTable{
		evaluationTestResultsTable: newEvaluationTestResultsTableImpl(schemaName, tableName, alias),
		EXCLUDED:                   newEvaluationTestResultsTableImpl("", "excluded", ""),
	}
}

func newEvaluationTestResultsTableImpl(schemaName, tableName, alias string) evaluationTestResultsTable {
	var (
		IDColumn             = postgres.IntegerColumn("id")
		EvaluationIDColumn   = postgres.IntegerColumn("evaluation_id")
		EvalStatusIDColumn   = postgres.StringColumn("eval_status_id")
		TaskVTestIDColumn    = postgres.IntegerColumn("task_v_test_id")
		ExecRDataIDColumn    = postgres.IntegerColumn("exec_r_data_id")
		CheckerRDataIDColumn = postgres.IntegerColumn("checker_r_data_id")
		allColumns           = postgres.ColumnList{IDColumn, EvaluationIDColumn, EvalStatusIDColumn, TaskVTestIDColumn, ExecRDataIDColumn, CheckerRDataIDColumn}
		mutableColumns       = postgres.ColumnList{EvaluationIDColumn, EvalStatusIDColumn, TaskVTestIDColumn, ExecRDataIDColumn, CheckerRDataIDColumn}
	)

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

		//Columns
		ID:             IDColumn,
		EvaluationID:   EvaluationIDColumn,
		EvalStatusID:   EvalStatusIDColumn,
		TaskVTestID:    TaskVTestIDColumn,
		ExecRDataID:    ExecRDataIDColumn,
		CheckerRDataID: CheckerRDataIDColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
	}
}
