//
// 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 MarkdownStatements = newMarkdownStatementsTable("public", "markdown_statements", "")

type markdownStatementsTable struct {
	postgres.Table

	// Columns
	ID            postgres.ColumnInteger
	Story         postgres.ColumnString
	Input         postgres.ColumnString
	Output        postgres.ColumnString
	Notes         postgres.ColumnString
	Scoring       postgres.ColumnString
	TaskVersionID postgres.ColumnInteger
	LangIso6391   postgres.ColumnString

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
}

type MarkdownStatementsTable struct {
	markdownStatementsTable

	EXCLUDED markdownStatementsTable
}

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

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

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

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

func newMarkdownStatementsTable(schemaName, tableName, alias string) *MarkdownStatementsTable {
	return &MarkdownStatementsTable{
		markdownStatementsTable: newMarkdownStatementsTableImpl(schemaName, tableName, alias),
		EXCLUDED:                newMarkdownStatementsTableImpl("", "excluded", ""),
	}
}

func newMarkdownStatementsTableImpl(schemaName, tableName, alias string) markdownStatementsTable {
	var (
		IDColumn            = postgres.IntegerColumn("id")
		StoryColumn         = postgres.StringColumn("story")
		InputColumn         = postgres.StringColumn("input")
		OutputColumn        = postgres.StringColumn("output")
		NotesColumn         = postgres.StringColumn("notes")
		ScoringColumn       = postgres.StringColumn("scoring")
		TaskVersionIDColumn = postgres.IntegerColumn("task_version_id")
		LangIso6391Column   = postgres.StringColumn("lang_iso639_1")
		allColumns          = postgres.ColumnList{IDColumn, StoryColumn, InputColumn, OutputColumn, NotesColumn, ScoringColumn, TaskVersionIDColumn, LangIso6391Column}
		mutableColumns      = postgres.ColumnList{StoryColumn, InputColumn, OutputColumn, NotesColumn, ScoringColumn, TaskVersionIDColumn, LangIso6391Column}
	)

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

		//Columns
		ID:            IDColumn,
		Story:         StoryColumn,
		Input:         InputColumn,
		Output:        OutputColumn,
		Notes:         NotesColumn,
		Scoring:       ScoringColumn,
		TaskVersionID: TaskVersionIDColumn,
		LangIso6391:   LangIso6391Column,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
	}
}
