// 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 PublicreportNotifyPhonePools = Table[
	publicreportNotifyPhonePoolColumns,
	publicreportNotifyPhonePoolIndexes,
	publicreportNotifyPhonePoolForeignKeys,
	publicreportNotifyPhonePoolUniques,
	publicreportNotifyPhonePoolChecks,
]{
	Schema: "publicreport",
	Name:   "notify_phone_pool",
	Columns: publicreportNotifyPhonePoolColumns{
		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,
		},
		PhoneE164: column{
			Name:      "phone_e164",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		PoolID: column{
			Name:      "pool_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: publicreportNotifyPhonePoolIndexes{
		NotifyPhonePoolPkey: index{
			Type: "btree",
			Name: "notify_phone_pool_pkey",
			Columns: []indexColumn{
				{
					Name:         "pool_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_pool_pkey",
		Columns: []string{"pool_id", "phone_e164"},
		Comment: "",
	},
	ForeignKeys: publicreportNotifyPhonePoolForeignKeys{
		PublicreportNotifyPhonePoolNotifyPhonePoolPhoneE164Fkey: foreignKey{
			constraint: constraint{
				Name:    "publicreport.notify_phone_pool.notify_phone_pool_phone_e164_fkey",
				Columns: []string{"phone_e164"},
				Comment: "",
			},
			ForeignTable:   "comms.phone",
			ForeignColumns: []string{"e164"},
		},
		PublicreportNotifyPhonePoolNotifyPhonePoolPoolIDFkey: foreignKey{
			constraint: constraint{
				Name:    "publicreport.notify_phone_pool.notify_phone_pool_pool_id_fkey",
				Columns: []string{"pool_id"},
				Comment: "",
			},
			ForeignTable:   "publicreport.pool",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type publicreportNotifyPhonePoolColumns struct {
	Created   column
	Deleted   column
	PhoneE164 column
	PoolID    column
}

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

type publicreportNotifyPhonePoolIndexes struct {
	NotifyPhonePoolPkey index
}

func (i publicreportNotifyPhonePoolIndexes) AsSlice() []index {
	return []index{
		i.NotifyPhonePoolPkey,
	}
}

type publicreportNotifyPhonePoolForeignKeys struct {
	PublicreportNotifyPhonePoolNotifyPhonePoolPhoneE164Fkey foreignKey
	PublicreportNotifyPhonePoolNotifyPhonePoolPoolIDFkey    foreignKey
}

func (f publicreportNotifyPhonePoolForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.PublicreportNotifyPhonePoolNotifyPhonePoolPhoneE164Fkey, f.PublicreportNotifyPhonePoolNotifyPhonePoolPoolIDFkey,
	}
}

type publicreportNotifyPhonePoolUniques struct{}

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

type publicreportNotifyPhonePoolChecks struct{}

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