2026-01-27 18:44:02 +00:00
|
|
|
// Code generated by BobGen psql v0.42.5. DO NOT EDIT.
|
2025-11-04 23:11:32 +00:00
|
|
|
// This file is meant to be re-generated in place and/or deleted at any time.
|
|
|
|
|
|
|
|
|
|
package factory
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"testing"
|
|
|
|
|
|
2026-01-27 18:44:02 +00:00
|
|
|
"github.com/Gleipnir-Technology/bob"
|
2025-11-24 18:08:24 +00:00
|
|
|
models "github.com/Gleipnir-Technology/nidus-sync/db/models"
|
2025-11-04 23:11:32 +00:00
|
|
|
"github.com/aarondl/opt/null"
|
|
|
|
|
"github.com/aarondl/opt/omit"
|
|
|
|
|
"github.com/aarondl/opt/omitnull"
|
2026-01-22 03:27:32 +00:00
|
|
|
"github.com/google/uuid"
|
2025-11-04 23:11:32 +00:00
|
|
|
"github.com/jaswdr/faker/v2"
|
2026-02-17 05:33:12 +00:00
|
|
|
"github.com/shopspring/decimal"
|
2025-11-04 23:11:32 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type OrganizationMod interface {
|
|
|
|
|
Apply(context.Context, *OrganizationTemplate)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type OrganizationModFunc func(context.Context, *OrganizationTemplate)
|
|
|
|
|
|
|
|
|
|
func (f OrganizationModFunc) Apply(ctx context.Context, n *OrganizationTemplate) {
|
|
|
|
|
f(ctx, n)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type OrganizationModSlice []OrganizationMod
|
|
|
|
|
|
|
|
|
|
func (mods OrganizationModSlice) Apply(ctx context.Context, n *OrganizationTemplate) {
|
|
|
|
|
for _, f := range mods {
|
|
|
|
|
f.Apply(ctx, n)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// OrganizationTemplate is an object representing the database table.
|
|
|
|
|
// all columns are optional and should be set by mods
|
|
|
|
|
type OrganizationTemplate struct {
|
2026-02-28 22:54:39 +00:00
|
|
|
ID func() int32
|
|
|
|
|
Name func() string
|
|
|
|
|
ImportDistrictGid func() null.Val[int32]
|
|
|
|
|
Website func() null.Val[string]
|
|
|
|
|
LogoUUID func() null.Val[uuid.UUID]
|
|
|
|
|
Slug func() null.Val[string]
|
|
|
|
|
GeneralManagerName func() null.Val[string]
|
|
|
|
|
MailingAddressCity func() null.Val[string]
|
|
|
|
|
MailingAddressPostalCode func() null.Val[string]
|
|
|
|
|
MailingAddressStreet func() null.Val[string]
|
|
|
|
|
OfficeAddressCity func() null.Val[string]
|
|
|
|
|
OfficeAddressPostalCode func() null.Val[string]
|
|
|
|
|
OfficeAddressStreet func() null.Val[string]
|
|
|
|
|
ServiceAreaGeometry func() null.Val[string]
|
|
|
|
|
ServiceAreaSquareMeters func() null.Val[decimal.Decimal]
|
|
|
|
|
ServiceAreaCentroid func() null.Val[string]
|
|
|
|
|
ServiceAreaExtent func() null.Val[string]
|
|
|
|
|
OfficeFax func() null.Val[string]
|
|
|
|
|
OfficePhone func() null.Val[string]
|
|
|
|
|
ServiceAreaXmin func() null.Val[float64]
|
|
|
|
|
ServiceAreaYmin func() null.Val[float64]
|
|
|
|
|
ServiceAreaXmax func() null.Val[float64]
|
|
|
|
|
ServiceAreaYmax func() null.Val[float64]
|
|
|
|
|
ServiceAreaCentroidGeojson func() null.Val[string]
|
|
|
|
|
ServiceAreaCentroidX func() null.Val[float64]
|
|
|
|
|
ServiceAreaCentroidY func() null.Val[float64]
|
|
|
|
|
MailingAddressCountry func() null.Val[string]
|
|
|
|
|
MailingAddressState func() null.Val[string]
|
|
|
|
|
OfficeAddressCountry func() null.Val[string]
|
|
|
|
|
OfficeAddressState func() null.Val[string]
|
|
|
|
|
ArcgisAccountID func() null.Val[string]
|
|
|
|
|
FieldseekerServiceFeatureItemID func() null.Val[string]
|
2025-11-04 23:11:32 +00:00
|
|
|
|
|
|
|
|
r organizationR
|
|
|
|
|
f *Factory
|
|
|
|
|
|
|
|
|
|
alreadyPersisted bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type organizationR struct {
|
2026-02-28 22:54:39 +00:00
|
|
|
Accounts []*organizationRAccountsR
|
|
|
|
|
AddressMappings []*organizationRAddressMappingsR
|
|
|
|
|
ParcelMappings []*organizationRParcelMappingsR
|
|
|
|
|
EmailContacts []*organizationREmailContactsR
|
|
|
|
|
Phones []*organizationRPhonesR
|
|
|
|
|
Containerrelates []*organizationRContainerrelatesR
|
|
|
|
|
Fieldscoutinglogs []*organizationRFieldscoutinglogsR
|
|
|
|
|
Habitatrelates []*organizationRHabitatrelatesR
|
|
|
|
|
Inspectionsamples []*organizationRInspectionsamplesR
|
|
|
|
|
Inspectionsampledetails []*organizationRInspectionsampledetailsR
|
|
|
|
|
Linelocations []*organizationRLinelocationsR
|
|
|
|
|
Locationtrackings []*organizationRLocationtrackingsR
|
|
|
|
|
Mosquitoinspections []*organizationRMosquitoinspectionsR
|
|
|
|
|
Pointlocations []*organizationRPointlocationsR
|
|
|
|
|
Polygonlocations []*organizationRPolygonlocationsR
|
|
|
|
|
FieldseekerPool []*organizationRFieldseekerPoolR
|
|
|
|
|
Pooldetails []*organizationRPooldetailsR
|
|
|
|
|
Proposedtreatmentareas []*organizationRProposedtreatmentareasR
|
|
|
|
|
Qamosquitoinspections []*organizationRQamosquitoinspectionsR
|
|
|
|
|
Rodentlocations []*organizationRRodentlocationsR
|
|
|
|
|
Samplecollections []*organizationRSamplecollectionsR
|
|
|
|
|
Samplelocations []*organizationRSamplelocationsR
|
|
|
|
|
Servicerequests []*organizationRServicerequestsR
|
|
|
|
|
Speciesabundances []*organizationRSpeciesabundancesR
|
|
|
|
|
Stormdrains []*organizationRStormdrainsR
|
|
|
|
|
Timecards []*organizationRTimecardsR
|
|
|
|
|
Trapdata []*organizationRTrapdataR
|
|
|
|
|
Traplocations []*organizationRTraplocationsR
|
|
|
|
|
Treatments []*organizationRTreatmentsR
|
|
|
|
|
Treatmentareas []*organizationRTreatmentareasR
|
|
|
|
|
Zones []*organizationRZonesR
|
|
|
|
|
Zones2s []*organizationRZones2sR
|
|
|
|
|
FieldseekerSyncs []*organizationRFieldseekerSyncsR
|
|
|
|
|
Files []*organizationRFilesR
|
2026-03-02 18:49:02 +00:00
|
|
|
FlyoverAerialServices []*organizationRFlyoverAerialServicesR
|
2026-02-28 22:54:39 +00:00
|
|
|
Pools []*organizationRPoolsR
|
|
|
|
|
H3Aggregations []*organizationRH3AggregationsR
|
|
|
|
|
NoteAudios []*organizationRNoteAudiosR
|
|
|
|
|
NoteImages []*organizationRNoteImagesR
|
|
|
|
|
ArcgisAccountAccount *organizationRArcgisAccountAccountR
|
|
|
|
|
FieldseekerServiceFeatureItemServiceFeature *organizationRFieldseekerServiceFeatureItemServiceFeatureR
|
|
|
|
|
Nuisances []*organizationRNuisancesR
|
|
|
|
|
PublicreportPool []*organizationRPublicreportPoolR
|
|
|
|
|
Quicks []*organizationRQuicksR
|
|
|
|
|
User []*organizationRUserR
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type organizationRAccountsR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *ArcgisAccountTemplate
|
2025-12-24 17:49:39 -07:00
|
|
|
}
|
2026-02-26 18:18:33 +00:00
|
|
|
type organizationRAddressMappingsR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *ArcgisAddressMappingTemplate
|
|
|
|
|
}
|
|
|
|
|
type organizationRParcelMappingsR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *ArcgisParcelMappingTemplate
|
|
|
|
|
}
|
2026-01-31 20:08:08 +00:00
|
|
|
type organizationREmailContactsR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *CommsEmailContactTemplate
|
|
|
|
|
}
|
|
|
|
|
type organizationRPhonesR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *CommsPhoneTemplate
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRContainerrelatesR struct {
|
2025-11-07 09:30:31 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerContainerrelateTemplate
|
2025-11-07 09:30:31 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRFieldscoutinglogsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerFieldscoutinglogTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRHabitatrelatesR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerHabitatrelateTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRInspectionsamplesR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerInspectionsampleTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRInspectionsampledetailsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerInspectionsampledetailTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRLinelocationsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerLinelocationTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRLocationtrackingsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerLocationtrackingTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRMosquitoinspectionsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerMosquitoinspectionTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRPointlocationsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerPointlocationTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRPolygonlocationsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerPolygonlocationTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2026-02-09 18:25:44 +00:00
|
|
|
type organizationRFieldseekerPoolR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerPoolTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRPooldetailsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerPooldetailTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRProposedtreatmentareasR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerProposedtreatmentareaTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRQamosquitoinspectionsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerQamosquitoinspectionTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRRodentlocationsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerRodentlocationTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRSamplecollectionsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerSamplecollectionTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRSamplelocationsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerSamplelocationTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRServicerequestsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerServicerequestTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRSpeciesabundancesR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerSpeciesabundanceTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRStormdrainsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerStormdrainTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRTimecardsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerTimecardTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRTrapdataR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerTrapdatumTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRTraplocationsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerTraplocationTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRTreatmentsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerTreatmentTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRTreatmentareasR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerTreatmentareaTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRZonesR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerZoneTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRZones2sR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerZones2Template
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRFieldseekerSyncsR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *FieldseekerSyncTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2026-02-08 05:00:14 +00:00
|
|
|
type organizationRFilesR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *FileuploadFileTemplate
|
|
|
|
|
}
|
2026-03-02 18:49:02 +00:00
|
|
|
type organizationRFlyoverAerialServicesR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *FileuploadFlyoverAerialServiceTemplate
|
|
|
|
|
}
|
2026-02-09 19:03:27 +00:00
|
|
|
type organizationRPoolsR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *FileuploadPoolTemplate
|
|
|
|
|
}
|
2025-11-13 23:48:41 +00:00
|
|
|
type organizationRH3AggregationsR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *H3AggregationTemplate
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRNoteAudiosR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *NoteAudioTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationRNoteImagesR struct {
|
2025-11-07 08:34:32 +00:00
|
|
|
number int
|
2025-12-24 17:49:39 -07:00
|
|
|
o *NoteImageTemplate
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2026-02-28 22:54:39 +00:00
|
|
|
type organizationRArcgisAccountAccountR struct {
|
|
|
|
|
o *ArcgisAccountTemplate
|
|
|
|
|
}
|
|
|
|
|
type organizationRFieldseekerServiceFeatureItemServiceFeatureR struct {
|
|
|
|
|
o *ArcgisServiceFeatureTemplate
|
|
|
|
|
}
|
2026-01-22 03:27:32 +00:00
|
|
|
type organizationRNuisancesR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *PublicreportNuisanceTemplate
|
|
|
|
|
}
|
|
|
|
|
type organizationRPublicreportPoolR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *PublicreportPoolTemplate
|
|
|
|
|
}
|
|
|
|
|
type organizationRQuicksR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *PublicreportQuickTemplate
|
|
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
type organizationRUserR struct {
|
|
|
|
|
number int
|
|
|
|
|
o *UserTemplate
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Apply mods to the OrganizationTemplate
|
|
|
|
|
func (o *OrganizationTemplate) Apply(ctx context.Context, mods ...OrganizationMod) {
|
|
|
|
|
for _, mod := range mods {
|
|
|
|
|
mod.Apply(ctx, o)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// setModelRels creates and sets the relationships on *models.Organization
|
|
|
|
|
// according to the relationships in the template. Nothing is inserted into the db
|
|
|
|
|
func (t OrganizationTemplate) setModelRels(o *models.Organization) {
|
2026-02-28 22:54:39 +00:00
|
|
|
if t.r.Accounts != nil {
|
|
|
|
|
rel := models.ArcgisAccountSlice{}
|
|
|
|
|
for _, r := range t.r.Accounts {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.OrganizationID = o.ID // h2
|
|
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.Accounts = rel
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-26 18:18:33 +00:00
|
|
|
if t.r.AddressMappings != nil {
|
|
|
|
|
rel := models.ArcgisAddressMappingSlice{}
|
|
|
|
|
for _, r := range t.r.AddressMappings {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.OrganizationID = o.ID // h2
|
|
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.AddressMappings = rel
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if t.r.ParcelMappings != nil {
|
|
|
|
|
rel := models.ArcgisParcelMappingSlice{}
|
|
|
|
|
for _, r := range t.r.ParcelMappings {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.OrganizationID = o.ID // h2
|
|
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.ParcelMappings = rel
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-31 20:08:08 +00:00
|
|
|
if t.r.EmailContacts != nil {
|
|
|
|
|
rel := models.CommsEmailContactSlice{}
|
|
|
|
|
for _, r := range t.r.EmailContacts {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.R.Organizations = append(rel.R.Organizations, o)
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.EmailContacts = rel
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if t.r.Phones != nil {
|
|
|
|
|
rel := models.CommsPhoneSlice{}
|
|
|
|
|
for _, r := range t.r.Phones {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.R.Organizations = append(rel.R.Organizations, o)
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.Phones = rel
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Containerrelates != nil {
|
|
|
|
|
rel := models.FieldseekerContainerrelateSlice{}
|
|
|
|
|
for _, r := range t.r.Containerrelates {
|
2025-11-07 09:30:31 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.OrganizationID = o.ID // h2
|
|
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Containerrelates = rel
|
2025-11-07 09:30:31 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Fieldscoutinglogs != nil {
|
|
|
|
|
rel := models.FieldseekerFieldscoutinglogSlice{}
|
|
|
|
|
for _, r := range t.r.Fieldscoutinglogs {
|
2025-11-04 23:11:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-04 23:11:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Fieldscoutinglogs = rel
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Habitatrelates != nil {
|
|
|
|
|
rel := models.FieldseekerHabitatrelateSlice{}
|
|
|
|
|
for _, r := range t.r.Habitatrelates {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Habitatrelates = rel
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Inspectionsamples != nil {
|
|
|
|
|
rel := models.FieldseekerInspectionsampleSlice{}
|
|
|
|
|
for _, r := range t.r.Inspectionsamples {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Inspectionsamples = rel
|
2025-11-07 02:07:33 +00:00
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Inspectionsampledetails != nil {
|
|
|
|
|
rel := models.FieldseekerInspectionsampledetailSlice{}
|
|
|
|
|
for _, r := range t.r.Inspectionsampledetails {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Inspectionsampledetails = rel
|
2025-11-07 02:07:33 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Linelocations != nil {
|
|
|
|
|
rel := models.FieldseekerLinelocationSlice{}
|
|
|
|
|
for _, r := range t.r.Linelocations {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Linelocations = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Locationtrackings != nil {
|
|
|
|
|
rel := models.FieldseekerLocationtrackingSlice{}
|
|
|
|
|
for _, r := range t.r.Locationtrackings {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Locationtrackings = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Mosquitoinspections != nil {
|
|
|
|
|
rel := models.FieldseekerMosquitoinspectionSlice{}
|
|
|
|
|
for _, r := range t.r.Mosquitoinspections {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Mosquitoinspections = rel
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Pointlocations != nil {
|
|
|
|
|
rel := models.FieldseekerPointlocationSlice{}
|
|
|
|
|
for _, r := range t.r.Pointlocations {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Pointlocations = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Polygonlocations != nil {
|
|
|
|
|
rel := models.FieldseekerPolygonlocationSlice{}
|
|
|
|
|
for _, r := range t.r.Polygonlocations {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Polygonlocations = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2026-02-09 18:25:44 +00:00
|
|
|
if t.r.FieldseekerPool != nil {
|
2025-12-24 17:49:39 -07:00
|
|
|
rel := models.FieldseekerPoolSlice{}
|
2026-02-09 18:25:44 +00:00
|
|
|
for _, r := range t.r.FieldseekerPool {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2026-02-09 18:25:44 +00:00
|
|
|
o.R.FieldseekerPool = rel
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Pooldetails != nil {
|
|
|
|
|
rel := models.FieldseekerPooldetailSlice{}
|
|
|
|
|
for _, r := range t.r.Pooldetails {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Pooldetails = rel
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Proposedtreatmentareas != nil {
|
|
|
|
|
rel := models.FieldseekerProposedtreatmentareaSlice{}
|
|
|
|
|
for _, r := range t.r.Proposedtreatmentareas {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Proposedtreatmentareas = rel
|
2025-11-07 02:07:33 +00:00
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Qamosquitoinspections != nil {
|
|
|
|
|
rel := models.FieldseekerQamosquitoinspectionSlice{}
|
|
|
|
|
for _, r := range t.r.Qamosquitoinspections {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Qamosquitoinspections = rel
|
2025-11-07 02:07:33 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Rodentlocations != nil {
|
|
|
|
|
rel := models.FieldseekerRodentlocationSlice{}
|
|
|
|
|
for _, r := range t.r.Rodentlocations {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Rodentlocations = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Samplecollections != nil {
|
|
|
|
|
rel := models.FieldseekerSamplecollectionSlice{}
|
|
|
|
|
for _, r := range t.r.Samplecollections {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Samplecollections = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Samplelocations != nil {
|
|
|
|
|
rel := models.FieldseekerSamplelocationSlice{}
|
|
|
|
|
for _, r := range t.r.Samplelocations {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Samplelocations = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Servicerequests != nil {
|
|
|
|
|
rel := models.FieldseekerServicerequestSlice{}
|
|
|
|
|
for _, r := range t.r.Servicerequests {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Servicerequests = rel
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Speciesabundances != nil {
|
|
|
|
|
rel := models.FieldseekerSpeciesabundanceSlice{}
|
|
|
|
|
for _, r := range t.r.Speciesabundances {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Speciesabundances = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Stormdrains != nil {
|
|
|
|
|
rel := models.FieldseekerStormdrainSlice{}
|
|
|
|
|
for _, r := range t.r.Stormdrains {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Stormdrains = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Timecards != nil {
|
|
|
|
|
rel := models.FieldseekerTimecardSlice{}
|
|
|
|
|
for _, r := range t.r.Timecards {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Timecards = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Trapdata != nil {
|
|
|
|
|
rel := models.FieldseekerTrapdatumSlice{}
|
|
|
|
|
for _, r := range t.r.Trapdata {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Trapdata = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Traplocations != nil {
|
|
|
|
|
rel := models.FieldseekerTraplocationSlice{}
|
|
|
|
|
for _, r := range t.r.Traplocations {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
rel = append(rel, related...)
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Traplocations = rel
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Treatments != nil {
|
|
|
|
|
rel := models.FieldseekerTreatmentSlice{}
|
|
|
|
|
for _, r := range t.r.Treatments {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Treatments = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Treatmentareas != nil {
|
|
|
|
|
rel := models.FieldseekerTreatmentareaSlice{}
|
|
|
|
|
for _, r := range t.r.Treatmentareas {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Treatmentareas = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Zones != nil {
|
|
|
|
|
rel := models.FieldseekerZoneSlice{}
|
|
|
|
|
for _, r := range t.r.Zones {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Zones = rel
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.Zones2s != nil {
|
|
|
|
|
rel := models.FieldseekerZones2Slice{}
|
|
|
|
|
for _, r := range t.r.Zones2s {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.Zones2s = rel
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.FieldseekerSyncs != nil {
|
|
|
|
|
rel := models.FieldseekerSyncSlice{}
|
|
|
|
|
for _, r := range t.r.FieldseekerSyncs {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.FieldseekerSyncs = rel
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2026-02-08 05:00:14 +00:00
|
|
|
if t.r.Files != nil {
|
|
|
|
|
rel := models.FileuploadFileSlice{}
|
|
|
|
|
for _, r := range t.r.Files {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.OrganizationID = o.ID // h2
|
|
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.Files = rel
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 18:49:02 +00:00
|
|
|
if t.r.FlyoverAerialServices != nil {
|
|
|
|
|
rel := models.FileuploadFlyoverAerialServiceSlice{}
|
|
|
|
|
for _, r := range t.r.FlyoverAerialServices {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.OrganizationID = o.ID // h2
|
|
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.FlyoverAerialServices = rel
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-09 19:03:27 +00:00
|
|
|
if t.r.Pools != nil {
|
|
|
|
|
rel := models.FileuploadPoolSlice{}
|
|
|
|
|
for _, r := range t.r.Pools {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.OrganizationID = o.ID // h2
|
|
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.Pools = rel
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-13 23:48:41 +00:00
|
|
|
if t.r.H3Aggregations != nil {
|
|
|
|
|
rel := models.H3AggregationSlice{}
|
|
|
|
|
for _, r := range t.r.H3Aggregations {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.OrganizationID = o.ID // h2
|
|
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.H3Aggregations = rel
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.NoteAudios != nil {
|
|
|
|
|
rel := models.NoteAudioSlice{}
|
|
|
|
|
for _, r := range t.r.NoteAudios {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.NoteAudios = rel
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.NoteImages != nil {
|
|
|
|
|
rel := models.NoteImageSlice{}
|
|
|
|
|
for _, r := range t.r.NoteImages {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2025-11-07 09:30:31 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.NoteImages = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
if t.r.ArcgisAccountAccount != nil {
|
|
|
|
|
rel := t.r.ArcgisAccountAccount.o.Build()
|
|
|
|
|
rel.R.ArcgisAccountOrganizations = append(rel.R.ArcgisAccountOrganizations, o)
|
|
|
|
|
o.ArcgisAccountID = null.From(rel.ID) // h2
|
|
|
|
|
o.R.ArcgisAccountAccount = rel
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if t.r.FieldseekerServiceFeatureItemServiceFeature != nil {
|
|
|
|
|
rel := t.r.FieldseekerServiceFeatureItemServiceFeature.o.Build()
|
|
|
|
|
rel.R.FieldseekerServiceFeatureItemOrganizations = append(rel.R.FieldseekerServiceFeatureItemOrganizations, o)
|
|
|
|
|
o.FieldseekerServiceFeatureItemID = null.From(rel.ItemID) // h2
|
|
|
|
|
o.R.FieldseekerServiceFeatureItemServiceFeature = rel
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-22 03:27:32 +00:00
|
|
|
if t.r.Nuisances != nil {
|
|
|
|
|
rel := models.PublicreportNuisanceSlice{}
|
|
|
|
|
for _, r := range t.r.Nuisances {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.OrganizationID = null.From(o.ID) // h2
|
|
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.Nuisances = rel
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if t.r.PublicreportPool != nil {
|
|
|
|
|
rel := models.PublicreportPoolSlice{}
|
|
|
|
|
for _, r := range t.r.PublicreportPool {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.OrganizationID = null.From(o.ID) // h2
|
|
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.PublicreportPool = rel
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if t.r.Quicks != nil {
|
|
|
|
|
rel := models.PublicreportQuickSlice{}
|
|
|
|
|
for _, r := range t.r.Quicks {
|
|
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
|
|
|
|
rel.OrganizationID = null.From(o.ID) // h2
|
|
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
|
|
|
|
o.R.Quicks = rel
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if t.r.User != nil {
|
|
|
|
|
rel := models.UserSlice{}
|
|
|
|
|
for _, r := range t.r.User {
|
2025-11-07 08:34:32 +00:00
|
|
|
related := r.o.BuildMany(r.number)
|
|
|
|
|
for _, rel := range related {
|
2026-01-06 15:06:16 +00:00
|
|
|
rel.OrganizationID = o.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
rel.R.Organization = o
|
|
|
|
|
}
|
|
|
|
|
rel = append(rel, related...)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
o.R.User = rel
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// BuildSetter returns an *models.OrganizationSetter
|
|
|
|
|
// this does nothing with the relationship templates
|
|
|
|
|
func (o OrganizationTemplate) BuildSetter() *models.OrganizationSetter {
|
|
|
|
|
m := &models.OrganizationSetter{}
|
|
|
|
|
|
|
|
|
|
if o.ID != nil {
|
|
|
|
|
val := o.ID()
|
|
|
|
|
m.ID = omit.From(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Name != nil {
|
|
|
|
|
val := o.Name()
|
2026-01-14 21:49:12 +00:00
|
|
|
m.Name = omit.From(val)
|
2025-12-24 17:49:39 -07:00
|
|
|
}
|
2026-01-16 14:43:26 +00:00
|
|
|
if o.ImportDistrictGid != nil {
|
|
|
|
|
val := o.ImportDistrictGid()
|
|
|
|
|
m.ImportDistrictGid = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Website != nil {
|
|
|
|
|
val := o.Website()
|
|
|
|
|
m.Website = omitnull.FromNull(val)
|
|
|
|
|
}
|
2026-01-22 03:27:32 +00:00
|
|
|
if o.LogoUUID != nil {
|
|
|
|
|
val := o.LogoUUID()
|
|
|
|
|
m.LogoUUID = omitnull.FromNull(val)
|
|
|
|
|
}
|
2026-01-24 19:13:55 +00:00
|
|
|
if o.Slug != nil {
|
|
|
|
|
val := o.Slug()
|
|
|
|
|
m.Slug = omitnull.FromNull(val)
|
|
|
|
|
}
|
2026-02-17 05:33:12 +00:00
|
|
|
if o.GeneralManagerName != nil {
|
|
|
|
|
val := o.GeneralManagerName()
|
|
|
|
|
m.GeneralManagerName = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.MailingAddressCity != nil {
|
|
|
|
|
val := o.MailingAddressCity()
|
|
|
|
|
m.MailingAddressCity = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.MailingAddressPostalCode != nil {
|
|
|
|
|
val := o.MailingAddressPostalCode()
|
|
|
|
|
m.MailingAddressPostalCode = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.MailingAddressStreet != nil {
|
|
|
|
|
val := o.MailingAddressStreet()
|
|
|
|
|
m.MailingAddressStreet = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeAddressCity != nil {
|
|
|
|
|
val := o.OfficeAddressCity()
|
|
|
|
|
m.OfficeAddressCity = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeAddressPostalCode != nil {
|
|
|
|
|
val := o.OfficeAddressPostalCode()
|
|
|
|
|
m.OfficeAddressPostalCode = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeAddressStreet != nil {
|
|
|
|
|
val := o.OfficeAddressStreet()
|
|
|
|
|
m.OfficeAddressStreet = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.ServiceAreaGeometry != nil {
|
|
|
|
|
val := o.ServiceAreaGeometry()
|
|
|
|
|
m.ServiceAreaGeometry = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeFax != nil {
|
|
|
|
|
val := o.OfficeFax()
|
|
|
|
|
m.OfficeFax = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.OfficePhone != nil {
|
|
|
|
|
val := o.OfficePhone()
|
|
|
|
|
m.OfficePhone = omitnull.FromNull(val)
|
|
|
|
|
}
|
2026-02-28 22:54:39 +00:00
|
|
|
if o.MailingAddressCountry != nil {
|
|
|
|
|
val := o.MailingAddressCountry()
|
|
|
|
|
m.MailingAddressCountry = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.MailingAddressState != nil {
|
|
|
|
|
val := o.MailingAddressState()
|
|
|
|
|
m.MailingAddressState = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeAddressCountry != nil {
|
|
|
|
|
val := o.OfficeAddressCountry()
|
|
|
|
|
m.OfficeAddressCountry = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeAddressState != nil {
|
|
|
|
|
val := o.OfficeAddressState()
|
|
|
|
|
m.OfficeAddressState = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.ArcgisAccountID != nil {
|
|
|
|
|
val := o.ArcgisAccountID()
|
|
|
|
|
m.ArcgisAccountID = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.FieldseekerServiceFeatureItemID != nil {
|
|
|
|
|
val := o.FieldseekerServiceFeatureItemID()
|
|
|
|
|
m.FieldseekerServiceFeatureItemID = omitnull.FromNull(val)
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BuildManySetter returns an []*models.OrganizationSetter
|
|
|
|
|
// this does nothing with the relationship templates
|
|
|
|
|
func (o OrganizationTemplate) BuildManySetter(number int) []*models.OrganizationSetter {
|
|
|
|
|
m := make([]*models.OrganizationSetter, number)
|
|
|
|
|
|
|
|
|
|
for i := range m {
|
|
|
|
|
m[i] = o.BuildSetter()
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Build returns an *models.Organization
|
|
|
|
|
// Related objects are also created and placed in the .R field
|
|
|
|
|
// NOTE: Objects are not inserted into the database. Use OrganizationTemplate.Create
|
|
|
|
|
func (o OrganizationTemplate) Build() *models.Organization {
|
|
|
|
|
m := &models.Organization{}
|
|
|
|
|
|
|
|
|
|
if o.ID != nil {
|
|
|
|
|
m.ID = o.ID()
|
|
|
|
|
}
|
|
|
|
|
if o.Name != nil {
|
|
|
|
|
m.Name = o.Name()
|
|
|
|
|
}
|
2026-01-16 14:43:26 +00:00
|
|
|
if o.ImportDistrictGid != nil {
|
|
|
|
|
m.ImportDistrictGid = o.ImportDistrictGid()
|
|
|
|
|
}
|
|
|
|
|
if o.Website != nil {
|
|
|
|
|
m.Website = o.Website()
|
|
|
|
|
}
|
2026-01-22 03:27:32 +00:00
|
|
|
if o.LogoUUID != nil {
|
|
|
|
|
m.LogoUUID = o.LogoUUID()
|
|
|
|
|
}
|
2026-01-24 19:13:55 +00:00
|
|
|
if o.Slug != nil {
|
|
|
|
|
m.Slug = o.Slug()
|
|
|
|
|
}
|
2026-02-17 05:33:12 +00:00
|
|
|
if o.GeneralManagerName != nil {
|
|
|
|
|
m.GeneralManagerName = o.GeneralManagerName()
|
|
|
|
|
}
|
|
|
|
|
if o.MailingAddressCity != nil {
|
|
|
|
|
m.MailingAddressCity = o.MailingAddressCity()
|
|
|
|
|
}
|
|
|
|
|
if o.MailingAddressPostalCode != nil {
|
|
|
|
|
m.MailingAddressPostalCode = o.MailingAddressPostalCode()
|
|
|
|
|
}
|
|
|
|
|
if o.MailingAddressStreet != nil {
|
|
|
|
|
m.MailingAddressStreet = o.MailingAddressStreet()
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeAddressCity != nil {
|
|
|
|
|
m.OfficeAddressCity = o.OfficeAddressCity()
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeAddressPostalCode != nil {
|
|
|
|
|
m.OfficeAddressPostalCode = o.OfficeAddressPostalCode()
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeAddressStreet != nil {
|
|
|
|
|
m.OfficeAddressStreet = o.OfficeAddressStreet()
|
|
|
|
|
}
|
|
|
|
|
if o.ServiceAreaGeometry != nil {
|
|
|
|
|
m.ServiceAreaGeometry = o.ServiceAreaGeometry()
|
|
|
|
|
}
|
|
|
|
|
if o.ServiceAreaSquareMeters != nil {
|
|
|
|
|
m.ServiceAreaSquareMeters = o.ServiceAreaSquareMeters()
|
|
|
|
|
}
|
|
|
|
|
if o.ServiceAreaCentroid != nil {
|
|
|
|
|
m.ServiceAreaCentroid = o.ServiceAreaCentroid()
|
|
|
|
|
}
|
|
|
|
|
if o.ServiceAreaExtent != nil {
|
|
|
|
|
m.ServiceAreaExtent = o.ServiceAreaExtent()
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeFax != nil {
|
|
|
|
|
m.OfficeFax = o.OfficeFax()
|
|
|
|
|
}
|
|
|
|
|
if o.OfficePhone != nil {
|
|
|
|
|
m.OfficePhone = o.OfficePhone()
|
|
|
|
|
}
|
|
|
|
|
if o.ServiceAreaXmin != nil {
|
|
|
|
|
m.ServiceAreaXmin = o.ServiceAreaXmin()
|
|
|
|
|
}
|
|
|
|
|
if o.ServiceAreaYmin != nil {
|
|
|
|
|
m.ServiceAreaYmin = o.ServiceAreaYmin()
|
|
|
|
|
}
|
|
|
|
|
if o.ServiceAreaXmax != nil {
|
|
|
|
|
m.ServiceAreaXmax = o.ServiceAreaXmax()
|
|
|
|
|
}
|
|
|
|
|
if o.ServiceAreaYmax != nil {
|
|
|
|
|
m.ServiceAreaYmax = o.ServiceAreaYmax()
|
|
|
|
|
}
|
|
|
|
|
if o.ServiceAreaCentroidGeojson != nil {
|
|
|
|
|
m.ServiceAreaCentroidGeojson = o.ServiceAreaCentroidGeojson()
|
|
|
|
|
}
|
2026-02-25 16:08:32 +00:00
|
|
|
if o.ServiceAreaCentroidX != nil {
|
|
|
|
|
m.ServiceAreaCentroidX = o.ServiceAreaCentroidX()
|
|
|
|
|
}
|
|
|
|
|
if o.ServiceAreaCentroidY != nil {
|
|
|
|
|
m.ServiceAreaCentroidY = o.ServiceAreaCentroidY()
|
|
|
|
|
}
|
2026-02-28 22:54:39 +00:00
|
|
|
if o.MailingAddressCountry != nil {
|
|
|
|
|
m.MailingAddressCountry = o.MailingAddressCountry()
|
|
|
|
|
}
|
|
|
|
|
if o.MailingAddressState != nil {
|
|
|
|
|
m.MailingAddressState = o.MailingAddressState()
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeAddressCountry != nil {
|
|
|
|
|
m.OfficeAddressCountry = o.OfficeAddressCountry()
|
|
|
|
|
}
|
|
|
|
|
if o.OfficeAddressState != nil {
|
|
|
|
|
m.OfficeAddressState = o.OfficeAddressState()
|
|
|
|
|
}
|
|
|
|
|
if o.ArcgisAccountID != nil {
|
|
|
|
|
m.ArcgisAccountID = o.ArcgisAccountID()
|
|
|
|
|
}
|
|
|
|
|
if o.FieldseekerServiceFeatureItemID != nil {
|
|
|
|
|
m.FieldseekerServiceFeatureItemID = o.FieldseekerServiceFeatureItemID()
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
o.setModelRels(m)
|
|
|
|
|
|
|
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BuildMany returns an models.OrganizationSlice
|
|
|
|
|
// Related objects are also created and placed in the .R field
|
|
|
|
|
// NOTE: Objects are not inserted into the database. Use OrganizationTemplate.CreateMany
|
|
|
|
|
func (o OrganizationTemplate) BuildMany(number int) models.OrganizationSlice {
|
|
|
|
|
m := make(models.OrganizationSlice, number)
|
|
|
|
|
|
|
|
|
|
for i := range m {
|
|
|
|
|
m[i] = o.Build()
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func ensureCreatableOrganization(m *models.OrganizationSetter) {
|
2026-01-14 21:49:12 +00:00
|
|
|
if !(m.Name.IsValue()) {
|
|
|
|
|
val := random_string(nil)
|
|
|
|
|
m.Name = omit.From(val)
|
|
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// insertOptRels creates and inserts any optional the relationships on *models.Organization
|
|
|
|
|
// according to the relationships in the template.
|
|
|
|
|
// any required relationship should have already exist on the model
|
|
|
|
|
func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.Organization) error {
|
|
|
|
|
var err error
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
isAccountsDone, _ := organizationRelAccountsCtx.Value(ctx)
|
|
|
|
|
if !isAccountsDone && o.r.Accounts != nil {
|
|
|
|
|
ctx = organizationRelAccountsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Accounts {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.Accounts = append(m.R.Accounts, r.o.Build())
|
|
|
|
|
} else {
|
|
|
|
|
rel0, err := r.o.CreateMany(ctx, exec, r.number)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
err = m.AttachAccounts(ctx, exec, rel0...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-26 18:18:33 +00:00
|
|
|
isAddressMappingsDone, _ := organizationRelAddressMappingsCtx.Value(ctx)
|
|
|
|
|
if !isAddressMappingsDone && o.r.AddressMappings != nil {
|
|
|
|
|
ctx = organizationRelAddressMappingsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.AddressMappings {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.AddressMappings = append(m.R.AddressMappings, r.o.Build())
|
|
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel1, err := r.o.CreateMany(ctx, exec, r.number)
|
2026-02-26 18:18:33 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachAddressMappings(ctx, exec, rel1...)
|
2026-02-26 18:18:33 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
isParcelMappingsDone, _ := organizationRelParcelMappingsCtx.Value(ctx)
|
|
|
|
|
if !isParcelMappingsDone && o.r.ParcelMappings != nil {
|
|
|
|
|
ctx = organizationRelParcelMappingsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.ParcelMappings {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.ParcelMappings = append(m.R.ParcelMappings, r.o.Build())
|
|
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel2, err := r.o.CreateMany(ctx, exec, r.number)
|
2026-02-26 18:18:33 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachParcelMappings(ctx, exec, rel2...)
|
2026-02-26 18:18:33 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-31 20:08:08 +00:00
|
|
|
isEmailContactsDone, _ := organizationRelEmailContactsCtx.Value(ctx)
|
|
|
|
|
if !isEmailContactsDone && o.r.EmailContacts != nil {
|
|
|
|
|
ctx = organizationRelEmailContactsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.EmailContacts {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.EmailContacts = append(m.R.EmailContacts, r.o.Build())
|
|
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel3, err := r.o.CreateMany(ctx, exec, r.number)
|
2026-01-31 20:08:08 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachEmailContacts(ctx, exec, rel3...)
|
2026-01-31 20:08:08 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
isPhonesDone, _ := organizationRelPhonesCtx.Value(ctx)
|
|
|
|
|
if !isPhonesDone && o.r.Phones != nil {
|
|
|
|
|
ctx = organizationRelPhonesCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Phones {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.Phones = append(m.R.Phones, r.o.Build())
|
|
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel4, err := r.o.CreateMany(ctx, exec, r.number)
|
2026-01-31 20:08:08 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachPhones(ctx, exec, rel4...)
|
2026-01-31 20:08:08 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isContainerrelatesDone, _ := organizationRelContainerrelatesCtx.Value(ctx)
|
|
|
|
|
if !isContainerrelatesDone && o.r.Containerrelates != nil {
|
|
|
|
|
ctx = organizationRelContainerrelatesCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Containerrelates {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.Containerrelates = append(m.R.Containerrelates, r.o.Build())
|
|
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel5, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-12-24 17:49:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachContainerrelates(ctx, exec, rel5...)
|
2025-12-24 17:49:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isFieldscoutinglogsDone, _ := organizationRelFieldscoutinglogsCtx.Value(ctx)
|
|
|
|
|
if !isFieldscoutinglogsDone && o.r.Fieldscoutinglogs != nil {
|
|
|
|
|
ctx = organizationRelFieldscoutinglogsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Fieldscoutinglogs {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.Fieldscoutinglogs = append(m.R.Fieldscoutinglogs, r.o.Build())
|
|
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel6, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-12-24 17:49:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachFieldscoutinglogs(ctx, exec, rel6...)
|
2025-12-24 17:49:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isHabitatrelatesDone, _ := organizationRelHabitatrelatesCtx.Value(ctx)
|
|
|
|
|
if !isHabitatrelatesDone && o.r.Habitatrelates != nil {
|
|
|
|
|
ctx = organizationRelHabitatrelatesCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Habitatrelates {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.Habitatrelates = append(m.R.Habitatrelates, r.o.Build())
|
|
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel7, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-12-24 17:49:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachHabitatrelates(ctx, exec, rel7...)
|
2025-12-24 17:49:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isInspectionsamplesDone, _ := organizationRelInspectionsamplesCtx.Value(ctx)
|
|
|
|
|
if !isInspectionsamplesDone && o.r.Inspectionsamples != nil {
|
|
|
|
|
ctx = organizationRelInspectionsamplesCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Inspectionsamples {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.Inspectionsamples = append(m.R.Inspectionsamples, r.o.Build())
|
|
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel8, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-12-24 17:49:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachInspectionsamples(ctx, exec, rel8...)
|
2025-12-24 17:49:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isInspectionsampledetailsDone, _ := organizationRelInspectionsampledetailsCtx.Value(ctx)
|
|
|
|
|
if !isInspectionsampledetailsDone && o.r.Inspectionsampledetails != nil {
|
|
|
|
|
ctx = organizationRelInspectionsampledetailsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Inspectionsampledetails {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.Inspectionsampledetails = append(m.R.Inspectionsampledetails, r.o.Build())
|
|
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel9, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-12-24 17:49:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachInspectionsampledetails(ctx, exec, rel9...)
|
2025-12-24 17:49:39 -07:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isLinelocationsDone, _ := organizationRelLinelocationsCtx.Value(ctx)
|
|
|
|
|
if !isLinelocationsDone && o.r.Linelocations != nil {
|
|
|
|
|
ctx = organizationRelLinelocationsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Linelocations {
|
2025-11-07 09:30:31 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Linelocations = append(m.R.Linelocations, r.o.Build())
|
2025-11-07 09:30:31 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel10, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 09:30:31 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachLinelocations(ctx, exec, rel10...)
|
2025-11-07 09:30:31 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isLocationtrackingsDone, _ := organizationRelLocationtrackingsCtx.Value(ctx)
|
|
|
|
|
if !isLocationtrackingsDone && o.r.Locationtrackings != nil {
|
|
|
|
|
ctx = organizationRelLocationtrackingsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Locationtrackings {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Locationtrackings = append(m.R.Locationtrackings, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel11, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachLocationtrackings(ctx, exec, rel11...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isMosquitoinspectionsDone, _ := organizationRelMosquitoinspectionsCtx.Value(ctx)
|
|
|
|
|
if !isMosquitoinspectionsDone && o.r.Mosquitoinspections != nil {
|
|
|
|
|
ctx = organizationRelMosquitoinspectionsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Mosquitoinspections {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Mosquitoinspections = append(m.R.Mosquitoinspections, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel12, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachMosquitoinspections(ctx, exec, rel12...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isPointlocationsDone, _ := organizationRelPointlocationsCtx.Value(ctx)
|
|
|
|
|
if !isPointlocationsDone && o.r.Pointlocations != nil {
|
|
|
|
|
ctx = organizationRelPointlocationsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Pointlocations {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Pointlocations = append(m.R.Pointlocations, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel13, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachPointlocations(ctx, exec, rel13...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isPolygonlocationsDone, _ := organizationRelPolygonlocationsCtx.Value(ctx)
|
|
|
|
|
if !isPolygonlocationsDone && o.r.Polygonlocations != nil {
|
|
|
|
|
ctx = organizationRelPolygonlocationsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Polygonlocations {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Polygonlocations = append(m.R.Polygonlocations, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel14, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachPolygonlocations(ctx, exec, rel14...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-09 18:25:44 +00:00
|
|
|
isFieldseekerPoolDone, _ := organizationRelFieldseekerPoolCtx.Value(ctx)
|
|
|
|
|
if !isFieldseekerPoolDone && o.r.FieldseekerPool != nil {
|
|
|
|
|
ctx = organizationRelFieldseekerPoolCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.FieldseekerPool {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2026-02-09 18:25:44 +00:00
|
|
|
m.R.FieldseekerPool = append(m.R.FieldseekerPool, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel15, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachFieldseekerPool(ctx, exec, rel15...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isPooldetailsDone, _ := organizationRelPooldetailsCtx.Value(ctx)
|
|
|
|
|
if !isPooldetailsDone && o.r.Pooldetails != nil {
|
|
|
|
|
ctx = organizationRelPooldetailsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Pooldetails {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Pooldetails = append(m.R.Pooldetails, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel16, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachPooldetails(ctx, exec, rel16...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isProposedtreatmentareasDone, _ := organizationRelProposedtreatmentareasCtx.Value(ctx)
|
|
|
|
|
if !isProposedtreatmentareasDone && o.r.Proposedtreatmentareas != nil {
|
|
|
|
|
ctx = organizationRelProposedtreatmentareasCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Proposedtreatmentareas {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Proposedtreatmentareas = append(m.R.Proposedtreatmentareas, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel17, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachProposedtreatmentareas(ctx, exec, rel17...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isQamosquitoinspectionsDone, _ := organizationRelQamosquitoinspectionsCtx.Value(ctx)
|
|
|
|
|
if !isQamosquitoinspectionsDone && o.r.Qamosquitoinspections != nil {
|
|
|
|
|
ctx = organizationRelQamosquitoinspectionsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Qamosquitoinspections {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Qamosquitoinspections = append(m.R.Qamosquitoinspections, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel18, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachQamosquitoinspections(ctx, exec, rel18...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isRodentlocationsDone, _ := organizationRelRodentlocationsCtx.Value(ctx)
|
|
|
|
|
if !isRodentlocationsDone && o.r.Rodentlocations != nil {
|
|
|
|
|
ctx = organizationRelRodentlocationsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Rodentlocations {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Rodentlocations = append(m.R.Rodentlocations, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel19, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachRodentlocations(ctx, exec, rel19...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isSamplecollectionsDone, _ := organizationRelSamplecollectionsCtx.Value(ctx)
|
|
|
|
|
if !isSamplecollectionsDone && o.r.Samplecollections != nil {
|
|
|
|
|
ctx = organizationRelSamplecollectionsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Samplecollections {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Samplecollections = append(m.R.Samplecollections, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel20, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachSamplecollections(ctx, exec, rel20...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isSamplelocationsDone, _ := organizationRelSamplelocationsCtx.Value(ctx)
|
|
|
|
|
if !isSamplelocationsDone && o.r.Samplelocations != nil {
|
|
|
|
|
ctx = organizationRelSamplelocationsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Samplelocations {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Samplelocations = append(m.R.Samplelocations, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel21, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachSamplelocations(ctx, exec, rel21...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isServicerequestsDone, _ := organizationRelServicerequestsCtx.Value(ctx)
|
|
|
|
|
if !isServicerequestsDone && o.r.Servicerequests != nil {
|
|
|
|
|
ctx = organizationRelServicerequestsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Servicerequests {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Servicerequests = append(m.R.Servicerequests, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel22, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachServicerequests(ctx, exec, rel22...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isSpeciesabundancesDone, _ := organizationRelSpeciesabundancesCtx.Value(ctx)
|
|
|
|
|
if !isSpeciesabundancesDone && o.r.Speciesabundances != nil {
|
|
|
|
|
ctx = organizationRelSpeciesabundancesCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Speciesabundances {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Speciesabundances = append(m.R.Speciesabundances, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel23, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachSpeciesabundances(ctx, exec, rel23...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isStormdrainsDone, _ := organizationRelStormdrainsCtx.Value(ctx)
|
|
|
|
|
if !isStormdrainsDone && o.r.Stormdrains != nil {
|
|
|
|
|
ctx = organizationRelStormdrainsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Stormdrains {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Stormdrains = append(m.R.Stormdrains, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel24, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachStormdrains(ctx, exec, rel24...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isTimecardsDone, _ := organizationRelTimecardsCtx.Value(ctx)
|
|
|
|
|
if !isTimecardsDone && o.r.Timecards != nil {
|
|
|
|
|
ctx = organizationRelTimecardsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Timecards {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Timecards = append(m.R.Timecards, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel25, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachTimecards(ctx, exec, rel25...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isTrapdataDone, _ := organizationRelTrapdataCtx.Value(ctx)
|
|
|
|
|
if !isTrapdataDone && o.r.Trapdata != nil {
|
|
|
|
|
ctx = organizationRelTrapdataCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Trapdata {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Trapdata = append(m.R.Trapdata, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel26, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachTrapdata(ctx, exec, rel26...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isTraplocationsDone, _ := organizationRelTraplocationsCtx.Value(ctx)
|
|
|
|
|
if !isTraplocationsDone && o.r.Traplocations != nil {
|
|
|
|
|
ctx = organizationRelTraplocationsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Traplocations {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Traplocations = append(m.R.Traplocations, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel27, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachTraplocations(ctx, exec, rel27...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isTreatmentsDone, _ := organizationRelTreatmentsCtx.Value(ctx)
|
|
|
|
|
if !isTreatmentsDone && o.r.Treatments != nil {
|
|
|
|
|
ctx = organizationRelTreatmentsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Treatments {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Treatments = append(m.R.Treatments, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel28, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachTreatments(ctx, exec, rel28...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isTreatmentareasDone, _ := organizationRelTreatmentareasCtx.Value(ctx)
|
|
|
|
|
if !isTreatmentareasDone && o.r.Treatmentareas != nil {
|
|
|
|
|
ctx = organizationRelTreatmentareasCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Treatmentareas {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Treatmentareas = append(m.R.Treatmentareas, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel29, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachTreatmentareas(ctx, exec, rel29...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isZonesDone, _ := organizationRelZonesCtx.Value(ctx)
|
|
|
|
|
if !isZonesDone && o.r.Zones != nil {
|
|
|
|
|
ctx = organizationRelZonesCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Zones {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Zones = append(m.R.Zones, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel30, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachZones(ctx, exec, rel30...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isZones2sDone, _ := organizationRelZones2sCtx.Value(ctx)
|
|
|
|
|
if !isZones2sDone && o.r.Zones2s != nil {
|
|
|
|
|
ctx = organizationRelZones2sCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Zones2s {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.Zones2s = append(m.R.Zones2s, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel31, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachZones2s(ctx, exec, rel31...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isFieldseekerSyncsDone, _ := organizationRelFieldseekerSyncsCtx.Value(ctx)
|
|
|
|
|
if !isFieldseekerSyncsDone && o.r.FieldseekerSyncs != nil {
|
|
|
|
|
ctx = organizationRelFieldseekerSyncsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.FieldseekerSyncs {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.FieldseekerSyncs = append(m.R.FieldseekerSyncs, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel32, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachFieldseekerSyncs(ctx, exec, rel32...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-08 05:00:14 +00:00
|
|
|
isFilesDone, _ := organizationRelFilesCtx.Value(ctx)
|
|
|
|
|
if !isFilesDone && o.r.Files != nil {
|
|
|
|
|
ctx = organizationRelFilesCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Files {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.Files = append(m.R.Files, r.o.Build())
|
|
|
|
|
} else {
|
2026-02-28 22:54:39 +00:00
|
|
|
rel33, err := r.o.CreateMany(ctx, exec, r.number)
|
2026-02-08 05:00:14 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
err = m.AttachFiles(ctx, exec, rel33...)
|
2026-02-08 05:00:14 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 18:49:02 +00:00
|
|
|
isFlyoverAerialServicesDone, _ := organizationRelFlyoverAerialServicesCtx.Value(ctx)
|
|
|
|
|
if !isFlyoverAerialServicesDone && o.r.FlyoverAerialServices != nil {
|
|
|
|
|
ctx = organizationRelFlyoverAerialServicesCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.FlyoverAerialServices {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.FlyoverAerialServices = append(m.R.FlyoverAerialServices, r.o.Build())
|
|
|
|
|
} else {
|
|
|
|
|
rel34, err := r.o.CreateMany(ctx, exec, r.number)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
err = m.AttachFlyoverAerialServices(ctx, exec, rel34...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-09 19:03:27 +00:00
|
|
|
isPoolsDone, _ := organizationRelPoolsCtx.Value(ctx)
|
|
|
|
|
if !isPoolsDone && o.r.Pools != nil {
|
|
|
|
|
ctx = organizationRelPoolsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Pools {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.Pools = append(m.R.Pools, r.o.Build())
|
|
|
|
|
} else {
|
2026-03-02 18:49:02 +00:00
|
|
|
rel35, err := r.o.CreateMany(ctx, exec, r.number)
|
2026-02-09 19:03:27 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 18:49:02 +00:00
|
|
|
err = m.AttachPools(ctx, exec, rel35...)
|
2026-02-09 19:03:27 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-13 23:48:41 +00:00
|
|
|
isH3AggregationsDone, _ := organizationRelH3AggregationsCtx.Value(ctx)
|
|
|
|
|
if !isH3AggregationsDone && o.r.H3Aggregations != nil {
|
|
|
|
|
ctx = organizationRelH3AggregationsCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.H3Aggregations {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.H3Aggregations = append(m.R.H3Aggregations, r.o.Build())
|
|
|
|
|
} else {
|
2026-03-02 18:49:02 +00:00
|
|
|
rel36, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-13 23:48:41 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 18:49:02 +00:00
|
|
|
err = m.AttachH3Aggregations(ctx, exec, rel36...)
|
2025-11-13 23:48:41 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isNoteAudiosDone, _ := organizationRelNoteAudiosCtx.Value(ctx)
|
|
|
|
|
if !isNoteAudiosDone && o.r.NoteAudios != nil {
|
|
|
|
|
ctx = organizationRelNoteAudiosCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.NoteAudios {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.NoteAudios = append(m.R.NoteAudios, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-03-02 18:49:02 +00:00
|
|
|
rel37, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 18:49:02 +00:00
|
|
|
err = m.AttachNoteAudios(ctx, exec, rel37...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isNoteImagesDone, _ := organizationRelNoteImagesCtx.Value(ctx)
|
|
|
|
|
if !isNoteImagesDone && o.r.NoteImages != nil {
|
|
|
|
|
ctx = organizationRelNoteImagesCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.NoteImages {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.NoteImages = append(m.R.NoteImages, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-03-02 18:49:02 +00:00
|
|
|
rel38, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 18:49:02 +00:00
|
|
|
err = m.AttachNoteImages(ctx, exec, rel38...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
isArcgisAccountAccountDone, _ := organizationRelArcgisAccountAccountCtx.Value(ctx)
|
|
|
|
|
if !isArcgisAccountAccountDone && o.r.ArcgisAccountAccount != nil {
|
|
|
|
|
ctx = organizationRelArcgisAccountAccountCtx.WithValue(ctx, true)
|
|
|
|
|
if o.r.ArcgisAccountAccount.o.alreadyPersisted {
|
|
|
|
|
m.R.ArcgisAccountAccount = o.r.ArcgisAccountAccount.o.Build()
|
|
|
|
|
} else {
|
2026-03-02 18:49:02 +00:00
|
|
|
var rel39 *models.ArcgisAccount
|
|
|
|
|
rel39, err = o.r.ArcgisAccountAccount.o.Create(ctx, exec)
|
2026-02-28 22:54:39 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
2026-03-02 18:49:02 +00:00
|
|
|
err = m.AttachArcgisAccountAccount(ctx, exec, rel39)
|
2026-02-28 22:54:39 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
isFieldseekerServiceFeatureItemServiceFeatureDone, _ := organizationRelFieldseekerServiceFeatureItemServiceFeatureCtx.Value(ctx)
|
|
|
|
|
if !isFieldseekerServiceFeatureItemServiceFeatureDone && o.r.FieldseekerServiceFeatureItemServiceFeature != nil {
|
|
|
|
|
ctx = organizationRelFieldseekerServiceFeatureItemServiceFeatureCtx.WithValue(ctx, true)
|
|
|
|
|
if o.r.FieldseekerServiceFeatureItemServiceFeature.o.alreadyPersisted {
|
|
|
|
|
m.R.FieldseekerServiceFeatureItemServiceFeature = o.r.FieldseekerServiceFeatureItemServiceFeature.o.Build()
|
|
|
|
|
} else {
|
2026-03-02 18:49:02 +00:00
|
|
|
var rel40 *models.ArcgisServiceFeature
|
|
|
|
|
rel40, err = o.r.FieldseekerServiceFeatureItemServiceFeature.o.Create(ctx, exec)
|
2026-02-28 22:54:39 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
2026-03-02 18:49:02 +00:00
|
|
|
err = m.AttachFieldseekerServiceFeatureItemServiceFeature(ctx, exec, rel40)
|
2026-02-28 22:54:39 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-22 03:27:32 +00:00
|
|
|
isNuisancesDone, _ := organizationRelNuisancesCtx.Value(ctx)
|
|
|
|
|
if !isNuisancesDone && o.r.Nuisances != nil {
|
|
|
|
|
ctx = organizationRelNuisancesCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Nuisances {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.Nuisances = append(m.R.Nuisances, r.o.Build())
|
|
|
|
|
} else {
|
2026-03-02 18:49:02 +00:00
|
|
|
rel41, err := r.o.CreateMany(ctx, exec, r.number)
|
2026-01-22 03:27:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 18:49:02 +00:00
|
|
|
err = m.AttachNuisances(ctx, exec, rel41...)
|
2026-01-22 03:27:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
isPublicreportPoolDone, _ := organizationRelPublicreportPoolCtx.Value(ctx)
|
|
|
|
|
if !isPublicreportPoolDone && o.r.PublicreportPool != nil {
|
|
|
|
|
ctx = organizationRelPublicreportPoolCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.PublicreportPool {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.PublicreportPool = append(m.R.PublicreportPool, r.o.Build())
|
|
|
|
|
} else {
|
2026-03-02 18:49:02 +00:00
|
|
|
rel42, err := r.o.CreateMany(ctx, exec, r.number)
|
2026-01-22 03:27:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 18:49:02 +00:00
|
|
|
err = m.AttachPublicreportPool(ctx, exec, rel42...)
|
2026-01-22 03:27:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
isQuicksDone, _ := organizationRelQuicksCtx.Value(ctx)
|
|
|
|
|
if !isQuicksDone && o.r.Quicks != nil {
|
|
|
|
|
ctx = organizationRelQuicksCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.Quicks {
|
|
|
|
|
if r.o.alreadyPersisted {
|
|
|
|
|
m.R.Quicks = append(m.R.Quicks, r.o.Build())
|
|
|
|
|
} else {
|
2026-03-02 18:49:02 +00:00
|
|
|
rel43, err := r.o.CreateMany(ctx, exec, r.number)
|
2026-01-22 03:27:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 18:49:02 +00:00
|
|
|
err = m.AttachQuicks(ctx, exec, rel43...)
|
2026-01-22 03:27:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
isUserDone, _ := organizationRelUserCtx.Value(ctx)
|
|
|
|
|
if !isUserDone && o.r.User != nil {
|
|
|
|
|
ctx = organizationRelUserCtx.WithValue(ctx, true)
|
|
|
|
|
for _, r := range o.r.User {
|
2025-11-07 08:34:32 +00:00
|
|
|
if r.o.alreadyPersisted {
|
2025-12-24 17:49:39 -07:00
|
|
|
m.R.User = append(m.R.User, r.o.Build())
|
2025-11-07 08:34:32 +00:00
|
|
|
} else {
|
2026-03-02 18:49:02 +00:00
|
|
|
rel44, err := r.o.CreateMany(ctx, exec, r.number)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 18:49:02 +00:00
|
|
|
err = m.AttachUser(ctx, exec, rel44...)
|
2025-11-07 08:34:32 +00:00
|
|
|
if err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
return err
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Create builds a organization and inserts it into the database
|
|
|
|
|
// Relations objects are also inserted and placed in the .R field
|
|
|
|
|
func (o *OrganizationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.Organization, error) {
|
|
|
|
|
var err error
|
|
|
|
|
opt := o.BuildSetter()
|
|
|
|
|
ensureCreatableOrganization(opt)
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
m, err := models.Organizations.Insert(opt).One(ctx, exec)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
if err := o.insertOptRels(ctx, exec, m); err != nil {
|
|
|
|
|
return nil, err
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
return m, err
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// MustCreate builds a organization and inserts it into the database
|
|
|
|
|
// Relations objects are also inserted and placed in the .R field
|
|
|
|
|
// panics if an error occurs
|
|
|
|
|
func (o *OrganizationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.Organization {
|
|
|
|
|
m, err := o.Create(ctx, exec)
|
|
|
|
|
if err != nil {
|
|
|
|
|
panic(err)
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
return m
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// CreateOrFail builds a organization and inserts it into the database
|
|
|
|
|
// Relations objects are also inserted and placed in the .R field
|
|
|
|
|
// It calls `tb.Fatal(err)` on the test/benchmark if an error occurs
|
|
|
|
|
func (o *OrganizationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.Organization {
|
|
|
|
|
tb.Helper()
|
|
|
|
|
m, err := o.Create(ctx, exec)
|
|
|
|
|
if err != nil {
|
|
|
|
|
tb.Fatal(err)
|
|
|
|
|
return nil
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
return m
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// CreateMany builds multiple organizations and inserts them into the database
|
|
|
|
|
// Relations objects are also inserted and placed in the .R field
|
|
|
|
|
func (o OrganizationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.OrganizationSlice, error) {
|
|
|
|
|
var err error
|
|
|
|
|
m := make(models.OrganizationSlice, number)
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
for i := range m {
|
|
|
|
|
m[i], err = o.Create(ctx, exec)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
return m, nil
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// MustCreateMany builds multiple organizations and inserts them into the database
|
|
|
|
|
// Relations objects are also inserted and placed in the .R field
|
|
|
|
|
// panics if an error occurs
|
|
|
|
|
func (o OrganizationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.OrganizationSlice {
|
|
|
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
|
|
|
if err != nil {
|
|
|
|
|
panic(err)
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
return m
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// CreateManyOrFail builds multiple organizations and inserts them into the database
|
|
|
|
|
// Relations objects are also inserted and placed in the .R field
|
|
|
|
|
// It calls `tb.Fatal(err)` on the test/benchmark if an error occurs
|
|
|
|
|
func (o OrganizationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.OrganizationSlice {
|
|
|
|
|
tb.Helper()
|
|
|
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
|
|
|
if err != nil {
|
|
|
|
|
tb.Fatal(err)
|
|
|
|
|
return nil
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
return m
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Organization has methods that act as mods for the OrganizationTemplate
|
|
|
|
|
var OrganizationMods organizationMods
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
type organizationMods struct{}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) RandomizeAllColumns(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModSlice{
|
|
|
|
|
OrganizationMods.RandomID(f),
|
|
|
|
|
OrganizationMods.RandomName(f),
|
2026-01-16 14:43:26 +00:00
|
|
|
OrganizationMods.RandomImportDistrictGid(f),
|
|
|
|
|
OrganizationMods.RandomWebsite(f),
|
2026-01-22 03:27:32 +00:00
|
|
|
OrganizationMods.RandomLogoUUID(f),
|
2026-01-24 19:13:55 +00:00
|
|
|
OrganizationMods.RandomSlug(f),
|
2026-02-17 05:33:12 +00:00
|
|
|
OrganizationMods.RandomGeneralManagerName(f),
|
|
|
|
|
OrganizationMods.RandomMailingAddressCity(f),
|
|
|
|
|
OrganizationMods.RandomMailingAddressPostalCode(f),
|
|
|
|
|
OrganizationMods.RandomMailingAddressStreet(f),
|
|
|
|
|
OrganizationMods.RandomOfficeAddressCity(f),
|
|
|
|
|
OrganizationMods.RandomOfficeAddressPostalCode(f),
|
|
|
|
|
OrganizationMods.RandomOfficeAddressStreet(f),
|
|
|
|
|
OrganizationMods.RandomServiceAreaGeometry(f),
|
|
|
|
|
OrganizationMods.RandomServiceAreaSquareMeters(f),
|
|
|
|
|
OrganizationMods.RandomServiceAreaCentroid(f),
|
|
|
|
|
OrganizationMods.RandomServiceAreaExtent(f),
|
|
|
|
|
OrganizationMods.RandomOfficeFax(f),
|
|
|
|
|
OrganizationMods.RandomOfficePhone(f),
|
|
|
|
|
OrganizationMods.RandomServiceAreaXmin(f),
|
|
|
|
|
OrganizationMods.RandomServiceAreaYmin(f),
|
|
|
|
|
OrganizationMods.RandomServiceAreaXmax(f),
|
|
|
|
|
OrganizationMods.RandomServiceAreaYmax(f),
|
|
|
|
|
OrganizationMods.RandomServiceAreaCentroidGeojson(f),
|
2026-02-25 16:08:32 +00:00
|
|
|
OrganizationMods.RandomServiceAreaCentroidX(f),
|
|
|
|
|
OrganizationMods.RandomServiceAreaCentroidY(f),
|
2026-02-28 22:54:39 +00:00
|
|
|
OrganizationMods.RandomMailingAddressCountry(f),
|
|
|
|
|
OrganizationMods.RandomMailingAddressState(f),
|
|
|
|
|
OrganizationMods.RandomOfficeAddressCountry(f),
|
|
|
|
|
OrganizationMods.RandomOfficeAddressState(f),
|
|
|
|
|
OrganizationMods.RandomArcgisAccountID(f),
|
|
|
|
|
OrganizationMods.RandomFieldseekerServiceFeatureItemID(f),
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
2025-12-24 17:49:39 -07:00
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ID(val int32) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ID = func() int32 { return val }
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) IDFunc(f func() int32) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ID = f
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetID() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ID = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
func (m organizationMods) RandomID(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ID = func() int32 {
|
|
|
|
|
return random_int32(f)
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Set the model columns to this value
|
2026-01-14 21:49:12 +00:00
|
|
|
func (m organizationMods) Name(val string) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-01-14 21:49:12 +00:00
|
|
|
o.Name = func() string { return val }
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Set the Column from the function
|
2026-01-14 21:49:12 +00:00
|
|
|
func (m organizationMods) NameFunc(f func() string) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.Name = f
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetName() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.Name = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
func (m organizationMods) RandomName(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-01-14 21:49:12 +00:00
|
|
|
o.Name = func() string {
|
|
|
|
|
return random_string(f)
|
2025-12-24 17:49:39 -07:00
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Set the model columns to this value
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) ImportDistrictGid(val null.Val[int32]) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.ImportDistrictGid = func() null.Val[int32] { return val }
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Set the Column from the function
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) ImportDistrictGidFunc(f func() null.Val[int32]) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.ImportDistrictGid = f
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Clear any values for the column
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) UnsetImportDistrictGid() OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.ImportDistrictGid = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomImportDistrictGid(f *faker.Faker) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.ImportDistrictGid = func() null.Val[int32] {
|
2025-12-24 17:49:39 -07:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
val := random_int32(f)
|
2025-12-24 17:49:39 -07:00
|
|
|
return null.From(val)
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomImportDistrictGidNotNull(f *faker.Faker) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.ImportDistrictGid = func() null.Val[int32] {
|
2025-12-24 17:49:39 -07:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
val := random_int32(f)
|
2025-12-24 17:49:39 -07:00
|
|
|
return null.From(val)
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Set the model columns to this value
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) Website(val null.Val[string]) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.Website = func() null.Val[string] { return val }
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Set the Column from the function
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) WebsiteFunc(f func() null.Val[string]) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.Website = f
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Clear any values for the column
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) UnsetWebsite() OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.Website = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomWebsite(f *faker.Faker) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.Website = func() null.Val[string] {
|
2025-12-24 17:49:39 -07:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomWebsiteNotNull(f *faker.Faker) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.Website = func() null.Val[string] {
|
2025-12-24 17:49:39 -07:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Set the model columns to this value
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) LogoUUID(val null.Val[uuid.UUID]) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.LogoUUID = func() null.Val[uuid.UUID] { return val }
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Set the Column from the function
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) LogoUUIDFunc(f func() null.Val[uuid.UUID]) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.LogoUUID = f
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Clear any values for the column
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) UnsetLogoUUID() OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.LogoUUID = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomLogoUUID(f *faker.Faker) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.LogoUUID = func() null.Val[uuid.UUID] {
|
2025-12-24 17:49:39 -07:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
val := random_uuid_UUID(f)
|
2025-12-24 17:49:39 -07:00
|
|
|
return null.From(val)
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomLogoUUIDNotNull(f *faker.Faker) OrganizationMod {
|
2025-12-24 17:49:39 -07:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.LogoUUID = func() null.Val[uuid.UUID] {
|
2025-12-24 17:49:39 -07:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
val := random_uuid_UUID(f)
|
2025-12-24 17:49:39 -07:00
|
|
|
return null.From(val)
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-16 14:43:26 +00:00
|
|
|
// Set the model columns to this value
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) Slug(val null.Val[string]) OrganizationMod {
|
2026-01-16 14:43:26 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.Slug = func() null.Val[string] { return val }
|
2026-01-16 14:43:26 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) SlugFunc(f func() null.Val[string]) OrganizationMod {
|
2026-01-16 14:43:26 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.Slug = f
|
2026-01-16 14:43:26 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) UnsetSlug() OrganizationMod {
|
2026-01-16 14:43:26 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.Slug = nil
|
2026-01-16 14:43:26 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomSlug(f *faker.Faker) OrganizationMod {
|
2026-01-16 14:43:26 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.Slug = func() null.Val[string] {
|
2026-01-16 14:43:26 +00:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
val := random_string(f, "24")
|
2026-01-16 14:43:26 +00:00
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomSlugNotNull(f *faker.Faker) OrganizationMod {
|
2026-01-16 14:43:26 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.Slug = func() null.Val[string] {
|
2026-01-16 14:43:26 +00:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
val := random_string(f, "24")
|
2026-01-16 14:43:26 +00:00
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) GeneralManagerName(val null.Val[string]) OrganizationMod {
|
2026-01-16 14:43:26 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.GeneralManagerName = func() null.Val[string] { return val }
|
2026-01-16 14:43:26 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) GeneralManagerNameFunc(f func() null.Val[string]) OrganizationMod {
|
2026-01-16 14:43:26 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.GeneralManagerName = f
|
2026-01-16 14:43:26 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) UnsetGeneralManagerName() OrganizationMod {
|
2026-01-16 14:43:26 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.GeneralManagerName = nil
|
2026-01-16 14:43:26 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomGeneralManagerName(f *faker.Faker) OrganizationMod {
|
2026-01-16 14:43:26 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.GeneralManagerName = func() null.Val[string] {
|
2026-01-16 14:43:26 +00:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomGeneralManagerNameNotNull(f *faker.Faker) OrganizationMod {
|
2026-01-16 14:43:26 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.GeneralManagerName = func() null.Val[string] {
|
2026-01-16 14:43:26 +00:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-22 03:27:32 +00:00
|
|
|
// Set the model columns to this value
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) MailingAddressCity(val null.Val[string]) OrganizationMod {
|
2026-01-22 03:27:32 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.MailingAddressCity = func() null.Val[string] { return val }
|
2026-01-22 03:27:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) MailingAddressCityFunc(f func() null.Val[string]) OrganizationMod {
|
2026-01-22 03:27:32 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.MailingAddressCity = f
|
2026-01-22 03:27:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) UnsetMailingAddressCity() OrganizationMod {
|
2026-01-22 03:27:32 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.MailingAddressCity = nil
|
2026-01-22 03:27:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomMailingAddressCity(f *faker.Faker) OrganizationMod {
|
2026-01-22 03:27:32 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.MailingAddressCity = func() null.Val[string] {
|
2026-01-22 03:27:32 +00:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
val := random_string(f)
|
2026-01-22 03:27:32 +00:00
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) RandomMailingAddressCityNotNull(f *faker.Faker) OrganizationMod {
|
2026-01-22 03:27:32 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.MailingAddressCity = func() null.Val[string] {
|
2026-01-22 03:27:32 +00:00
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
val := random_string(f)
|
2026-01-22 03:27:32 +00:00
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-24 19:13:55 +00:00
|
|
|
// Set the model columns to this value
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) MailingAddressPostalCode(val null.Val[string]) OrganizationMod {
|
2026-01-24 19:13:55 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.MailingAddressPostalCode = func() null.Val[string] { return val }
|
2026-01-24 19:13:55 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) MailingAddressPostalCodeFunc(f func() null.Val[string]) OrganizationMod {
|
2026-01-24 19:13:55 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.MailingAddressPostalCode = f
|
2026-01-24 19:13:55 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
2026-02-28 22:54:39 +00:00
|
|
|
func (m organizationMods) UnsetMailingAddressPostalCode() OrganizationMod {
|
2026-01-24 19:13:55 +00:00
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
2026-02-28 22:54:39 +00:00
|
|
|
o.MailingAddressPostalCode = nil
|
2026-02-17 05:33:12 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomMailingAddressPostalCode(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressPostalCode = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
2026-01-16 14:43:26 +00:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-17 05:33:12 +00:00
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomMailingAddressPostalCodeNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressPostalCode = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) MailingAddressStreet(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressStreet = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) MailingAddressStreetFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressStreet = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetMailingAddressStreet() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressStreet = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomMailingAddressStreet(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressStreet = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomMailingAddressStreetNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressStreet = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) OfficeAddressCity(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressCity = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) OfficeAddressCityFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressCity = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetOfficeAddressCity() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressCity = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomOfficeAddressCity(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressCity = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomOfficeAddressCityNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressCity = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) OfficeAddressPostalCode(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressPostalCode = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) OfficeAddressPostalCodeFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressPostalCode = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetOfficeAddressPostalCode() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressPostalCode = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomOfficeAddressPostalCode(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressPostalCode = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomOfficeAddressPostalCodeNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressPostalCode = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) OfficeAddressStreet(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressStreet = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) OfficeAddressStreetFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressStreet = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetOfficeAddressStreet() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressStreet = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomOfficeAddressStreet(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressStreet = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomOfficeAddressStreetNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressStreet = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ServiceAreaGeometry(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaGeometry = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ServiceAreaGeometryFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaGeometry = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetServiceAreaGeometry() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaGeometry = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaGeometry(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaGeometry = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaGeometryNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaGeometry = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ServiceAreaSquareMeters(val null.Val[decimal.Decimal]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaSquareMeters = func() null.Val[decimal.Decimal] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ServiceAreaSquareMetersFunc(f func() null.Val[decimal.Decimal]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaSquareMeters = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetServiceAreaSquareMeters() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaSquareMeters = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaSquareMeters(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaSquareMeters = func() null.Val[decimal.Decimal] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_decimal_Decimal(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaSquareMetersNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaSquareMeters = func() null.Val[decimal.Decimal] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_decimal_Decimal(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ServiceAreaCentroid(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroid = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ServiceAreaCentroidFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroid = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetServiceAreaCentroid() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroid = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaCentroid(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroid = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaCentroidNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroid = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ServiceAreaExtent(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaExtent = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ServiceAreaExtentFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaExtent = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetServiceAreaExtent() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaExtent = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaExtent(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaExtent = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaExtentNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaExtent = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) OfficeFax(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeFax = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) OfficeFaxFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeFax = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetOfficeFax() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeFax = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomOfficeFax(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeFax = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomOfficeFaxNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeFax = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) OfficePhone(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficePhone = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) OfficePhoneFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficePhone = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetOfficePhone() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficePhone = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomOfficePhone(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficePhone = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomOfficePhoneNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficePhone = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ServiceAreaXmin(val null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaXmin = func() null.Val[float64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ServiceAreaXminFunc(f func() null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaXmin = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetServiceAreaXmin() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaXmin = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaXmin(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaXmin = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaXminNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaXmin = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ServiceAreaYmin(val null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaYmin = func() null.Val[float64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ServiceAreaYminFunc(f func() null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaYmin = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetServiceAreaYmin() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaYmin = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaYmin(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaYmin = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaYminNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaYmin = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ServiceAreaXmax(val null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaXmax = func() null.Val[float64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ServiceAreaXmaxFunc(f func() null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaXmax = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetServiceAreaXmax() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaXmax = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaXmax(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaXmax = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaXmaxNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaXmax = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ServiceAreaYmax(val null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaYmax = func() null.Val[float64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ServiceAreaYmaxFunc(f func() null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaYmax = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetServiceAreaYmax() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaYmax = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaYmax(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaYmax = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaYmaxNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaYmax = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ServiceAreaCentroidGeojson(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidGeojson = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ServiceAreaCentroidGeojsonFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidGeojson = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetServiceAreaCentroidGeojson() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidGeojson = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaCentroidGeojson(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidGeojson = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaCentroidGeojsonNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidGeojson = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-25 16:08:32 +00:00
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ServiceAreaCentroidX(val null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidX = func() null.Val[float64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ServiceAreaCentroidXFunc(f func() null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidX = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetServiceAreaCentroidX() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidX = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaCentroidX(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidX = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaCentroidXNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidX = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ServiceAreaCentroidY(val null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidY = func() null.Val[float64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ServiceAreaCentroidYFunc(f func() null.Val[float64]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidY = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetServiceAreaCentroidY() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidY = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaCentroidY(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidY = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomServiceAreaCentroidYNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ServiceAreaCentroidY = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-28 22:54:39 +00:00
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) MailingAddressCountry(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressCountry = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) MailingAddressCountryFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressCountry = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetMailingAddressCountry() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressCountry = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomMailingAddressCountry(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressCountry = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomMailingAddressCountryNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressCountry = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) MailingAddressState(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressState = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) MailingAddressStateFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressState = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetMailingAddressState() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressState = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomMailingAddressState(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressState = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomMailingAddressStateNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.MailingAddressState = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) OfficeAddressCountry(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressCountry = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) OfficeAddressCountryFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressCountry = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetOfficeAddressCountry() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressCountry = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomOfficeAddressCountry(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressCountry = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomOfficeAddressCountryNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressCountry = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) OfficeAddressState(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressState = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) OfficeAddressStateFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressState = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetOfficeAddressState() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressState = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomOfficeAddressState(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressState = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomOfficeAddressStateNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.OfficeAddressState = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) ArcgisAccountID(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ArcgisAccountID = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) ArcgisAccountIDFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ArcgisAccountID = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetArcgisAccountID() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ArcgisAccountID = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomArcgisAccountID(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ArcgisAccountID = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomArcgisAccountIDNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.ArcgisAccountID = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m organizationMods) FieldseekerServiceFeatureItemID(val null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.FieldseekerServiceFeatureItemID = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m organizationMods) FieldseekerServiceFeatureItemIDFunc(f func() null.Val[string]) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.FieldseekerServiceFeatureItemID = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m organizationMods) UnsetFieldseekerServiceFeatureItemID() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.FieldseekerServiceFeatureItemID = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m organizationMods) RandomFieldseekerServiceFeatureItemID(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.FieldseekerServiceFeatureItemID = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m organizationMods) RandomFieldseekerServiceFeatureItemIDNotNull(f *faker.Faker) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.FieldseekerServiceFeatureItemID = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-17 05:33:12 +00:00
|
|
|
func (m organizationMods) WithParentsCascading() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
if isDone, _ := organizationWithParentsCascadingCtx.Value(ctx); isDone {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
ctx = organizationWithParentsCascadingCtx.WithValue(ctx, true)
|
2026-02-28 22:54:39 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
|
|
related := o.f.NewArcgisAccountWithContext(ctx, ArcgisAccountMods.WithParentsCascading())
|
|
|
|
|
m.WithArcgisAccountAccount(related).Apply(ctx, o)
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
related := o.f.NewArcgisServiceFeatureWithContext(ctx, ArcgisServiceFeatureMods.WithParentsCascading())
|
|
|
|
|
m.WithFieldseekerServiceFeatureItemServiceFeature(related).Apply(ctx, o)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithArcgisAccountAccount(rel *ArcgisAccountTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.ArcgisAccountAccount = &organizationRArcgisAccountAccountR{
|
|
|
|
|
o: rel,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewArcgisAccountAccount(mods ...ArcgisAccountMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewArcgisAccountWithContext(ctx, mods...)
|
|
|
|
|
|
|
|
|
|
m.WithArcgisAccountAccount(related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithExistingArcgisAccountAccount(em *models.ArcgisAccount) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.ArcgisAccountAccount = &organizationRArcgisAccountAccountR{
|
|
|
|
|
o: o.f.FromExistingArcgisAccount(em),
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutArcgisAccountAccount() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.ArcgisAccountAccount = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithFieldseekerServiceFeatureItemServiceFeature(rel *ArcgisServiceFeatureTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.FieldseekerServiceFeatureItemServiceFeature = &organizationRFieldseekerServiceFeatureItemServiceFeatureR{
|
|
|
|
|
o: rel,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewFieldseekerServiceFeatureItemServiceFeature(mods ...ArcgisServiceFeatureMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewArcgisServiceFeatureWithContext(ctx, mods...)
|
|
|
|
|
|
|
|
|
|
m.WithFieldseekerServiceFeatureItemServiceFeature(related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithExistingFieldseekerServiceFeatureItemServiceFeature(em *models.ArcgisServiceFeature) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.FieldseekerServiceFeatureItemServiceFeature = &organizationRFieldseekerServiceFeatureItemServiceFeatureR{
|
|
|
|
|
o: o.f.FromExistingArcgisServiceFeature(em),
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutFieldseekerServiceFeatureItemServiceFeature() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.FieldseekerServiceFeatureItemServiceFeature = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithAccounts(number int, related *ArcgisAccountTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Accounts = []*organizationRAccountsR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewAccounts(number int, mods ...ArcgisAccountMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewArcgisAccountWithContext(ctx, mods...)
|
|
|
|
|
m.WithAccounts(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddAccounts(number int, related *ArcgisAccountTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Accounts = append(o.r.Accounts, &organizationRAccountsR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewAccounts(number int, mods ...ArcgisAccountMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewArcgisAccountWithContext(ctx, mods...)
|
|
|
|
|
m.AddAccounts(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingAccounts(existingModels ...*models.ArcgisAccount) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.Accounts = append(o.r.Accounts, &organizationRAccountsR{
|
|
|
|
|
o: o.f.FromExistingArcgisAccount(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutAccounts() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Accounts = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-26 18:18:33 +00:00
|
|
|
func (m organizationMods) WithAddressMappings(number int, related *ArcgisAddressMappingTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.AddressMappings = []*organizationRAddressMappingsR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewAddressMappings(number int, mods ...ArcgisAddressMappingMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewArcgisAddressMappingWithContext(ctx, mods...)
|
|
|
|
|
m.WithAddressMappings(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddAddressMappings(number int, related *ArcgisAddressMappingTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.AddressMappings = append(o.r.AddressMappings, &organizationRAddressMappingsR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewAddressMappings(number int, mods ...ArcgisAddressMappingMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewArcgisAddressMappingWithContext(ctx, mods...)
|
|
|
|
|
m.AddAddressMappings(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingAddressMappings(existingModels ...*models.ArcgisAddressMapping) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.AddressMappings = append(o.r.AddressMappings, &organizationRAddressMappingsR{
|
|
|
|
|
o: o.f.FromExistingArcgisAddressMapping(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutAddressMappings() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.AddressMappings = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithParcelMappings(number int, related *ArcgisParcelMappingTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.ParcelMappings = []*organizationRParcelMappingsR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewParcelMappings(number int, mods ...ArcgisParcelMappingMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewArcgisParcelMappingWithContext(ctx, mods...)
|
|
|
|
|
m.WithParcelMappings(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddParcelMappings(number int, related *ArcgisParcelMappingTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.ParcelMappings = append(o.r.ParcelMappings, &organizationRParcelMappingsR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewParcelMappings(number int, mods ...ArcgisParcelMappingMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewArcgisParcelMappingWithContext(ctx, mods...)
|
|
|
|
|
m.AddParcelMappings(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingParcelMappings(existingModels ...*models.ArcgisParcelMapping) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.ParcelMappings = append(o.r.ParcelMappings, &organizationRParcelMappingsR{
|
|
|
|
|
o: o.f.FromExistingArcgisParcelMapping(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutParcelMappings() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.ParcelMappings = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-31 20:08:08 +00:00
|
|
|
func (m organizationMods) WithEmailContacts(number int, related *CommsEmailContactTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.EmailContacts = []*organizationREmailContactsR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewEmailContacts(number int, mods ...CommsEmailContactMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewCommsEmailContactWithContext(ctx, mods...)
|
|
|
|
|
m.WithEmailContacts(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddEmailContacts(number int, related *CommsEmailContactTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.EmailContacts = append(o.r.EmailContacts, &organizationREmailContactsR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewEmailContacts(number int, mods ...CommsEmailContactMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewCommsEmailContactWithContext(ctx, mods...)
|
|
|
|
|
m.AddEmailContacts(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingEmailContacts(existingModels ...*models.CommsEmailContact) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.EmailContacts = append(o.r.EmailContacts, &organizationREmailContactsR{
|
|
|
|
|
o: o.f.FromExistingCommsEmailContact(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutEmailContacts() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.EmailContacts = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithPhones(number int, related *CommsPhoneTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Phones = []*organizationRPhonesR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewPhones(number int, mods ...CommsPhoneMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewCommsPhoneWithContext(ctx, mods...)
|
|
|
|
|
m.WithPhones(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddPhones(number int, related *CommsPhoneTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Phones = append(o.r.Phones, &organizationRPhonesR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewPhones(number int, mods ...CommsPhoneMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewCommsPhoneWithContext(ctx, mods...)
|
|
|
|
|
m.AddPhones(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingPhones(existingModels ...*models.CommsPhone) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.Phones = append(o.r.Phones, &organizationRPhonesR{
|
|
|
|
|
o: o.f.FromExistingCommsPhone(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutPhones() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Phones = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithContainerrelates(number int, related *FieldseekerContainerrelateTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Containerrelates = []*organizationRContainerrelatesR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewContainerrelates(number int, mods ...FieldseekerContainerrelateMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerContainerrelateWithContext(ctx, mods...)
|
|
|
|
|
m.WithContainerrelates(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddContainerrelates(number int, related *FieldseekerContainerrelateTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Containerrelates = append(o.r.Containerrelates, &organizationRContainerrelatesR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewContainerrelates(number int, mods ...FieldseekerContainerrelateMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerContainerrelateWithContext(ctx, mods...)
|
|
|
|
|
m.AddContainerrelates(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingContainerrelates(existingModels ...*models.FieldseekerContainerrelate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Containerrelates = append(o.r.Containerrelates, &organizationRContainerrelatesR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerContainerrelate(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutContainerrelates() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Containerrelates = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithFieldscoutinglogs(number int, related *FieldseekerFieldscoutinglogTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Fieldscoutinglogs = []*organizationRFieldscoutinglogsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewFieldscoutinglogs(number int, mods ...FieldseekerFieldscoutinglogMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerFieldscoutinglogWithContext(ctx, mods...)
|
|
|
|
|
m.WithFieldscoutinglogs(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddFieldscoutinglogs(number int, related *FieldseekerFieldscoutinglogTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Fieldscoutinglogs = append(o.r.Fieldscoutinglogs, &organizationRFieldscoutinglogsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewFieldscoutinglogs(number int, mods ...FieldseekerFieldscoutinglogMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerFieldscoutinglogWithContext(ctx, mods...)
|
|
|
|
|
m.AddFieldscoutinglogs(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingFieldscoutinglogs(existingModels ...*models.FieldseekerFieldscoutinglog) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Fieldscoutinglogs = append(o.r.Fieldscoutinglogs, &organizationRFieldscoutinglogsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerFieldscoutinglog(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutFieldscoutinglogs() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Fieldscoutinglogs = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithHabitatrelates(number int, related *FieldseekerHabitatrelateTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Habitatrelates = []*organizationRHabitatrelatesR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewHabitatrelates(number int, mods ...FieldseekerHabitatrelateMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerHabitatrelateWithContext(ctx, mods...)
|
|
|
|
|
m.WithHabitatrelates(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddHabitatrelates(number int, related *FieldseekerHabitatrelateTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Habitatrelates = append(o.r.Habitatrelates, &organizationRHabitatrelatesR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewHabitatrelates(number int, mods ...FieldseekerHabitatrelateMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerHabitatrelateWithContext(ctx, mods...)
|
|
|
|
|
m.AddHabitatrelates(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingHabitatrelates(existingModels ...*models.FieldseekerHabitatrelate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Habitatrelates = append(o.r.Habitatrelates, &organizationRHabitatrelatesR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerHabitatrelate(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutHabitatrelates() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Habitatrelates = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithInspectionsamples(number int, related *FieldseekerInspectionsampleTemplate) OrganizationMod {
|
2025-11-13 23:48:41 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Inspectionsamples = []*organizationRInspectionsamplesR{{
|
2025-11-13 23:48:41 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewInspectionsamples(number int, mods ...FieldseekerInspectionsampleMod) OrganizationMod {
|
2025-11-13 23:48:41 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerInspectionsampleWithContext(ctx, mods...)
|
|
|
|
|
m.WithInspectionsamples(number, related).Apply(ctx, o)
|
2025-11-13 23:48:41 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddInspectionsamples(number int, related *FieldseekerInspectionsampleTemplate) OrganizationMod {
|
2025-11-13 23:48:41 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Inspectionsamples = append(o.r.Inspectionsamples, &organizationRInspectionsamplesR{
|
2025-11-13 23:48:41 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewInspectionsamples(number int, mods ...FieldseekerInspectionsampleMod) OrganizationMod {
|
2025-11-13 23:48:41 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerInspectionsampleWithContext(ctx, mods...)
|
|
|
|
|
m.AddInspectionsamples(number, related).Apply(ctx, o)
|
2025-11-13 23:48:41 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingInspectionsamples(existingModels ...*models.FieldseekerInspectionsample) OrganizationMod {
|
2025-11-13 23:48:41 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Inspectionsamples = append(o.r.Inspectionsamples, &organizationRInspectionsamplesR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerInspectionsample(em),
|
2025-11-13 23:48:41 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutInspectionsamples() OrganizationMod {
|
2025-11-13 23:48:41 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Inspectionsamples = nil
|
2025-11-13 23:48:41 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithInspectionsampledetails(number int, related *FieldseekerInspectionsampledetailTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Inspectionsampledetails = []*organizationRInspectionsampledetailsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewInspectionsampledetails(number int, mods ...FieldseekerInspectionsampledetailMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerInspectionsampledetailWithContext(ctx, mods...)
|
|
|
|
|
m.WithInspectionsampledetails(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddInspectionsampledetails(number int, related *FieldseekerInspectionsampledetailTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Inspectionsampledetails = append(o.r.Inspectionsampledetails, &organizationRInspectionsampledetailsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewInspectionsampledetails(number int, mods ...FieldseekerInspectionsampledetailMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerInspectionsampledetailWithContext(ctx, mods...)
|
|
|
|
|
m.AddInspectionsampledetails(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingInspectionsampledetails(existingModels ...*models.FieldseekerInspectionsampledetail) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Inspectionsampledetails = append(o.r.Inspectionsampledetails, &organizationRInspectionsampledetailsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerInspectionsampledetail(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutInspectionsampledetails() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Inspectionsampledetails = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithLinelocations(number int, related *FieldseekerLinelocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Linelocations = []*organizationRLinelocationsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewLinelocations(number int, mods ...FieldseekerLinelocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerLinelocationWithContext(ctx, mods...)
|
|
|
|
|
m.WithLinelocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddLinelocations(number int, related *FieldseekerLinelocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Linelocations = append(o.r.Linelocations, &organizationRLinelocationsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewLinelocations(number int, mods ...FieldseekerLinelocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerLinelocationWithContext(ctx, mods...)
|
|
|
|
|
m.AddLinelocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingLinelocations(existingModels ...*models.FieldseekerLinelocation) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Linelocations = append(o.r.Linelocations, &organizationRLinelocationsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerLinelocation(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutLinelocations() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Linelocations = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithLocationtrackings(number int, related *FieldseekerLocationtrackingTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Locationtrackings = []*organizationRLocationtrackingsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewLocationtrackings(number int, mods ...FieldseekerLocationtrackingMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerLocationtrackingWithContext(ctx, mods...)
|
|
|
|
|
m.WithLocationtrackings(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddLocationtrackings(number int, related *FieldseekerLocationtrackingTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Locationtrackings = append(o.r.Locationtrackings, &organizationRLocationtrackingsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewLocationtrackings(number int, mods ...FieldseekerLocationtrackingMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerLocationtrackingWithContext(ctx, mods...)
|
|
|
|
|
m.AddLocationtrackings(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingLocationtrackings(existingModels ...*models.FieldseekerLocationtracking) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Locationtrackings = append(o.r.Locationtrackings, &organizationRLocationtrackingsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerLocationtracking(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutLocationtrackings() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Locationtrackings = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithMosquitoinspections(number int, related *FieldseekerMosquitoinspectionTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Mosquitoinspections = []*organizationRMosquitoinspectionsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewMosquitoinspections(number int, mods ...FieldseekerMosquitoinspectionMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerMosquitoinspectionWithContext(ctx, mods...)
|
|
|
|
|
m.WithMosquitoinspections(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddMosquitoinspections(number int, related *FieldseekerMosquitoinspectionTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Mosquitoinspections = append(o.r.Mosquitoinspections, &organizationRMosquitoinspectionsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewMosquitoinspections(number int, mods ...FieldseekerMosquitoinspectionMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerMosquitoinspectionWithContext(ctx, mods...)
|
|
|
|
|
m.AddMosquitoinspections(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingMosquitoinspections(existingModels ...*models.FieldseekerMosquitoinspection) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Mosquitoinspections = append(o.r.Mosquitoinspections, &organizationRMosquitoinspectionsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerMosquitoinspection(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutMosquitoinspections() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Mosquitoinspections = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithPointlocations(number int, related *FieldseekerPointlocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Pointlocations = []*organizationRPointlocationsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewPointlocations(number int, mods ...FieldseekerPointlocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerPointlocationWithContext(ctx, mods...)
|
|
|
|
|
m.WithPointlocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddPointlocations(number int, related *FieldseekerPointlocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Pointlocations = append(o.r.Pointlocations, &organizationRPointlocationsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewPointlocations(number int, mods ...FieldseekerPointlocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerPointlocationWithContext(ctx, mods...)
|
|
|
|
|
m.AddPointlocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingPointlocations(existingModels ...*models.FieldseekerPointlocation) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Pointlocations = append(o.r.Pointlocations, &organizationRPointlocationsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerPointlocation(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutPointlocations() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Pointlocations = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithPolygonlocations(number int, related *FieldseekerPolygonlocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Polygonlocations = []*organizationRPolygonlocationsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewPolygonlocations(number int, mods ...FieldseekerPolygonlocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerPolygonlocationWithContext(ctx, mods...)
|
|
|
|
|
m.WithPolygonlocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddPolygonlocations(number int, related *FieldseekerPolygonlocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Polygonlocations = append(o.r.Polygonlocations, &organizationRPolygonlocationsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewPolygonlocations(number int, mods ...FieldseekerPolygonlocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerPolygonlocationWithContext(ctx, mods...)
|
|
|
|
|
m.AddPolygonlocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingPolygonlocations(existingModels ...*models.FieldseekerPolygonlocation) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Polygonlocations = append(o.r.Polygonlocations, &organizationRPolygonlocationsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerPolygonlocation(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutPolygonlocations() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Polygonlocations = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-09 18:25:44 +00:00
|
|
|
func (m organizationMods) WithFieldseekerPool(number int, related *FieldseekerPoolTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2026-02-09 18:25:44 +00:00
|
|
|
o.r.FieldseekerPool = []*organizationRFieldseekerPoolR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-09 18:25:44 +00:00
|
|
|
func (m organizationMods) WithNewFieldseekerPool(number int, mods ...FieldseekerPoolMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerPoolWithContext(ctx, mods...)
|
2026-02-09 18:25:44 +00:00
|
|
|
m.WithFieldseekerPool(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-09 18:25:44 +00:00
|
|
|
func (m organizationMods) AddFieldseekerPool(number int, related *FieldseekerPoolTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2026-02-09 18:25:44 +00:00
|
|
|
o.r.FieldseekerPool = append(o.r.FieldseekerPool, &organizationRFieldseekerPoolR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-09 18:25:44 +00:00
|
|
|
func (m organizationMods) AddNewFieldseekerPool(number int, mods ...FieldseekerPoolMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerPoolWithContext(ctx, mods...)
|
2026-02-09 18:25:44 +00:00
|
|
|
m.AddFieldseekerPool(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-09 18:25:44 +00:00
|
|
|
func (m organizationMods) AddExistingFieldseekerPool(existingModels ...*models.FieldseekerPool) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2026-02-09 18:25:44 +00:00
|
|
|
o.r.FieldseekerPool = append(o.r.FieldseekerPool, &organizationRFieldseekerPoolR{
|
2025-12-24 17:49:39 -07:00
|
|
|
o: o.f.FromExistingFieldseekerPool(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-09 18:25:44 +00:00
|
|
|
func (m organizationMods) WithoutFieldseekerPool() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2026-02-09 18:25:44 +00:00
|
|
|
o.r.FieldseekerPool = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithPooldetails(number int, related *FieldseekerPooldetailTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Pooldetails = []*organizationRPooldetailsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewPooldetails(number int, mods ...FieldseekerPooldetailMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerPooldetailWithContext(ctx, mods...)
|
|
|
|
|
m.WithPooldetails(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddPooldetails(number int, related *FieldseekerPooldetailTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Pooldetails = append(o.r.Pooldetails, &organizationRPooldetailsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewPooldetails(number int, mods ...FieldseekerPooldetailMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerPooldetailWithContext(ctx, mods...)
|
|
|
|
|
m.AddPooldetails(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingPooldetails(existingModels ...*models.FieldseekerPooldetail) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Pooldetails = append(o.r.Pooldetails, &organizationRPooldetailsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerPooldetail(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutPooldetails() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Pooldetails = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithProposedtreatmentareas(number int, related *FieldseekerProposedtreatmentareaTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Proposedtreatmentareas = []*organizationRProposedtreatmentareasR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewProposedtreatmentareas(number int, mods ...FieldseekerProposedtreatmentareaMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerProposedtreatmentareaWithContext(ctx, mods...)
|
|
|
|
|
m.WithProposedtreatmentareas(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddProposedtreatmentareas(number int, related *FieldseekerProposedtreatmentareaTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Proposedtreatmentareas = append(o.r.Proposedtreatmentareas, &organizationRProposedtreatmentareasR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewProposedtreatmentareas(number int, mods ...FieldseekerProposedtreatmentareaMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerProposedtreatmentareaWithContext(ctx, mods...)
|
|
|
|
|
m.AddProposedtreatmentareas(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingProposedtreatmentareas(existingModels ...*models.FieldseekerProposedtreatmentarea) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Proposedtreatmentareas = append(o.r.Proposedtreatmentareas, &organizationRProposedtreatmentareasR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerProposedtreatmentarea(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutProposedtreatmentareas() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Proposedtreatmentareas = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithQamosquitoinspections(number int, related *FieldseekerQamosquitoinspectionTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Qamosquitoinspections = []*organizationRQamosquitoinspectionsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewQamosquitoinspections(number int, mods ...FieldseekerQamosquitoinspectionMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerQamosquitoinspectionWithContext(ctx, mods...)
|
|
|
|
|
m.WithQamosquitoinspections(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddQamosquitoinspections(number int, related *FieldseekerQamosquitoinspectionTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Qamosquitoinspections = append(o.r.Qamosquitoinspections, &organizationRQamosquitoinspectionsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewQamosquitoinspections(number int, mods ...FieldseekerQamosquitoinspectionMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerQamosquitoinspectionWithContext(ctx, mods...)
|
|
|
|
|
m.AddQamosquitoinspections(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingQamosquitoinspections(existingModels ...*models.FieldseekerQamosquitoinspection) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Qamosquitoinspections = append(o.r.Qamosquitoinspections, &organizationRQamosquitoinspectionsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerQamosquitoinspection(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutQamosquitoinspections() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Qamosquitoinspections = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithRodentlocations(number int, related *FieldseekerRodentlocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Rodentlocations = []*organizationRRodentlocationsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewRodentlocations(number int, mods ...FieldseekerRodentlocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerRodentlocationWithContext(ctx, mods...)
|
|
|
|
|
m.WithRodentlocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddRodentlocations(number int, related *FieldseekerRodentlocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Rodentlocations = append(o.r.Rodentlocations, &organizationRRodentlocationsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewRodentlocations(number int, mods ...FieldseekerRodentlocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerRodentlocationWithContext(ctx, mods...)
|
|
|
|
|
m.AddRodentlocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingRodentlocations(existingModels ...*models.FieldseekerRodentlocation) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Rodentlocations = append(o.r.Rodentlocations, &organizationRRodentlocationsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerRodentlocation(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutRodentlocations() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Rodentlocations = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithSamplecollections(number int, related *FieldseekerSamplecollectionTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Samplecollections = []*organizationRSamplecollectionsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewSamplecollections(number int, mods ...FieldseekerSamplecollectionMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerSamplecollectionWithContext(ctx, mods...)
|
|
|
|
|
m.WithSamplecollections(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddSamplecollections(number int, related *FieldseekerSamplecollectionTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Samplecollections = append(o.r.Samplecollections, &organizationRSamplecollectionsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewSamplecollections(number int, mods ...FieldseekerSamplecollectionMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerSamplecollectionWithContext(ctx, mods...)
|
|
|
|
|
m.AddSamplecollections(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingSamplecollections(existingModels ...*models.FieldseekerSamplecollection) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Samplecollections = append(o.r.Samplecollections, &organizationRSamplecollectionsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerSamplecollection(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutSamplecollections() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Samplecollections = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithSamplelocations(number int, related *FieldseekerSamplelocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Samplelocations = []*organizationRSamplelocationsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewSamplelocations(number int, mods ...FieldseekerSamplelocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerSamplelocationWithContext(ctx, mods...)
|
|
|
|
|
m.WithSamplelocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddSamplelocations(number int, related *FieldseekerSamplelocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Samplelocations = append(o.r.Samplelocations, &organizationRSamplelocationsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewSamplelocations(number int, mods ...FieldseekerSamplelocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerSamplelocationWithContext(ctx, mods...)
|
|
|
|
|
m.AddSamplelocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingSamplelocations(existingModels ...*models.FieldseekerSamplelocation) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Samplelocations = append(o.r.Samplelocations, &organizationRSamplelocationsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerSamplelocation(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutSamplelocations() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Samplelocations = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithServicerequests(number int, related *FieldseekerServicerequestTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Servicerequests = []*organizationRServicerequestsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewServicerequests(number int, mods ...FieldseekerServicerequestMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerServicerequestWithContext(ctx, mods...)
|
|
|
|
|
m.WithServicerequests(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddServicerequests(number int, related *FieldseekerServicerequestTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Servicerequests = append(o.r.Servicerequests, &organizationRServicerequestsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewServicerequests(number int, mods ...FieldseekerServicerequestMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerServicerequestWithContext(ctx, mods...)
|
|
|
|
|
m.AddServicerequests(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingServicerequests(existingModels ...*models.FieldseekerServicerequest) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Servicerequests = append(o.r.Servicerequests, &organizationRServicerequestsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerServicerequest(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutServicerequests() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Servicerequests = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithSpeciesabundances(number int, related *FieldseekerSpeciesabundanceTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Speciesabundances = []*organizationRSpeciesabundancesR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewSpeciesabundances(number int, mods ...FieldseekerSpeciesabundanceMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerSpeciesabundanceWithContext(ctx, mods...)
|
|
|
|
|
m.WithSpeciesabundances(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddSpeciesabundances(number int, related *FieldseekerSpeciesabundanceTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Speciesabundances = append(o.r.Speciesabundances, &organizationRSpeciesabundancesR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewSpeciesabundances(number int, mods ...FieldseekerSpeciesabundanceMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerSpeciesabundanceWithContext(ctx, mods...)
|
|
|
|
|
m.AddSpeciesabundances(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingSpeciesabundances(existingModels ...*models.FieldseekerSpeciesabundance) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Speciesabundances = append(o.r.Speciesabundances, &organizationRSpeciesabundancesR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerSpeciesabundance(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutSpeciesabundances() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Speciesabundances = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithStormdrains(number int, related *FieldseekerStormdrainTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Stormdrains = []*organizationRStormdrainsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewStormdrains(number int, mods ...FieldseekerStormdrainMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerStormdrainWithContext(ctx, mods...)
|
|
|
|
|
m.WithStormdrains(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddStormdrains(number int, related *FieldseekerStormdrainTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Stormdrains = append(o.r.Stormdrains, &organizationRStormdrainsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewStormdrains(number int, mods ...FieldseekerStormdrainMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerStormdrainWithContext(ctx, mods...)
|
|
|
|
|
m.AddStormdrains(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingStormdrains(existingModels ...*models.FieldseekerStormdrain) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Stormdrains = append(o.r.Stormdrains, &organizationRStormdrainsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerStormdrain(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutStormdrains() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Stormdrains = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithTimecards(number int, related *FieldseekerTimecardTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Timecards = []*organizationRTimecardsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewTimecards(number int, mods ...FieldseekerTimecardMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerTimecardWithContext(ctx, mods...)
|
|
|
|
|
m.WithTimecards(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddTimecards(number int, related *FieldseekerTimecardTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Timecards = append(o.r.Timecards, &organizationRTimecardsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewTimecards(number int, mods ...FieldseekerTimecardMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerTimecardWithContext(ctx, mods...)
|
|
|
|
|
m.AddTimecards(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingTimecards(existingModels ...*models.FieldseekerTimecard) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Timecards = append(o.r.Timecards, &organizationRTimecardsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerTimecard(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutTimecards() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Timecards = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithTrapdata(number int, related *FieldseekerTrapdatumTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Trapdata = []*organizationRTrapdataR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewTrapdata(number int, mods ...FieldseekerTrapdatumMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerTrapdatumWithContext(ctx, mods...)
|
|
|
|
|
m.WithTrapdata(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddTrapdata(number int, related *FieldseekerTrapdatumTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Trapdata = append(o.r.Trapdata, &organizationRTrapdataR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewTrapdata(number int, mods ...FieldseekerTrapdatumMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerTrapdatumWithContext(ctx, mods...)
|
|
|
|
|
m.AddTrapdata(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingTrapdata(existingModels ...*models.FieldseekerTrapdatum) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Trapdata = append(o.r.Trapdata, &organizationRTrapdataR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerTrapdatum(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutTrapdata() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Trapdata = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithTraplocations(number int, related *FieldseekerTraplocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Traplocations = []*organizationRTraplocationsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewTraplocations(number int, mods ...FieldseekerTraplocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerTraplocationWithContext(ctx, mods...)
|
|
|
|
|
m.WithTraplocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddTraplocations(number int, related *FieldseekerTraplocationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Traplocations = append(o.r.Traplocations, &organizationRTraplocationsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewTraplocations(number int, mods ...FieldseekerTraplocationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerTraplocationWithContext(ctx, mods...)
|
|
|
|
|
m.AddTraplocations(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingTraplocations(existingModels ...*models.FieldseekerTraplocation) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Traplocations = append(o.r.Traplocations, &organizationRTraplocationsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerTraplocation(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutTraplocations() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Traplocations = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithTreatments(number int, related *FieldseekerTreatmentTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Treatments = []*organizationRTreatmentsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewTreatments(number int, mods ...FieldseekerTreatmentMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerTreatmentWithContext(ctx, mods...)
|
|
|
|
|
m.WithTreatments(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddTreatments(number int, related *FieldseekerTreatmentTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Treatments = append(o.r.Treatments, &organizationRTreatmentsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewTreatments(number int, mods ...FieldseekerTreatmentMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerTreatmentWithContext(ctx, mods...)
|
|
|
|
|
m.AddTreatments(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingTreatments(existingModels ...*models.FieldseekerTreatment) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Treatments = append(o.r.Treatments, &organizationRTreatmentsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerTreatment(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutTreatments() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Treatments = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithTreatmentareas(number int, related *FieldseekerTreatmentareaTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Treatmentareas = []*organizationRTreatmentareasR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewTreatmentareas(number int, mods ...FieldseekerTreatmentareaMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerTreatmentareaWithContext(ctx, mods...)
|
|
|
|
|
m.WithTreatmentareas(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddTreatmentareas(number int, related *FieldseekerTreatmentareaTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Treatmentareas = append(o.r.Treatmentareas, &organizationRTreatmentareasR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewTreatmentareas(number int, mods ...FieldseekerTreatmentareaMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerTreatmentareaWithContext(ctx, mods...)
|
|
|
|
|
m.AddTreatmentareas(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingTreatmentareas(existingModels ...*models.FieldseekerTreatmentarea) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Treatmentareas = append(o.r.Treatmentareas, &organizationRTreatmentareasR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerTreatmentarea(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutTreatmentareas() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Treatmentareas = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithZones(number int, related *FieldseekerZoneTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Zones = []*organizationRZonesR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewZones(number int, mods ...FieldseekerZoneMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerZoneWithContext(ctx, mods...)
|
|
|
|
|
m.WithZones(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddZones(number int, related *FieldseekerZoneTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Zones = append(o.r.Zones, &organizationRZonesR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewZones(number int, mods ...FieldseekerZoneMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerZoneWithContext(ctx, mods...)
|
|
|
|
|
m.AddZones(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingZones(existingModels ...*models.FieldseekerZone) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Zones = append(o.r.Zones, &organizationRZonesR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerZone(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutZones() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Zones = nil
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithZones2s(number int, related *FieldseekerZones2Template) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Zones2s = []*organizationRZones2sR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewZones2s(number int, mods ...FieldseekerZones2Mod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerZones2WithContext(ctx, mods...)
|
|
|
|
|
m.WithZones2s(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddZones2s(number int, related *FieldseekerZones2Template) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Zones2s = append(o.r.Zones2s, &organizationRZones2sR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewZones2s(number int, mods ...FieldseekerZones2Mod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerZones2WithContext(ctx, mods...)
|
|
|
|
|
m.AddZones2s(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingZones2s(existingModels ...*models.FieldseekerZones2) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Zones2s = append(o.r.Zones2s, &organizationRZones2sR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerZones2(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-11-04 23:11:32 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutZones2s() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.Zones2s = nil
|
2025-11-04 23:11:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithFieldseekerSyncs(number int, related *FieldseekerSyncTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.FieldseekerSyncs = []*organizationRFieldseekerSyncsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
2025-11-04 23:11:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewFieldseekerSyncs(number int, mods ...FieldseekerSyncMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerSyncWithContext(ctx, mods...)
|
|
|
|
|
m.WithFieldseekerSyncs(number, related).Apply(ctx, o)
|
2025-11-04 23:11:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddFieldseekerSyncs(number int, related *FieldseekerSyncTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.FieldseekerSyncs = append(o.r.FieldseekerSyncs, &organizationRFieldseekerSyncsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
2025-11-04 23:11:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewFieldseekerSyncs(number int, mods ...FieldseekerSyncMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewFieldseekerSyncWithContext(ctx, mods...)
|
|
|
|
|
m.AddFieldseekerSyncs(number, related).Apply(ctx, o)
|
2025-11-04 23:11:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingFieldseekerSyncs(existingModels ...*models.FieldseekerSync) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.FieldseekerSyncs = append(o.r.FieldseekerSyncs, &organizationRFieldseekerSyncsR{
|
|
|
|
|
o: o.f.FromExistingFieldseekerSync(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutFieldseekerSyncs() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.FieldseekerSyncs = nil
|
2025-11-04 23:11:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-08 05:00:14 +00:00
|
|
|
func (m organizationMods) WithFiles(number int, related *FileuploadFileTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Files = []*organizationRFilesR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewFiles(number int, mods ...FileuploadFileMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewFileuploadFileWithContext(ctx, mods...)
|
|
|
|
|
m.WithFiles(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddFiles(number int, related *FileuploadFileTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Files = append(o.r.Files, &organizationRFilesR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewFiles(number int, mods ...FileuploadFileMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewFileuploadFileWithContext(ctx, mods...)
|
|
|
|
|
m.AddFiles(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingFiles(existingModels ...*models.FileuploadFile) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.Files = append(o.r.Files, &organizationRFilesR{
|
|
|
|
|
o: o.f.FromExistingFileuploadFile(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutFiles() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Files = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-02 18:49:02 +00:00
|
|
|
func (m organizationMods) WithFlyoverAerialServices(number int, related *FileuploadFlyoverAerialServiceTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.FlyoverAerialServices = []*organizationRFlyoverAerialServicesR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewFlyoverAerialServices(number int, mods ...FileuploadFlyoverAerialServiceMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewFileuploadFlyoverAerialServiceWithContext(ctx, mods...)
|
|
|
|
|
m.WithFlyoverAerialServices(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddFlyoverAerialServices(number int, related *FileuploadFlyoverAerialServiceTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.FlyoverAerialServices = append(o.r.FlyoverAerialServices, &organizationRFlyoverAerialServicesR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewFlyoverAerialServices(number int, mods ...FileuploadFlyoverAerialServiceMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewFileuploadFlyoverAerialServiceWithContext(ctx, mods...)
|
|
|
|
|
m.AddFlyoverAerialServices(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingFlyoverAerialServices(existingModels ...*models.FileuploadFlyoverAerialService) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.FlyoverAerialServices = append(o.r.FlyoverAerialServices, &organizationRFlyoverAerialServicesR{
|
|
|
|
|
o: o.f.FromExistingFileuploadFlyoverAerialService(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutFlyoverAerialServices() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.FlyoverAerialServices = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-09 19:03:27 +00:00
|
|
|
func (m organizationMods) WithPools(number int, related *FileuploadPoolTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Pools = []*organizationRPoolsR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewPools(number int, mods ...FileuploadPoolMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewFileuploadPoolWithContext(ctx, mods...)
|
|
|
|
|
m.WithPools(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddPools(number int, related *FileuploadPoolTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Pools = append(o.r.Pools, &organizationRPoolsR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewPools(number int, mods ...FileuploadPoolMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewFileuploadPoolWithContext(ctx, mods...)
|
|
|
|
|
m.AddPools(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingPools(existingModels ...*models.FileuploadPool) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.Pools = append(o.r.Pools, &organizationRPoolsR{
|
|
|
|
|
o: o.f.FromExistingFileuploadPool(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutPools() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Pools = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithH3Aggregations(number int, related *H3AggregationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.H3Aggregations = []*organizationRH3AggregationsR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewH3Aggregations(number int, mods ...H3AggregationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewH3AggregationWithContext(ctx, mods...)
|
|
|
|
|
m.WithH3Aggregations(number, related).Apply(ctx, o)
|
2025-11-04 23:11:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddH3Aggregations(number int, related *H3AggregationTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.H3Aggregations = append(o.r.H3Aggregations, &organizationRH3AggregationsR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
2025-11-04 23:11:32 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewH3Aggregations(number int, mods ...H3AggregationMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewH3AggregationWithContext(ctx, mods...)
|
|
|
|
|
m.AddH3Aggregations(number, related).Apply(ctx, o)
|
2025-11-04 23:11:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingH3Aggregations(existingModels ...*models.H3Aggregation) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.H3Aggregations = append(o.r.H3Aggregations, &organizationRH3AggregationsR{
|
|
|
|
|
o: o.f.FromExistingH3Aggregation(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
2025-11-07 02:07:33 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutH3Aggregations() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.H3Aggregations = nil
|
2025-11-07 02:07:33 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNoteAudios(number int, related *NoteAudioTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.NoteAudios = []*organizationRNoteAudiosR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
2025-11-07 02:07:33 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewNoteAudios(number int, mods ...NoteAudioMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewNoteAudioWithContext(ctx, mods...)
|
|
|
|
|
m.WithNoteAudios(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
2025-11-07 02:07:33 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNoteAudios(number int, related *NoteAudioTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.NoteAudios = append(o.r.NoteAudios, &organizationRNoteAudiosR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
2025-11-07 02:07:33 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewNoteAudios(number int, mods ...NoteAudioMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewNoteAudioWithContext(ctx, mods...)
|
|
|
|
|
m.AddNoteAudios(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
2025-11-07 02:07:33 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingNoteAudios(existingModels ...*models.NoteAudio) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.NoteAudios = append(o.r.NoteAudios, &organizationRNoteAudiosR{
|
|
|
|
|
o: o.f.FromExistingNoteAudio(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
2025-11-07 02:07:33 +00:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutNoteAudios() OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.NoteAudios = nil
|
2025-11-07 02:07:33 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNoteImages(number int, related *NoteImageTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.NoteImages = []*organizationRNoteImagesR{{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
2025-11-07 02:07:33 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithNewNoteImages(number int, mods ...NoteImageMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewNoteImageWithContext(ctx, mods...)
|
|
|
|
|
m.WithNoteImages(number, related).Apply(ctx, o)
|
2025-11-07 02:07:33 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNoteImages(number int, related *NoteImageTemplate) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.NoteImages = append(o.r.NoteImages, &organizationRNoteImagesR{
|
2025-11-07 08:34:32 +00:00
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
2025-11-07 02:07:33 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddNewNoteImages(number int, mods ...NoteImageMod) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
related := o.f.NewNoteImageWithContext(ctx, mods...)
|
|
|
|
|
m.AddNoteImages(number, related).Apply(ctx, o)
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
2025-11-07 02:07:33 +00:00
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) AddExistingNoteImages(existingModels ...*models.NoteImage) OrganizationMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.NoteImages = append(o.r.NoteImages, &organizationRNoteImagesR{
|
|
|
|
|
o: o.f.FromExistingNoteImage(em),
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
2025-11-07 02:07:33 +00:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-24 17:49:39 -07:00
|
|
|
func (m organizationMods) WithoutNoteImages() OrganizationMod {
|
2025-11-04 23:11:32 +00:00
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
2025-12-24 17:49:39 -07:00
|
|
|
o.r.NoteImages = nil
|
2025-11-04 23:11:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-22 03:27:32 +00:00
|
|
|
func (m organizationMods) WithNuisances(number int, related *PublicreportNuisanceTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Nuisances = []*organizationRNuisancesR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewNuisances(number int, mods ...PublicreportNuisanceMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewPublicreportNuisanceWithContext(ctx, mods...)
|
|
|
|
|
m.WithNuisances(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNuisances(number int, related *PublicreportNuisanceTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Nuisances = append(o.r.Nuisances, &organizationRNuisancesR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewNuisances(number int, mods ...PublicreportNuisanceMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewPublicreportNuisanceWithContext(ctx, mods...)
|
|
|
|
|
m.AddNuisances(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingNuisances(existingModels ...*models.PublicreportNuisance) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.Nuisances = append(o.r.Nuisances, &organizationRNuisancesR{
|
|
|
|
|
o: o.f.FromExistingPublicreportNuisance(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutNuisances() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Nuisances = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithPublicreportPool(number int, related *PublicreportPoolTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.PublicreportPool = []*organizationRPublicreportPoolR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewPublicreportPool(number int, mods ...PublicreportPoolMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewPublicreportPoolWithContext(ctx, mods...)
|
|
|
|
|
m.WithPublicreportPool(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddPublicreportPool(number int, related *PublicreportPoolTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.PublicreportPool = append(o.r.PublicreportPool, &organizationRPublicreportPoolR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewPublicreportPool(number int, mods ...PublicreportPoolMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewPublicreportPoolWithContext(ctx, mods...)
|
|
|
|
|
m.AddPublicreportPool(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingPublicreportPool(existingModels ...*models.PublicreportPool) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.PublicreportPool = append(o.r.PublicreportPool, &organizationRPublicreportPoolR{
|
|
|
|
|
o: o.f.FromExistingPublicreportPool(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutPublicreportPool() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.PublicreportPool = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithQuicks(number int, related *PublicreportQuickTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Quicks = []*organizationRQuicksR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewQuicks(number int, mods ...PublicreportQuickMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewPublicreportQuickWithContext(ctx, mods...)
|
|
|
|
|
m.WithQuicks(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddQuicks(number int, related *PublicreportQuickTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Quicks = append(o.r.Quicks, &organizationRQuicksR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewQuicks(number int, mods ...PublicreportQuickMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewPublicreportQuickWithContext(ctx, mods...)
|
|
|
|
|
m.AddQuicks(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingQuicks(existingModels ...*models.PublicreportQuick) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.Quicks = append(o.r.Quicks, &organizationRQuicksR{
|
|
|
|
|
o: o.f.FromExistingPublicreportQuick(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutQuicks() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.Quicks = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-04 23:11:32 +00:00
|
|
|
func (m organizationMods) WithUser(number int, related *UserTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.User = []*organizationRUserR{{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
}}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithNewUser(number int, mods ...UserMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewUserWithContext(ctx, mods...)
|
|
|
|
|
m.WithUser(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddUser(number int, related *UserTemplate) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.User = append(o.r.User, &organizationRUserR{
|
|
|
|
|
number: number,
|
|
|
|
|
o: related,
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddNewUser(number int, mods ...UserMod) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
related := o.f.NewUserWithContext(ctx, mods...)
|
|
|
|
|
m.AddUser(number, related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) AddExistingUser(existingModels ...*models.User) OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
for _, em := range existingModels {
|
|
|
|
|
o.r.User = append(o.r.User, &organizationRUserR{
|
|
|
|
|
o: o.f.FromExistingUser(em),
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m organizationMods) WithoutUser() OrganizationMod {
|
|
|
|
|
return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
|
|
|
|
|
o.r.User = nil
|
|
|
|
|
})
|
|
|
|
|
}
|