//
// 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/go-jet/jet/v2/postgres"
)

var UserImagesToProcess = newUserImagesToProcessTable("haystack", "user_images_to_process", "")

type userImagesToProcessTable struct {
	postgres.Table

	// Columns
	ID      postgres.ColumnString
	Status  postgres.ColumnString
	ImageID postgres.ColumnString
	UserID  postgres.ColumnString

	AllColumns     postgres.ColumnList
	MutableColumns postgres.ColumnList
}

type UserImagesToProcessTable struct {
	userImagesToProcessTable

	EXCLUDED userImagesToProcessTable
}

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

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

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

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

func newUserImagesToProcessTable(schemaName, tableName, alias string) *UserImagesToProcessTable {
	return &UserImagesToProcessTable{
		userImagesToProcessTable: newUserImagesToProcessTableImpl(schemaName, tableName, alias),
		EXCLUDED:                 newUserImagesToProcessTableImpl("", "excluded", ""),
	}
}

func newUserImagesToProcessTableImpl(schemaName, tableName, alias string) userImagesToProcessTable {
	var (
		IDColumn       = postgres.StringColumn("id")
		StatusColumn   = postgres.StringColumn("status")
		ImageIDColumn  = postgres.StringColumn("image_id")
		UserIDColumn   = postgres.StringColumn("user_id")
		allColumns     = postgres.ColumnList{IDColumn, StatusColumn, ImageIDColumn, UserIDColumn}
		mutableColumns = postgres.ColumnList{StatusColumn, ImageIDColumn, UserIDColumn}
	)

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

		//Columns
		ID:      IDColumn,
		Status:  StatusColumn,
		ImageID: ImageIDColumn,
		UserID:  UserIDColumn,

		AllColumns:     allColumns,
		MutableColumns: mutableColumns,
	}
}
