// 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 CommsPhones = Table[
	commsPhoneColumns,
	commsPhoneIndexes,
	commsPhoneForeignKeys,
	commsPhoneUniques,
	commsPhoneChecks,
]{
	Schema: "comms",
	Name:   "phone",
	Columns: commsPhoneColumns{
		E164: column{
			Name:      "e164",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		IsSubscribed: column{
			Name:      "is_subscribed",
			DBType:    "boolean",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Status: column{
			Name:      "status",
			DBType:    "comms.phonestatustype",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		CanSMS: column{
			Name:      "can_sms",
			DBType:    "boolean",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: commsPhoneIndexes{
		PhonePkey: index{
			Type: "btree",
			Name: "phone_pkey",
			Columns: []indexColumn{
				{
					Name:         "e164",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
	},
	PrimaryKey: &constraint{
		Name:    "phone_pkey",
		Columns: []string{"e164"},
		Comment: "",
	},

	Comment: "",
}

type commsPhoneColumns struct {
	E164         column
	IsSubscribed column
	Status       column
	CanSMS       column
}

func (c commsPhoneColumns) AsSlice() []column {
	return []column{
		c.E164, c.IsSubscribed, c.Status, c.CanSMS,
	}
}

type commsPhoneIndexes struct {
	PhonePkey index
}

func (i commsPhoneIndexes) AsSlice() []index {
	return []index{
		i.PhonePkey,
	}
}

type commsPhoneForeignKeys struct{}

func (f commsPhoneForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{}
}

type commsPhoneUniques struct{}

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

type commsPhoneChecks struct{}

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