//
// 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 SubmissionEvaluations = newSubmissionEvaluationsTable("public", "submission_evaluations", "")

type submissionEvaluationsTable struct {
	postgres.Table

	// Columns
	ID           postgres.ColumnInteger
	SubmissionID postgres.ColumnInteger
	EvaluationID postgres.ColumnInteger

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
}

type SubmissionEvaluationsTable struct {
	submissionEvaluationsTable

	EXCLUDED submissionEvaluationsTable
}

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

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

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

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

func newSubmissionEvaluationsTable(schemaName, tableName, alias string) *SubmissionEvaluationsTable {
	return &SubmissionEvaluationsTable{
		submissionEvaluationsTable: newSubmissionEvaluationsTableImpl(schemaName, tableName, alias),
		EXCLUDED:                   newSubmissionEvaluationsTableImpl("", "excluded", ""),
	}
}

func newSubmissionEvaluationsTableImpl(schemaName, tableName, alias string) submissionEvaluationsTable {
	var (
		IDColumn           = postgres.IntegerColumn("id")
		SubmissionIDColumn = postgres.IntegerColumn("submission_id")
		EvaluationIDColumn = postgres.IntegerColumn("evaluation_id")
		allColumns         = postgres.ColumnList{IDColumn, SubmissionIDColumn, EvaluationIDColumn}
		mutableColumns     = postgres.ColumnList{SubmissionIDColumn, EvaluationIDColumn}
	)

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

		//Columns
		ID:           IDColumn,
		SubmissionID: SubmissionIDColumn,
		EvaluationID: EvaluationIDColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
	}
}
