// 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 PublicreportWaterImageOlds = Table[
	publicreportWaterImageOldColumns,
	publicreportWaterImageOldIndexes,
	publicreportWaterImageOldForeignKeys,
	publicreportWaterImageOldUniques,
	publicreportWaterImageOldChecks,
]{
	Schema: "publicreport",
	Name:   "water_image_old",
	Columns: publicreportWaterImageOldColumns{
		ImageID: column{
			Name:      "image_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		WaterID: column{
			Name:      "water_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: publicreportWaterImageOldIndexes{
		PoolImagePkey: index{
			Type: "btree",
			Name: "pool_image_pkey",
			Columns: []indexColumn{
				{
					Name:         "image_id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "water_id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false, false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
	},
	PrimaryKey: &constraint{
		Name:    "pool_image_pkey",
		Columns: []string{"image_id", "water_id"},
		Comment: "",
	},
	ForeignKeys: publicreportWaterImageOldForeignKeys{
		PublicreportWaterImageOldPoolImageImageIDFkey: foreignKey{
			constraint: constraint{
				Name:    "publicreport.water_image_old.pool_image_image_id_fkey",
				Columns: []string{"image_id"},
				Comment: "",
			},
			ForeignTable:   "publicreport.image",
			ForeignColumns: []string{"id"},
		},
		PublicreportWaterImageOldPoolImagePoolIDFkey: foreignKey{
			constraint: constraint{
				Name:    "publicreport.water_image_old.pool_image_pool_id_fkey",
				Columns: []string{"water_id"},
				Comment: "",
			},
			ForeignTable:   "publicreport.water_old",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type publicreportWaterImageOldColumns struct {
	ImageID column
	WaterID column
}

func (c publicreportWaterImageOldColumns) AsSlice() []column {
	return []column{
		c.ImageID, c.WaterID,
	}
}

type publicreportWaterImageOldIndexes struct {
	PoolImagePkey index
}

func (i publicreportWaterImageOldIndexes) AsSlice() []index {
	return []index{
		i.PoolImagePkey,
	}
}

type publicreportWaterImageOldForeignKeys struct {
	PublicreportWaterImageOldPoolImageImageIDFkey foreignKey
	PublicreportWaterImageOldPoolImagePoolIDFkey  foreignKey
}

func (f publicreportWaterImageOldForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.PublicreportWaterImageOldPoolImageImageIDFkey, f.PublicreportWaterImageOldPoolImagePoolIDFkey,
	}
}

type publicreportWaterImageOldUniques struct{}

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

type publicreportWaterImageOldChecks struct{}

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