// 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 DistrictSubscriptionEmails = Table[
	districtSubscriptionEmailColumns,
	districtSubscriptionEmailIndexes,
	districtSubscriptionEmailForeignKeys,
	districtSubscriptionEmailUniques,
	districtSubscriptionEmailChecks,
]{
	Schema: "",
	Name:   "district_subscription_email",
	Columns: districtSubscriptionEmailColumns{
		OrganizationID: column{
			Name:      "organization_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		EmailContactAddress: column{
			Name:      "email_contact_address",
			DBType:    "text",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: districtSubscriptionEmailIndexes{
		DistrictSubscriptionEmailPkey: index{
			Type: "btree",
			Name: "district_subscription_email_pkey",
			Columns: []indexColumn{
				{
					Name:         "organization_id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "email_contact_address",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false, false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
	},
	PrimaryKey: &constraint{
		Name:    "district_subscription_email_pkey",
		Columns: []string{"organization_id", "email_contact_address"},
		Comment: "",
	},
	ForeignKeys: districtSubscriptionEmailForeignKeys{
		DistrictSubscriptionEmailDistrictSubscriptionEmailEmailContactAddressFkey: foreignKey{
			constraint: constraint{
				Name:    "district_subscription_email.district_subscription_email_email_contact_address_fkey",
				Columns: []string{"email_contact_address"},
				Comment: "",
			},
			ForeignTable:   "comms.email_contact",
			ForeignColumns: []string{"address"},
		},
		DistrictSubscriptionEmailDistrictSubscriptionEmailOrganizationIDFkey: foreignKey{
			constraint: constraint{
				Name:    "district_subscription_email.district_subscription_email_organization_id_fkey",
				Columns: []string{"organization_id"},
				Comment: "",
			},
			ForeignTable:   "organization",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type districtSubscriptionEmailColumns struct {
	OrganizationID      column
	EmailContactAddress column
}

func (c districtSubscriptionEmailColumns) AsSlice() []column {
	return []column{
		c.OrganizationID, c.EmailContactAddress,
	}
}

type districtSubscriptionEmailIndexes struct {
	DistrictSubscriptionEmailPkey index
}

func (i districtSubscriptionEmailIndexes) AsSlice() []index {
	return []index{
		i.DistrictSubscriptionEmailPkey,
	}
}

type districtSubscriptionEmailForeignKeys struct {
	DistrictSubscriptionEmailDistrictSubscriptionEmailEmailContactAddressFkey foreignKey
	DistrictSubscriptionEmailDistrictSubscriptionEmailOrganizationIDFkey      foreignKey
}

func (f districtSubscriptionEmailForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.DistrictSubscriptionEmailDistrictSubscriptionEmailEmailContactAddressFkey, f.DistrictSubscriptionEmailDistrictSubscriptionEmailOrganizationIDFkey,
	}
}

type districtSubscriptionEmailUniques struct{}

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

type districtSubscriptionEmailChecks struct{}

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