// 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 PublicreportSubscribeEmails = Table[
	publicreportSubscribeEmailColumns,
	publicreportSubscribeEmailIndexes,
	publicreportSubscribeEmailForeignKeys,
	publicreportSubscribeEmailUniques,
	publicreportSubscribeEmailChecks,
]{
	Schema: "publicreport",
	Name:   "subscribe_email",
	Columns: publicreportSubscribeEmailColumns{
		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,
		},
		EmailAddress: column{
			Name:      "email_address",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('publicreport.subscribe_email_id_seq'::regclass)",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: publicreportSubscribeEmailIndexes{
		SubscribeEmailPkey: index{
			Type: "btree",
			Name: "subscribe_email_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_email_pkey",
		Columns: []string{"id"},
		Comment: "",
	},
	ForeignKeys: publicreportSubscribeEmailForeignKeys{
		PublicreportSubscribeEmailSubscribeEmailEmailAddressFkey: foreignKey{
			constraint: constraint{
				Name:    "publicreport.subscribe_email.subscribe_email_email_address_fkey",
				Columns: []string{"email_address"},
				Comment: "",
			},
			ForeignTable:   "comms.email_contact",
			ForeignColumns: []string{"address"},
		},
	},

	Comment: "",
}

type publicreportSubscribeEmailColumns struct {
	Created      column
	Deleted      column
	EmailAddress column
	ID           column
}

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

type publicreportSubscribeEmailIndexes struct {
	SubscribeEmailPkey index
}

func (i publicreportSubscribeEmailIndexes) AsSlice() []index {
	return []index{
		i.SubscribeEmailPkey,
	}
}

type publicreportSubscribeEmailForeignKeys struct {
	PublicreportSubscribeEmailSubscribeEmailEmailAddressFkey foreignKey
}

func (f publicreportSubscribeEmailForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.PublicreportSubscribeEmailSubscribeEmailEmailAddressFkey,
	}
}

type publicreportSubscribeEmailUniques struct{}

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

type publicreportSubscribeEmailChecks struct{}

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