//
// 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 ComplianceReportRequest = newComplianceReportRequestTable("public", "compliance_report_request", "")

type complianceReportRequestTable struct {
	postgres.Table

	// Columns
	Created  postgres.ColumnTimestamp
	Creator  postgres.ColumnInteger
	ID       postgres.ColumnInteger
	PublicID postgres.ColumnString
	LeadID   postgres.ColumnInteger

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

type ComplianceReportRequestTable struct {
	complianceReportRequestTable

	EXCLUDED complianceReportRequestTable
}

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

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

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

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

func newComplianceReportRequestTable(schemaName, tableName, alias string) *ComplianceReportRequestTable {
	return &ComplianceReportRequestTable{
		complianceReportRequestTable: newComplianceReportRequestTableImpl(schemaName, tableName, alias),
		EXCLUDED:                     newComplianceReportRequestTableImpl("", "excluded", ""),
	}
}

func newComplianceReportRequestTableImpl(schemaName, tableName, alias string) complianceReportRequestTable {
	var (
		CreatedColumn  = postgres.TimestampColumn("created")
		CreatorColumn  = postgres.IntegerColumn("creator")
		IDColumn       = postgres.IntegerColumn("id")
		PublicIDColumn = postgres.StringColumn("public_id")
		LeadIDColumn   = postgres.IntegerColumn("lead_id")
		allColumns     = postgres.ColumnList{CreatedColumn, CreatorColumn, IDColumn, PublicIDColumn, LeadIDColumn}
		mutableColumns = postgres.ColumnList{CreatedColumn, CreatorColumn, PublicIDColumn, LeadIDColumn}
		defaultColumns = postgres.ColumnList{IDColumn}
	)

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

		//Columns
		Created:  CreatedColumn,
		Creator:  CreatorColumn,
		ID:       IDColumn,
		PublicID: PublicIDColumn,
		LeadID:   LeadIDColumn,

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