//
// 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 TextLog = newTextLogTable("comms", "text_log", "")

// Used to track text messages that were sent.
type textLogTable struct {
	postgres.Table

	// Columns
	Content        postgres.ColumnString
	Created        postgres.ColumnTimestamp
	Destination    postgres.ColumnString
	ID             postgres.ColumnInteger
	IsWelcome      postgres.ColumnBool
	Origin         postgres.ColumnString
	Source         postgres.ColumnString
	TwilioSid      postgres.ColumnString
	TwilioStatus   postgres.ColumnString
	IsVisibleToLlm postgres.ColumnBool

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

type TextLogTable struct {
	textLogTable

	EXCLUDED textLogTable
}

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

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

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

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

func newTextLogTable(schemaName, tableName, alias string) *TextLogTable {
	return &TextLogTable{
		textLogTable: newTextLogTableImpl(schemaName, tableName, alias),
		EXCLUDED:     newTextLogTableImpl("", "excluded", ""),
	}
}

func newTextLogTableImpl(schemaName, tableName, alias string) textLogTable {
	var (
		ContentColumn        = postgres.StringColumn("content")
		CreatedColumn        = postgres.TimestampColumn("created")
		DestinationColumn    = postgres.StringColumn("destination")
		IDColumn             = postgres.IntegerColumn("id")
		IsWelcomeColumn      = postgres.BoolColumn("is_welcome")
		OriginColumn         = postgres.StringColumn("origin")
		SourceColumn         = postgres.StringColumn("source")
		TwilioSidColumn      = postgres.StringColumn("twilio_sid")
		TwilioStatusColumn   = postgres.StringColumn("twilio_status")
		IsVisibleToLlmColumn = postgres.BoolColumn("is_visible_to_llm")
		allColumns           = postgres.ColumnList{ContentColumn, CreatedColumn, DestinationColumn, IDColumn, IsWelcomeColumn, OriginColumn, SourceColumn, TwilioSidColumn, TwilioStatusColumn, IsVisibleToLlmColumn}
		mutableColumns       = postgres.ColumnList{ContentColumn, CreatedColumn, DestinationColumn, IsWelcomeColumn, OriginColumn, SourceColumn, TwilioSidColumn, TwilioStatusColumn, IsVisibleToLlmColumn}
		defaultColumns       = postgres.ColumnList{IDColumn}
	)

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

		//Columns
		Content:        ContentColumn,
		Created:        CreatedColumn,
		Destination:    DestinationColumn,
		ID:             IDColumn,
		IsWelcome:      IsWelcomeColumn,
		Origin:         OriginColumn,
		Source:         SourceColumn,
		TwilioSid:      TwilioSidColumn,
		TwilioStatus:   TwilioStatusColumn,
		IsVisibleToLlm: IsVisibleToLlmColumn,

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