//
// 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 ProductPrice = newProductPriceTable("payments", "product_price", "")

type productPriceTable struct {
	postgres.Table

	// Columns
	ProductID postgres.ColumnString
	Method    postgres.ColumnString
	Currency  postgres.ColumnString
	Amount    postgres.ColumnInteger

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

type ProductPriceTable struct {
	productPriceTable

	EXCLUDED productPriceTable
}

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

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

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

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

func newProductPriceTable(schemaName, tableName, alias string) *ProductPriceTable {
	return &ProductPriceTable{
		productPriceTable: newProductPriceTableImpl(schemaName, tableName, alias),
		EXCLUDED:          newProductPriceTableImpl("", "excluded", ""),
	}
}

func newProductPriceTableImpl(schemaName, tableName, alias string) productPriceTable {
	var (
		ProductIDColumn = postgres.StringColumn("product_id")
		MethodColumn    = postgres.StringColumn("method")
		CurrencyColumn  = postgres.StringColumn("currency")
		AmountColumn    = postgres.IntegerColumn("amount")
		allColumns      = postgres.ColumnList{ProductIDColumn, MethodColumn, CurrencyColumn, AmountColumn}
		mutableColumns  = postgres.ColumnList{ProductIDColumn, MethodColumn, CurrencyColumn, AmountColumn}
		defaultColumns  = postgres.ColumnList{}
	)

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

		//Columns
		ProductID: ProductIDColumn,
		Method:    MethodColumn,
		Currency:  CurrencyColumn,
		Amount:    AmountColumn,

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