//
// 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 Account = newAccountTable("arcgis", "account", "")

type accountTable struct {
	postgres.Table

	// Columns
	ID             postgres.ColumnString
	Name           postgres.ColumnString
	OrganizationID postgres.ColumnInteger
	URLFeatures    postgres.ColumnString
	URLInsights    postgres.ColumnString
	URLGeometry    postgres.ColumnString
	URLNotebooks   postgres.ColumnString
	URLTiles       postgres.ColumnString

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

type AccountTable struct {
	accountTable

	EXCLUDED accountTable
}

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

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

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

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

func newAccountTable(schemaName, tableName, alias string) *AccountTable {
	return &AccountTable{
		accountTable: newAccountTableImpl(schemaName, tableName, alias),
		EXCLUDED:     newAccountTableImpl("", "excluded", ""),
	}
}

func newAccountTableImpl(schemaName, tableName, alias string) accountTable {
	var (
		IDColumn             = postgres.StringColumn("id")
		NameColumn           = postgres.StringColumn("name")
		OrganizationIDColumn = postgres.IntegerColumn("organization_id")
		URLFeaturesColumn    = postgres.StringColumn("url_features")
		URLInsightsColumn    = postgres.StringColumn("url_insights")
		URLGeometryColumn    = postgres.StringColumn("url_geometry")
		URLNotebooksColumn   = postgres.StringColumn("url_notebooks")
		URLTilesColumn       = postgres.StringColumn("url_tiles")
		allColumns           = postgres.ColumnList{IDColumn, NameColumn, OrganizationIDColumn, URLFeaturesColumn, URLInsightsColumn, URLGeometryColumn, URLNotebooksColumn, URLTilesColumn}
		mutableColumns       = postgres.ColumnList{NameColumn, OrganizationIDColumn, URLFeaturesColumn, URLInsightsColumn, URLGeometryColumn, URLNotebooksColumn, URLTilesColumn}
		defaultColumns       = postgres.ColumnList{}
	)

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

		//Columns
		ID:             IDColumn,
		Name:           NameColumn,
		OrganizationID: OrganizationIDColumn,
		URLFeatures:    URLFeaturesColumn,
		URLInsights:    URLInsightsColumn,
		URLGeometry:    URLGeometryColumn,
		URLNotebooks:   URLNotebooksColumn,
		URLTiles:       URLTilesColumn,

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