// 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 CommsMailers = Table[
	commsMailerColumns,
	commsMailerIndexes,
	commsMailerForeignKeys,
	commsMailerUniques,
	commsMailerChecks,
]{
	Schema: "comms",
	Name:   "mailer",
	Columns: commsMailerColumns{
		AddressID: column{
			Name:      "address_id",
			DBType:    "integer",
			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,
		},
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('comms.mailer_id_seq'::regclass)",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Recipient: column{
			Name:      "recipient",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		UUID: column{
			Name:      "uuid",
			DBType:    "uuid",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		ExternalID: column{
			Name:      "external_id",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: commsMailerIndexes{
		MailerPkey: index{
			Type: "btree",
			Name: "mailer_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:    "mailer_pkey",
		Columns: []string{"id"},
		Comment: "",
	},
	ForeignKeys: commsMailerForeignKeys{
		CommsMailerMailerAddressIDFkey: foreignKey{
			constraint: constraint{
				Name:    "comms.mailer.mailer_address_id_fkey",
				Columns: []string{"address_id"},
				Comment: "",
			},
			ForeignTable:   "address",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type commsMailerColumns struct {
	AddressID  column
	Created    column
	ID         column
	Recipient  column
	UUID       column
	ExternalID column
}

func (c commsMailerColumns) AsSlice() []column {
	return []column{
		c.AddressID, c.Created, c.ID, c.Recipient, c.UUID, c.ExternalID,
	}
}

type commsMailerIndexes struct {
	MailerPkey index
}

func (i commsMailerIndexes) AsSlice() []index {
	return []index{
		i.MailerPkey,
	}
}

type commsMailerForeignKeys struct {
	CommsMailerMailerAddressIDFkey foreignKey
}

func (f commsMailerForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.CommsMailerMailerAddressIDFkey,
	}
}

type commsMailerUniques struct{}

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

type commsMailerChecks struct{}

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