//
// 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 FieldseekerSync = newFieldseekerSyncTable("public", "fieldseeker_sync", "")

type fieldseekerSyncTable struct {
	postgres.Table

	// Columns
	ID               postgres.ColumnInteger
	Created          postgres.ColumnTimestamp
	RecordsCreated   postgres.ColumnInteger
	RecordsUpdated   postgres.ColumnInteger
	RecordsUnchanged postgres.ColumnInteger
	OrganizationID   postgres.ColumnInteger

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

type FieldseekerSyncTable struct {
	fieldseekerSyncTable

	EXCLUDED fieldseekerSyncTable
}

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

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

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

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

func newFieldseekerSyncTable(schemaName, tableName, alias string) *FieldseekerSyncTable {
	return &FieldseekerSyncTable{
		fieldseekerSyncTable: newFieldseekerSyncTableImpl(schemaName, tableName, alias),
		EXCLUDED:             newFieldseekerSyncTableImpl("", "excluded", ""),
	}
}

func newFieldseekerSyncTableImpl(schemaName, tableName, alias string) fieldseekerSyncTable {
	var (
		IDColumn               = postgres.IntegerColumn("id")
		CreatedColumn          = postgres.TimestampColumn("created")
		RecordsCreatedColumn   = postgres.IntegerColumn("records_created")
		RecordsUpdatedColumn   = postgres.IntegerColumn("records_updated")
		RecordsUnchangedColumn = postgres.IntegerColumn("records_unchanged")
		OrganizationIDColumn   = postgres.IntegerColumn("organization_id")
		allColumns             = postgres.ColumnList{IDColumn, CreatedColumn, RecordsCreatedColumn, RecordsUpdatedColumn, RecordsUnchangedColumn, OrganizationIDColumn}
		mutableColumns         = postgres.ColumnList{CreatedColumn, RecordsCreatedColumn, RecordsUpdatedColumn, RecordsUnchangedColumn, OrganizationIDColumn}
		defaultColumns         = postgres.ColumnList{IDColumn, CreatedColumn}
	)

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

		//Columns
		ID:               IDColumn,
		Created:          CreatedColumn,
		RecordsCreated:   RecordsCreatedColumn,
		RecordsUpdated:   RecordsUpdatedColumn,
		RecordsUnchanged: RecordsUnchangedColumn,
		OrganizationID:   OrganizationIDColumn,

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