//
// 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/go-jet/jet/v2/postgres"
)

var NotificationMalformedIntents = newNotificationMalformedIntentsTable("backend", "notification_malformed_intents", "")

type notificationMalformedIntentsTable struct {
	postgres.Table

	// Columns
	ID         postgres.ColumnString
	ReceivedAt postgres.ColumnTimestampz
	Payload    postgres.ColumnString
	Reason     postgres.ColumnString

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

type NotificationMalformedIntentsTable struct {
	notificationMalformedIntentsTable

	EXCLUDED notificationMalformedIntentsTable
}

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

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

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

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

func newNotificationMalformedIntentsTable(schemaName, tableName, alias string) *NotificationMalformedIntentsTable {
	return &NotificationMalformedIntentsTable{
		notificationMalformedIntentsTable: newNotificationMalformedIntentsTableImpl(schemaName, tableName, alias),
		EXCLUDED:                          newNotificationMalformedIntentsTableImpl("", "excluded", ""),
	}
}

func newNotificationMalformedIntentsTableImpl(schemaName, tableName, alias string) notificationMalformedIntentsTable {
	var (
		IDColumn         = postgres.StringColumn("id")
		ReceivedAtColumn = postgres.TimestampzColumn("received_at")
		PayloadColumn    = postgres.StringColumn("payload")
		ReasonColumn     = postgres.StringColumn("reason")
		allColumns       = postgres.ColumnList{IDColumn, ReceivedAtColumn, PayloadColumn, ReasonColumn}
		mutableColumns   = postgres.ColumnList{ReceivedAtColumn, PayloadColumn, ReasonColumn}
		defaultColumns   = postgres.ColumnList{ReceivedAtColumn}
	)

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

		//Columns
		ID:         IDColumn,
		ReceivedAt: ReceivedAtColumn,
		Payload:    PayloadColumn,
		Reason:     ReasonColumn,

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