//
// 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 Evaluations = newEvaluationsTable("public", "evaluations", "")

type evaluationsTable struct {
	postgres.Table

	// Columns
	ID                      postgres.ColumnInteger
	EvalStatusID            postgres.ColumnString
	EvalTotalScore          postgres.ColumnInteger
	EvalPossibleScore       postgres.ColumnInteger
	TestRuntimeStatisticsID postgres.ColumnInteger
	CompilationDataID       postgres.ColumnInteger
	CreatedAt               postgres.ColumnTimestampz
	TaskVersionID           postgres.ColumnInteger

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
}

type EvaluationsTable struct {
	evaluationsTable

	EXCLUDED evaluationsTable
}

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

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

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

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

func newEvaluationsTable(schemaName, tableName, alias string) *EvaluationsTable {
	return &EvaluationsTable{
		evaluationsTable: newEvaluationsTableImpl(schemaName, tableName, alias),
		EXCLUDED:         newEvaluationsTableImpl("", "excluded", ""),
	}
}

func newEvaluationsTableImpl(schemaName, tableName, alias string) evaluationsTable {
	var (
		IDColumn                      = postgres.IntegerColumn("id")
		EvalStatusIDColumn            = postgres.StringColumn("eval_status_id")
		EvalTotalScoreColumn          = postgres.IntegerColumn("eval_total_score")
		EvalPossibleScoreColumn       = postgres.IntegerColumn("eval_possible_score")
		TestRuntimeStatisticsIDColumn = postgres.IntegerColumn("test_runtime_statistics_id")
		CompilationDataIDColumn       = postgres.IntegerColumn("compilation_data_id")
		CreatedAtColumn               = postgres.TimestampzColumn("created_at")
		TaskVersionIDColumn           = postgres.IntegerColumn("task_version_id")
		allColumns                    = postgres.ColumnList{IDColumn, EvalStatusIDColumn, EvalTotalScoreColumn, EvalPossibleScoreColumn, TestRuntimeStatisticsIDColumn, CompilationDataIDColumn, CreatedAtColumn, TaskVersionIDColumn}
		mutableColumns                = postgres.ColumnList{EvalStatusIDColumn, EvalTotalScoreColumn, EvalPossibleScoreColumn, TestRuntimeStatisticsIDColumn, CompilationDataIDColumn, CreatedAtColumn, TaskVersionIDColumn}
	)

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

		//Columns
		ID:                      IDColumn,
		EvalStatusID:            EvalStatusIDColumn,
		EvalTotalScore:          EvalTotalScoreColumn,
		EvalPossibleScore:       EvalPossibleScoreColumn,
		TestRuntimeStatisticsID: TestRuntimeStatisticsIDColumn,
		CompilationDataID:       CompilationDataIDColumn,
		CreatedAt:               CreatedAtColumn,
		TaskVersionID:           TaskVersionIDColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
	}
}
