//
// 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 Water = newWaterTable("publicreport", "water", "")

type waterTable struct {
	postgres.Table

	// Columns
	AccessComments         postgres.ColumnString
	AccessGate             postgres.ColumnBool
	AccessFence            postgres.ColumnBool
	AccessLocked           postgres.ColumnBool
	AccessDog              postgres.ColumnBool
	AccessOther            postgres.ColumnBool
	Comments               postgres.ColumnString
	IsReporterConfidential postgres.ColumnBool
	IsReporterOwner        postgres.ColumnBool
	HasAdult               postgres.ColumnBool
	HasBackyardPermission  postgres.ColumnBool
	HasLarvae              postgres.ColumnBool
	HasPupae               postgres.ColumnBool
	OwnerEmail             postgres.ColumnString
	OwnerName              postgres.ColumnString
	OwnerPhone             postgres.ColumnString
	ReportID               postgres.ColumnInteger
	Duration               postgres.ColumnString

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

type WaterTable struct {
	waterTable

	EXCLUDED waterTable
}

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

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

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

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

func newWaterTable(schemaName, tableName, alias string) *WaterTable {
	return &WaterTable{
		waterTable: newWaterTableImpl(schemaName, tableName, alias),
		EXCLUDED:   newWaterTableImpl("", "excluded", ""),
	}
}

func newWaterTableImpl(schemaName, tableName, alias string) waterTable {
	var (
		AccessCommentsColumn         = postgres.StringColumn("access_comments")
		AccessGateColumn             = postgres.BoolColumn("access_gate")
		AccessFenceColumn            = postgres.BoolColumn("access_fence")
		AccessLockedColumn           = postgres.BoolColumn("access_locked")
		AccessDogColumn              = postgres.BoolColumn("access_dog")
		AccessOtherColumn            = postgres.BoolColumn("access_other")
		CommentsColumn               = postgres.StringColumn("comments")
		IsReporterConfidentialColumn = postgres.BoolColumn("is_reporter_confidential")
		IsReporterOwnerColumn        = postgres.BoolColumn("is_reporter_owner")
		HasAdultColumn               = postgres.BoolColumn("has_adult")
		HasBackyardPermissionColumn  = postgres.BoolColumn("has_backyard_permission")
		HasLarvaeColumn              = postgres.BoolColumn("has_larvae")
		HasPupaeColumn               = postgres.BoolColumn("has_pupae")
		OwnerEmailColumn             = postgres.StringColumn("owner_email")
		OwnerNameColumn              = postgres.StringColumn("owner_name")
		OwnerPhoneColumn             = postgres.StringColumn("owner_phone")
		ReportIDColumn               = postgres.IntegerColumn("report_id")
		DurationColumn               = postgres.StringColumn("duration")
		allColumns                   = postgres.ColumnList{AccessCommentsColumn, AccessGateColumn, AccessFenceColumn, AccessLockedColumn, AccessDogColumn, AccessOtherColumn, CommentsColumn, IsReporterConfidentialColumn, IsReporterOwnerColumn, HasAdultColumn, HasBackyardPermissionColumn, HasLarvaeColumn, HasPupaeColumn, OwnerEmailColumn, OwnerNameColumn, OwnerPhoneColumn, ReportIDColumn, DurationColumn}
		mutableColumns               = postgres.ColumnList{AccessCommentsColumn, AccessGateColumn, AccessFenceColumn, AccessLockedColumn, AccessDogColumn, AccessOtherColumn, CommentsColumn, IsReporterConfidentialColumn, IsReporterOwnerColumn, HasAdultColumn, HasBackyardPermissionColumn, HasLarvaeColumn, HasPupaeColumn, OwnerEmailColumn, OwnerNameColumn, OwnerPhoneColumn, DurationColumn}
		defaultColumns               = postgres.ColumnList{}
	)

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

		//Columns
		AccessComments:         AccessCommentsColumn,
		AccessGate:             AccessGateColumn,
		AccessFence:            AccessFenceColumn,
		AccessLocked:           AccessLockedColumn,
		AccessDog:              AccessDogColumn,
		AccessOther:            AccessOtherColumn,
		Comments:               CommentsColumn,
		IsReporterConfidential: IsReporterConfidentialColumn,
		IsReporterOwner:        IsReporterOwnerColumn,
		HasAdult:               HasAdultColumn,
		HasBackyardPermission:  HasBackyardPermissionColumn,
		HasLarvae:              HasLarvaeColumn,
		HasPupae:               HasPupaeColumn,
		OwnerEmail:             OwnerEmailColumn,
		OwnerName:              OwnerNameColumn,
		OwnerPhone:             OwnerPhoneColumn,
		ReportID:               ReportIDColumn,
		Duration:               DurationColumn,

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