// 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 TileCachedImages = Table[
	tileCachedImageColumns,
	tileCachedImageIndexes,
	tileCachedImageForeignKeys,
	tileCachedImageUniques,
	tileCachedImageChecks,
]{
	Schema: "tile",
	Name:   "cached_image",
	Columns: tileCachedImageColumns{
		X: column{
			Name:      "x",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Y: column{
			Name:      "y",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		Z: column{
			Name:      "z",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		IsEmpty: column{
			Name:      "is_empty",
			DBType:    "boolean",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
		ServiceID: column{
			Name:      "service_id",
			DBType:    "integer",
			Default:   "",
			Comment:   "",
			Nullable:  false,
			Generated: false,
			AutoIncr:  false,
		},
	},
	Indexes: tileCachedImageIndexes{
		CachedImagePkey: index{
			Type: "btree",
			Name: "cached_image_pkey",
			Columns: []indexColumn{
				{
					Name:         "service_id",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "x",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "y",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
				{
					Name:         "z",
					Desc:         null.FromCond(false, true),
					IsExpression: false,
				},
			},
			Unique:        true,
			Comment:       "",
			NullsFirst:    []bool{false, false, false, false},
			NullsDistinct: false,
			Where:         "",
			Include:       []string{},
		},
	},
	PrimaryKey: &constraint{
		Name:    "cached_image_pkey",
		Columns: []string{"service_id", "x", "y", "z"},
		Comment: "",
	},
	ForeignKeys: tileCachedImageForeignKeys{
		TileCachedImageCachedImageServiceIDFkey: foreignKey{
			constraint: constraint{
				Name:    "tile.cached_image.cached_image_service_id_fkey",
				Columns: []string{"service_id"},
				Comment: "",
			},
			ForeignTable:   "tile.service",
			ForeignColumns: []string{"id"},
		},
	},

	Comment: "",
}

type tileCachedImageColumns struct {
	X         column
	Y         column
	Z         column
	IsEmpty   column
	ServiceID column
}

func (c tileCachedImageColumns) AsSlice() []column {
	return []column{
		c.X, c.Y, c.Z, c.IsEmpty, c.ServiceID,
	}
}

type tileCachedImageIndexes struct {
	CachedImagePkey index
}

func (i tileCachedImageIndexes) AsSlice() []index {
	return []index{
		i.CachedImagePkey,
	}
}

type tileCachedImageForeignKeys struct {
	TileCachedImageCachedImageServiceIDFkey foreignKey
}

func (f tileCachedImageForeignKeys) AsSlice() []foreignKey {
	return []foreignKey{
		f.TileCachedImageCachedImageServiceIDFkey,
	}
}

type tileCachedImageUniques struct{}

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

type tileCachedImageChecks struct{}

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