//
// 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 NoteImage = newNoteImageTable("public", "note_image", "")

type noteImageTable struct {
	postgres.Table

	// Columns
	Created        postgres.ColumnTimestamp
	CreatorID      postgres.ColumnInteger
	Deleted        postgres.ColumnTimestamp
	DeletorID      postgres.ColumnInteger
	OrganizationID postgres.ColumnInteger
	Version        postgres.ColumnInteger
	UUID           postgres.ColumnString
	ID             postgres.ColumnInteger

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

type NoteImageTable struct {
	noteImageTable

	EXCLUDED noteImageTable
}

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

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

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

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

func newNoteImageTable(schemaName, tableName, alias string) *NoteImageTable {
	return &NoteImageTable{
		noteImageTable: newNoteImageTableImpl(schemaName, tableName, alias),
		EXCLUDED:       newNoteImageTableImpl("", "excluded", ""),
	}
}

func newNoteImageTableImpl(schemaName, tableName, alias string) noteImageTable {
	var (
		CreatedColumn        = postgres.TimestampColumn("created")
		CreatorIDColumn      = postgres.IntegerColumn("creator_id")
		DeletedColumn        = postgres.TimestampColumn("deleted")
		DeletorIDColumn      = postgres.IntegerColumn("deletor_id")
		OrganizationIDColumn = postgres.IntegerColumn("organization_id")
		VersionColumn        = postgres.IntegerColumn("version")
		UUIDColumn           = postgres.StringColumn("uuid")
		IDColumn             = postgres.IntegerColumn("id")
		allColumns           = postgres.ColumnList{CreatedColumn, CreatorIDColumn, DeletedColumn, DeletorIDColumn, OrganizationIDColumn, VersionColumn, UUIDColumn, IDColumn}
		mutableColumns       = postgres.ColumnList{CreatedColumn, CreatorIDColumn, DeletedColumn, DeletorIDColumn, OrganizationIDColumn, IDColumn}
		defaultColumns       = postgres.ColumnList{}
	)

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

		//Columns
		Created:        CreatedColumn,
		CreatorID:      CreatorIDColumn,
		Deleted:        DeletedColumn,
		DeletorID:      DeletorIDColumn,
		OrganizationID: OrganizationIDColumn,
		Version:        VersionColumn,
		UUID:           UUIDColumn,
		ID:             IDColumn,

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