//
// 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 WaterImageOld = newWaterImageOldTable("publicreport", "water_image_old", "")

type waterImageOldTable struct {
	postgres.Table

	// Columns
	ImageID postgres.ColumnInteger
	WaterID postgres.ColumnInteger

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

type WaterImageOldTable struct {
	waterImageOldTable

	EXCLUDED waterImageOldTable
}

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

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

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

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

func newWaterImageOldTable(schemaName, tableName, alias string) *WaterImageOldTable {
	return &WaterImageOldTable{
		waterImageOldTable: newWaterImageOldTableImpl(schemaName, tableName, alias),
		EXCLUDED:           newWaterImageOldTableImpl("", "excluded", ""),
	}
}

func newWaterImageOldTableImpl(schemaName, tableName, alias string) waterImageOldTable {
	var (
		ImageIDColumn  = postgres.IntegerColumn("image_id")
		WaterIDColumn  = postgres.IntegerColumn("water_id")
		allColumns     = postgres.ColumnList{ImageIDColumn, WaterIDColumn}
		mutableColumns = postgres.ColumnList{}
		defaultColumns = postgres.ColumnList{}
	)

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

		//Columns
		ImageID: ImageIDColumn,
		WaterID: WaterIDColumn,

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