// Code generated by BobGen psql v0.42.5. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.

package dbinfo

import "github.com/aarondl/opt/null"

var FileuploadPools = Table[
	fileuploadPoolColumns,
	fileuploadPoolIndexes,
	fileuploadPoolForeignKeys,
	fileuploadPoolUniques,
	fileuploadPoolChecks,
]{
	Schema: "fileupload",
	Name:   "pool",
	Columns: fileuploadPoolColumns{
		AddressPostalCode: column{
			Name:      "address_postal_code",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		AddressStreet: column{
			Name:      "address_street",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Committed: column{
			Name:      "committed",
			DBType:    "boolean",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Created: column{
			Name:      "created",
			DBType:    "timestamp without time zone",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		CreatorID: column{
			Name:      "creator_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		CSVFile: column{
			Name:      "csv_file",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Deleted: column{
			Name:      "deleted",
			DBType:    "timestamp without time zone",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		Geom: column{
			Name:      "geom",
			DBType:    "geometry",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		H3cell: column{
			Name:      "h3cell",
			DBType:    "h3index",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('fileupload.pool_id_seq'::regclass)",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		IsInDistrict: column{
			Name:      "is_in_district",
			DBType:    "boolean",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		IsNew: column{
			Name:      "is_new",
			DBType:    "boolean",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Notes: column{
			Name:      "notes",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		PropertyOwnerName: column{
			Name:      "property_owner_name",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		PropertyOwnerPhoneE164: column{
			Name:      "property_owner_phone_e164",
			DBType:    "text",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		ResidentOwned: column{
			Name:      "resident_owned",
			DBType:    "boolean",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		ResidentPhoneE164: column{
			Name:      "resident_phone_e164",
			DBType:    "text",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
		LineNumber: column{
			Name:      "line_number",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Tags: column{
			Name:      "tags",
			DBType:    "hstore",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		AddressNumber: column{
			Name:      "address_number",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		AddressLocality: column{
			Name:      "address_locality",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		AddressRegion: column{
			Name:      "address_region",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Condition: column{
			Name:      "condition",
			DBType:    "public.poolconditiontype",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		AddressID: column{
			Name:      "address_id",
			DBType:    "integer",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: fileuploadPoolIndexes{
		PoolPkey: index{
			Type: "btree",
			Name: "pool_pkey",
			Columns: []indexColumn{
				{
					Name:         "id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
	},
	PrimaryKey: &constraint{
		Name:    "pool_pkey",
		Columns: []string{"id"},
		Comment: "",
	},
	ForeignKeys: fileuploadPoolForeignKeys{
		FileuploadPoolPoolAddressIDFkey: foreignKey{
			constraint: constraint{
				Name:    "fileupload.pool.pool_address_id_fkey",
				Columns: []string{"address_id"},
				Comment: "",
			},
			ForeignTable:   "address",
			ForeignColumns: []string{"id"},
		},
		FileuploadPoolPoolCreatorIDFkey: foreignKey{
			constraint: constraint{
				Name:    "fileupload.pool.pool_creator_id_fkey",
				Columns: []string{"creator_id"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
		FileuploadPoolPoolCSVFileFkey: foreignKey{
			constraint: constraint{
				Name:    "fileupload.pool.pool_csv_file_fkey",
				Columns: []string{"csv_file"},
				Comment: "",
			},
			ForeignTable:   "fileupload.csv",
			ForeignColumns: []string{"file_id"},
		},
		FileuploadPoolPoolPropertyOwnerPhoneE164Fkey: foreignKey{
			constraint: constraint{
				Name:    "fileupload.pool.pool_property_owner_phone_e164_fkey",
				Columns: []string{"property_owner_phone_e164"},
				Comment: "",
			},
			ForeignTable:   "comms.phone",
			ForeignColumns: []string{"e164"},
		},
		FileuploadPoolPoolResidentPhoneE164Fkey: foreignKey{
			constraint: constraint{
				Name:    "fileupload.pool.pool_resident_phone_e164_fkey",
				Columns: []string{"resident_phone_e164"},
				Comment: "",
			},
			ForeignTable:   "comms.phone",
			ForeignColumns: []string{"e164"},
		},
	},

	Comment: "",
}

type fileuploadPoolColumns struct {
	AddressPostalCode      column
	AddressStreet          column
	Committed              column
	Created                column
	CreatorID              column
	CSVFile                column
	Deleted                column
	Geom                   column
	H3cell                 column
	ID                     column
	IsInDistrict           column
	IsNew                  column
	Notes                  column
	PropertyOwnerName      column
	PropertyOwnerPhoneE164 column
	ResidentOwned          column
	ResidentPhoneE164      column
	LineNumber             column
	Tags                   column
	AddressNumber          column
	AddressLocality        column
	AddressRegion          column
	Condition              column
	AddressID              column
}

func (c fileuploadPoolColumns) AsSlice() []column {
	return []column{
		c.AddressPostalCode, c.AddressStreet, c.Committed, c.Created, c.CreatorID, c.CSVFile, c.Deleted, c.Geom, c.H3cell, c.ID, c.IsInDistrict, c.IsNew, c.Notes, c.PropertyOwnerName, c.PropertyOwnerPhoneE164, c.ResidentOwned, c.ResidentPhoneE164, c.LineNumber, c.Tags, c.AddressNumber, c.AddressLocality, c.AddressRegion, c.Condition, c.AddressID,
	}
}

type fileuploadPoolIndexes struct {
	PoolPkey index
}

func (i fileuploadPoolIndexes) AsSlice() []index {
	return []index{
		i.PoolPkey,
	}
}

type fileuploadPoolForeignKeys struct {
	FileuploadPoolPoolAddressIDFkey              foreignKey
	FileuploadPoolPoolCreatorIDFkey              foreignKey
	FileuploadPoolPoolCSVFileFkey                foreignKey
	FileuploadPoolPoolPropertyOwnerPhoneE164Fkey foreignKey
	FileuploadPoolPoolResidentPhoneE164Fkey      foreignKey
}

func (f fileuploadPoolForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.FileuploadPoolPoolAddressIDFkey, f.FileuploadPoolPoolCreatorIDFkey, f.FileuploadPoolPoolCSVFileFkey, f.FileuploadPoolPoolPropertyOwnerPhoneE164Fkey, f.FileuploadPoolPoolResidentPhoneE164Fkey,
	}
}

type fileuploadPoolUniques struct{}

func (u fileuploadPoolUniques) AsSlice() []constraint {
	return []constraint{}
}

type fileuploadPoolChecks struct{}

func (c fileuploadPoolChecks) AsSlice() []check {
	return []check{}
}
