// 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 PublicreportSubscribePhones = Table[
	publicreportSubscribePhoneColumns,
	publicreportSubscribePhoneIndexes,
	publicreportSubscribePhoneForeignKeys,
	publicreportSubscribePhoneUniques,
	publicreportSubscribePhoneChecks,
]{
	Schema: "publicreport",
	Name:   "subscribe_phone",
	Columns: publicreportSubscribePhoneColumns{
		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,
		},
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('publicreport.subscribe_phone_id_seq'::regclass)",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		PhoneE164: column{
			Name:      "phone_e164",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: publicreportSubscribePhoneIndexes{
		SubscribePhonePkey: index{
			Type: "btree",
			Name: "subscribe_phone_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:    "subscribe_phone_pkey",
		Columns: []string{"id"},
		Comment: "",
	},
	ForeignKeys: publicreportSubscribePhoneForeignKeys{
		PublicreportSubscribePhoneSubscribePhonePhoneE164Fkey: foreignKey{
			constraint: constraint{
				Name:    "publicreport.subscribe_phone.subscribe_phone_phone_e164_fkey",
				Columns: []string{"phone_e164"},
				Comment: "",
			},
			ForeignTable:   "comms.phone",
			ForeignColumns: []string{"e164"},
		},
	},

	Comment: "",
}

type publicreportSubscribePhoneColumns struct {
	Created   column
	Deleted   column
	ID        column
	PhoneE164 column
}

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

type publicreportSubscribePhoneIndexes struct {
	SubscribePhonePkey index
}

func (i publicreportSubscribePhoneIndexes) AsSlice() []index {
	return []index{
		i.SubscribePhonePkey,
	}
}

type publicreportSubscribePhoneForeignKeys struct {
	PublicreportSubscribePhoneSubscribePhonePhoneE164Fkey foreignKey
}

func (f publicreportSubscribePhoneForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.PublicreportSubscribePhoneSubscribePhonePhoneE164Fkey,
	}
}

type publicreportSubscribePhoneUniques struct{}

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

type publicreportSubscribePhoneChecks struct{}

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