//
// 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 Report = newReportTable("publicreport", "report", "")

type reportTable struct {
	postgres.Table

	// Columns
	AddressRaw             postgres.ColumnString
	AddressID              postgres.ColumnInteger
	Created                postgres.ColumnTimestamp
	Location               postgres.ColumnGeometry
	H3cell                 postgres.ColumnString
	ID                     postgres.ColumnInteger
	LatlngAccuracyType     postgres.ColumnString
	LatlngAccuracyValue    postgres.ColumnFloat
	MapZoom                postgres.ColumnFloat
	OrganizationID         postgres.ColumnInteger
	PublicID               postgres.ColumnString
	ReporterName           postgres.ColumnString
	ReporterEmail          postgres.ColumnString
	ReporterPhone          postgres.ColumnString
	ReporterContactConsent postgres.ColumnBool
	ReportType             postgres.ColumnString
	Reviewed               postgres.ColumnTimestamp
	ReviewerID             postgres.ColumnInteger
	Status                 postgres.ColumnString
	AddressGid             postgres.ColumnString
	ClientUUID             postgres.ColumnString
	ReporterPhoneCanSms    postgres.ColumnBool
	ReporterContactID      postgres.ColumnInteger

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

type ReportTable struct {
	reportTable

	EXCLUDED reportTable
}

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

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

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

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

func newReportTable(schemaName, tableName, alias string) *ReportTable {
	return &ReportTable{
		reportTable: newReportTableImpl(schemaName, tableName, alias),
		EXCLUDED:    newReportTableImpl("", "excluded", ""),
	}
}

func newReportTableImpl(schemaName, tableName, alias string) reportTable {
	var (
		AddressRawColumn             = postgres.StringColumn("address_raw")
		AddressIDColumn              = postgres.IntegerColumn("address_id")
		CreatedColumn                = postgres.TimestampColumn("created")
		LocationColumn               = postgres.GeometryColumn("location")
		H3cellColumn                 = postgres.StringColumn("h3cell")
		IDColumn                     = postgres.IntegerColumn("id")
		LatlngAccuracyTypeColumn     = postgres.StringColumn("latlng_accuracy_type")
		LatlngAccuracyValueColumn    = postgres.FloatColumn("latlng_accuracy_value")
		MapZoomColumn                = postgres.FloatColumn("map_zoom")
		OrganizationIDColumn         = postgres.IntegerColumn("organization_id")
		PublicIDColumn               = postgres.StringColumn("public_id")
		ReporterNameColumn           = postgres.StringColumn("reporter_name")
		ReporterEmailColumn          = postgres.StringColumn("reporter_email")
		ReporterPhoneColumn          = postgres.StringColumn("reporter_phone")
		ReporterContactConsentColumn = postgres.BoolColumn("reporter_contact_consent")
		ReportTypeColumn             = postgres.StringColumn("report_type")
		ReviewedColumn               = postgres.TimestampColumn("reviewed")
		ReviewerIDColumn             = postgres.IntegerColumn("reviewer_id")
		StatusColumn                 = postgres.StringColumn("status")
		AddressGidColumn             = postgres.StringColumn("address_gid")
		ClientUUIDColumn             = postgres.StringColumn("client_uuid")
		ReporterPhoneCanSmsColumn    = postgres.BoolColumn("reporter_phone_can_sms")
		ReporterContactIDColumn      = postgres.IntegerColumn("reporter_contact_id")
		allColumns                   = postgres.ColumnList{AddressRawColumn, AddressIDColumn, CreatedColumn, LocationColumn, H3cellColumn, IDColumn, LatlngAccuracyTypeColumn, LatlngAccuracyValueColumn, MapZoomColumn, OrganizationIDColumn, PublicIDColumn, ReporterNameColumn, ReporterEmailColumn, ReporterPhoneColumn, ReporterContactConsentColumn, ReportTypeColumn, ReviewedColumn, ReviewerIDColumn, StatusColumn, AddressGidColumn, ClientUUIDColumn, ReporterPhoneCanSmsColumn, ReporterContactIDColumn}
		mutableColumns               = postgres.ColumnList{AddressRawColumn, AddressIDColumn, CreatedColumn, LocationColumn, H3cellColumn, LatlngAccuracyTypeColumn, LatlngAccuracyValueColumn, MapZoomColumn, OrganizationIDColumn, PublicIDColumn, ReporterNameColumn, ReporterEmailColumn, ReporterPhoneColumn, ReporterContactConsentColumn, ReportTypeColumn, ReviewedColumn, ReviewerIDColumn, StatusColumn, AddressGidColumn, ClientUUIDColumn, ReporterPhoneCanSmsColumn, ReporterContactIDColumn}
		defaultColumns               = postgres.ColumnList{IDColumn}
	)

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

		//Columns
		AddressRaw:             AddressRawColumn,
		AddressID:              AddressIDColumn,
		Created:                CreatedColumn,
		Location:               LocationColumn,
		H3cell:                 H3cellColumn,
		ID:                     IDColumn,
		LatlngAccuracyType:     LatlngAccuracyTypeColumn,
		LatlngAccuracyValue:    LatlngAccuracyValueColumn,
		MapZoom:                MapZoomColumn,
		OrganizationID:         OrganizationIDColumn,
		PublicID:               PublicIDColumn,
		ReporterName:           ReporterNameColumn,
		ReporterEmail:          ReporterEmailColumn,
		ReporterPhone:          ReporterPhoneColumn,
		ReporterContactConsent: ReporterContactConsentColumn,
		ReportType:             ReportTypeColumn,
		Reviewed:               ReviewedColumn,
		ReviewerID:             ReviewerIDColumn,
		Status:                 StatusColumn,
		AddressGid:             AddressGidColumn,
		ClientUUID:             ClientUUIDColumn,
		ReporterPhoneCanSms:    ReporterPhoneCanSmsColumn,
		ReporterContactID:      ReporterContactIDColumn,

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