//
// 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 ComplianceReportRequestMailer = newComplianceReportRequestMailerTable("public", "compliance_report_request_mailer", "")

type complianceReportRequestMailerTable struct {
	postgres.Table

	// Columns
	ComplianceReportRequestID postgres.ColumnInteger
	MailerID                  postgres.ColumnInteger
	ID                        postgres.ColumnInteger

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

type ComplianceReportRequestMailerTable struct {
	complianceReportRequestMailerTable

	EXCLUDED complianceReportRequestMailerTable
}

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

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

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

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

func newComplianceReportRequestMailerTable(schemaName, tableName, alias string) *ComplianceReportRequestMailerTable {
	return &ComplianceReportRequestMailerTable{
		complianceReportRequestMailerTable: newComplianceReportRequestMailerTableImpl(schemaName, tableName, alias),
		EXCLUDED:                           newComplianceReportRequestMailerTableImpl("", "excluded", ""),
	}
}

func newComplianceReportRequestMailerTableImpl(schemaName, tableName, alias string) complianceReportRequestMailerTable {
	var (
		ComplianceReportRequestIDColumn = postgres.IntegerColumn("compliance_report_request_id")
		MailerIDColumn                  = postgres.IntegerColumn("mailer_id")
		IDColumn                        = postgres.IntegerColumn("id")
		allColumns                      = postgres.ColumnList{ComplianceReportRequestIDColumn, MailerIDColumn, IDColumn}
		mutableColumns                  = postgres.ColumnList{ComplianceReportRequestIDColumn, MailerIDColumn}
		defaultColumns                  = postgres.ColumnList{IDColumn}
	)

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

		//Columns
		ComplianceReportRequestID: ComplianceReportRequestIDColumn,
		MailerID:                  MailerIDColumn,
		ID:                        IDColumn,

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