Move data out of import.district and in to organization
Then get the organization settings page to work again. Tons of other stuff is broken now.
This commit is contained in:
parent
b786c88f52
commit
5a7c9fd090
31 changed files with 2001 additions and 4340 deletions
|
|
@ -19,7 +19,6 @@ psql:
|
|||
- "arcgis"
|
||||
- "comms"
|
||||
- "fileupload"
|
||||
- "import"
|
||||
- "public"
|
||||
- "publicreport"
|
||||
- "fieldseeker"
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
// 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 dberrors
|
||||
|
||||
var ImportDistrictErrors = &importDistrictErrors{
|
||||
ErrUniqueDistrictPkey: &UniqueConstraintError{
|
||||
schema: "import",
|
||||
table: "district",
|
||||
columns: []string{"gid"},
|
||||
s: "district_pkey",
|
||||
},
|
||||
}
|
||||
|
||||
type importDistrictErrors struct {
|
||||
ErrUniqueDistrictPkey *UniqueConstraintError
|
||||
}
|
||||
|
|
@ -24,13 +24,6 @@ var OrganizationErrors = &organizationErrors{
|
|||
columns: []string{"slug"},
|
||||
s: "organization_slug_key",
|
||||
},
|
||||
|
||||
ErrUniqueOrganizationWebsiteKey: &UniqueConstraintError{
|
||||
schema: "",
|
||||
table: "organization",
|
||||
columns: []string{"website"},
|
||||
s: "organization_website_key",
|
||||
},
|
||||
}
|
||||
|
||||
type organizationErrors struct {
|
||||
|
|
@ -39,6 +32,4 @@ type organizationErrors struct {
|
|||
ErrUniqueOrganizationImportDistrictGidKey *UniqueConstraintError
|
||||
|
||||
ErrUniqueOrganizationSlugKey *UniqueConstraintError
|
||||
|
||||
ErrUniqueOrganizationWebsiteKey *UniqueConstraintError
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,360 +0,0 @@
|
|||
// 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 ImportDistricts = Table[
|
||||
importDistrictColumns,
|
||||
importDistrictIndexes,
|
||||
importDistrictForeignKeys,
|
||||
importDistrictUniques,
|
||||
importDistrictChecks,
|
||||
]{
|
||||
Schema: "import",
|
||||
Name: "district",
|
||||
Columns: importDistrictColumns{
|
||||
Gid: column{
|
||||
Name: "gid",
|
||||
DBType: "integer",
|
||||
Default: "nextval('import.district_gid_seq'::regclass)",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ID: column{
|
||||
Name: "id",
|
||||
DBType: "numeric",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Website: column{
|
||||
Name: "website",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Contact: column{
|
||||
Name: "contact",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Address: column{
|
||||
Name: "address",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Regionid: column{
|
||||
Name: "regionid",
|
||||
DBType: "numeric",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
PostalCod: column{
|
||||
Name: "postal_cod",
|
||||
DBType: "numeric",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Phone1: column{
|
||||
Name: "phone1",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Fax1: column{
|
||||
Name: "fax1",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Agency: column{
|
||||
Name: "agency",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Code1: column{
|
||||
Name: "code1",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
City1: column{
|
||||
Name: "city1",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ShapeLeng: column{
|
||||
Name: "shape_leng",
|
||||
DBType: "numeric",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Address2: column{
|
||||
Name: "address2",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
GeneralMG: column{
|
||||
Name: "general_mg",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
City2: column{
|
||||
Name: "city2",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
PostalC1: column{
|
||||
Name: "postal_c_1",
|
||||
DBType: "numeric",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Fax2: column{
|
||||
Name: "fax2",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Phone2: column{
|
||||
Name: "phone2",
|
||||
DBType: "character varying",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ShapeLe1: column{
|
||||
Name: "shape_le_1",
|
||||
DBType: "numeric",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ShapeArea: column{
|
||||
Name: "shape_area",
|
||||
DBType: "numeric",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Geom: column{
|
||||
Name: "geom",
|
||||
DBType: "geometry",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Geom4326: column{
|
||||
Name: "geom_4326",
|
||||
DBType: "geometry",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Centroid4326: column{
|
||||
Name: "centroid_4326",
|
||||
DBType: "geometry",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Extent4326: column{
|
||||
Name: "extent_4326",
|
||||
DBType: "geometry",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
Area4326SQM: column{
|
||||
Name: "area_4326_sqm",
|
||||
DBType: "numeric",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
},
|
||||
Indexes: importDistrictIndexes{
|
||||
DistrictPkey: index{
|
||||
Type: "btree",
|
||||
Name: "district_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "gid",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
},
|
||||
Unique: true,
|
||||
Comment: "",
|
||||
NullsFirst: []bool{false},
|
||||
NullsDistinct: false,
|
||||
Where: "",
|
||||
Include: []string{},
|
||||
},
|
||||
DistrictGeomIdx: index{
|
||||
Type: "gist",
|
||||
Name: "district_geom_idx",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "geom",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
},
|
||||
Unique: false,
|
||||
Comment: "",
|
||||
NullsFirst: []bool{false},
|
||||
NullsDistinct: false,
|
||||
Where: "",
|
||||
Include: []string{},
|
||||
},
|
||||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "district_pkey",
|
||||
Columns: []string{"gid"},
|
||||
Comment: "",
|
||||
},
|
||||
|
||||
Comment: "",
|
||||
}
|
||||
|
||||
type importDistrictColumns struct {
|
||||
Gid column
|
||||
ID column
|
||||
Website column
|
||||
Contact column
|
||||
Address column
|
||||
Regionid column
|
||||
PostalCod column
|
||||
Phone1 column
|
||||
Fax1 column
|
||||
Agency column
|
||||
Code1 column
|
||||
City1 column
|
||||
ShapeLeng column
|
||||
Address2 column
|
||||
GeneralMG column
|
||||
City2 column
|
||||
PostalC1 column
|
||||
Fax2 column
|
||||
Phone2 column
|
||||
ShapeLe1 column
|
||||
ShapeArea column
|
||||
Geom column
|
||||
Geom4326 column
|
||||
Centroid4326 column
|
||||
Extent4326 column
|
||||
Area4326SQM column
|
||||
}
|
||||
|
||||
func (c importDistrictColumns) AsSlice() []column {
|
||||
return []column{
|
||||
c.Gid, c.ID, c.Website, c.Contact, c.Address, c.Regionid, c.PostalCod, c.Phone1, c.Fax1, c.Agency, c.Code1, c.City1, c.ShapeLeng, c.Address2, c.GeneralMG, c.City2, c.PostalC1, c.Fax2, c.Phone2, c.ShapeLe1, c.ShapeArea, c.Geom, c.Geom4326, c.Centroid4326, c.Extent4326, c.Area4326SQM,
|
||||
}
|
||||
}
|
||||
|
||||
type importDistrictIndexes struct {
|
||||
DistrictPkey index
|
||||
DistrictGeomIdx index
|
||||
}
|
||||
|
||||
func (i importDistrictIndexes) AsSlice() []index {
|
||||
return []index{
|
||||
i.DistrictPkey, i.DistrictGeomIdx,
|
||||
}
|
||||
}
|
||||
|
||||
type importDistrictForeignKeys struct{}
|
||||
|
||||
func (f importDistrictForeignKeys) AsSlice() []foreignKey {
|
||||
return []foreignKey{}
|
||||
}
|
||||
|
||||
type importDistrictUniques struct{}
|
||||
|
||||
func (u importDistrictUniques) AsSlice() []constraint {
|
||||
return []constraint{}
|
||||
}
|
||||
|
||||
type importDistrictChecks struct{}
|
||||
|
||||
func (c importDistrictChecks) AsSlice() []check {
|
||||
return []check{}
|
||||
}
|
||||
|
|
@ -96,6 +96,168 @@ var Organizations = Table[
|
|||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
GeneralManagerName: column{
|
||||
Name: "general_manager_name",
|
||||
DBType: "text",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
MailingAddressCity: column{
|
||||
Name: "mailing_address_city",
|
||||
DBType: "text",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
MailingAddressPostalCode: column{
|
||||
Name: "mailing_address_postal_code",
|
||||
DBType: "text",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
MailingAddressStreet: column{
|
||||
Name: "mailing_address_street",
|
||||
DBType: "text",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
OfficeAddressCity: column{
|
||||
Name: "office_address_city",
|
||||
DBType: "text",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
OfficeAddressPostalCode: column{
|
||||
Name: "office_address_postal_code",
|
||||
DBType: "text",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
OfficeAddressStreet: column{
|
||||
Name: "office_address_street",
|
||||
DBType: "text",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ServiceAreaGeometry: column{
|
||||
Name: "service_area_geometry",
|
||||
DBType: "geometry",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ServiceAreaSquareMeters: column{
|
||||
Name: "service_area_square_meters",
|
||||
DBType: "numeric",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ServiceAreaCentroid: column{
|
||||
Name: "service_area_centroid",
|
||||
DBType: "geometry",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ServiceAreaExtent: column{
|
||||
Name: "service_area_extent",
|
||||
DBType: "geometry",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
OfficeFax: column{
|
||||
Name: "office_fax",
|
||||
DBType: "text",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
OfficePhone: column{
|
||||
Name: "office_phone",
|
||||
DBType: "text",
|
||||
Default: "NULL",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ServiceAreaXmin: column{
|
||||
Name: "service_area_xmin",
|
||||
DBType: "double precision",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ServiceAreaYmin: column{
|
||||
Name: "service_area_ymin",
|
||||
DBType: "double precision",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ServiceAreaXmax: column{
|
||||
Name: "service_area_xmax",
|
||||
DBType: "double precision",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ServiceAreaYmax: column{
|
||||
Name: "service_area_ymax",
|
||||
DBType: "double precision",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
ServiceAreaCentroidGeojson: column{
|
||||
Name: "service_area_centroid_geojson",
|
||||
DBType: "text",
|
||||
Default: "GENERATED",
|
||||
Comment: "",
|
||||
Nullable: true,
|
||||
Generated: true,
|
||||
AutoIncr: false,
|
||||
},
|
||||
},
|
||||
Indexes: organizationIndexes{
|
||||
OrganizationPkey: index{
|
||||
|
|
@ -149,23 +311,6 @@ var Organizations = Table[
|
|||
Where: "",
|
||||
Include: []string{},
|
||||
},
|
||||
OrganizationWebsiteKey: index{
|
||||
Type: "btree",
|
||||
Name: "organization_website_key",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "website",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
},
|
||||
Unique: true,
|
||||
Comment: "",
|
||||
NullsFirst: []bool{false},
|
||||
NullsDistinct: false,
|
||||
Where: "",
|
||||
Include: []string{},
|
||||
},
|
||||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "organization_pkey",
|
||||
|
|
@ -194,31 +339,44 @@ var Organizations = Table[
|
|||
Columns: []string{"slug"},
|
||||
Comment: "",
|
||||
},
|
||||
OrganizationWebsiteKey: constraint{
|
||||
Name: "organization_website_key",
|
||||
Columns: []string{"website"},
|
||||
Comment: "",
|
||||
},
|
||||
},
|
||||
|
||||
Comment: "",
|
||||
}
|
||||
|
||||
type organizationColumns struct {
|
||||
ID column
|
||||
Name column
|
||||
ArcgisID column
|
||||
ArcgisName column
|
||||
FieldseekerURL column
|
||||
ImportDistrictGid column
|
||||
Website column
|
||||
LogoUUID column
|
||||
Slug column
|
||||
ID column
|
||||
Name column
|
||||
ArcgisID column
|
||||
ArcgisName column
|
||||
FieldseekerURL column
|
||||
ImportDistrictGid column
|
||||
Website column
|
||||
LogoUUID column
|
||||
Slug column
|
||||
GeneralManagerName column
|
||||
MailingAddressCity column
|
||||
MailingAddressPostalCode column
|
||||
MailingAddressStreet column
|
||||
OfficeAddressCity column
|
||||
OfficeAddressPostalCode column
|
||||
OfficeAddressStreet column
|
||||
ServiceAreaGeometry column
|
||||
ServiceAreaSquareMeters column
|
||||
ServiceAreaCentroid column
|
||||
ServiceAreaExtent column
|
||||
OfficeFax column
|
||||
OfficePhone column
|
||||
ServiceAreaXmin column
|
||||
ServiceAreaYmin column
|
||||
ServiceAreaXmax column
|
||||
ServiceAreaYmax column
|
||||
ServiceAreaCentroidGeojson column
|
||||
}
|
||||
|
||||
func (c organizationColumns) AsSlice() []column {
|
||||
return []column{
|
||||
c.ID, c.Name, c.ArcgisID, c.ArcgisName, c.FieldseekerURL, c.ImportDistrictGid, c.Website, c.LogoUUID, c.Slug,
|
||||
c.ID, c.Name, c.ArcgisID, c.ArcgisName, c.FieldseekerURL, c.ImportDistrictGid, c.Website, c.LogoUUID, c.Slug, c.GeneralManagerName, c.MailingAddressCity, c.MailingAddressPostalCode, c.MailingAddressStreet, c.OfficeAddressCity, c.OfficeAddressPostalCode, c.OfficeAddressStreet, c.ServiceAreaGeometry, c.ServiceAreaSquareMeters, c.ServiceAreaCentroid, c.ServiceAreaExtent, c.OfficeFax, c.OfficePhone, c.ServiceAreaXmin, c.ServiceAreaYmin, c.ServiceAreaXmax, c.ServiceAreaYmax, c.ServiceAreaCentroidGeojson,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -226,12 +384,11 @@ type organizationIndexes struct {
|
|||
OrganizationPkey index
|
||||
OrganizationImportDistrictGidKey index
|
||||
OrganizationSlugKey index
|
||||
OrganizationWebsiteKey index
|
||||
}
|
||||
|
||||
func (i organizationIndexes) AsSlice() []index {
|
||||
return []index{
|
||||
i.OrganizationPkey, i.OrganizationImportDistrictGidKey, i.OrganizationSlugKey, i.OrganizationWebsiteKey,
|
||||
i.OrganizationPkey, i.OrganizationImportDistrictGidKey, i.OrganizationSlugKey,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -248,12 +405,11 @@ func (f organizationForeignKeys) AsSlice() []foreignKey {
|
|||
type organizationUniques struct {
|
||||
OrganizationImportDistrictGidKey constraint
|
||||
OrganizationSlugKey constraint
|
||||
OrganizationWebsiteKey constraint
|
||||
}
|
||||
|
||||
func (u organizationUniques) AsSlice() []constraint {
|
||||
return []constraint{
|
||||
u.OrganizationImportDistrictGidKey, u.OrganizationSlugKey, u.OrganizationWebsiteKey,
|
||||
u.OrganizationImportDistrictGidKey, u.OrganizationSlugKey,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -219,10 +219,6 @@ var (
|
|||
h3AggregationWithParentsCascadingCtx = newContextual[bool]("h3AggregationWithParentsCascading")
|
||||
h3AggregationRelOrganizationCtx = newContextual[bool]("h3_aggregation.organization.h3_aggregation.h3_aggregation_organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for import.district
|
||||
importDistrictWithParentsCascadingCtx = newContextual[bool]("importDistrictWithParentsCascading")
|
||||
importDistrictRelImportDistrictGidOrganizationCtx = newContextual[bool]("import.district.organization.organization.organization_import_district_gid_fkey")
|
||||
|
||||
// Relationship Contexts for note_audio
|
||||
noteAudioWithParentsCascadingCtx = newContextual[bool]("noteAudioWithParentsCascading")
|
||||
noteAudioRelCreatorUserCtx = newContextual[bool]("note_audio.user_.note_audio.note_audio_creator_id_fkey")
|
||||
|
|
@ -264,47 +260,46 @@ var (
|
|||
oauthTokenRelUserUserCtx = newContextual[bool]("oauth_token.user_.oauth_token.oauth_token_user_id_fkey")
|
||||
|
||||
// Relationship Contexts for organization
|
||||
organizationWithParentsCascadingCtx = newContextual[bool]("organizationWithParentsCascading")
|
||||
organizationRelEmailContactsCtx = newContextual[bool]("comms.email_contact.organization.district_subscription_email.district_subscription_email_email_contact_address_fkeydistrict_subscription_email.district_subscription_email_organization_id_fkey")
|
||||
organizationRelPhonesCtx = newContextual[bool]("comms.phone.organization.district_subscription_phone.district_subscription_phone_organization_id_fkeydistrict_subscription_phone.district_subscription_phone_phone_e164_fkey")
|
||||
organizationRelContainerrelatesCtx = newContextual[bool]("fieldseeker.containerrelate.organization.fieldseeker.containerrelate.containerrelate_organization_id_fkey")
|
||||
organizationRelFieldscoutinglogsCtx = newContextual[bool]("fieldseeker.fieldscoutinglog.organization.fieldseeker.fieldscoutinglog.fieldscoutinglog_organization_id_fkey")
|
||||
organizationRelHabitatrelatesCtx = newContextual[bool]("fieldseeker.habitatrelate.organization.fieldseeker.habitatrelate.habitatrelate_organization_id_fkey")
|
||||
organizationRelInspectionsamplesCtx = newContextual[bool]("fieldseeker.inspectionsample.organization.fieldseeker.inspectionsample.inspectionsample_organization_id_fkey")
|
||||
organizationRelInspectionsampledetailsCtx = newContextual[bool]("fieldseeker.inspectionsampledetail.organization.fieldseeker.inspectionsampledetail.inspectionsampledetail_organization_id_fkey")
|
||||
organizationRelLinelocationsCtx = newContextual[bool]("fieldseeker.linelocation.organization.fieldseeker.linelocation.linelocation_organization_id_fkey")
|
||||
organizationRelLocationtrackingsCtx = newContextual[bool]("fieldseeker.locationtracking.organization.fieldseeker.locationtracking.locationtracking_organization_id_fkey")
|
||||
organizationRelMosquitoinspectionsCtx = newContextual[bool]("fieldseeker.mosquitoinspection.organization.fieldseeker.mosquitoinspection.mosquitoinspection_organization_id_fkey")
|
||||
organizationRelPointlocationsCtx = newContextual[bool]("fieldseeker.pointlocation.organization.fieldseeker.pointlocation.pointlocation_organization_id_fkey")
|
||||
organizationRelPolygonlocationsCtx = newContextual[bool]("fieldseeker.polygonlocation.organization.fieldseeker.polygonlocation.polygonlocation_organization_id_fkey")
|
||||
organizationRelFieldseekerPoolCtx = newContextual[bool]("fieldseeker.pool.organization.fieldseeker.pool.pool_organization_id_fkey")
|
||||
organizationRelPooldetailsCtx = newContextual[bool]("fieldseeker.pooldetail.organization.fieldseeker.pooldetail.pooldetail_organization_id_fkey")
|
||||
organizationRelProposedtreatmentareasCtx = newContextual[bool]("fieldseeker.proposedtreatmentarea.organization.fieldseeker.proposedtreatmentarea.proposedtreatmentarea_organization_id_fkey")
|
||||
organizationRelQamosquitoinspectionsCtx = newContextual[bool]("fieldseeker.qamosquitoinspection.organization.fieldseeker.qamosquitoinspection.qamosquitoinspection_organization_id_fkey")
|
||||
organizationRelRodentlocationsCtx = newContextual[bool]("fieldseeker.rodentlocation.organization.fieldseeker.rodentlocation.rodentlocation_organization_id_fkey")
|
||||
organizationRelSamplecollectionsCtx = newContextual[bool]("fieldseeker.samplecollection.organization.fieldseeker.samplecollection.samplecollection_organization_id_fkey")
|
||||
organizationRelSamplelocationsCtx = newContextual[bool]("fieldseeker.samplelocation.organization.fieldseeker.samplelocation.samplelocation_organization_id_fkey")
|
||||
organizationRelServicerequestsCtx = newContextual[bool]("fieldseeker.servicerequest.organization.fieldseeker.servicerequest.servicerequest_organization_id_fkey")
|
||||
organizationRelSpeciesabundancesCtx = newContextual[bool]("fieldseeker.speciesabundance.organization.fieldseeker.speciesabundance.speciesabundance_organization_id_fkey")
|
||||
organizationRelStormdrainsCtx = newContextual[bool]("fieldseeker.stormdrain.organization.fieldseeker.stormdrain.stormdrain_organization_id_fkey")
|
||||
organizationRelTimecardsCtx = newContextual[bool]("fieldseeker.timecard.organization.fieldseeker.timecard.timecard_organization_id_fkey")
|
||||
organizationRelTrapdataCtx = newContextual[bool]("fieldseeker.trapdata.organization.fieldseeker.trapdata.trapdata_organization_id_fkey")
|
||||
organizationRelTraplocationsCtx = newContextual[bool]("fieldseeker.traplocation.organization.fieldseeker.traplocation.traplocation_organization_id_fkey")
|
||||
organizationRelTreatmentsCtx = newContextual[bool]("fieldseeker.treatment.organization.fieldseeker.treatment.treatment_organization_id_fkey")
|
||||
organizationRelTreatmentareasCtx = newContextual[bool]("fieldseeker.treatmentarea.organization.fieldseeker.treatmentarea.treatmentarea_organization_id_fkey")
|
||||
organizationRelZonesCtx = newContextual[bool]("fieldseeker.zones.organization.fieldseeker.zones.zones_organization_id_fkey")
|
||||
organizationRelZones2sCtx = newContextual[bool]("fieldseeker.zones2.organization.fieldseeker.zones2.zones2_organization_id_fkey")
|
||||
organizationRelFieldseekerSyncsCtx = newContextual[bool]("fieldseeker_sync.organization.fieldseeker_sync.fieldseeker_sync_organization_id_fkey")
|
||||
organizationRelFilesCtx = newContextual[bool]("fileupload.file.organization.fileupload.file.file_organization_id_fkey")
|
||||
organizationRelPoolsCtx = newContextual[bool]("fileupload.pool.organization.fileupload.pool.pool_organization_id_fkey")
|
||||
organizationRelH3AggregationsCtx = newContextual[bool]("h3_aggregation.organization.h3_aggregation.h3_aggregation_organization_id_fkey")
|
||||
organizationRelNoteAudiosCtx = newContextual[bool]("note_audio.organization.note_audio.note_audio_organization_id_fkey")
|
||||
organizationRelNoteImagesCtx = newContextual[bool]("note_image.organization.note_image.note_image_organization_id_fkey")
|
||||
organizationRelImportDistrictGidDistrictCtx = newContextual[bool]("import.district.organization.organization.organization_import_district_gid_fkey")
|
||||
organizationRelNuisancesCtx = newContextual[bool]("organization.publicreport.nuisance.publicreport.nuisance.nuisance_organization_id_fkey")
|
||||
organizationRelPublicreportPoolCtx = newContextual[bool]("organization.publicreport.pool.publicreport.pool.pool_organization_id_fkey")
|
||||
organizationRelQuicksCtx = newContextual[bool]("organization.publicreport.quick.publicreport.quick.quick_organization_id_fkey")
|
||||
organizationRelUserCtx = newContextual[bool]("organization.user_.user_.user__organization_id_fkey")
|
||||
organizationWithParentsCascadingCtx = newContextual[bool]("organizationWithParentsCascading")
|
||||
organizationRelEmailContactsCtx = newContextual[bool]("comms.email_contact.organization.district_subscription_email.district_subscription_email_email_contact_address_fkeydistrict_subscription_email.district_subscription_email_organization_id_fkey")
|
||||
organizationRelPhonesCtx = newContextual[bool]("comms.phone.organization.district_subscription_phone.district_subscription_phone_organization_id_fkeydistrict_subscription_phone.district_subscription_phone_phone_e164_fkey")
|
||||
organizationRelContainerrelatesCtx = newContextual[bool]("fieldseeker.containerrelate.organization.fieldseeker.containerrelate.containerrelate_organization_id_fkey")
|
||||
organizationRelFieldscoutinglogsCtx = newContextual[bool]("fieldseeker.fieldscoutinglog.organization.fieldseeker.fieldscoutinglog.fieldscoutinglog_organization_id_fkey")
|
||||
organizationRelHabitatrelatesCtx = newContextual[bool]("fieldseeker.habitatrelate.organization.fieldseeker.habitatrelate.habitatrelate_organization_id_fkey")
|
||||
organizationRelInspectionsamplesCtx = newContextual[bool]("fieldseeker.inspectionsample.organization.fieldseeker.inspectionsample.inspectionsample_organization_id_fkey")
|
||||
organizationRelInspectionsampledetailsCtx = newContextual[bool]("fieldseeker.inspectionsampledetail.organization.fieldseeker.inspectionsampledetail.inspectionsampledetail_organization_id_fkey")
|
||||
organizationRelLinelocationsCtx = newContextual[bool]("fieldseeker.linelocation.organization.fieldseeker.linelocation.linelocation_organization_id_fkey")
|
||||
organizationRelLocationtrackingsCtx = newContextual[bool]("fieldseeker.locationtracking.organization.fieldseeker.locationtracking.locationtracking_organization_id_fkey")
|
||||
organizationRelMosquitoinspectionsCtx = newContextual[bool]("fieldseeker.mosquitoinspection.organization.fieldseeker.mosquitoinspection.mosquitoinspection_organization_id_fkey")
|
||||
organizationRelPointlocationsCtx = newContextual[bool]("fieldseeker.pointlocation.organization.fieldseeker.pointlocation.pointlocation_organization_id_fkey")
|
||||
organizationRelPolygonlocationsCtx = newContextual[bool]("fieldseeker.polygonlocation.organization.fieldseeker.polygonlocation.polygonlocation_organization_id_fkey")
|
||||
organizationRelFieldseekerPoolCtx = newContextual[bool]("fieldseeker.pool.organization.fieldseeker.pool.pool_organization_id_fkey")
|
||||
organizationRelPooldetailsCtx = newContextual[bool]("fieldseeker.pooldetail.organization.fieldseeker.pooldetail.pooldetail_organization_id_fkey")
|
||||
organizationRelProposedtreatmentareasCtx = newContextual[bool]("fieldseeker.proposedtreatmentarea.organization.fieldseeker.proposedtreatmentarea.proposedtreatmentarea_organization_id_fkey")
|
||||
organizationRelQamosquitoinspectionsCtx = newContextual[bool]("fieldseeker.qamosquitoinspection.organization.fieldseeker.qamosquitoinspection.qamosquitoinspection_organization_id_fkey")
|
||||
organizationRelRodentlocationsCtx = newContextual[bool]("fieldseeker.rodentlocation.organization.fieldseeker.rodentlocation.rodentlocation_organization_id_fkey")
|
||||
organizationRelSamplecollectionsCtx = newContextual[bool]("fieldseeker.samplecollection.organization.fieldseeker.samplecollection.samplecollection_organization_id_fkey")
|
||||
organizationRelSamplelocationsCtx = newContextual[bool]("fieldseeker.samplelocation.organization.fieldseeker.samplelocation.samplelocation_organization_id_fkey")
|
||||
organizationRelServicerequestsCtx = newContextual[bool]("fieldseeker.servicerequest.organization.fieldseeker.servicerequest.servicerequest_organization_id_fkey")
|
||||
organizationRelSpeciesabundancesCtx = newContextual[bool]("fieldseeker.speciesabundance.organization.fieldseeker.speciesabundance.speciesabundance_organization_id_fkey")
|
||||
organizationRelStormdrainsCtx = newContextual[bool]("fieldseeker.stormdrain.organization.fieldseeker.stormdrain.stormdrain_organization_id_fkey")
|
||||
organizationRelTimecardsCtx = newContextual[bool]("fieldseeker.timecard.organization.fieldseeker.timecard.timecard_organization_id_fkey")
|
||||
organizationRelTrapdataCtx = newContextual[bool]("fieldseeker.trapdata.organization.fieldseeker.trapdata.trapdata_organization_id_fkey")
|
||||
organizationRelTraplocationsCtx = newContextual[bool]("fieldseeker.traplocation.organization.fieldseeker.traplocation.traplocation_organization_id_fkey")
|
||||
organizationRelTreatmentsCtx = newContextual[bool]("fieldseeker.treatment.organization.fieldseeker.treatment.treatment_organization_id_fkey")
|
||||
organizationRelTreatmentareasCtx = newContextual[bool]("fieldseeker.treatmentarea.organization.fieldseeker.treatmentarea.treatmentarea_organization_id_fkey")
|
||||
organizationRelZonesCtx = newContextual[bool]("fieldseeker.zones.organization.fieldseeker.zones.zones_organization_id_fkey")
|
||||
organizationRelZones2sCtx = newContextual[bool]("fieldseeker.zones2.organization.fieldseeker.zones2.zones2_organization_id_fkey")
|
||||
organizationRelFieldseekerSyncsCtx = newContextual[bool]("fieldseeker_sync.organization.fieldseeker_sync.fieldseeker_sync_organization_id_fkey")
|
||||
organizationRelFilesCtx = newContextual[bool]("fileupload.file.organization.fileupload.file.file_organization_id_fkey")
|
||||
organizationRelPoolsCtx = newContextual[bool]("fileupload.pool.organization.fileupload.pool.pool_organization_id_fkey")
|
||||
organizationRelH3AggregationsCtx = newContextual[bool]("h3_aggregation.organization.h3_aggregation.h3_aggregation_organization_id_fkey")
|
||||
organizationRelNoteAudiosCtx = newContextual[bool]("note_audio.organization.note_audio.note_audio_organization_id_fkey")
|
||||
organizationRelNoteImagesCtx = newContextual[bool]("note_image.organization.note_image.note_image_organization_id_fkey")
|
||||
organizationRelNuisancesCtx = newContextual[bool]("organization.publicreport.nuisance.publicreport.nuisance.nuisance_organization_id_fkey")
|
||||
organizationRelPublicreportPoolCtx = newContextual[bool]("organization.publicreport.pool.publicreport.pool.pool_organization_id_fkey")
|
||||
organizationRelQuicksCtx = newContextual[bool]("organization.publicreport.quick.publicreport.quick.quick_organization_id_fkey")
|
||||
organizationRelUserCtx = newContextual[bool]("organization.user_.user_.user__organization_id_fkey")
|
||||
|
||||
// Relationship Contexts for publicreport.image
|
||||
publicreportImageWithParentsCascadingCtx = newContextual[bool]("publicreportImageWithParentsCascading")
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ type Factory struct {
|
|||
baseGeometryColumnMods GeometryColumnModSlice
|
||||
baseGooseDBVersionMods GooseDBVersionModSlice
|
||||
baseH3AggregationMods H3AggregationModSlice
|
||||
baseImportDistrictMods ImportDistrictModSlice
|
||||
baseNoteAudioMods NoteAudioModSlice
|
||||
baseNoteAudioBreadcrumbMods NoteAudioBreadcrumbModSlice
|
||||
baseNoteAudioDatumMods NoteAudioDatumModSlice
|
||||
|
|
@ -2581,60 +2580,6 @@ func (f *Factory) FromExistingH3Aggregation(m *models.H3Aggregation) *H3Aggregat
|
|||
return o
|
||||
}
|
||||
|
||||
func (f *Factory) NewImportDistrict(mods ...ImportDistrictMod) *ImportDistrictTemplate {
|
||||
return f.NewImportDistrictWithContext(context.Background(), mods...)
|
||||
}
|
||||
|
||||
func (f *Factory) NewImportDistrictWithContext(ctx context.Context, mods ...ImportDistrictMod) *ImportDistrictTemplate {
|
||||
o := &ImportDistrictTemplate{f: f}
|
||||
|
||||
if f != nil {
|
||||
f.baseImportDistrictMods.Apply(ctx, o)
|
||||
}
|
||||
|
||||
ImportDistrictModSlice(mods).Apply(ctx, o)
|
||||
|
||||
return o
|
||||
}
|
||||
|
||||
func (f *Factory) FromExistingImportDistrict(m *models.ImportDistrict) *ImportDistrictTemplate {
|
||||
o := &ImportDistrictTemplate{f: f, alreadyPersisted: true}
|
||||
|
||||
o.Gid = func() int32 { return m.Gid }
|
||||
o.ID = func() null.Val[decimal.Decimal] { return m.ID }
|
||||
o.Website = func() null.Val[string] { return m.Website }
|
||||
o.Contact = func() null.Val[string] { return m.Contact }
|
||||
o.Address = func() null.Val[string] { return m.Address }
|
||||
o.Regionid = func() null.Val[decimal.Decimal] { return m.Regionid }
|
||||
o.PostalCod = func() null.Val[decimal.Decimal] { return m.PostalCod }
|
||||
o.Phone1 = func() null.Val[string] { return m.Phone1 }
|
||||
o.Fax1 = func() null.Val[string] { return m.Fax1 }
|
||||
o.Agency = func() null.Val[string] { return m.Agency }
|
||||
o.Code1 = func() null.Val[string] { return m.Code1 }
|
||||
o.City1 = func() null.Val[string] { return m.City1 }
|
||||
o.ShapeLeng = func() null.Val[decimal.Decimal] { return m.ShapeLeng }
|
||||
o.Address2 = func() null.Val[string] { return m.Address2 }
|
||||
o.GeneralMG = func() null.Val[string] { return m.GeneralMG }
|
||||
o.City2 = func() null.Val[string] { return m.City2 }
|
||||
o.PostalC1 = func() null.Val[decimal.Decimal] { return m.PostalC1 }
|
||||
o.Fax2 = func() null.Val[string] { return m.Fax2 }
|
||||
o.Phone2 = func() null.Val[string] { return m.Phone2 }
|
||||
o.ShapeLe1 = func() null.Val[decimal.Decimal] { return m.ShapeLe1 }
|
||||
o.ShapeArea = func() null.Val[decimal.Decimal] { return m.ShapeArea }
|
||||
o.Geom = func() null.Val[string] { return m.Geom }
|
||||
o.Geom4326 = func() null.Val[string] { return m.Geom4326 }
|
||||
o.Centroid4326 = func() null.Val[string] { return m.Centroid4326 }
|
||||
o.Extent4326 = func() null.Val[string] { return m.Extent4326 }
|
||||
o.Area4326SQM = func() null.Val[decimal.Decimal] { return m.Area4326SQM }
|
||||
|
||||
ctx := context.Background()
|
||||
if m.R.ImportDistrictGidOrganization != nil {
|
||||
ImportDistrictMods.WithExistingImportDistrictGidOrganization(m.R.ImportDistrictGidOrganization).Apply(ctx, o)
|
||||
}
|
||||
|
||||
return o
|
||||
}
|
||||
|
||||
func (f *Factory) NewNoteAudio(mods ...NoteAudioMod) *NoteAudioTemplate {
|
||||
return f.NewNoteAudioWithContext(context.Background(), mods...)
|
||||
}
|
||||
|
|
@ -2966,6 +2911,24 @@ func (f *Factory) FromExistingOrganization(m *models.Organization) *Organization
|
|||
o.Website = func() null.Val[string] { return m.Website }
|
||||
o.LogoUUID = func() null.Val[uuid.UUID] { return m.LogoUUID }
|
||||
o.Slug = func() null.Val[string] { return m.Slug }
|
||||
o.GeneralManagerName = func() null.Val[string] { return m.GeneralManagerName }
|
||||
o.MailingAddressCity = func() null.Val[string] { return m.MailingAddressCity }
|
||||
o.MailingAddressPostalCode = func() null.Val[string] { return m.MailingAddressPostalCode }
|
||||
o.MailingAddressStreet = func() null.Val[string] { return m.MailingAddressStreet }
|
||||
o.OfficeAddressCity = func() null.Val[string] { return m.OfficeAddressCity }
|
||||
o.OfficeAddressPostalCode = func() null.Val[string] { return m.OfficeAddressPostalCode }
|
||||
o.OfficeAddressStreet = func() null.Val[string] { return m.OfficeAddressStreet }
|
||||
o.ServiceAreaGeometry = func() null.Val[string] { return m.ServiceAreaGeometry }
|
||||
o.ServiceAreaSquareMeters = func() null.Val[decimal.Decimal] { return m.ServiceAreaSquareMeters }
|
||||
o.ServiceAreaCentroid = func() null.Val[string] { return m.ServiceAreaCentroid }
|
||||
o.ServiceAreaExtent = func() null.Val[string] { return m.ServiceAreaExtent }
|
||||
o.OfficeFax = func() null.Val[string] { return m.OfficeFax }
|
||||
o.OfficePhone = func() null.Val[string] { return m.OfficePhone }
|
||||
o.ServiceAreaXmin = func() null.Val[float64] { return m.ServiceAreaXmin }
|
||||
o.ServiceAreaYmin = func() null.Val[float64] { return m.ServiceAreaYmin }
|
||||
o.ServiceAreaXmax = func() null.Val[float64] { return m.ServiceAreaXmax }
|
||||
o.ServiceAreaYmax = func() null.Val[float64] { return m.ServiceAreaYmax }
|
||||
o.ServiceAreaCentroidGeojson = func() null.Val[string] { return m.ServiceAreaCentroidGeojson }
|
||||
|
||||
ctx := context.Background()
|
||||
if len(m.R.EmailContacts) > 0 {
|
||||
|
|
@ -3073,9 +3036,6 @@ func (f *Factory) FromExistingOrganization(m *models.Organization) *Organization
|
|||
if len(m.R.NoteImages) > 0 {
|
||||
OrganizationMods.AddExistingNoteImages(m.R.NoteImages...).Apply(ctx, o)
|
||||
}
|
||||
if m.R.ImportDistrictGidDistrict != nil {
|
||||
OrganizationMods.WithExistingImportDistrictGidDistrict(m.R.ImportDistrictGidDistrict).Apply(ctx, o)
|
||||
}
|
||||
if len(m.R.Nuisances) > 0 {
|
||||
OrganizationMods.AddExistingNuisances(m.R.Nuisances...).Apply(ctx, o)
|
||||
}
|
||||
|
|
@ -4256,14 +4216,6 @@ func (f *Factory) AddBaseH3AggregationMod(mods ...H3AggregationMod) {
|
|||
f.baseH3AggregationMods = append(f.baseH3AggregationMods, mods...)
|
||||
}
|
||||
|
||||
func (f *Factory) ClearBaseImportDistrictMods() {
|
||||
f.baseImportDistrictMods = nil
|
||||
}
|
||||
|
||||
func (f *Factory) AddBaseImportDistrictMod(mods ...ImportDistrictMod) {
|
||||
f.baseImportDistrictMods = append(f.baseImportDistrictMods, mods...)
|
||||
}
|
||||
|
||||
func (f *Factory) ClearBaseNoteAudioMods() {
|
||||
f.baseNoteAudioMods = nil
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
24
db/migrations/00064_organization_eats_district.sql
Normal file
24
db/migrations/00064_organization_eats_district.sql
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
-- +goose Up
|
||||
ALTER TABLE organization ADD COLUMN general_manager_name TEXT;
|
||||
ALTER TABLE organization ADD COLUMN mailing_address_city TEXT;
|
||||
ALTER TABLE organization ADD COLUMN mailing_address_postal_code TEXT;
|
||||
ALTER TABLE organization ADD COLUMN mailing_address_street TEXT;
|
||||
ALTER TABLE organization ADD COLUMN office_address_city TEXT;
|
||||
ALTER TABLE organization ADD COLUMN office_address_postal_code TEXT;
|
||||
ALTER TABLE organization ADD COLUMN office_address_street TEXT;
|
||||
ALTER TABLE organization ADD COLUMN office_fax TEXT;
|
||||
ALTER TABLE organization ADD COLUMN office_phone TEXT;
|
||||
|
||||
ALTER TABLE organization ADD COLUMN service_area_geometry geometry(MultiPolygon,4326);
|
||||
|
||||
ALTER TABLE organization ADD COLUMN service_area_square_meters numeric GENERATED ALWAYS AS (ST_Area(service_area_geometry)) STORED;
|
||||
ALTER TABLE organization ADD COLUMN service_area_centroid geometry(Point,4326) GENERATED ALWAYS AS (ST_Centroid(service_area_geometry)) STORED;
|
||||
ALTER TABLE organization ADD COLUMN service_area_centroid_geojson TEXT GENERATED ALWAYS AS (ST_AsGeoJSON(ST_Centroid(service_area_geometry))) STORED;
|
||||
ALTER TABLE organization ADD COLUMN service_area_extent geometry(Polygon,4326) GENERATED ALWAYS AS (ST_Envelope(service_area_geometry)) STORED;
|
||||
ALTER TABLE organization ADD COLUMN service_area_xmin DOUBLE PRECISION GENERATED ALWAYS AS (ST_XMin(ST_Envelope(service_area_geometry))) STORED;
|
||||
ALTER TABLE organization ADD COLUMN service_area_ymin DOUBLE PRECISION GENERATED ALWAYS AS (ST_YMin(ST_Envelope(service_area_geometry))) STORED;
|
||||
ALTER TABLE organization ADD COLUMN service_area_xmax DOUBLE PRECISION GENERATED ALWAYS AS (ST_XMax(ST_Envelope(service_area_geometry))) STORED;
|
||||
ALTER TABLE organization ADD COLUMN service_area_ymax DOUBLE PRECISION GENERATED ALWAYS AS (ST_YMax(ST_Envelope(service_area_geometry))) STORED;
|
||||
|
||||
ALTER TABLE organization DROP CONSTRAINT organization_website_key;
|
||||
-- +goose Down
|
||||
|
|
@ -76,7 +76,6 @@ type joins[Q dialect.Joinable] struct {
|
|||
FileuploadFiles joinSet[fileuploadFileJoins[Q]]
|
||||
FileuploadPools joinSet[fileuploadPoolJoins[Q]]
|
||||
H3Aggregations joinSet[h3AggregationJoins[Q]]
|
||||
ImportDistricts joinSet[importDistrictJoins[Q]]
|
||||
NoteAudios joinSet[noteAudioJoins[Q]]
|
||||
NoteAudioBreadcrumbs joinSet[noteAudioBreadcrumbJoins[Q]]
|
||||
NoteAudioData joinSet[noteAudioDatumJoins[Q]]
|
||||
|
|
@ -157,7 +156,6 @@ func getJoins[Q dialect.Joinable]() joins[Q] {
|
|||
FileuploadFiles: buildJoinSet[fileuploadFileJoins[Q]](FileuploadFiles.Columns, buildFileuploadFileJoins),
|
||||
FileuploadPools: buildJoinSet[fileuploadPoolJoins[Q]](FileuploadPools.Columns, buildFileuploadPoolJoins),
|
||||
H3Aggregations: buildJoinSet[h3AggregationJoins[Q]](H3Aggregations.Columns, buildH3AggregationJoins),
|
||||
ImportDistricts: buildJoinSet[importDistrictJoins[Q]](ImportDistricts.Columns, buildImportDistrictJoins),
|
||||
NoteAudios: buildJoinSet[noteAudioJoins[Q]](NoteAudios.Columns, buildNoteAudioJoins),
|
||||
NoteAudioBreadcrumbs: buildJoinSet[noteAudioBreadcrumbJoins[Q]](NoteAudioBreadcrumbs.Columns, buildNoteAudioBreadcrumbJoins),
|
||||
NoteAudioData: buildJoinSet[noteAudioDatumJoins[Q]](NoteAudioData.Columns, buildNoteAudioDatumJoins),
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ type preloaders struct {
|
|||
FileuploadFile fileuploadFilePreloader
|
||||
FileuploadPool fileuploadPoolPreloader
|
||||
H3Aggregation h3AggregationPreloader
|
||||
ImportDistrict importDistrictPreloader
|
||||
NoteAudio noteAudioPreloader
|
||||
NoteAudioBreadcrumb noteAudioBreadcrumbPreloader
|
||||
NoteAudioDatum noteAudioDatumPreloader
|
||||
|
|
@ -134,7 +133,6 @@ func getPreloaders() preloaders {
|
|||
FileuploadFile: buildFileuploadFilePreloader(),
|
||||
FileuploadPool: buildFileuploadPoolPreloader(),
|
||||
H3Aggregation: buildH3AggregationPreloader(),
|
||||
ImportDistrict: buildImportDistrictPreloader(),
|
||||
NoteAudio: buildNoteAudioPreloader(),
|
||||
NoteAudioBreadcrumb: buildNoteAudioBreadcrumbPreloader(),
|
||||
NoteAudioDatum: buildNoteAudioDatumPreloader(),
|
||||
|
|
@ -213,7 +211,6 @@ type thenLoaders[Q orm.Loadable] struct {
|
|||
FileuploadFile fileuploadFileThenLoader[Q]
|
||||
FileuploadPool fileuploadPoolThenLoader[Q]
|
||||
H3Aggregation h3AggregationThenLoader[Q]
|
||||
ImportDistrict importDistrictThenLoader[Q]
|
||||
NoteAudio noteAudioThenLoader[Q]
|
||||
NoteAudioBreadcrumb noteAudioBreadcrumbThenLoader[Q]
|
||||
NoteAudioDatum noteAudioDatumThenLoader[Q]
|
||||
|
|
@ -286,7 +283,6 @@ func getThenLoaders[Q orm.Loadable]() thenLoaders[Q] {
|
|||
FileuploadFile: buildFileuploadFileThenLoader[Q](),
|
||||
FileuploadPool: buildFileuploadPoolThenLoader[Q](),
|
||||
H3Aggregation: buildH3AggregationThenLoader[Q](),
|
||||
ImportDistrict: buildImportDistrictThenLoader[Q](),
|
||||
NoteAudio: buildNoteAudioThenLoader[Q](),
|
||||
NoteAudioBreadcrumb: buildNoteAudioBreadcrumbThenLoader[Q](),
|
||||
NoteAudioDatum: buildNoteAudioDatumThenLoader[Q](),
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ func Where[Q psql.Filterable]() struct {
|
|||
GeometryColumns geometryColumnWhere[Q]
|
||||
GooseDBVersions gooseDBVersionWhere[Q]
|
||||
H3Aggregations h3AggregationWhere[Q]
|
||||
ImportDistricts importDistrictWhere[Q]
|
||||
NoteAudios noteAudioWhere[Q]
|
||||
NoteAudioBreadcrumbs noteAudioBreadcrumbWhere[Q]
|
||||
NoteAudioData noteAudioDatumWhere[Q]
|
||||
|
|
@ -143,7 +142,6 @@ func Where[Q psql.Filterable]() struct {
|
|||
GeometryColumns geometryColumnWhere[Q]
|
||||
GooseDBVersions gooseDBVersionWhere[Q]
|
||||
H3Aggregations h3AggregationWhere[Q]
|
||||
ImportDistricts importDistrictWhere[Q]
|
||||
NoteAudios noteAudioWhere[Q]
|
||||
NoteAudioBreadcrumbs noteAudioBreadcrumbWhere[Q]
|
||||
NoteAudioData noteAudioDatumWhere[Q]
|
||||
|
|
@ -221,7 +219,6 @@ func Where[Q psql.Filterable]() struct {
|
|||
GeometryColumns: buildGeometryColumnWhere[Q](GeometryColumns.Columns),
|
||||
GooseDBVersions: buildGooseDBVersionWhere[Q](GooseDBVersions.Columns),
|
||||
H3Aggregations: buildH3AggregationWhere[Q](H3Aggregations.Columns),
|
||||
ImportDistricts: buildImportDistrictWhere[Q](ImportDistricts.Columns),
|
||||
NoteAudios: buildNoteAudioWhere[Q](NoteAudios.Columns),
|
||||
NoteAudioBreadcrumbs: buildNoteAudioBreadcrumbWhere[Q](NoteAudioBreadcrumbs.Columns),
|
||||
NoteAudioData: buildNoteAudioDatumWhere[Q](NoteAudioData.Columns),
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -23,20 +23,39 @@ import (
|
|||
"github.com/aarondl/opt/omit"
|
||||
"github.com/aarondl/opt/omitnull"
|
||||
"github.com/google/uuid"
|
||||
"github.com/shopspring/decimal"
|
||||
"github.com/stephenafamo/scan"
|
||||
)
|
||||
|
||||
// Organization is an object representing the database table.
|
||||
type Organization struct {
|
||||
ID int32 `db:"id,pk" `
|
||||
Name string `db:"name" `
|
||||
ArcgisID null.Val[string] `db:"arcgis_id" `
|
||||
ArcgisName null.Val[string] `db:"arcgis_name" `
|
||||
FieldseekerURL null.Val[string] `db:"fieldseeker_url" `
|
||||
ImportDistrictGid null.Val[int32] `db:"import_district_gid" `
|
||||
Website null.Val[string] `db:"website" `
|
||||
LogoUUID null.Val[uuid.UUID] `db:"logo_uuid" `
|
||||
Slug null.Val[string] `db:"slug" `
|
||||
ID int32 `db:"id,pk" `
|
||||
Name string `db:"name" `
|
||||
ArcgisID null.Val[string] `db:"arcgis_id" `
|
||||
ArcgisName null.Val[string] `db:"arcgis_name" `
|
||||
FieldseekerURL null.Val[string] `db:"fieldseeker_url" `
|
||||
ImportDistrictGid null.Val[int32] `db:"import_district_gid" `
|
||||
Website null.Val[string] `db:"website" `
|
||||
LogoUUID null.Val[uuid.UUID] `db:"logo_uuid" `
|
||||
Slug null.Val[string] `db:"slug" `
|
||||
GeneralManagerName null.Val[string] `db:"general_manager_name" `
|
||||
MailingAddressCity null.Val[string] `db:"mailing_address_city" `
|
||||
MailingAddressPostalCode null.Val[string] `db:"mailing_address_postal_code" `
|
||||
MailingAddressStreet null.Val[string] `db:"mailing_address_street" `
|
||||
OfficeAddressCity null.Val[string] `db:"office_address_city" `
|
||||
OfficeAddressPostalCode null.Val[string] `db:"office_address_postal_code" `
|
||||
OfficeAddressStreet null.Val[string] `db:"office_address_street" `
|
||||
ServiceAreaGeometry null.Val[string] `db:"service_area_geometry" `
|
||||
ServiceAreaSquareMeters null.Val[decimal.Decimal] `db:"service_area_square_meters,generated" `
|
||||
ServiceAreaCentroid null.Val[string] `db:"service_area_centroid,generated" `
|
||||
ServiceAreaExtent null.Val[string] `db:"service_area_extent,generated" `
|
||||
OfficeFax null.Val[string] `db:"office_fax" `
|
||||
OfficePhone null.Val[string] `db:"office_phone" `
|
||||
ServiceAreaXmin null.Val[float64] `db:"service_area_xmin,generated" `
|
||||
ServiceAreaYmin null.Val[float64] `db:"service_area_ymin,generated" `
|
||||
ServiceAreaXmax null.Val[float64] `db:"service_area_xmax,generated" `
|
||||
ServiceAreaYmax null.Val[float64] `db:"service_area_ymax,generated" `
|
||||
ServiceAreaCentroidGeojson null.Val[string] `db:"service_area_centroid_geojson,generated" `
|
||||
|
||||
R organizationR `db:"-" `
|
||||
|
||||
|
|
@ -55,78 +74,113 @@ type OrganizationsQuery = *psql.ViewQuery[*Organization, OrganizationSlice]
|
|||
|
||||
// organizationR is where relationships are stored.
|
||||
type organizationR struct {
|
||||
EmailContacts CommsEmailContactSlice // district_subscription_email.district_subscription_email_email_contact_address_fkeydistrict_subscription_email.district_subscription_email_organization_id_fkey
|
||||
Phones CommsPhoneSlice // district_subscription_phone.district_subscription_phone_organization_id_fkeydistrict_subscription_phone.district_subscription_phone_phone_e164_fkey
|
||||
Containerrelates FieldseekerContainerrelateSlice // fieldseeker.containerrelate.containerrelate_organization_id_fkey
|
||||
Fieldscoutinglogs FieldseekerFieldscoutinglogSlice // fieldseeker.fieldscoutinglog.fieldscoutinglog_organization_id_fkey
|
||||
Habitatrelates FieldseekerHabitatrelateSlice // fieldseeker.habitatrelate.habitatrelate_organization_id_fkey
|
||||
Inspectionsamples FieldseekerInspectionsampleSlice // fieldseeker.inspectionsample.inspectionsample_organization_id_fkey
|
||||
Inspectionsampledetails FieldseekerInspectionsampledetailSlice // fieldseeker.inspectionsampledetail.inspectionsampledetail_organization_id_fkey
|
||||
Linelocations FieldseekerLinelocationSlice // fieldseeker.linelocation.linelocation_organization_id_fkey
|
||||
Locationtrackings FieldseekerLocationtrackingSlice // fieldseeker.locationtracking.locationtracking_organization_id_fkey
|
||||
Mosquitoinspections FieldseekerMosquitoinspectionSlice // fieldseeker.mosquitoinspection.mosquitoinspection_organization_id_fkey
|
||||
Pointlocations FieldseekerPointlocationSlice // fieldseeker.pointlocation.pointlocation_organization_id_fkey
|
||||
Polygonlocations FieldseekerPolygonlocationSlice // fieldseeker.polygonlocation.polygonlocation_organization_id_fkey
|
||||
FieldseekerPool FieldseekerPoolSlice // fieldseeker.pool.pool_organization_id_fkey
|
||||
Pooldetails FieldseekerPooldetailSlice // fieldseeker.pooldetail.pooldetail_organization_id_fkey
|
||||
Proposedtreatmentareas FieldseekerProposedtreatmentareaSlice // fieldseeker.proposedtreatmentarea.proposedtreatmentarea_organization_id_fkey
|
||||
Qamosquitoinspections FieldseekerQamosquitoinspectionSlice // fieldseeker.qamosquitoinspection.qamosquitoinspection_organization_id_fkey
|
||||
Rodentlocations FieldseekerRodentlocationSlice // fieldseeker.rodentlocation.rodentlocation_organization_id_fkey
|
||||
Samplecollections FieldseekerSamplecollectionSlice // fieldseeker.samplecollection.samplecollection_organization_id_fkey
|
||||
Samplelocations FieldseekerSamplelocationSlice // fieldseeker.samplelocation.samplelocation_organization_id_fkey
|
||||
Servicerequests FieldseekerServicerequestSlice // fieldseeker.servicerequest.servicerequest_organization_id_fkey
|
||||
Speciesabundances FieldseekerSpeciesabundanceSlice // fieldseeker.speciesabundance.speciesabundance_organization_id_fkey
|
||||
Stormdrains FieldseekerStormdrainSlice // fieldseeker.stormdrain.stormdrain_organization_id_fkey
|
||||
Timecards FieldseekerTimecardSlice // fieldseeker.timecard.timecard_organization_id_fkey
|
||||
Trapdata FieldseekerTrapdatumSlice // fieldseeker.trapdata.trapdata_organization_id_fkey
|
||||
Traplocations FieldseekerTraplocationSlice // fieldseeker.traplocation.traplocation_organization_id_fkey
|
||||
Treatments FieldseekerTreatmentSlice // fieldseeker.treatment.treatment_organization_id_fkey
|
||||
Treatmentareas FieldseekerTreatmentareaSlice // fieldseeker.treatmentarea.treatmentarea_organization_id_fkey
|
||||
Zones FieldseekerZoneSlice // fieldseeker.zones.zones_organization_id_fkey
|
||||
Zones2s FieldseekerZones2Slice // fieldseeker.zones2.zones2_organization_id_fkey
|
||||
FieldseekerSyncs FieldseekerSyncSlice // fieldseeker_sync.fieldseeker_sync_organization_id_fkey
|
||||
Files FileuploadFileSlice // fileupload.file.file_organization_id_fkey
|
||||
Pools FileuploadPoolSlice // fileupload.pool.pool_organization_id_fkey
|
||||
H3Aggregations H3AggregationSlice // h3_aggregation.h3_aggregation_organization_id_fkey
|
||||
NoteAudios NoteAudioSlice // note_audio.note_audio_organization_id_fkey
|
||||
NoteImages NoteImageSlice // note_image.note_image_organization_id_fkey
|
||||
ImportDistrictGidDistrict *ImportDistrict // organization.organization_import_district_gid_fkey
|
||||
Nuisances PublicreportNuisanceSlice // publicreport.nuisance.nuisance_organization_id_fkey
|
||||
PublicreportPool PublicreportPoolSlice // publicreport.pool.pool_organization_id_fkey
|
||||
Quicks PublicreportQuickSlice // publicreport.quick.quick_organization_id_fkey
|
||||
User UserSlice // user_.user__organization_id_fkey
|
||||
EmailContacts CommsEmailContactSlice // district_subscription_email.district_subscription_email_email_contact_address_fkeydistrict_subscription_email.district_subscription_email_organization_id_fkey
|
||||
Phones CommsPhoneSlice // district_subscription_phone.district_subscription_phone_organization_id_fkeydistrict_subscription_phone.district_subscription_phone_phone_e164_fkey
|
||||
Containerrelates FieldseekerContainerrelateSlice // fieldseeker.containerrelate.containerrelate_organization_id_fkey
|
||||
Fieldscoutinglogs FieldseekerFieldscoutinglogSlice // fieldseeker.fieldscoutinglog.fieldscoutinglog_organization_id_fkey
|
||||
Habitatrelates FieldseekerHabitatrelateSlice // fieldseeker.habitatrelate.habitatrelate_organization_id_fkey
|
||||
Inspectionsamples FieldseekerInspectionsampleSlice // fieldseeker.inspectionsample.inspectionsample_organization_id_fkey
|
||||
Inspectionsampledetails FieldseekerInspectionsampledetailSlice // fieldseeker.inspectionsampledetail.inspectionsampledetail_organization_id_fkey
|
||||
Linelocations FieldseekerLinelocationSlice // fieldseeker.linelocation.linelocation_organization_id_fkey
|
||||
Locationtrackings FieldseekerLocationtrackingSlice // fieldseeker.locationtracking.locationtracking_organization_id_fkey
|
||||
Mosquitoinspections FieldseekerMosquitoinspectionSlice // fieldseeker.mosquitoinspection.mosquitoinspection_organization_id_fkey
|
||||
Pointlocations FieldseekerPointlocationSlice // fieldseeker.pointlocation.pointlocation_organization_id_fkey
|
||||
Polygonlocations FieldseekerPolygonlocationSlice // fieldseeker.polygonlocation.polygonlocation_organization_id_fkey
|
||||
FieldseekerPool FieldseekerPoolSlice // fieldseeker.pool.pool_organization_id_fkey
|
||||
Pooldetails FieldseekerPooldetailSlice // fieldseeker.pooldetail.pooldetail_organization_id_fkey
|
||||
Proposedtreatmentareas FieldseekerProposedtreatmentareaSlice // fieldseeker.proposedtreatmentarea.proposedtreatmentarea_organization_id_fkey
|
||||
Qamosquitoinspections FieldseekerQamosquitoinspectionSlice // fieldseeker.qamosquitoinspection.qamosquitoinspection_organization_id_fkey
|
||||
Rodentlocations FieldseekerRodentlocationSlice // fieldseeker.rodentlocation.rodentlocation_organization_id_fkey
|
||||
Samplecollections FieldseekerSamplecollectionSlice // fieldseeker.samplecollection.samplecollection_organization_id_fkey
|
||||
Samplelocations FieldseekerSamplelocationSlice // fieldseeker.samplelocation.samplelocation_organization_id_fkey
|
||||
Servicerequests FieldseekerServicerequestSlice // fieldseeker.servicerequest.servicerequest_organization_id_fkey
|
||||
Speciesabundances FieldseekerSpeciesabundanceSlice // fieldseeker.speciesabundance.speciesabundance_organization_id_fkey
|
||||
Stormdrains FieldseekerStormdrainSlice // fieldseeker.stormdrain.stormdrain_organization_id_fkey
|
||||
Timecards FieldseekerTimecardSlice // fieldseeker.timecard.timecard_organization_id_fkey
|
||||
Trapdata FieldseekerTrapdatumSlice // fieldseeker.trapdata.trapdata_organization_id_fkey
|
||||
Traplocations FieldseekerTraplocationSlice // fieldseeker.traplocation.traplocation_organization_id_fkey
|
||||
Treatments FieldseekerTreatmentSlice // fieldseeker.treatment.treatment_organization_id_fkey
|
||||
Treatmentareas FieldseekerTreatmentareaSlice // fieldseeker.treatmentarea.treatmentarea_organization_id_fkey
|
||||
Zones FieldseekerZoneSlice // fieldseeker.zones.zones_organization_id_fkey
|
||||
Zones2s FieldseekerZones2Slice // fieldseeker.zones2.zones2_organization_id_fkey
|
||||
FieldseekerSyncs FieldseekerSyncSlice // fieldseeker_sync.fieldseeker_sync_organization_id_fkey
|
||||
Files FileuploadFileSlice // fileupload.file.file_organization_id_fkey
|
||||
Pools FileuploadPoolSlice // fileupload.pool.pool_organization_id_fkey
|
||||
H3Aggregations H3AggregationSlice // h3_aggregation.h3_aggregation_organization_id_fkey
|
||||
NoteAudios NoteAudioSlice // note_audio.note_audio_organization_id_fkey
|
||||
NoteImages NoteImageSlice // note_image.note_image_organization_id_fkey
|
||||
Nuisances PublicreportNuisanceSlice // publicreport.nuisance.nuisance_organization_id_fkey
|
||||
PublicreportPool PublicreportPoolSlice // publicreport.pool.pool_organization_id_fkey
|
||||
Quicks PublicreportQuickSlice // publicreport.quick.quick_organization_id_fkey
|
||||
User UserSlice // user_.user__organization_id_fkey
|
||||
}
|
||||
|
||||
func buildOrganizationColumns(alias string) organizationColumns {
|
||||
return organizationColumns{
|
||||
ColumnsExpr: expr.NewColumnsExpr(
|
||||
"id", "name", "arcgis_id", "arcgis_name", "fieldseeker_url", "import_district_gid", "website", "logo_uuid", "slug",
|
||||
"id", "name", "arcgis_id", "arcgis_name", "fieldseeker_url", "import_district_gid", "website", "logo_uuid", "slug", "general_manager_name", "mailing_address_city", "mailing_address_postal_code", "mailing_address_street", "office_address_city", "office_address_postal_code", "office_address_street", "service_area_geometry", "service_area_square_meters", "service_area_centroid", "service_area_extent", "office_fax", "office_phone", "service_area_xmin", "service_area_ymin", "service_area_xmax", "service_area_ymax", "service_area_centroid_geojson",
|
||||
).WithParent("organization"),
|
||||
tableAlias: alias,
|
||||
ID: psql.Quote(alias, "id"),
|
||||
Name: psql.Quote(alias, "name"),
|
||||
ArcgisID: psql.Quote(alias, "arcgis_id"),
|
||||
ArcgisName: psql.Quote(alias, "arcgis_name"),
|
||||
FieldseekerURL: psql.Quote(alias, "fieldseeker_url"),
|
||||
ImportDistrictGid: psql.Quote(alias, "import_district_gid"),
|
||||
Website: psql.Quote(alias, "website"),
|
||||
LogoUUID: psql.Quote(alias, "logo_uuid"),
|
||||
Slug: psql.Quote(alias, "slug"),
|
||||
tableAlias: alias,
|
||||
ID: psql.Quote(alias, "id"),
|
||||
Name: psql.Quote(alias, "name"),
|
||||
ArcgisID: psql.Quote(alias, "arcgis_id"),
|
||||
ArcgisName: psql.Quote(alias, "arcgis_name"),
|
||||
FieldseekerURL: psql.Quote(alias, "fieldseeker_url"),
|
||||
ImportDistrictGid: psql.Quote(alias, "import_district_gid"),
|
||||
Website: psql.Quote(alias, "website"),
|
||||
LogoUUID: psql.Quote(alias, "logo_uuid"),
|
||||
Slug: psql.Quote(alias, "slug"),
|
||||
GeneralManagerName: psql.Quote(alias, "general_manager_name"),
|
||||
MailingAddressCity: psql.Quote(alias, "mailing_address_city"),
|
||||
MailingAddressPostalCode: psql.Quote(alias, "mailing_address_postal_code"),
|
||||
MailingAddressStreet: psql.Quote(alias, "mailing_address_street"),
|
||||
OfficeAddressCity: psql.Quote(alias, "office_address_city"),
|
||||
OfficeAddressPostalCode: psql.Quote(alias, "office_address_postal_code"),
|
||||
OfficeAddressStreet: psql.Quote(alias, "office_address_street"),
|
||||
ServiceAreaGeometry: psql.Quote(alias, "service_area_geometry"),
|
||||
ServiceAreaSquareMeters: psql.Quote(alias, "service_area_square_meters"),
|
||||
ServiceAreaCentroid: psql.Quote(alias, "service_area_centroid"),
|
||||
ServiceAreaExtent: psql.Quote(alias, "service_area_extent"),
|
||||
OfficeFax: psql.Quote(alias, "office_fax"),
|
||||
OfficePhone: psql.Quote(alias, "office_phone"),
|
||||
ServiceAreaXmin: psql.Quote(alias, "service_area_xmin"),
|
||||
ServiceAreaYmin: psql.Quote(alias, "service_area_ymin"),
|
||||
ServiceAreaXmax: psql.Quote(alias, "service_area_xmax"),
|
||||
ServiceAreaYmax: psql.Quote(alias, "service_area_ymax"),
|
||||
ServiceAreaCentroidGeojson: psql.Quote(alias, "service_area_centroid_geojson"),
|
||||
}
|
||||
}
|
||||
|
||||
type organizationColumns struct {
|
||||
expr.ColumnsExpr
|
||||
tableAlias string
|
||||
ID psql.Expression
|
||||
Name psql.Expression
|
||||
ArcgisID psql.Expression
|
||||
ArcgisName psql.Expression
|
||||
FieldseekerURL psql.Expression
|
||||
ImportDistrictGid psql.Expression
|
||||
Website psql.Expression
|
||||
LogoUUID psql.Expression
|
||||
Slug psql.Expression
|
||||
tableAlias string
|
||||
ID psql.Expression
|
||||
Name psql.Expression
|
||||
ArcgisID psql.Expression
|
||||
ArcgisName psql.Expression
|
||||
FieldseekerURL psql.Expression
|
||||
ImportDistrictGid psql.Expression
|
||||
Website psql.Expression
|
||||
LogoUUID psql.Expression
|
||||
Slug psql.Expression
|
||||
GeneralManagerName psql.Expression
|
||||
MailingAddressCity psql.Expression
|
||||
MailingAddressPostalCode psql.Expression
|
||||
MailingAddressStreet psql.Expression
|
||||
OfficeAddressCity psql.Expression
|
||||
OfficeAddressPostalCode psql.Expression
|
||||
OfficeAddressStreet psql.Expression
|
||||
ServiceAreaGeometry psql.Expression
|
||||
ServiceAreaSquareMeters psql.Expression
|
||||
ServiceAreaCentroid psql.Expression
|
||||
ServiceAreaExtent psql.Expression
|
||||
OfficeFax psql.Expression
|
||||
OfficePhone psql.Expression
|
||||
ServiceAreaXmin psql.Expression
|
||||
ServiceAreaYmin psql.Expression
|
||||
ServiceAreaXmax psql.Expression
|
||||
ServiceAreaYmax psql.Expression
|
||||
ServiceAreaCentroidGeojson psql.Expression
|
||||
}
|
||||
|
||||
func (c organizationColumns) Alias() string {
|
||||
|
|
@ -141,19 +195,29 @@ func (organizationColumns) AliasedAs(alias string) organizationColumns {
|
|||
// All values are optional, and do not have to be set
|
||||
// Generated columns are not included
|
||||
type OrganizationSetter struct {
|
||||
ID omit.Val[int32] `db:"id,pk" `
|
||||
Name omit.Val[string] `db:"name" `
|
||||
ArcgisID omitnull.Val[string] `db:"arcgis_id" `
|
||||
ArcgisName omitnull.Val[string] `db:"arcgis_name" `
|
||||
FieldseekerURL omitnull.Val[string] `db:"fieldseeker_url" `
|
||||
ImportDistrictGid omitnull.Val[int32] `db:"import_district_gid" `
|
||||
Website omitnull.Val[string] `db:"website" `
|
||||
LogoUUID omitnull.Val[uuid.UUID] `db:"logo_uuid" `
|
||||
Slug omitnull.Val[string] `db:"slug" `
|
||||
ID omit.Val[int32] `db:"id,pk" `
|
||||
Name omit.Val[string] `db:"name" `
|
||||
ArcgisID omitnull.Val[string] `db:"arcgis_id" `
|
||||
ArcgisName omitnull.Val[string] `db:"arcgis_name" `
|
||||
FieldseekerURL omitnull.Val[string] `db:"fieldseeker_url" `
|
||||
ImportDistrictGid omitnull.Val[int32] `db:"import_district_gid" `
|
||||
Website omitnull.Val[string] `db:"website" `
|
||||
LogoUUID omitnull.Val[uuid.UUID] `db:"logo_uuid" `
|
||||
Slug omitnull.Val[string] `db:"slug" `
|
||||
GeneralManagerName omitnull.Val[string] `db:"general_manager_name" `
|
||||
MailingAddressCity omitnull.Val[string] `db:"mailing_address_city" `
|
||||
MailingAddressPostalCode omitnull.Val[string] `db:"mailing_address_postal_code" `
|
||||
MailingAddressStreet omitnull.Val[string] `db:"mailing_address_street" `
|
||||
OfficeAddressCity omitnull.Val[string] `db:"office_address_city" `
|
||||
OfficeAddressPostalCode omitnull.Val[string] `db:"office_address_postal_code" `
|
||||
OfficeAddressStreet omitnull.Val[string] `db:"office_address_street" `
|
||||
ServiceAreaGeometry omitnull.Val[string] `db:"service_area_geometry" `
|
||||
OfficeFax omitnull.Val[string] `db:"office_fax" `
|
||||
OfficePhone omitnull.Val[string] `db:"office_phone" `
|
||||
}
|
||||
|
||||
func (s OrganizationSetter) SetColumns() []string {
|
||||
vals := make([]string, 0, 9)
|
||||
vals := make([]string, 0, 19)
|
||||
if s.ID.IsValue() {
|
||||
vals = append(vals, "id")
|
||||
}
|
||||
|
|
@ -181,6 +245,36 @@ func (s OrganizationSetter) SetColumns() []string {
|
|||
if !s.Slug.IsUnset() {
|
||||
vals = append(vals, "slug")
|
||||
}
|
||||
if !s.GeneralManagerName.IsUnset() {
|
||||
vals = append(vals, "general_manager_name")
|
||||
}
|
||||
if !s.MailingAddressCity.IsUnset() {
|
||||
vals = append(vals, "mailing_address_city")
|
||||
}
|
||||
if !s.MailingAddressPostalCode.IsUnset() {
|
||||
vals = append(vals, "mailing_address_postal_code")
|
||||
}
|
||||
if !s.MailingAddressStreet.IsUnset() {
|
||||
vals = append(vals, "mailing_address_street")
|
||||
}
|
||||
if !s.OfficeAddressCity.IsUnset() {
|
||||
vals = append(vals, "office_address_city")
|
||||
}
|
||||
if !s.OfficeAddressPostalCode.IsUnset() {
|
||||
vals = append(vals, "office_address_postal_code")
|
||||
}
|
||||
if !s.OfficeAddressStreet.IsUnset() {
|
||||
vals = append(vals, "office_address_street")
|
||||
}
|
||||
if !s.ServiceAreaGeometry.IsUnset() {
|
||||
vals = append(vals, "service_area_geometry")
|
||||
}
|
||||
if !s.OfficeFax.IsUnset() {
|
||||
vals = append(vals, "office_fax")
|
||||
}
|
||||
if !s.OfficePhone.IsUnset() {
|
||||
vals = append(vals, "office_phone")
|
||||
}
|
||||
return vals
|
||||
}
|
||||
|
||||
|
|
@ -212,6 +306,36 @@ func (s OrganizationSetter) Overwrite(t *Organization) {
|
|||
if !s.Slug.IsUnset() {
|
||||
t.Slug = s.Slug.MustGetNull()
|
||||
}
|
||||
if !s.GeneralManagerName.IsUnset() {
|
||||
t.GeneralManagerName = s.GeneralManagerName.MustGetNull()
|
||||
}
|
||||
if !s.MailingAddressCity.IsUnset() {
|
||||
t.MailingAddressCity = s.MailingAddressCity.MustGetNull()
|
||||
}
|
||||
if !s.MailingAddressPostalCode.IsUnset() {
|
||||
t.MailingAddressPostalCode = s.MailingAddressPostalCode.MustGetNull()
|
||||
}
|
||||
if !s.MailingAddressStreet.IsUnset() {
|
||||
t.MailingAddressStreet = s.MailingAddressStreet.MustGetNull()
|
||||
}
|
||||
if !s.OfficeAddressCity.IsUnset() {
|
||||
t.OfficeAddressCity = s.OfficeAddressCity.MustGetNull()
|
||||
}
|
||||
if !s.OfficeAddressPostalCode.IsUnset() {
|
||||
t.OfficeAddressPostalCode = s.OfficeAddressPostalCode.MustGetNull()
|
||||
}
|
||||
if !s.OfficeAddressStreet.IsUnset() {
|
||||
t.OfficeAddressStreet = s.OfficeAddressStreet.MustGetNull()
|
||||
}
|
||||
if !s.ServiceAreaGeometry.IsUnset() {
|
||||
t.ServiceAreaGeometry = s.ServiceAreaGeometry.MustGetNull()
|
||||
}
|
||||
if !s.OfficeFax.IsUnset() {
|
||||
t.OfficeFax = s.OfficeFax.MustGetNull()
|
||||
}
|
||||
if !s.OfficePhone.IsUnset() {
|
||||
t.OfficePhone = s.OfficePhone.MustGetNull()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *OrganizationSetter) Apply(q *dialect.InsertQuery) {
|
||||
|
|
@ -220,7 +344,7 @@ func (s *OrganizationSetter) Apply(q *dialect.InsertQuery) {
|
|||
})
|
||||
|
||||
q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) {
|
||||
vals := make([]bob.Expression, 9)
|
||||
vals := make([]bob.Expression, 19)
|
||||
if s.ID.IsValue() {
|
||||
vals[0] = psql.Arg(s.ID.MustGet())
|
||||
} else {
|
||||
|
|
@ -275,6 +399,66 @@ func (s *OrganizationSetter) Apply(q *dialect.InsertQuery) {
|
|||
vals[8] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.GeneralManagerName.IsUnset() {
|
||||
vals[9] = psql.Arg(s.GeneralManagerName.MustGetNull())
|
||||
} else {
|
||||
vals[9] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.MailingAddressCity.IsUnset() {
|
||||
vals[10] = psql.Arg(s.MailingAddressCity.MustGetNull())
|
||||
} else {
|
||||
vals[10] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.MailingAddressPostalCode.IsUnset() {
|
||||
vals[11] = psql.Arg(s.MailingAddressPostalCode.MustGetNull())
|
||||
} else {
|
||||
vals[11] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.MailingAddressStreet.IsUnset() {
|
||||
vals[12] = psql.Arg(s.MailingAddressStreet.MustGetNull())
|
||||
} else {
|
||||
vals[12] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.OfficeAddressCity.IsUnset() {
|
||||
vals[13] = psql.Arg(s.OfficeAddressCity.MustGetNull())
|
||||
} else {
|
||||
vals[13] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.OfficeAddressPostalCode.IsUnset() {
|
||||
vals[14] = psql.Arg(s.OfficeAddressPostalCode.MustGetNull())
|
||||
} else {
|
||||
vals[14] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.OfficeAddressStreet.IsUnset() {
|
||||
vals[15] = psql.Arg(s.OfficeAddressStreet.MustGetNull())
|
||||
} else {
|
||||
vals[15] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.ServiceAreaGeometry.IsUnset() {
|
||||
vals[16] = psql.Arg(s.ServiceAreaGeometry.MustGetNull())
|
||||
} else {
|
||||
vals[16] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.OfficeFax.IsUnset() {
|
||||
vals[17] = psql.Arg(s.OfficeFax.MustGetNull())
|
||||
} else {
|
||||
vals[17] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
if !s.OfficePhone.IsUnset() {
|
||||
vals[18] = psql.Arg(s.OfficePhone.MustGetNull())
|
||||
} else {
|
||||
vals[18] = psql.Raw("DEFAULT")
|
||||
}
|
||||
|
||||
return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "")
|
||||
}))
|
||||
}
|
||||
|
|
@ -284,7 +468,7 @@ func (s OrganizationSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] {
|
|||
}
|
||||
|
||||
func (s OrganizationSetter) Expressions(prefix ...string) []bob.Expression {
|
||||
exprs := make([]bob.Expression, 0, 9)
|
||||
exprs := make([]bob.Expression, 0, 19)
|
||||
|
||||
if s.ID.IsValue() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
|
|
@ -349,6 +533,76 @@ func (s OrganizationSetter) Expressions(prefix ...string) []bob.Expression {
|
|||
}})
|
||||
}
|
||||
|
||||
if !s.GeneralManagerName.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "general_manager_name")...),
|
||||
psql.Arg(s.GeneralManagerName),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.MailingAddressCity.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "mailing_address_city")...),
|
||||
psql.Arg(s.MailingAddressCity),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.MailingAddressPostalCode.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "mailing_address_postal_code")...),
|
||||
psql.Arg(s.MailingAddressPostalCode),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.MailingAddressStreet.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "mailing_address_street")...),
|
||||
psql.Arg(s.MailingAddressStreet),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.OfficeAddressCity.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "office_address_city")...),
|
||||
psql.Arg(s.OfficeAddressCity),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.OfficeAddressPostalCode.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "office_address_postal_code")...),
|
||||
psql.Arg(s.OfficeAddressPostalCode),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.OfficeAddressStreet.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "office_address_street")...),
|
||||
psql.Arg(s.OfficeAddressStreet),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.ServiceAreaGeometry.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "service_area_geometry")...),
|
||||
psql.Arg(s.ServiceAreaGeometry),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.OfficeFax.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "office_fax")...),
|
||||
psql.Arg(s.OfficeFax),
|
||||
}})
|
||||
}
|
||||
|
||||
if !s.OfficePhone.IsUnset() {
|
||||
exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{
|
||||
psql.Quote(append(prefix, "office_phone")...),
|
||||
psql.Arg(s.OfficePhone),
|
||||
}})
|
||||
}
|
||||
|
||||
return exprs
|
||||
}
|
||||
|
||||
|
|
@ -1425,30 +1679,6 @@ func (os OrganizationSlice) NoteImages(mods ...bob.Mod[*dialect.SelectQuery]) No
|
|||
)...)
|
||||
}
|
||||
|
||||
// ImportDistrictGidDistrict starts a query for related objects on import.district
|
||||
func (o *Organization) ImportDistrictGidDistrict(mods ...bob.Mod[*dialect.SelectQuery]) ImportDistrictsQuery {
|
||||
return ImportDistricts.Query(append(mods,
|
||||
sm.Where(ImportDistricts.Columns.Gid.EQ(psql.Arg(o.ImportDistrictGid))),
|
||||
)...)
|
||||
}
|
||||
|
||||
func (os OrganizationSlice) ImportDistrictGidDistrict(mods ...bob.Mod[*dialect.SelectQuery]) ImportDistrictsQuery {
|
||||
pkImportDistrictGid := make(pgtypes.Array[null.Val[int32]], 0, len(os))
|
||||
for _, o := range os {
|
||||
if o == nil {
|
||||
continue
|
||||
}
|
||||
pkImportDistrictGid = append(pkImportDistrictGid, o.ImportDistrictGid)
|
||||
}
|
||||
PKArgExpr := psql.Select(sm.Columns(
|
||||
psql.F("unnest", psql.Cast(psql.Arg(pkImportDistrictGid), "integer[]")),
|
||||
))
|
||||
|
||||
return ImportDistricts.Query(append(mods,
|
||||
sm.Where(psql.Group(ImportDistricts.Columns.Gid).OP("IN", PKArgExpr)),
|
||||
)...)
|
||||
}
|
||||
|
||||
// Nuisances starts a query for related objects on publicreport.nuisance
|
||||
func (o *Organization) Nuisances(mods ...bob.Mod[*dialect.SelectQuery]) PublicreportNuisancesQuery {
|
||||
return PublicreportNuisances.Query(append(mods,
|
||||
|
|
@ -3919,54 +4149,6 @@ func (organization0 *Organization) AttachNoteImages(ctx context.Context, exec bo
|
|||
return nil
|
||||
}
|
||||
|
||||
func attachOrganizationImportDistrictGidDistrict0(ctx context.Context, exec bob.Executor, count int, organization0 *Organization, importDistrict1 *ImportDistrict) (*Organization, error) {
|
||||
setter := &OrganizationSetter{
|
||||
ImportDistrictGid: omitnull.From(importDistrict1.Gid),
|
||||
}
|
||||
|
||||
err := organization0.Update(ctx, exec, setter)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("attachOrganizationImportDistrictGidDistrict0: %w", err)
|
||||
}
|
||||
|
||||
return organization0, nil
|
||||
}
|
||||
|
||||
func (organization0 *Organization) InsertImportDistrictGidDistrict(ctx context.Context, exec bob.Executor, related *ImportDistrictSetter) error {
|
||||
var err error
|
||||
|
||||
importDistrict1, err := ImportDistricts.Insert(related).One(ctx, exec)
|
||||
if err != nil {
|
||||
return fmt.Errorf("inserting related objects: %w", err)
|
||||
}
|
||||
|
||||
_, err = attachOrganizationImportDistrictGidDistrict0(ctx, exec, 1, organization0, importDistrict1)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
organization0.R.ImportDistrictGidDistrict = importDistrict1
|
||||
|
||||
importDistrict1.R.ImportDistrictGidOrganization = organization0
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (organization0 *Organization) AttachImportDistrictGidDistrict(ctx context.Context, exec bob.Executor, importDistrict1 *ImportDistrict) error {
|
||||
var err error
|
||||
|
||||
_, err = attachOrganizationImportDistrictGidDistrict0(ctx, exec, 1, organization0, importDistrict1)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
organization0.R.ImportDistrictGidDistrict = importDistrict1
|
||||
|
||||
importDistrict1.R.ImportDistrictGidOrganization = organization0
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func insertOrganizationNuisances0(ctx context.Context, exec bob.Executor, publicreportNuisances1 []*PublicreportNuisanceSetter, organization0 *Organization) (PublicreportNuisanceSlice, error) {
|
||||
for i := range publicreportNuisances1 {
|
||||
publicreportNuisances1[i].OrganizationID = omitnull.From(organization0.ID)
|
||||
|
|
@ -4240,15 +4422,33 @@ func (organization0 *Organization) AttachUser(ctx context.Context, exec bob.Exec
|
|||
}
|
||||
|
||||
type organizationWhere[Q psql.Filterable] struct {
|
||||
ID psql.WhereMod[Q, int32]
|
||||
Name psql.WhereMod[Q, string]
|
||||
ArcgisID psql.WhereNullMod[Q, string]
|
||||
ArcgisName psql.WhereNullMod[Q, string]
|
||||
FieldseekerURL psql.WhereNullMod[Q, string]
|
||||
ImportDistrictGid psql.WhereNullMod[Q, int32]
|
||||
Website psql.WhereNullMod[Q, string]
|
||||
LogoUUID psql.WhereNullMod[Q, uuid.UUID]
|
||||
Slug psql.WhereNullMod[Q, string]
|
||||
ID psql.WhereMod[Q, int32]
|
||||
Name psql.WhereMod[Q, string]
|
||||
ArcgisID psql.WhereNullMod[Q, string]
|
||||
ArcgisName psql.WhereNullMod[Q, string]
|
||||
FieldseekerURL psql.WhereNullMod[Q, string]
|
||||
ImportDistrictGid psql.WhereNullMod[Q, int32]
|
||||
Website psql.WhereNullMod[Q, string]
|
||||
LogoUUID psql.WhereNullMod[Q, uuid.UUID]
|
||||
Slug psql.WhereNullMod[Q, string]
|
||||
GeneralManagerName psql.WhereNullMod[Q, string]
|
||||
MailingAddressCity psql.WhereNullMod[Q, string]
|
||||
MailingAddressPostalCode psql.WhereNullMod[Q, string]
|
||||
MailingAddressStreet psql.WhereNullMod[Q, string]
|
||||
OfficeAddressCity psql.WhereNullMod[Q, string]
|
||||
OfficeAddressPostalCode psql.WhereNullMod[Q, string]
|
||||
OfficeAddressStreet psql.WhereNullMod[Q, string]
|
||||
ServiceAreaGeometry psql.WhereNullMod[Q, string]
|
||||
ServiceAreaSquareMeters psql.WhereNullMod[Q, decimal.Decimal]
|
||||
ServiceAreaCentroid psql.WhereNullMod[Q, string]
|
||||
ServiceAreaExtent psql.WhereNullMod[Q, string]
|
||||
OfficeFax psql.WhereNullMod[Q, string]
|
||||
OfficePhone psql.WhereNullMod[Q, string]
|
||||
ServiceAreaXmin psql.WhereNullMod[Q, float64]
|
||||
ServiceAreaYmin psql.WhereNullMod[Q, float64]
|
||||
ServiceAreaXmax psql.WhereNullMod[Q, float64]
|
||||
ServiceAreaYmax psql.WhereNullMod[Q, float64]
|
||||
ServiceAreaCentroidGeojson psql.WhereNullMod[Q, string]
|
||||
}
|
||||
|
||||
func (organizationWhere[Q]) AliasedAs(alias string) organizationWhere[Q] {
|
||||
|
|
@ -4257,15 +4457,33 @@ func (organizationWhere[Q]) AliasedAs(alias string) organizationWhere[Q] {
|
|||
|
||||
func buildOrganizationWhere[Q psql.Filterable](cols organizationColumns) organizationWhere[Q] {
|
||||
return organizationWhere[Q]{
|
||||
ID: psql.Where[Q, int32](cols.ID),
|
||||
Name: psql.Where[Q, string](cols.Name),
|
||||
ArcgisID: psql.WhereNull[Q, string](cols.ArcgisID),
|
||||
ArcgisName: psql.WhereNull[Q, string](cols.ArcgisName),
|
||||
FieldseekerURL: psql.WhereNull[Q, string](cols.FieldseekerURL),
|
||||
ImportDistrictGid: psql.WhereNull[Q, int32](cols.ImportDistrictGid),
|
||||
Website: psql.WhereNull[Q, string](cols.Website),
|
||||
LogoUUID: psql.WhereNull[Q, uuid.UUID](cols.LogoUUID),
|
||||
Slug: psql.WhereNull[Q, string](cols.Slug),
|
||||
ID: psql.Where[Q, int32](cols.ID),
|
||||
Name: psql.Where[Q, string](cols.Name),
|
||||
ArcgisID: psql.WhereNull[Q, string](cols.ArcgisID),
|
||||
ArcgisName: psql.WhereNull[Q, string](cols.ArcgisName),
|
||||
FieldseekerURL: psql.WhereNull[Q, string](cols.FieldseekerURL),
|
||||
ImportDistrictGid: psql.WhereNull[Q, int32](cols.ImportDistrictGid),
|
||||
Website: psql.WhereNull[Q, string](cols.Website),
|
||||
LogoUUID: psql.WhereNull[Q, uuid.UUID](cols.LogoUUID),
|
||||
Slug: psql.WhereNull[Q, string](cols.Slug),
|
||||
GeneralManagerName: psql.WhereNull[Q, string](cols.GeneralManagerName),
|
||||
MailingAddressCity: psql.WhereNull[Q, string](cols.MailingAddressCity),
|
||||
MailingAddressPostalCode: psql.WhereNull[Q, string](cols.MailingAddressPostalCode),
|
||||
MailingAddressStreet: psql.WhereNull[Q, string](cols.MailingAddressStreet),
|
||||
OfficeAddressCity: psql.WhereNull[Q, string](cols.OfficeAddressCity),
|
||||
OfficeAddressPostalCode: psql.WhereNull[Q, string](cols.OfficeAddressPostalCode),
|
||||
OfficeAddressStreet: psql.WhereNull[Q, string](cols.OfficeAddressStreet),
|
||||
ServiceAreaGeometry: psql.WhereNull[Q, string](cols.ServiceAreaGeometry),
|
||||
ServiceAreaSquareMeters: psql.WhereNull[Q, decimal.Decimal](cols.ServiceAreaSquareMeters),
|
||||
ServiceAreaCentroid: psql.WhereNull[Q, string](cols.ServiceAreaCentroid),
|
||||
ServiceAreaExtent: psql.WhereNull[Q, string](cols.ServiceAreaExtent),
|
||||
OfficeFax: psql.WhereNull[Q, string](cols.OfficeFax),
|
||||
OfficePhone: psql.WhereNull[Q, string](cols.OfficePhone),
|
||||
ServiceAreaXmin: psql.WhereNull[Q, float64](cols.ServiceAreaXmin),
|
||||
ServiceAreaYmin: psql.WhereNull[Q, float64](cols.ServiceAreaYmin),
|
||||
ServiceAreaXmax: psql.WhereNull[Q, float64](cols.ServiceAreaXmax),
|
||||
ServiceAreaYmax: psql.WhereNull[Q, float64](cols.ServiceAreaYmax),
|
||||
ServiceAreaCentroidGeojson: psql.WhereNull[Q, string](cols.ServiceAreaCentroidGeojson),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4765,18 +4983,6 @@ func (o *Organization) Preload(name string, retrieved any) error {
|
|||
}
|
||||
}
|
||||
return nil
|
||||
case "ImportDistrictGidDistrict":
|
||||
rel, ok := retrieved.(*ImportDistrict)
|
||||
if !ok {
|
||||
return fmt.Errorf("organization cannot load %T as %q", retrieved, name)
|
||||
}
|
||||
|
||||
o.R.ImportDistrictGidDistrict = rel
|
||||
|
||||
if rel != nil {
|
||||
rel.R.ImportDistrictGidOrganization = o
|
||||
}
|
||||
return nil
|
||||
case "Nuisances":
|
||||
rels, ok := retrieved.(PublicreportNuisanceSlice)
|
||||
if !ok {
|
||||
|
|
@ -4838,69 +5044,52 @@ func (o *Organization) Preload(name string, retrieved any) error {
|
|||
}
|
||||
}
|
||||
|
||||
type organizationPreloader struct {
|
||||
ImportDistrictGidDistrict func(...psql.PreloadOption) psql.Preloader
|
||||
}
|
||||
type organizationPreloader struct{}
|
||||
|
||||
func buildOrganizationPreloader() organizationPreloader {
|
||||
return organizationPreloader{
|
||||
ImportDistrictGidDistrict: func(opts ...psql.PreloadOption) psql.Preloader {
|
||||
return psql.Preload[*ImportDistrict, ImportDistrictSlice](psql.PreloadRel{
|
||||
Name: "ImportDistrictGidDistrict",
|
||||
Sides: []psql.PreloadSide{
|
||||
{
|
||||
From: Organizations,
|
||||
To: ImportDistricts,
|
||||
FromColumns: []string{"import_district_gid"},
|
||||
ToColumns: []string{"gid"},
|
||||
},
|
||||
},
|
||||
}, ImportDistricts.Columns.Names(), opts...)
|
||||
},
|
||||
}
|
||||
return organizationPreloader{}
|
||||
}
|
||||
|
||||
type organizationThenLoader[Q orm.Loadable] struct {
|
||||
EmailContacts func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Phones func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Containerrelates func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Fieldscoutinglogs func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Habitatrelates func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Inspectionsamples func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Inspectionsampledetails func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Linelocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Locationtrackings func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Mosquitoinspections func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Pointlocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Polygonlocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
FieldseekerPool func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Pooldetails func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Proposedtreatmentareas func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Qamosquitoinspections func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Rodentlocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Samplecollections func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Samplelocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Servicerequests func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Speciesabundances func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Stormdrains func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Timecards func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Trapdata func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Traplocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Treatments func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Treatmentareas func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Zones func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Zones2s func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
FieldseekerSyncs func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Files func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Pools func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
H3Aggregations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
NoteAudios func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
NoteImages func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
ImportDistrictGidDistrict func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Nuisances func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
PublicreportPool func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Quicks func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
User func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
EmailContacts func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Phones func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Containerrelates func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Fieldscoutinglogs func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Habitatrelates func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Inspectionsamples func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Inspectionsampledetails func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Linelocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Locationtrackings func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Mosquitoinspections func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Pointlocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Polygonlocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
FieldseekerPool func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Pooldetails func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Proposedtreatmentareas func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Qamosquitoinspections func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Rodentlocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Samplecollections func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Samplelocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Servicerequests func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Speciesabundances func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Stormdrains func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Timecards func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Trapdata func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Traplocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Treatments func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Treatmentareas func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Zones func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Zones2s func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
FieldseekerSyncs func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Files func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Pools func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
H3Aggregations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
NoteAudios func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
NoteImages func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Nuisances func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
PublicreportPool func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
Quicks func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
User func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q]
|
||||
}
|
||||
|
||||
func buildOrganizationThenLoader[Q orm.Loadable]() organizationThenLoader[Q] {
|
||||
|
|
@ -5009,9 +5198,6 @@ func buildOrganizationThenLoader[Q orm.Loadable]() organizationThenLoader[Q] {
|
|||
type NoteImagesLoadInterface interface {
|
||||
LoadNoteImages(context.Context, bob.Executor, ...bob.Mod[*dialect.SelectQuery]) error
|
||||
}
|
||||
type ImportDistrictGidDistrictLoadInterface interface {
|
||||
LoadImportDistrictGidDistrict(context.Context, bob.Executor, ...bob.Mod[*dialect.SelectQuery]) error
|
||||
}
|
||||
type NuisancesLoadInterface interface {
|
||||
LoadNuisances(context.Context, bob.Executor, ...bob.Mod[*dialect.SelectQuery]) error
|
||||
}
|
||||
|
|
@ -5236,12 +5422,6 @@ func buildOrganizationThenLoader[Q orm.Loadable]() organizationThenLoader[Q] {
|
|||
return retrieved.LoadNoteImages(ctx, exec, mods...)
|
||||
},
|
||||
),
|
||||
ImportDistrictGidDistrict: thenLoadBuilder[Q](
|
||||
"ImportDistrictGidDistrict",
|
||||
func(ctx context.Context, exec bob.Executor, retrieved ImportDistrictGidDistrictLoadInterface, mods ...bob.Mod[*dialect.SelectQuery]) error {
|
||||
return retrieved.LoadImportDistrictGidDistrict(ctx, exec, mods...)
|
||||
},
|
||||
),
|
||||
Nuisances: thenLoadBuilder[Q](
|
||||
"Nuisances",
|
||||
func(ctx context.Context, exec bob.Executor, retrieved NuisancesLoadInterface, mods ...bob.Mod[*dialect.SelectQuery]) error {
|
||||
|
|
@ -7444,61 +7624,6 @@ func (os OrganizationSlice) LoadNoteImages(ctx context.Context, exec bob.Executo
|
|||
return nil
|
||||
}
|
||||
|
||||
// LoadImportDistrictGidDistrict loads the organization's ImportDistrictGidDistrict into the .R struct
|
||||
func (o *Organization) LoadImportDistrictGidDistrict(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error {
|
||||
if o == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Reset the relationship
|
||||
o.R.ImportDistrictGidDistrict = nil
|
||||
|
||||
related, err := o.ImportDistrictGidDistrict(mods...).One(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
related.R.ImportDistrictGidOrganization = o
|
||||
|
||||
o.R.ImportDistrictGidDistrict = related
|
||||
return nil
|
||||
}
|
||||
|
||||
// LoadImportDistrictGidDistrict loads the organization's ImportDistrictGidDistrict into the .R struct
|
||||
func (os OrganizationSlice) LoadImportDistrictGidDistrict(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error {
|
||||
if len(os) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
importDistricts, err := os.ImportDistrictGidDistrict(mods...).All(ctx, exec)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, o := range os {
|
||||
if o == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, rel := range importDistricts {
|
||||
if !o.ImportDistrictGid.IsValue() {
|
||||
continue
|
||||
}
|
||||
|
||||
if !(o.ImportDistrictGid.IsValue() && o.ImportDistrictGid.MustGet() == rel.Gid) {
|
||||
continue
|
||||
}
|
||||
|
||||
rel.R.ImportDistrictGidOrganization = o
|
||||
|
||||
o.R.ImportDistrictGidDistrict = rel
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// LoadNuisances loads the organization's Nuisances into the .R struct
|
||||
func (o *Organization) LoadNuisances(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error {
|
||||
if o == nil {
|
||||
|
|
@ -10170,47 +10295,46 @@ func (os OrganizationSlice) LoadCountUser(ctx context.Context, exec bob.Executor
|
|||
}
|
||||
|
||||
type organizationJoins[Q dialect.Joinable] struct {
|
||||
typ string
|
||||
EmailContacts modAs[Q, commsEmailContactColumns]
|
||||
Phones modAs[Q, commsPhoneColumns]
|
||||
Containerrelates modAs[Q, fieldseekerContainerrelateColumns]
|
||||
Fieldscoutinglogs modAs[Q, fieldseekerFieldscoutinglogColumns]
|
||||
Habitatrelates modAs[Q, fieldseekerHabitatrelateColumns]
|
||||
Inspectionsamples modAs[Q, fieldseekerInspectionsampleColumns]
|
||||
Inspectionsampledetails modAs[Q, fieldseekerInspectionsampledetailColumns]
|
||||
Linelocations modAs[Q, fieldseekerLinelocationColumns]
|
||||
Locationtrackings modAs[Q, fieldseekerLocationtrackingColumns]
|
||||
Mosquitoinspections modAs[Q, fieldseekerMosquitoinspectionColumns]
|
||||
Pointlocations modAs[Q, fieldseekerPointlocationColumns]
|
||||
Polygonlocations modAs[Q, fieldseekerPolygonlocationColumns]
|
||||
FieldseekerPool modAs[Q, fieldseekerPoolColumns]
|
||||
Pooldetails modAs[Q, fieldseekerPooldetailColumns]
|
||||
Proposedtreatmentareas modAs[Q, fieldseekerProposedtreatmentareaColumns]
|
||||
Qamosquitoinspections modAs[Q, fieldseekerQamosquitoinspectionColumns]
|
||||
Rodentlocations modAs[Q, fieldseekerRodentlocationColumns]
|
||||
Samplecollections modAs[Q, fieldseekerSamplecollectionColumns]
|
||||
Samplelocations modAs[Q, fieldseekerSamplelocationColumns]
|
||||
Servicerequests modAs[Q, fieldseekerServicerequestColumns]
|
||||
Speciesabundances modAs[Q, fieldseekerSpeciesabundanceColumns]
|
||||
Stormdrains modAs[Q, fieldseekerStormdrainColumns]
|
||||
Timecards modAs[Q, fieldseekerTimecardColumns]
|
||||
Trapdata modAs[Q, fieldseekerTrapdatumColumns]
|
||||
Traplocations modAs[Q, fieldseekerTraplocationColumns]
|
||||
Treatments modAs[Q, fieldseekerTreatmentColumns]
|
||||
Treatmentareas modAs[Q, fieldseekerTreatmentareaColumns]
|
||||
Zones modAs[Q, fieldseekerZoneColumns]
|
||||
Zones2s modAs[Q, fieldseekerZones2Columns]
|
||||
FieldseekerSyncs modAs[Q, fieldseekerSyncColumns]
|
||||
Files modAs[Q, fileuploadFileColumns]
|
||||
Pools modAs[Q, fileuploadPoolColumns]
|
||||
H3Aggregations modAs[Q, h3AggregationColumns]
|
||||
NoteAudios modAs[Q, noteAudioColumns]
|
||||
NoteImages modAs[Q, noteImageColumns]
|
||||
ImportDistrictGidDistrict modAs[Q, importDistrictColumns]
|
||||
Nuisances modAs[Q, publicreportNuisanceColumns]
|
||||
PublicreportPool modAs[Q, publicreportPoolColumns]
|
||||
Quicks modAs[Q, publicreportQuickColumns]
|
||||
User modAs[Q, userColumns]
|
||||
typ string
|
||||
EmailContacts modAs[Q, commsEmailContactColumns]
|
||||
Phones modAs[Q, commsPhoneColumns]
|
||||
Containerrelates modAs[Q, fieldseekerContainerrelateColumns]
|
||||
Fieldscoutinglogs modAs[Q, fieldseekerFieldscoutinglogColumns]
|
||||
Habitatrelates modAs[Q, fieldseekerHabitatrelateColumns]
|
||||
Inspectionsamples modAs[Q, fieldseekerInspectionsampleColumns]
|
||||
Inspectionsampledetails modAs[Q, fieldseekerInspectionsampledetailColumns]
|
||||
Linelocations modAs[Q, fieldseekerLinelocationColumns]
|
||||
Locationtrackings modAs[Q, fieldseekerLocationtrackingColumns]
|
||||
Mosquitoinspections modAs[Q, fieldseekerMosquitoinspectionColumns]
|
||||
Pointlocations modAs[Q, fieldseekerPointlocationColumns]
|
||||
Polygonlocations modAs[Q, fieldseekerPolygonlocationColumns]
|
||||
FieldseekerPool modAs[Q, fieldseekerPoolColumns]
|
||||
Pooldetails modAs[Q, fieldseekerPooldetailColumns]
|
||||
Proposedtreatmentareas modAs[Q, fieldseekerProposedtreatmentareaColumns]
|
||||
Qamosquitoinspections modAs[Q, fieldseekerQamosquitoinspectionColumns]
|
||||
Rodentlocations modAs[Q, fieldseekerRodentlocationColumns]
|
||||
Samplecollections modAs[Q, fieldseekerSamplecollectionColumns]
|
||||
Samplelocations modAs[Q, fieldseekerSamplelocationColumns]
|
||||
Servicerequests modAs[Q, fieldseekerServicerequestColumns]
|
||||
Speciesabundances modAs[Q, fieldseekerSpeciesabundanceColumns]
|
||||
Stormdrains modAs[Q, fieldseekerStormdrainColumns]
|
||||
Timecards modAs[Q, fieldseekerTimecardColumns]
|
||||
Trapdata modAs[Q, fieldseekerTrapdatumColumns]
|
||||
Traplocations modAs[Q, fieldseekerTraplocationColumns]
|
||||
Treatments modAs[Q, fieldseekerTreatmentColumns]
|
||||
Treatmentareas modAs[Q, fieldseekerTreatmentareaColumns]
|
||||
Zones modAs[Q, fieldseekerZoneColumns]
|
||||
Zones2s modAs[Q, fieldseekerZones2Columns]
|
||||
FieldseekerSyncs modAs[Q, fieldseekerSyncColumns]
|
||||
Files modAs[Q, fileuploadFileColumns]
|
||||
Pools modAs[Q, fileuploadPoolColumns]
|
||||
H3Aggregations modAs[Q, h3AggregationColumns]
|
||||
NoteAudios modAs[Q, noteAudioColumns]
|
||||
NoteImages modAs[Q, noteImageColumns]
|
||||
Nuisances modAs[Q, publicreportNuisanceColumns]
|
||||
PublicreportPool modAs[Q, publicreportPoolColumns]
|
||||
Quicks modAs[Q, publicreportQuickColumns]
|
||||
User modAs[Q, userColumns]
|
||||
}
|
||||
|
||||
func (j organizationJoins[Q]) aliasedAs(alias string) organizationJoins[Q] {
|
||||
|
|
@ -10726,20 +10850,6 @@ func buildOrganizationJoins[Q dialect.Joinable](cols organizationColumns, typ st
|
|||
return mods
|
||||
},
|
||||
},
|
||||
ImportDistrictGidDistrict: modAs[Q, importDistrictColumns]{
|
||||
c: ImportDistricts.Columns,
|
||||
f: func(to importDistrictColumns) bob.Mod[Q] {
|
||||
mods := make(mods.QueryMods[Q], 0, 1)
|
||||
|
||||
{
|
||||
mods = append(mods, dialect.Join[Q](typ, ImportDistricts.Name().As(to.Alias())).On(
|
||||
to.Gid.EQ(cols.ImportDistrictGid),
|
||||
))
|
||||
}
|
||||
|
||||
return mods
|
||||
},
|
||||
},
|
||||
Nuisances: modAs[Q, publicreportNuisanceColumns]{
|
||||
c: PublicreportNuisances.Columns,
|
||||
f: func(to publicreportNuisanceColumns) bob.Mod[Q] {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue