This adds the ability to link a proper address in the database to the report and harmonizes the field names with the address table. It also migrates away from mapbox entirely. And I fixed the "pool" naming for the publicreports, which are supposed to be the more generic 'water'.
132 lines
3 KiB
Go
132 lines
3 KiB
Go
// 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 PublicreportWaterImages = Table[
|
|
publicreportWaterImageColumns,
|
|
publicreportWaterImageIndexes,
|
|
publicreportWaterImageForeignKeys,
|
|
publicreportWaterImageUniques,
|
|
publicreportWaterImageChecks,
|
|
]{
|
|
Schema: "publicreport",
|
|
Name: "water_image",
|
|
Columns: publicreportWaterImageColumns{
|
|
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: publicreportWaterImageIndexes{
|
|
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: publicreportWaterImageForeignKeys{
|
|
PublicreportWaterImagePoolImageImageIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "publicreport.water_image.pool_image_image_id_fkey",
|
|
Columns: []string{"image_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "publicreport.image",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
PublicreportWaterImagePoolImagePoolIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "publicreport.water_image.pool_image_pool_id_fkey",
|
|
Columns: []string{"water_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "publicreport.water",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type publicreportWaterImageColumns struct {
|
|
ImageID column
|
|
WaterID column
|
|
}
|
|
|
|
func (c publicreportWaterImageColumns) AsSlice() []column {
|
|
return []column{
|
|
c.ImageID, c.WaterID,
|
|
}
|
|
}
|
|
|
|
type publicreportWaterImageIndexes struct {
|
|
PoolImagePkey index
|
|
}
|
|
|
|
func (i publicreportWaterImageIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.PoolImagePkey,
|
|
}
|
|
}
|
|
|
|
type publicreportWaterImageForeignKeys struct {
|
|
PublicreportWaterImagePoolImageImageIDFkey foreignKey
|
|
PublicreportWaterImagePoolImagePoolIDFkey foreignKey
|
|
}
|
|
|
|
func (f publicreportWaterImageForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.PublicreportWaterImagePoolImageImageIDFkey, f.PublicreportWaterImagePoolImagePoolIDFkey,
|
|
}
|
|
}
|
|
|
|
type publicreportWaterImageUniques struct{}
|
|
|
|
func (u publicreportWaterImageUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type publicreportWaterImageChecks struct{}
|
|
|
|
func (c publicreportWaterImageChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|