// 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 PublicreportNotifyPhoneNuisances = Table[
	publicreportNotifyPhoneNuisanceColumns,
	publicreportNotifyPhoneNuisanceIndexes,
	publicreportNotifyPhoneNuisanceForeignKeys,
	publicreportNotifyPhoneNuisanceUniques,
	publicreportNotifyPhoneNuisanceChecks,
]{
	Schema: "publicreport",
	Name:   "notify_phone_nuisance",
	Columns: publicreportNotifyPhoneNuisanceColumns{
		Created: column{
			Name:      "created",
			DBType:    "timestamp without time zone",
			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,
		},
		NuisanceID: column{
			Name:      "nuisance_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		PhoneE164: column{
			Name:      "phone_e164",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: publicreportNotifyPhoneNuisanceIndexes{
		NotifyPhoneNuisancePkey: index{
			Type: "btree",
			Name: "notify_phone_nuisance_pkey",
			Columns: []indexColumn{
				{
					Name:         "nuisance_id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "phone_e164",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false, false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
	},
	PrimaryKey: &constraint{
		Name:    "notify_phone_nuisance_pkey",
		Columns: []string{"nuisance_id", "phone_e164"},
		Comment: "",
	},
	ForeignKeys: publicreportNotifyPhoneNuisanceForeignKeys{
		PublicreportNotifyPhoneNuisanceNotifyPhoneNuisanceNuisanceIDFkey: foreignKey{
			constraint: constraint{
				Name:    "publicreport.notify_phone_nuisance.notify_phone_nuisance_nuisance_id_fkey",
				Columns: []string{"nuisance_id"},
				Comment: "",
			},
			ForeignTable:   "publicreport.nuisance",
			ForeignColumns: []string{"id"},
		},
		PublicreportNotifyPhoneNuisanceNotifyPhoneNuisancePhoneE164Fkey: foreignKey{
			constraint: constraint{
				Name:    "publicreport.notify_phone_nuisance.notify_phone_nuisance_phone_e164_fkey",
				Columns: []string{"phone_e164"},
				Comment: "",
			},
			ForeignTable:   "comms.phone",
			ForeignColumns: []string{"e164"},
		},
	},

	Comment: "",
}

type publicreportNotifyPhoneNuisanceColumns struct {
	Created    column
	Deleted    column
	NuisanceID column
	PhoneE164  column
}

func (c publicreportNotifyPhoneNuisanceColumns) AsSlice() []column {
	return []column{
		c.Created, c.Deleted, c.NuisanceID, c.PhoneE164,
	}
}

type publicreportNotifyPhoneNuisanceIndexes struct {
	NotifyPhoneNuisancePkey index
}

func (i publicreportNotifyPhoneNuisanceIndexes) AsSlice() []index {
	return []index{
		i.NotifyPhoneNuisancePkey,
	}
}

type publicreportNotifyPhoneNuisanceForeignKeys struct {
	PublicreportNotifyPhoneNuisanceNotifyPhoneNuisanceNuisanceIDFkey foreignKey
	PublicreportNotifyPhoneNuisanceNotifyPhoneNuisancePhoneE164Fkey  foreignKey
}

func (f publicreportNotifyPhoneNuisanceForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.PublicreportNotifyPhoneNuisanceNotifyPhoneNuisanceNuisanceIDFkey, f.PublicreportNotifyPhoneNuisanceNotifyPhoneNuisancePhoneE164Fkey,
	}
}

type publicreportNotifyPhoneNuisanceUniques struct{}

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

type publicreportNotifyPhoneNuisanceChecks struct{}

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