//
// 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 DistrictSubscriptionEmail = newDistrictSubscriptionEmailTable("public", "district_subscription_email", "")

type districtSubscriptionEmailTable struct {
	postgres.Table

	// Columns
	OrganizationID      postgres.ColumnInteger
	EmailContactAddress postgres.ColumnString

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

type DistrictSubscriptionEmailTable struct {
	districtSubscriptionEmailTable

	EXCLUDED districtSubscriptionEmailTable
}

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

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

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

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

func newDistrictSubscriptionEmailTable(schemaName, tableName, alias string) *DistrictSubscriptionEmailTable {
	return &DistrictSubscriptionEmailTable{
		districtSubscriptionEmailTable: newDistrictSubscriptionEmailTableImpl(schemaName, tableName, alias),
		EXCLUDED:                       newDistrictSubscriptionEmailTableImpl("", "excluded", ""),
	}
}

func newDistrictSubscriptionEmailTableImpl(schemaName, tableName, alias string) districtSubscriptionEmailTable {
	var (
		OrganizationIDColumn      = postgres.IntegerColumn("organization_id")
		EmailContactAddressColumn = postgres.StringColumn("email_contact_address")
		allColumns                = postgres.ColumnList{OrganizationIDColumn, EmailContactAddressColumn}
		mutableColumns            = postgres.ColumnList{}
		defaultColumns            = postgres.ColumnList{}
	)

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

		//Columns
		OrganizationID:      OrganizationIDColumn,
		EmailContactAddress: EmailContactAddressColumn,

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