//
// 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 DiplomailTranslations = newDiplomailTranslationsTable("backend", "diplomail_translations", "")

type diplomailTranslationsTable struct {
	postgres.Table

	// Columns
	TranslationID     postgres.ColumnString
	MessageID         postgres.ColumnString
	TargetLang        postgres.ColumnString
	TranslatedSubject postgres.ColumnString
	TranslatedBody    postgres.ColumnString
	Translator        postgres.ColumnString
	TranslatedAt      postgres.ColumnTimestampz

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
	DefaultColumns postgres.ColumnList
}

type DiplomailTranslationsTable struct {
	diplomailTranslationsTable

	EXCLUDED diplomailTranslationsTable
}

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

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

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

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

func newDiplomailTranslationsTable(schemaName, tableName, alias string) *DiplomailTranslationsTable {
	return &DiplomailTranslationsTable{
		diplomailTranslationsTable: newDiplomailTranslationsTableImpl(schemaName, tableName, alias),
		EXCLUDED:                   newDiplomailTranslationsTableImpl("", "excluded", ""),
	}
}

func newDiplomailTranslationsTableImpl(schemaName, tableName, alias string) diplomailTranslationsTable {
	var (
		TranslationIDColumn     = postgres.StringColumn("translation_id")
		MessageIDColumn         = postgres.StringColumn("message_id")
		TargetLangColumn        = postgres.StringColumn("target_lang")
		TranslatedSubjectColumn = postgres.StringColumn("translated_subject")
		TranslatedBodyColumn    = postgres.StringColumn("translated_body")
		TranslatorColumn        = postgres.StringColumn("translator")
		TranslatedAtColumn      = postgres.TimestampzColumn("translated_at")
		allColumns              = postgres.ColumnList{TranslationIDColumn, MessageIDColumn, TargetLangColumn, TranslatedSubjectColumn, TranslatedBodyColumn, TranslatorColumn, TranslatedAtColumn}
		mutableColumns          = postgres.ColumnList{MessageIDColumn, TargetLangColumn, TranslatedSubjectColumn, TranslatedBodyColumn, TranslatorColumn, TranslatedAtColumn}
		defaultColumns          = postgres.ColumnList{TranslatedSubjectColumn, TranslatedAtColumn}
	)

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

		//Columns
		TranslationID:     TranslationIDColumn,
		MessageID:         MessageIDColumn,
		TargetLang:        TargetLangColumn,
		TranslatedSubject: TranslatedSubjectColumn,
		TranslatedBody:    TranslatedBodyColumn,
		Translator:        TranslatorColumn,
		TranslatedAt:      TranslatedAtColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
		DefaultColumns: defaultColumns,
	}
}
