//
// 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 ReviewTaskPool = newReviewTaskPoolTable("public", "review_task_pool", "")

type reviewTaskPoolTable struct {
	postgres.Table

	// Columns
	FeaturePoolID postgres.ColumnInteger
	Location      postgres.ColumnGeometry
	Geometry      postgres.ColumnGeometry
	ReviewTaskID  postgres.ColumnInteger
	Condition     postgres.ColumnString

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

type ReviewTaskPoolTable struct {
	reviewTaskPoolTable

	EXCLUDED reviewTaskPoolTable
}

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

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

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

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

func newReviewTaskPoolTable(schemaName, tableName, alias string) *ReviewTaskPoolTable {
	return &ReviewTaskPoolTable{
		reviewTaskPoolTable: newReviewTaskPoolTableImpl(schemaName, tableName, alias),
		EXCLUDED:            newReviewTaskPoolTableImpl("", "excluded", ""),
	}
}

func newReviewTaskPoolTableImpl(schemaName, tableName, alias string) reviewTaskPoolTable {
	var (
		FeaturePoolIDColumn = postgres.IntegerColumn("feature_pool_id")
		LocationColumn      = postgres.GeometryColumn("location")
		GeometryColumn      = postgres.GeometryColumn("geometry")
		ReviewTaskIDColumn  = postgres.IntegerColumn("review_task_id")
		ConditionColumn     = postgres.StringColumn("condition")
		allColumns          = postgres.ColumnList{FeaturePoolIDColumn, LocationColumn, GeometryColumn, ReviewTaskIDColumn, ConditionColumn}
		mutableColumns      = postgres.ColumnList{FeaturePoolIDColumn, LocationColumn, GeometryColumn, ConditionColumn}
		defaultColumns      = postgres.ColumnList{}
	)

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

		//Columns
		FeaturePoolID: FeaturePoolIDColumn,
		Location:      LocationColumn,
		Geometry:      GeometryColumn,
		ReviewTaskID:  ReviewTaskIDColumn,
		Condition:     ConditionColumn,

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