//
// 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 Nuisance = newNuisanceTable("publicreport", "nuisance", "")

type nuisanceTable struct {
	postgres.Table

	// Columns
	AdditionalInfo      postgres.ColumnString
	Duration            postgres.ColumnString
	IsLocationBackyard  postgres.ColumnBool
	IsLocationFrontyard postgres.ColumnBool
	IsLocationGarden    postgres.ColumnBool
	IsLocationOther     postgres.ColumnBool
	IsLocationPool      postgres.ColumnBool
	ReportID            postgres.ColumnInteger
	SourceContainer     postgres.ColumnBool
	SourceDescription   postgres.ColumnString
	SourceStagnant      postgres.ColumnBool
	SourceGutter        postgres.ColumnBool
	TodEarly            postgres.ColumnBool
	TodDay              postgres.ColumnBool
	TodEvening          postgres.ColumnBool
	TodNight            postgres.ColumnBool

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

type NuisanceTable struct {
	nuisanceTable

	EXCLUDED nuisanceTable
}

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

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

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

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

func newNuisanceTable(schemaName, tableName, alias string) *NuisanceTable {
	return &NuisanceTable{
		nuisanceTable: newNuisanceTableImpl(schemaName, tableName, alias),
		EXCLUDED:      newNuisanceTableImpl("", "excluded", ""),
	}
}

func newNuisanceTableImpl(schemaName, tableName, alias string) nuisanceTable {
	var (
		AdditionalInfoColumn      = postgres.StringColumn("additional_info")
		DurationColumn            = postgres.StringColumn("duration")
		IsLocationBackyardColumn  = postgres.BoolColumn("is_location_backyard")
		IsLocationFrontyardColumn = postgres.BoolColumn("is_location_frontyard")
		IsLocationGardenColumn    = postgres.BoolColumn("is_location_garden")
		IsLocationOtherColumn     = postgres.BoolColumn("is_location_other")
		IsLocationPoolColumn      = postgres.BoolColumn("is_location_pool")
		ReportIDColumn            = postgres.IntegerColumn("report_id")
		SourceContainerColumn     = postgres.BoolColumn("source_container")
		SourceDescriptionColumn   = postgres.StringColumn("source_description")
		SourceStagnantColumn      = postgres.BoolColumn("source_stagnant")
		SourceGutterColumn        = postgres.BoolColumn("source_gutter")
		TodEarlyColumn            = postgres.BoolColumn("tod_early")
		TodDayColumn              = postgres.BoolColumn("tod_day")
		TodEveningColumn          = postgres.BoolColumn("tod_evening")
		TodNightColumn            = postgres.BoolColumn("tod_night")
		allColumns                = postgres.ColumnList{AdditionalInfoColumn, DurationColumn, IsLocationBackyardColumn, IsLocationFrontyardColumn, IsLocationGardenColumn, IsLocationOtherColumn, IsLocationPoolColumn, ReportIDColumn, SourceContainerColumn, SourceDescriptionColumn, SourceStagnantColumn, SourceGutterColumn, TodEarlyColumn, TodDayColumn, TodEveningColumn, TodNightColumn}
		mutableColumns            = postgres.ColumnList{AdditionalInfoColumn, DurationColumn, IsLocationBackyardColumn, IsLocationFrontyardColumn, IsLocationGardenColumn, IsLocationOtherColumn, IsLocationPoolColumn, SourceContainerColumn, SourceDescriptionColumn, SourceStagnantColumn, SourceGutterColumn, TodEarlyColumn, TodDayColumn, TodEveningColumn, TodNightColumn}
		defaultColumns            = postgres.ColumnList{}
	)

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

		//Columns
		AdditionalInfo:      AdditionalInfoColumn,
		Duration:            DurationColumn,
		IsLocationBackyard:  IsLocationBackyardColumn,
		IsLocationFrontyard: IsLocationFrontyardColumn,
		IsLocationGarden:    IsLocationGardenColumn,
		IsLocationOther:     IsLocationOtherColumn,
		IsLocationPool:      IsLocationPoolColumn,
		ReportID:            ReportIDColumn,
		SourceContainer:     SourceContainerColumn,
		SourceDescription:   SourceDescriptionColumn,
		SourceStagnant:      SourceStagnantColumn,
		SourceGutter:        SourceGutterColumn,
		TodEarly:            TodEarlyColumn,
		TodDay:              TodDayColumn,
		TodEvening:          TodEveningColumn,
		TodNight:            TodNightColumn,

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