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'.
152 lines
3.8 KiB
Go
152 lines
3.8 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 PublicreportNotifyEmailWaters = Table[
|
|
publicreportNotifyEmailWaterColumns,
|
|
publicreportNotifyEmailWaterIndexes,
|
|
publicreportNotifyEmailWaterForeignKeys,
|
|
publicreportNotifyEmailWaterUniques,
|
|
publicreportNotifyEmailWaterChecks,
|
|
]{
|
|
Schema: "publicreport",
|
|
Name: "notify_email_water",
|
|
Columns: publicreportNotifyEmailWaterColumns{
|
|
Created: column{
|
|
Name: "created",
|
|
DBType: "timestamp without time zone",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Deleted: column{
|
|
Name: "deleted",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
WaterID: column{
|
|
Name: "water_id",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
EmailAddress: column{
|
|
Name: "email_address",
|
|
DBType: "text",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: publicreportNotifyEmailWaterIndexes{
|
|
NotifyEmailPoolPkey: index{
|
|
Type: "btree",
|
|
Name: "notify_email_pool_pkey",
|
|
Columns: []indexColumn{
|
|
{
|
|
Name: "water_id",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
{
|
|
Name: "email_address",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
},
|
|
Unique: true,
|
|
Comment: "",
|
|
NullsFirst: []bool{false, false},
|
|
NullsDistinct: false,
|
|
Where: "",
|
|
Include: []string{},
|
|
},
|
|
},
|
|
PrimaryKey: &constraint{
|
|
Name: "notify_email_pool_pkey",
|
|
Columns: []string{"water_id", "email_address"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: publicreportNotifyEmailWaterForeignKeys{
|
|
PublicreportNotifyEmailWaterNotifyEmailPoolEmailAddressFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "publicreport.notify_email_water.notify_email_pool_email_address_fkey",
|
|
Columns: []string{"email_address"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "comms.email_contact",
|
|
ForeignColumns: []string{"address"},
|
|
},
|
|
PublicreportNotifyEmailWaterNotifyEmailPoolPoolIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "publicreport.notify_email_water.notify_email_pool_pool_id_fkey",
|
|
Columns: []string{"water_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "publicreport.water",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type publicreportNotifyEmailWaterColumns struct {
|
|
Created column
|
|
Deleted column
|
|
WaterID column
|
|
EmailAddress column
|
|
}
|
|
|
|
func (c publicreportNotifyEmailWaterColumns) AsSlice() []column {
|
|
return []column{
|
|
c.Created, c.Deleted, c.WaterID, c.EmailAddress,
|
|
}
|
|
}
|
|
|
|
type publicreportNotifyEmailWaterIndexes struct {
|
|
NotifyEmailPoolPkey index
|
|
}
|
|
|
|
func (i publicreportNotifyEmailWaterIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.NotifyEmailPoolPkey,
|
|
}
|
|
}
|
|
|
|
type publicreportNotifyEmailWaterForeignKeys struct {
|
|
PublicreportNotifyEmailWaterNotifyEmailPoolEmailAddressFkey foreignKey
|
|
PublicreportNotifyEmailWaterNotifyEmailPoolPoolIDFkey foreignKey
|
|
}
|
|
|
|
func (f publicreportNotifyEmailWaterForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.PublicreportNotifyEmailWaterNotifyEmailPoolEmailAddressFkey, f.PublicreportNotifyEmailWaterNotifyEmailPoolPoolIDFkey,
|
|
}
|
|
}
|
|
|
|
type publicreportNotifyEmailWaterUniques struct{}
|
|
|
|
func (u publicreportNotifyEmailWaterUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type publicreportNotifyEmailWaterChecks struct{}
|
|
|
|
func (c publicreportNotifyEmailWaterChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|