//
// 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 DistrictSubscriptionPhone = newDistrictSubscriptionPhoneTable("public", "district_subscription_phone", "")

type districtSubscriptionPhoneTable struct {
	postgres.Table

	// Columns
	OrganizationID postgres.ColumnInteger
	PhoneE164      postgres.ColumnString

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

type DistrictSubscriptionPhoneTable struct {
	districtSubscriptionPhoneTable

	EXCLUDED districtSubscriptionPhoneTable
}

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

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

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

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

func newDistrictSubscriptionPhoneTable(schemaName, tableName, alias string) *DistrictSubscriptionPhoneTable {
	return &DistrictSubscriptionPhoneTable{
		districtSubscriptionPhoneTable: newDistrictSubscriptionPhoneTableImpl(schemaName, tableName, alias),
		EXCLUDED:                       newDistrictSubscriptionPhoneTableImpl("", "excluded", ""),
	}
}

func newDistrictSubscriptionPhoneTableImpl(schemaName, tableName, alias string) districtSubscriptionPhoneTable {
	var (
		OrganizationIDColumn = postgres.IntegerColumn("organization_id")
		PhoneE164Column      = postgres.StringColumn("phone_e164")
		allColumns           = postgres.ColumnList{OrganizationIDColumn, PhoneE164Column}
		mutableColumns       = postgres.ColumnList{}
		defaultColumns       = postgres.ColumnList{}
	)

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

		//Columns
		OrganizationID: OrganizationIDColumn,
		PhoneE164:      PhoneE164Column,

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