// 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 Features = Table[
	featureColumns,
	featureIndexes,
	featureForeignKeys,
	featureUniques,
	featureChecks,
]{
	Schema: "",
	Name:   "feature",
	Columns: featureColumns{
		Created: column{
			Name:      "created",
			DBType:    "timestamp without time zone",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		CreatorID: column{
			Name:      "creator_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		ID: column{
			Name:      "id",
			DBType:    "integer",
			Default:   "nextval('feature_id_seq'::regclass)",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		OrganizationID: column{
			Name:      "organization_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		SiteID: column{
			Name:      "site_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Location: column{
			Name:      "location",
			DBType:    "geometry",
			Default:   "NULL",
			Comment:   "",
			Nullable:  true,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: featureIndexes{
		FeaturePkey: index{
			Type: "btree",
			Name: "feature_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:    "feature_pkey",
		Columns: []string{"id"},
		Comment: "",
	},
	ForeignKeys: featureForeignKeys{
		FeatureFeatureCreatorIDFkey: foreignKey{
			constraint: constraint{
				Name:    "feature.feature_creator_id_fkey",
				Columns: []string{"creator_id"},
				Comment: "",
			},
			ForeignTable:   "user_",
			ForeignColumns: []string{"id"},
		},
		FeatureFeatureOrganizationIDFkey: foreignKey{
			constraint: constraint{
				Name:    "feature.feature_organization_id_fkey",
				Columns: []string{"organization_id"},
				Comment: "",
			},
			ForeignTable:   "organization",
			ForeignColumns: []string{"id"},
		},
		FeatureFeatureSiteIDFkey: foreignKey{
			constraint: constraint{
				Name:    "feature.feature_site_id_fkey",
				Columns: []string{"site_id"},
				Comment: "",
			},
			ForeignTable:   "site",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type featureColumns struct {
	Created        column
	CreatorID      column
	ID             column
	OrganizationID column
	SiteID         column
	Location       column
}

func (c featureColumns) AsSlice() []column {
	return []column{
		c.Created, c.CreatorID, c.ID, c.OrganizationID, c.SiteID, c.Location,
	}
}

type featureIndexes struct {
	FeaturePkey index
}

func (i featureIndexes) AsSlice() []index {
	return []index{
		i.FeaturePkey,
	}
}

type featureForeignKeys struct {
	FeatureFeatureCreatorIDFkey      foreignKey
	FeatureFeatureOrganizationIDFkey foreignKey
	FeatureFeatureSiteIDFkey         foreignKey
}

func (f featureForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.FeatureFeatureCreatorIDFkey, f.FeatureFeatureOrganizationIDFkey, f.FeatureFeatureSiteIDFkey,
	}
}

type featureUniques struct{}

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

type featureChecks struct{}

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