nidus-sync/db/dbinfo/publicreport.notify_phone_water.bob.go
Eli Ribble e932c2c473
Rework publicreport addressing
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'.
2026-03-09 18:02:22 +00:00

152 lines
3.7 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 PublicreportNotifyPhoneWaters = Table[
publicreportNotifyPhoneWaterColumns,
publicreportNotifyPhoneWaterIndexes,
publicreportNotifyPhoneWaterForeignKeys,
publicreportNotifyPhoneWaterUniques,
publicreportNotifyPhoneWaterChecks,
]{
Schema: "publicreport",
Name: "notify_phone_water",
Columns: publicreportNotifyPhoneWaterColumns{
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,
},
PhoneE164: column{
Name: "phone_e164",
DBType: "text",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
WaterID: column{
Name: "water_id",
DBType: "integer",
Default: "",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
},
Indexes: publicreportNotifyPhoneWaterIndexes{
NotifyPhonePoolPkey: index{
Type: "btree",
Name: "notify_phone_pool_pkey",
Columns: []indexColumn{
{
Name: "water_id",
Desc: null.FromCond(false, true),
IsExpression: false,
},
{
Name: "phone_e164",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false, false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
},
PrimaryKey: &constraint{
Name: "notify_phone_pool_pkey",
Columns: []string{"water_id", "phone_e164"},
Comment: "",
},
ForeignKeys: publicreportNotifyPhoneWaterForeignKeys{
PublicreportNotifyPhoneWaterNotifyPhonePoolPhoneE164Fkey: foreignKey{
constraint: constraint{
Name: "publicreport.notify_phone_water.notify_phone_pool_phone_e164_fkey",
Columns: []string{"phone_e164"},
Comment: "",
},
ForeignTable: "comms.phone",
ForeignColumns: []string{"e164"},
},
PublicreportNotifyPhoneWaterNotifyPhonePoolPoolIDFkey: foreignKey{
constraint: constraint{
Name: "publicreport.notify_phone_water.notify_phone_pool_pool_id_fkey",
Columns: []string{"water_id"},
Comment: "",
},
ForeignTable: "publicreport.water",
ForeignColumns: []string{"id"},
},
},
Comment: "",
}
type publicreportNotifyPhoneWaterColumns struct {
Created column
Deleted column
PhoneE164 column
WaterID column
}
func (c publicreportNotifyPhoneWaterColumns) AsSlice() []column {
return []column{
c.Created, c.Deleted, c.PhoneE164, c.WaterID,
}
}
type publicreportNotifyPhoneWaterIndexes struct {
NotifyPhonePoolPkey index
}
func (i publicreportNotifyPhoneWaterIndexes) AsSlice() []index {
return []index{
i.NotifyPhonePoolPkey,
}
}
type publicreportNotifyPhoneWaterForeignKeys struct {
PublicreportNotifyPhoneWaterNotifyPhonePoolPhoneE164Fkey foreignKey
PublicreportNotifyPhoneWaterNotifyPhonePoolPoolIDFkey foreignKey
}
func (f publicreportNotifyPhoneWaterForeignKeys) AsSlice() []foreignKey {
return []foreignKey{
f.PublicreportNotifyPhoneWaterNotifyPhonePoolPhoneE164Fkey, f.PublicreportNotifyPhoneWaterNotifyPhonePoolPoolIDFkey,
}
}
type publicreportNotifyPhoneWaterUniques struct{}
func (u publicreportNotifyPhoneWaterUniques) AsSlice() []constraint {
return []constraint{}
}
type publicreportNotifyPhoneWaterChecks struct{}
func (c publicreportNotifyPhoneWaterChecks) AsSlice() []check {
return []check{}
}