//
// 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 NoteAudio = newNoteAudioTable("public", "note_audio", "")

type noteAudioTable struct {
	postgres.Table

	// Columns
	Created                 postgres.ColumnTimestamp
	CreatorID               postgres.ColumnInteger
	Deleted                 postgres.ColumnTimestamp
	DeletorID               postgres.ColumnInteger
	Duration                postgres.ColumnFloat
	OrganizationID          postgres.ColumnInteger
	Transcription           postgres.ColumnString
	TranscriptionUserEdited postgres.ColumnBool
	Version                 postgres.ColumnInteger
	UUID                    postgres.ColumnString
	ID                      postgres.ColumnInteger

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

type NoteAudioTable struct {
	noteAudioTable

	EXCLUDED noteAudioTable
}

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

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

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

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

func newNoteAudioTable(schemaName, tableName, alias string) *NoteAudioTable {
	return &NoteAudioTable{
		noteAudioTable: newNoteAudioTableImpl(schemaName, tableName, alias),
		EXCLUDED:       newNoteAudioTableImpl("", "excluded", ""),
	}
}

func newNoteAudioTableImpl(schemaName, tableName, alias string) noteAudioTable {
	var (
		CreatedColumn                 = postgres.TimestampColumn("created")
		CreatorIDColumn               = postgres.IntegerColumn("creator_id")
		DeletedColumn                 = postgres.TimestampColumn("deleted")
		DeletorIDColumn               = postgres.IntegerColumn("deletor_id")
		DurationColumn                = postgres.FloatColumn("duration")
		OrganizationIDColumn          = postgres.IntegerColumn("organization_id")
		TranscriptionColumn           = postgres.StringColumn("transcription")
		TranscriptionUserEditedColumn = postgres.BoolColumn("transcription_user_edited")
		VersionColumn                 = postgres.IntegerColumn("version")
		UUIDColumn                    = postgres.StringColumn("uuid")
		IDColumn                      = postgres.IntegerColumn("id")
		allColumns                    = postgres.ColumnList{CreatedColumn, CreatorIDColumn, DeletedColumn, DeletorIDColumn, DurationColumn, OrganizationIDColumn, TranscriptionColumn, TranscriptionUserEditedColumn, VersionColumn, UUIDColumn, IDColumn}
		mutableColumns                = postgres.ColumnList{CreatedColumn, CreatorIDColumn, DeletedColumn, DeletorIDColumn, DurationColumn, OrganizationIDColumn, TranscriptionColumn, TranscriptionUserEditedColumn, IDColumn}
		defaultColumns                = postgres.ColumnList{}
	)

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

		//Columns
		Created:                 CreatedColumn,
		CreatorID:               CreatorIDColumn,
		Deleted:                 DeletedColumn,
		DeletorID:               DeletorIDColumn,
		Duration:                DurationColumn,
		OrganizationID:          OrganizationIDColumn,
		Transcription:           TranscriptionColumn,
		TranscriptionUserEdited: TranscriptionUserEditedColumn,
		Version:                 VersionColumn,
		UUID:                    UUIDColumn,
		ID:                      IDColumn,

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