//
// 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 NotifyPhoneWaterOld = newNotifyPhoneWaterOldTable("publicreport", "notify_phone_water_old", "")

type notifyPhoneWaterOldTable struct {
	postgres.Table

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

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

type NotifyPhoneWaterOldTable struct {
	notifyPhoneWaterOldTable

	EXCLUDED notifyPhoneWaterOldTable
}

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

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

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

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

func newNotifyPhoneWaterOldTable(schemaName, tableName, alias string) *NotifyPhoneWaterOldTable {
	return &NotifyPhoneWaterOldTable{
		notifyPhoneWaterOldTable: newNotifyPhoneWaterOldTableImpl(schemaName, tableName, alias),
		EXCLUDED:                 newNotifyPhoneWaterOldTableImpl("", "excluded", ""),
	}
}

func newNotifyPhoneWaterOldTableImpl(schemaName, tableName, alias string) notifyPhoneWaterOldTable {
	var (
		CreatedColumn   = postgres.TimestampColumn("created")
		DeletedColumn   = postgres.TimestampColumn("deleted")
		PhoneE164Column = postgres.StringColumn("phone_e164")
		WaterIDColumn   = postgres.IntegerColumn("water_id")
		allColumns      = postgres.ColumnList{CreatedColumn, DeletedColumn, PhoneE164Column, WaterIDColumn}
		mutableColumns  = postgres.ColumnList{CreatedColumn, DeletedColumn}
		defaultColumns  = postgres.ColumnList{}
	)

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

		//Columns
		Created:   CreatedColumn,
		Deleted:   DeletedColumn,
		PhoneE164: PhoneE164Column,
		WaterID:   WaterIDColumn,

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