//
// 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 NoteAudioData = newNoteAudioDataTable("public", "note_audio_data", "")

type noteAudioDataTable struct {
	postgres.Table

	// Columns
	Created          postgres.ColumnTimestamp
	NoteAudioVersion postgres.ColumnInteger
	NoteAudioUUID    postgres.ColumnString
	Type             postgres.ColumnString

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

type NoteAudioDataTable struct {
	noteAudioDataTable

	EXCLUDED noteAudioDataTable
}

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

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

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

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

func newNoteAudioDataTable(schemaName, tableName, alias string) *NoteAudioDataTable {
	return &NoteAudioDataTable{
		noteAudioDataTable: newNoteAudioDataTableImpl(schemaName, tableName, alias),
		EXCLUDED:           newNoteAudioDataTableImpl("", "excluded", ""),
	}
}

func newNoteAudioDataTableImpl(schemaName, tableName, alias string) noteAudioDataTable {
	var (
		CreatedColumn          = postgres.TimestampColumn("created")
		NoteAudioVersionColumn = postgres.IntegerColumn("note_audio_version")
		NoteAudioUUIDColumn    = postgres.StringColumn("note_audio_uuid")
		TypeColumn             = postgres.StringColumn("type_")
		allColumns             = postgres.ColumnList{CreatedColumn, NoteAudioVersionColumn, NoteAudioUUIDColumn, TypeColumn}
		mutableColumns         = postgres.ColumnList{CreatedColumn}
		defaultColumns         = postgres.ColumnList{}
	)

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

		//Columns
		Created:          CreatedColumn,
		NoteAudioVersion: NoteAudioVersionColumn,
		NoteAudioUUID:    NoteAudioUUIDColumn,
		Type:             TypeColumn,

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