//
// 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/Gleipnir-Technology/jet/postgres"
)

var NuisanceImageOld = newNuisanceImageOldTable("publicreport", "nuisance_image_old", "")

type nuisanceImageOldTable struct {
	postgres.Table

	// Columns
	ImageID    postgres.ColumnInteger
	NuisanceID postgres.ColumnInteger

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

type NuisanceImageOldTable struct {
	nuisanceImageOldTable

	EXCLUDED nuisanceImageOldTable
}

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

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

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

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

func newNuisanceImageOldTable(schemaName, tableName, alias string) *NuisanceImageOldTable {
	return &NuisanceImageOldTable{
		nuisanceImageOldTable: newNuisanceImageOldTableImpl(schemaName, tableName, alias),
		EXCLUDED:              newNuisanceImageOldTableImpl("", "excluded", ""),
	}
}

func newNuisanceImageOldTableImpl(schemaName, tableName, alias string) nuisanceImageOldTable {
	var (
		ImageIDColumn    = postgres.IntegerColumn("image_id")
		NuisanceIDColumn = postgres.IntegerColumn("nuisance_id")
		allColumns       = postgres.ColumnList{ImageIDColumn, NuisanceIDColumn}
		mutableColumns   = postgres.ColumnList{}
		defaultColumns   = postgres.ColumnList{}
	)

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

		//Columns
		ImageID:    ImageIDColumn,
		NuisanceID: NuisanceIDColumn,

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