//
// 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 ProblemTags = newProblemTagsTable("public", "problem_tags", "")

type problemTagsTable struct {
	postgres.Table

	// Columns
	ID            postgres.ColumnString
	CreatedAt     postgres.ColumnTimestampz
	UpdatedAt     postgres.ColumnTimestampz
	ColorRgbHex   postgres.ColumnString
	DescriptionLv postgres.ColumnString

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
}

type ProblemTagsTable struct {
	problemTagsTable

	EXCLUDED problemTagsTable
}

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

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

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

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

func newProblemTagsTable(schemaName, tableName, alias string) *ProblemTagsTable {
	return &ProblemTagsTable{
		problemTagsTable: newProblemTagsTableImpl(schemaName, tableName, alias),
		EXCLUDED:         newProblemTagsTableImpl("", "excluded", ""),
	}
}

func newProblemTagsTableImpl(schemaName, tableName, alias string) problemTagsTable {
	var (
		IDColumn            = postgres.StringColumn("id")
		CreatedAtColumn     = postgres.TimestampzColumn("created_at")
		UpdatedAtColumn     = postgres.TimestampzColumn("updated_at")
		ColorRgbHexColumn   = postgres.StringColumn("color_rgb_hex")
		DescriptionLvColumn = postgres.StringColumn("description_lv")
		allColumns          = postgres.ColumnList{IDColumn, CreatedAtColumn, UpdatedAtColumn, ColorRgbHexColumn, DescriptionLvColumn}
		mutableColumns      = postgres.ColumnList{CreatedAtColumn, UpdatedAtColumn, ColorRgbHexColumn, DescriptionLvColumn}
	)

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

		//Columns
		ID:            IDColumn,
		CreatedAt:     CreatedAtColumn,
		UpdatedAt:     UpdatedAtColumn,
		ColorRgbHex:   ColorRgbHexColumn,
		DescriptionLv: DescriptionLvColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
	}
}
