//
// 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 ImageExif = newImageExifTable("publicreport", "image_exif", "")

type imageExifTable struct {
	postgres.Table

	// Columns
	ImageID postgres.ColumnInteger
	Name    postgres.ColumnString
	Value   postgres.ColumnString

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

type ImageExifTable struct {
	imageExifTable

	EXCLUDED imageExifTable
}

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

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

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

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

func newImageExifTable(schemaName, tableName, alias string) *ImageExifTable {
	return &ImageExifTable{
		imageExifTable: newImageExifTableImpl(schemaName, tableName, alias),
		EXCLUDED:       newImageExifTableImpl("", "excluded", ""),
	}
}

func newImageExifTableImpl(schemaName, tableName, alias string) imageExifTable {
	var (
		ImageIDColumn  = postgres.IntegerColumn("image_id")
		NameColumn     = postgres.StringColumn("name")
		ValueColumn    = postgres.StringColumn("value")
		allColumns     = postgres.ColumnList{ImageIDColumn, NameColumn, ValueColumn}
		mutableColumns = postgres.ColumnList{}
		defaultColumns = postgres.ColumnList{}
	)

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

		//Columns
		ImageID: ImageIDColumn,
		Name:    NameColumn,
		Value:   ValueColumn,

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