//
// 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 Compliance = newComplianceTable("publicreport", "compliance", "")

type complianceTable struct {
	postgres.Table

	// Columns
	AccessInstructions postgres.ColumnString
	AvailabilityNotes  postgres.ColumnString
	Comments           postgres.ColumnString
	GateCode           postgres.ColumnString
	HasDog             postgres.ColumnBool
	PermissionType     postgres.ColumnString
	ReportID           postgres.ColumnInteger
	ReportPhoneCanText postgres.ColumnBool
	WantsScheduled     postgres.ColumnBool
	Submitted          postgres.ColumnTimestamp

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

type ComplianceTable struct {
	complianceTable

	EXCLUDED complianceTable
}

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

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

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

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

func newComplianceTable(schemaName, tableName, alias string) *ComplianceTable {
	return &ComplianceTable{
		complianceTable: newComplianceTableImpl(schemaName, tableName, alias),
		EXCLUDED:        newComplianceTableImpl("", "excluded", ""),
	}
}

func newComplianceTableImpl(schemaName, tableName, alias string) complianceTable {
	var (
		AccessInstructionsColumn = postgres.StringColumn("access_instructions")
		AvailabilityNotesColumn  = postgres.StringColumn("availability_notes")
		CommentsColumn           = postgres.StringColumn("comments")
		GateCodeColumn           = postgres.StringColumn("gate_code")
		HasDogColumn             = postgres.BoolColumn("has_dog")
		PermissionTypeColumn     = postgres.StringColumn("permission_type")
		ReportIDColumn           = postgres.IntegerColumn("report_id")
		ReportPhoneCanTextColumn = postgres.BoolColumn("report_phone_can_text")
		WantsScheduledColumn     = postgres.BoolColumn("wants_scheduled")
		SubmittedColumn          = postgres.TimestampColumn("submitted")
		allColumns               = postgres.ColumnList{AccessInstructionsColumn, AvailabilityNotesColumn, CommentsColumn, GateCodeColumn, HasDogColumn, PermissionTypeColumn, ReportIDColumn, ReportPhoneCanTextColumn, WantsScheduledColumn, SubmittedColumn}
		mutableColumns           = postgres.ColumnList{AccessInstructionsColumn, AvailabilityNotesColumn, CommentsColumn, GateCodeColumn, HasDogColumn, PermissionTypeColumn, ReportPhoneCanTextColumn, WantsScheduledColumn, SubmittedColumn}
		defaultColumns           = postgres.ColumnList{}
	)

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

		//Columns
		AccessInstructions: AccessInstructionsColumn,
		AvailabilityNotes:  AvailabilityNotesColumn,
		Comments:           CommentsColumn,
		GateCode:           GateCodeColumn,
		HasDog:             HasDogColumn,
		PermissionType:     PermissionTypeColumn,
		ReportID:           ReportIDColumn,
		ReportPhoneCanText: ReportPhoneCanTextColumn,
		WantsScheduled:     WantsScheduledColumn,
		Submitted:          SubmittedColumn,

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