//
// 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 NoteImageData = newNoteImageDataTable("public", "note_image_data", "")

type noteImageDataTable struct {
	postgres.Table

	// Columns
	Created          postgres.ColumnTimestamp
	NoteImageVersion postgres.ColumnInteger
	NoteImageUUID    postgres.ColumnString
	Type             postgres.ColumnString

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

type NoteImageDataTable struct {
	noteImageDataTable

	EXCLUDED noteImageDataTable
}

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

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

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

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

func newNoteImageDataTable(schemaName, tableName, alias string) *NoteImageDataTable {
	return &NoteImageDataTable{
		noteImageDataTable: newNoteImageDataTableImpl(schemaName, tableName, alias),
		EXCLUDED:           newNoteImageDataTableImpl("", "excluded", ""),
	}
}

func newNoteImageDataTableImpl(schemaName, tableName, alias string) noteImageDataTable {
	var (
		CreatedColumn          = postgres.TimestampColumn("created")
		NoteImageVersionColumn = postgres.IntegerColumn("note_image_version")
		NoteImageUUIDColumn    = postgres.StringColumn("note_image_uuid")
		TypeColumn             = postgres.StringColumn("type_")
		allColumns             = postgres.ColumnList{CreatedColumn, NoteImageVersionColumn, NoteImageUUIDColumn, TypeColumn}
		mutableColumns         = postgres.ColumnList{CreatedColumn}
		defaultColumns         = postgres.ColumnList{}
	)

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

		//Columns
		Created:          CreatedColumn,
		NoteImageVersion: NoteImageVersionColumn,
		NoteImageUUID:    NoteImageUUIDColumn,
		Type:             TypeColumn,

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