//
// 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 NotifyPhoneNuisanceOld = newNotifyPhoneNuisanceOldTable("publicreport", "notify_phone_nuisance_old", "")

type notifyPhoneNuisanceOldTable struct {
	postgres.Table

	// Columns
	Created    postgres.ColumnTimestamp
	Deleted    postgres.ColumnTimestamp
	NuisanceID postgres.ColumnInteger
	PhoneE164  postgres.ColumnString

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

type NotifyPhoneNuisanceOldTable struct {
	notifyPhoneNuisanceOldTable

	EXCLUDED notifyPhoneNuisanceOldTable
}

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

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

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

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

func newNotifyPhoneNuisanceOldTable(schemaName, tableName, alias string) *NotifyPhoneNuisanceOldTable {
	return &NotifyPhoneNuisanceOldTable{
		notifyPhoneNuisanceOldTable: newNotifyPhoneNuisanceOldTableImpl(schemaName, tableName, alias),
		EXCLUDED:                    newNotifyPhoneNuisanceOldTableImpl("", "excluded", ""),
	}
}

func newNotifyPhoneNuisanceOldTableImpl(schemaName, tableName, alias string) notifyPhoneNuisanceOldTable {
	var (
		CreatedColumn    = postgres.TimestampColumn("created")
		DeletedColumn    = postgres.TimestampColumn("deleted")
		NuisanceIDColumn = postgres.IntegerColumn("nuisance_id")
		PhoneE164Column  = postgres.StringColumn("phone_e164")
		allColumns       = postgres.ColumnList{CreatedColumn, DeletedColumn, NuisanceIDColumn, PhoneE164Column}
		mutableColumns   = postgres.ColumnList{CreatedColumn, DeletedColumn}
		defaultColumns   = postgres.ColumnList{}
	)

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

		//Columns
		Created:    CreatedColumn,
		Deleted:    DeletedColumn,
		NuisanceID: NuisanceIDColumn,
		PhoneE164:  PhoneE164Column,

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