//
// 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 view

import (
	"github.com/Gleipnir-Technology/jet/postgres"
)

var OrganizationReportCount = newOrganizationReportCountTable("publicreport", "organization_report_count", "")

type organizationReportCountTable struct {
	postgres.Table

	// Columns
	OrganizationID      postgres.ColumnInteger
	NuisanceReported    postgres.ColumnInteger
	NuisanceReviewed    postgres.ColumnInteger
	NuisanceScheduled   postgres.ColumnInteger
	NuisanceTreated     postgres.ColumnInteger
	NuisanceInvalidated postgres.ColumnInteger
	WaterReported       postgres.ColumnInteger
	WaterReviewed       postgres.ColumnInteger
	WaterScheduled      postgres.ColumnInteger
	WaterTreated        postgres.ColumnInteger
	WaterInvalidated    postgres.ColumnInteger

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

type OrganizationReportCountTable struct {
	organizationReportCountTable

	EXCLUDED organizationReportCountTable
}

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

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

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

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

func newOrganizationReportCountTable(schemaName, tableName, alias string) *OrganizationReportCountTable {
	return &OrganizationReportCountTable{
		organizationReportCountTable: newOrganizationReportCountTableImpl(schemaName, tableName, alias),
		EXCLUDED:                     newOrganizationReportCountTableImpl("", "excluded", ""),
	}
}

func newOrganizationReportCountTableImpl(schemaName, tableName, alias string) organizationReportCountTable {
	var (
		OrganizationIDColumn      = postgres.IntegerColumn("organization_id")
		NuisanceReportedColumn    = postgres.IntegerColumn("nuisance_reported")
		NuisanceReviewedColumn    = postgres.IntegerColumn("nuisance_reviewed")
		NuisanceScheduledColumn   = postgres.IntegerColumn("nuisance_scheduled")
		NuisanceTreatedColumn     = postgres.IntegerColumn("nuisance_treated")
		NuisanceInvalidatedColumn = postgres.IntegerColumn("nuisance_invalidated")
		WaterReportedColumn       = postgres.IntegerColumn("water_reported")
		WaterReviewedColumn       = postgres.IntegerColumn("water_reviewed")
		WaterScheduledColumn      = postgres.IntegerColumn("water_scheduled")
		WaterTreatedColumn        = postgres.IntegerColumn("water_treated")
		WaterInvalidatedColumn    = postgres.IntegerColumn("water_invalidated")
		allColumns                = postgres.ColumnList{OrganizationIDColumn, NuisanceReportedColumn, NuisanceReviewedColumn, NuisanceScheduledColumn, NuisanceTreatedColumn, NuisanceInvalidatedColumn, WaterReportedColumn, WaterReviewedColumn, WaterScheduledColumn, WaterTreatedColumn, WaterInvalidatedColumn}
		mutableColumns            = postgres.ColumnList{OrganizationIDColumn, NuisanceReportedColumn, NuisanceReviewedColumn, NuisanceScheduledColumn, NuisanceTreatedColumn, NuisanceInvalidatedColumn, WaterReportedColumn, WaterReviewedColumn, WaterScheduledColumn, WaterTreatedColumn, WaterInvalidatedColumn}
		defaultColumns            = postgres.ColumnList{}
	)

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

		//Columns
		OrganizationID:      OrganizationIDColumn,
		NuisanceReported:    NuisanceReportedColumn,
		NuisanceReviewed:    NuisanceReviewedColumn,
		NuisanceScheduled:   NuisanceScheduledColumn,
		NuisanceTreated:     NuisanceTreatedColumn,
		NuisanceInvalidated: NuisanceInvalidatedColumn,
		WaterReported:       WaterReportedColumn,
		WaterReviewed:       WaterReviewedColumn,
		WaterScheduled:      WaterScheduledColumn,
		WaterTreated:        WaterTreatedColumn,
		WaterInvalidated:    WaterInvalidatedColumn,

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