// Code generated by BobGen psql v0.42.5. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.

package factory

import (
	"context"
	"testing"

	"github.com/Gleipnir-Technology/bob"
	models "github.com/Gleipnir-Technology/nidus-sync/db/models"
	"github.com/aarondl/opt/null"
	"github.com/aarondl/opt/omit"
	"github.com/aarondl/opt/omitnull"
	"github.com/google/uuid"
	"github.com/jaswdr/faker/v2"
	"github.com/shopspring/decimal"
)

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 {
	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]

	r organizationR
	f *Factory

	alreadyPersisted bool
}

type organizationR struct {
	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
	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
}
type organizationRAddressMappingsR struct {
	number int
	o      *ArcgisAddressMappingTemplate
}
type organizationRParcelMappingsR struct {
	number int
	o      *ArcgisParcelMappingTemplate
}
type organizationREmailContactsR struct {
	number int
	o      *CommsEmailContactTemplate
}
type organizationRPhonesR struct {
	number int
	o      *CommsPhoneTemplate
}
type organizationRContainerrelatesR struct {
	number int
	o      *FieldseekerContainerrelateTemplate
}
type organizationRFieldscoutinglogsR struct {
	number int
	o      *FieldseekerFieldscoutinglogTemplate
}
type organizationRHabitatrelatesR struct {
	number int
	o      *FieldseekerHabitatrelateTemplate
}
type organizationRInspectionsamplesR struct {
	number int
	o      *FieldseekerInspectionsampleTemplate
}
type organizationRInspectionsampledetailsR struct {
	number int
	o      *FieldseekerInspectionsampledetailTemplate
}
type organizationRLinelocationsR struct {
	number int
	o      *FieldseekerLinelocationTemplate
}
type organizationRLocationtrackingsR struct {
	number int
	o      *FieldseekerLocationtrackingTemplate
}
type organizationRMosquitoinspectionsR struct {
	number int
	o      *FieldseekerMosquitoinspectionTemplate
}
type organizationRPointlocationsR struct {
	number int
	o      *FieldseekerPointlocationTemplate
}
type organizationRPolygonlocationsR struct {
	number int
	o      *FieldseekerPolygonlocationTemplate
}
type organizationRFieldseekerPoolR struct {
	number int
	o      *FieldseekerPoolTemplate
}
type organizationRPooldetailsR struct {
	number int
	o      *FieldseekerPooldetailTemplate
}
type organizationRProposedtreatmentareasR struct {
	number int
	o      *FieldseekerProposedtreatmentareaTemplate
}
type organizationRQamosquitoinspectionsR struct {
	number int
	o      *FieldseekerQamosquitoinspectionTemplate
}
type organizationRRodentlocationsR struct {
	number int
	o      *FieldseekerRodentlocationTemplate
}
type organizationRSamplecollectionsR struct {
	number int
	o      *FieldseekerSamplecollectionTemplate
}
type organizationRSamplelocationsR struct {
	number int
	o      *FieldseekerSamplelocationTemplate
}
type organizationRServicerequestsR struct {
	number int
	o      *FieldseekerServicerequestTemplate
}
type organizationRSpeciesabundancesR struct {
	number int
	o      *FieldseekerSpeciesabundanceTemplate
}
type organizationRStormdrainsR struct {
	number int
	o      *FieldseekerStormdrainTemplate
}
type organizationRTimecardsR struct {
	number int
	o      *FieldseekerTimecardTemplate
}
type organizationRTrapdataR struct {
	number int
	o      *FieldseekerTrapdatumTemplate
}
type organizationRTraplocationsR struct {
	number int
	o      *FieldseekerTraplocationTemplate
}
type organizationRTreatmentsR struct {
	number int
	o      *FieldseekerTreatmentTemplate
}
type organizationRTreatmentareasR struct {
	number int
	o      *FieldseekerTreatmentareaTemplate
}
type organizationRZonesR struct {
	number int
	o      *FieldseekerZoneTemplate
}
type organizationRZones2sR struct {
	number int
	o      *FieldseekerZones2Template
}
type organizationRFieldseekerSyncsR struct {
	number int
	o      *FieldseekerSyncTemplate
}
type organizationRFilesR struct {
	number int
	o      *FileuploadFileTemplate
}
type organizationRPoolsR struct {
	number int
	o      *FileuploadPoolTemplate
}
type organizationRH3AggregationsR struct {
	number int
	o      *H3AggregationTemplate
}
type organizationRNoteAudiosR struct {
	number int
	o      *NoteAudioTemplate
}
type organizationRNoteImagesR struct {
	number int
	o      *NoteImageTemplate
}
type organizationRArcgisAccountAccountR struct {
	o *ArcgisAccountTemplate
}
type organizationRFieldseekerServiceFeatureItemServiceFeatureR struct {
	o *ArcgisServiceFeatureTemplate
}
type organizationRNuisancesR struct {
	number int
	o      *PublicreportNuisanceTemplate
}
type organizationRPublicreportPoolR struct {
	number int
	o      *PublicreportPoolTemplate
}
type organizationRQuicksR struct {
	number int
	o      *PublicreportQuickTemplate
}
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) {
	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
	}

	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
	}

	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
	}

	if t.r.Containerrelates != nil {
		rel := models.FieldseekerContainerrelateSlice{}
		for _, r := range t.r.Containerrelates {
			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.Containerrelates = rel
	}

	if t.r.Fieldscoutinglogs != nil {
		rel := models.FieldseekerFieldscoutinglogSlice{}
		for _, r := range t.r.Fieldscoutinglogs {
			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.Fieldscoutinglogs = rel
	}

	if t.r.Habitatrelates != nil {
		rel := models.FieldseekerHabitatrelateSlice{}
		for _, r := range t.r.Habitatrelates {
			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.Habitatrelates = rel
	}

	if t.r.Inspectionsamples != nil {
		rel := models.FieldseekerInspectionsampleSlice{}
		for _, r := range t.r.Inspectionsamples {
			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.Inspectionsamples = rel
	}

	if t.r.Inspectionsampledetails != nil {
		rel := models.FieldseekerInspectionsampledetailSlice{}
		for _, r := range t.r.Inspectionsampledetails {
			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.Inspectionsampledetails = rel
	}

	if t.r.Linelocations != nil {
		rel := models.FieldseekerLinelocationSlice{}
		for _, r := range t.r.Linelocations {
			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.Linelocations = rel
	}

	if t.r.Locationtrackings != nil {
		rel := models.FieldseekerLocationtrackingSlice{}
		for _, r := range t.r.Locationtrackings {
			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.Locationtrackings = rel
	}

	if t.r.Mosquitoinspections != nil {
		rel := models.FieldseekerMosquitoinspectionSlice{}
		for _, r := range t.r.Mosquitoinspections {
			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.Mosquitoinspections = rel
	}

	if t.r.Pointlocations != nil {
		rel := models.FieldseekerPointlocationSlice{}
		for _, r := range t.r.Pointlocations {
			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.Pointlocations = rel
	}

	if t.r.Polygonlocations != nil {
		rel := models.FieldseekerPolygonlocationSlice{}
		for _, r := range t.r.Polygonlocations {
			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.Polygonlocations = rel
	}

	if t.r.FieldseekerPool != nil {
		rel := models.FieldseekerPoolSlice{}
		for _, r := range t.r.FieldseekerPool {
			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.FieldseekerPool = rel
	}

	if t.r.Pooldetails != nil {
		rel := models.FieldseekerPooldetailSlice{}
		for _, r := range t.r.Pooldetails {
			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.Pooldetails = rel
	}

	if t.r.Proposedtreatmentareas != nil {
		rel := models.FieldseekerProposedtreatmentareaSlice{}
		for _, r := range t.r.Proposedtreatmentareas {
			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.Proposedtreatmentareas = rel
	}

	if t.r.Qamosquitoinspections != nil {
		rel := models.FieldseekerQamosquitoinspectionSlice{}
		for _, r := range t.r.Qamosquitoinspections {
			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.Qamosquitoinspections = rel
	}

	if t.r.Rodentlocations != nil {
		rel := models.FieldseekerRodentlocationSlice{}
		for _, r := range t.r.Rodentlocations {
			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.Rodentlocations = rel
	}

	if t.r.Samplecollections != nil {
		rel := models.FieldseekerSamplecollectionSlice{}
		for _, r := range t.r.Samplecollections {
			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.Samplecollections = rel
	}

	if t.r.Samplelocations != nil {
		rel := models.FieldseekerSamplelocationSlice{}
		for _, r := range t.r.Samplelocations {
			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.Samplelocations = rel
	}

	if t.r.Servicerequests != nil {
		rel := models.FieldseekerServicerequestSlice{}
		for _, r := range t.r.Servicerequests {
			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.Servicerequests = rel
	}

	if t.r.Speciesabundances != nil {
		rel := models.FieldseekerSpeciesabundanceSlice{}
		for _, r := range t.r.Speciesabundances {
			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.Speciesabundances = rel
	}

	if t.r.Stormdrains != nil {
		rel := models.FieldseekerStormdrainSlice{}
		for _, r := range t.r.Stormdrains {
			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.Stormdrains = rel
	}

	if t.r.Timecards != nil {
		rel := models.FieldseekerTimecardSlice{}
		for _, r := range t.r.Timecards {
			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.Timecards = rel
	}

	if t.r.Trapdata != nil {
		rel := models.FieldseekerTrapdatumSlice{}
		for _, r := range t.r.Trapdata {
			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.Trapdata = rel
	}

	if t.r.Traplocations != nil {
		rel := models.FieldseekerTraplocationSlice{}
		for _, r := range t.r.Traplocations {
			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.Traplocations = rel
	}

	if t.r.Treatments != nil {
		rel := models.FieldseekerTreatmentSlice{}
		for _, r := range t.r.Treatments {
			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.Treatments = rel
	}

	if t.r.Treatmentareas != nil {
		rel := models.FieldseekerTreatmentareaSlice{}
		for _, r := range t.r.Treatmentareas {
			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.Treatmentareas = rel
	}

	if t.r.Zones != nil {
		rel := models.FieldseekerZoneSlice{}
		for _, r := range t.r.Zones {
			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.Zones = rel
	}

	if t.r.Zones2s != nil {
		rel := models.FieldseekerZones2Slice{}
		for _, r := range t.r.Zones2s {
			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.Zones2s = rel
	}

	if t.r.FieldseekerSyncs != nil {
		rel := models.FieldseekerSyncSlice{}
		for _, r := range t.r.FieldseekerSyncs {
			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.FieldseekerSyncs = rel
	}

	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
	}

	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
	}

	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
	}

	if t.r.NoteAudios != nil {
		rel := models.NoteAudioSlice{}
		for _, r := range t.r.NoteAudios {
			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.NoteAudios = rel
	}

	if t.r.NoteImages != nil {
		rel := models.NoteImageSlice{}
		for _, r := range t.r.NoteImages {
			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.NoteImages = rel
	}

	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
	}

	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
	}

	if t.r.User != nil {
		rel := models.UserSlice{}
		for _, r := range t.r.User {
			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.User = rel
	}
}

// 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()
		m.Name = omit.From(val)
	}
	if o.ImportDistrictGid != nil {
		val := o.ImportDistrictGid()
		m.ImportDistrictGid = omitnull.FromNull(val)
	}
	if o.Website != nil {
		val := o.Website()
		m.Website = omitnull.FromNull(val)
	}
	if o.LogoUUID != nil {
		val := o.LogoUUID()
		m.LogoUUID = omitnull.FromNull(val)
	}
	if o.Slug != nil {
		val := o.Slug()
		m.Slug = omitnull.FromNull(val)
	}
	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)
	}
	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)
	}

	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()
	}

	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()
	}
	if o.ImportDistrictGid != nil {
		m.ImportDistrictGid = o.ImportDistrictGid()
	}
	if o.Website != nil {
		m.Website = o.Website()
	}
	if o.LogoUUID != nil {
		m.LogoUUID = o.LogoUUID()
	}
	if o.Slug != nil {
		m.Slug = o.Slug()
	}
	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()
	}
	if o.ServiceAreaCentroidX != nil {
		m.ServiceAreaCentroidX = o.ServiceAreaCentroidX()
	}
	if o.ServiceAreaCentroidY != nil {
		m.ServiceAreaCentroidY = o.ServiceAreaCentroidY()
	}
	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()
	}

	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()
	}

	return m
}

func ensureCreatableOrganization(m *models.OrganizationSetter) {
	if !(m.Name.IsValue()) {
		val := random_string(nil)
		m.Name = omit.From(val)
	}
}

// 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

	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
				}
			}
		}
	}

	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 {
				rel1, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachAddressMappings(ctx, exec, rel1...)
				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 {
				rel2, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachParcelMappings(ctx, exec, rel2...)
				if err != nil {
					return err
				}
			}
		}
	}

	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 {
				rel3, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachEmailContacts(ctx, exec, rel3...)
				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 {
				rel4, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachPhones(ctx, exec, rel4...)
				if err != nil {
					return err
				}
			}
		}
	}

	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 {
				rel5, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachContainerrelates(ctx, exec, rel5...)
				if err != nil {
					return err
				}
			}
		}
	}

	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 {
				rel6, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachFieldscoutinglogs(ctx, exec, rel6...)
				if err != nil {
					return err
				}
			}
		}
	}

	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 {
				rel7, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachHabitatrelates(ctx, exec, rel7...)
				if err != nil {
					return err
				}
			}
		}
	}

	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 {
				rel8, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachInspectionsamples(ctx, exec, rel8...)
				if err != nil {
					return err
				}
			}
		}
	}

	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 {
				rel9, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachInspectionsampledetails(ctx, exec, rel9...)
				if err != nil {
					return err
				}
			}
		}
	}

	isLinelocationsDone, _ := organizationRelLinelocationsCtx.Value(ctx)
	if !isLinelocationsDone && o.r.Linelocations != nil {
		ctx = organizationRelLinelocationsCtx.WithValue(ctx, true)
		for _, r := range o.r.Linelocations {
			if r.o.alreadyPersisted {
				m.R.Linelocations = append(m.R.Linelocations, r.o.Build())
			} else {
				rel10, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachLinelocations(ctx, exec, rel10...)
				if err != nil {
					return err
				}
			}
		}
	}

	isLocationtrackingsDone, _ := organizationRelLocationtrackingsCtx.Value(ctx)
	if !isLocationtrackingsDone && o.r.Locationtrackings != nil {
		ctx = organizationRelLocationtrackingsCtx.WithValue(ctx, true)
		for _, r := range o.r.Locationtrackings {
			if r.o.alreadyPersisted {
				m.R.Locationtrackings = append(m.R.Locationtrackings, r.o.Build())
			} else {
				rel11, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachLocationtrackings(ctx, exec, rel11...)
				if err != nil {
					return err
				}
			}
		}
	}

	isMosquitoinspectionsDone, _ := organizationRelMosquitoinspectionsCtx.Value(ctx)
	if !isMosquitoinspectionsDone && o.r.Mosquitoinspections != nil {
		ctx = organizationRelMosquitoinspectionsCtx.WithValue(ctx, true)
		for _, r := range o.r.Mosquitoinspections {
			if r.o.alreadyPersisted {
				m.R.Mosquitoinspections = append(m.R.Mosquitoinspections, r.o.Build())
			} else {
				rel12, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachMosquitoinspections(ctx, exec, rel12...)
				if err != nil {
					return err
				}
			}
		}
	}

	isPointlocationsDone, _ := organizationRelPointlocationsCtx.Value(ctx)
	if !isPointlocationsDone && o.r.Pointlocations != nil {
		ctx = organizationRelPointlocationsCtx.WithValue(ctx, true)
		for _, r := range o.r.Pointlocations {
			if r.o.alreadyPersisted {
				m.R.Pointlocations = append(m.R.Pointlocations, r.o.Build())
			} else {
				rel13, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachPointlocations(ctx, exec, rel13...)
				if err != nil {
					return err
				}
			}
		}
	}

	isPolygonlocationsDone, _ := organizationRelPolygonlocationsCtx.Value(ctx)
	if !isPolygonlocationsDone && o.r.Polygonlocations != nil {
		ctx = organizationRelPolygonlocationsCtx.WithValue(ctx, true)
		for _, r := range o.r.Polygonlocations {
			if r.o.alreadyPersisted {
				m.R.Polygonlocations = append(m.R.Polygonlocations, r.o.Build())
			} else {
				rel14, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachPolygonlocations(ctx, exec, rel14...)
				if err != nil {
					return err
				}
			}
		}
	}

	isFieldseekerPoolDone, _ := organizationRelFieldseekerPoolCtx.Value(ctx)
	if !isFieldseekerPoolDone && o.r.FieldseekerPool != nil {
		ctx = organizationRelFieldseekerPoolCtx.WithValue(ctx, true)
		for _, r := range o.r.FieldseekerPool {
			if r.o.alreadyPersisted {
				m.R.FieldseekerPool = append(m.R.FieldseekerPool, r.o.Build())
			} else {
				rel15, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachFieldseekerPool(ctx, exec, rel15...)
				if err != nil {
					return err
				}
			}
		}
	}

	isPooldetailsDone, _ := organizationRelPooldetailsCtx.Value(ctx)
	if !isPooldetailsDone && o.r.Pooldetails != nil {
		ctx = organizationRelPooldetailsCtx.WithValue(ctx, true)
		for _, r := range o.r.Pooldetails {
			if r.o.alreadyPersisted {
				m.R.Pooldetails = append(m.R.Pooldetails, r.o.Build())
			} else {
				rel16, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachPooldetails(ctx, exec, rel16...)
				if err != nil {
					return err
				}
			}
		}
	}

	isProposedtreatmentareasDone, _ := organizationRelProposedtreatmentareasCtx.Value(ctx)
	if !isProposedtreatmentareasDone && o.r.Proposedtreatmentareas != nil {
		ctx = organizationRelProposedtreatmentareasCtx.WithValue(ctx, true)
		for _, r := range o.r.Proposedtreatmentareas {
			if r.o.alreadyPersisted {
				m.R.Proposedtreatmentareas = append(m.R.Proposedtreatmentareas, r.o.Build())
			} else {
				rel17, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachProposedtreatmentareas(ctx, exec, rel17...)
				if err != nil {
					return err
				}
			}
		}
	}

	isQamosquitoinspectionsDone, _ := organizationRelQamosquitoinspectionsCtx.Value(ctx)
	if !isQamosquitoinspectionsDone && o.r.Qamosquitoinspections != nil {
		ctx = organizationRelQamosquitoinspectionsCtx.WithValue(ctx, true)
		for _, r := range o.r.Qamosquitoinspections {
			if r.o.alreadyPersisted {
				m.R.Qamosquitoinspections = append(m.R.Qamosquitoinspections, r.o.Build())
			} else {
				rel18, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachQamosquitoinspections(ctx, exec, rel18...)
				if err != nil {
					return err
				}
			}
		}
	}

	isRodentlocationsDone, _ := organizationRelRodentlocationsCtx.Value(ctx)
	if !isRodentlocationsDone && o.r.Rodentlocations != nil {
		ctx = organizationRelRodentlocationsCtx.WithValue(ctx, true)
		for _, r := range o.r.Rodentlocations {
			if r.o.alreadyPersisted {
				m.R.Rodentlocations = append(m.R.Rodentlocations, r.o.Build())
			} else {
				rel19, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachRodentlocations(ctx, exec, rel19...)
				if err != nil {
					return err
				}
			}
		}
	}

	isSamplecollectionsDone, _ := organizationRelSamplecollectionsCtx.Value(ctx)
	if !isSamplecollectionsDone && o.r.Samplecollections != nil {
		ctx = organizationRelSamplecollectionsCtx.WithValue(ctx, true)
		for _, r := range o.r.Samplecollections {
			if r.o.alreadyPersisted {
				m.R.Samplecollections = append(m.R.Samplecollections, r.o.Build())
			} else {
				rel20, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachSamplecollections(ctx, exec, rel20...)
				if err != nil {
					return err
				}
			}
		}
	}

	isSamplelocationsDone, _ := organizationRelSamplelocationsCtx.Value(ctx)
	if !isSamplelocationsDone && o.r.Samplelocations != nil {
		ctx = organizationRelSamplelocationsCtx.WithValue(ctx, true)
		for _, r := range o.r.Samplelocations {
			if r.o.alreadyPersisted {
				m.R.Samplelocations = append(m.R.Samplelocations, r.o.Build())
			} else {
				rel21, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachSamplelocations(ctx, exec, rel21...)
				if err != nil {
					return err
				}
			}
		}
	}

	isServicerequestsDone, _ := organizationRelServicerequestsCtx.Value(ctx)
	if !isServicerequestsDone && o.r.Servicerequests != nil {
		ctx = organizationRelServicerequestsCtx.WithValue(ctx, true)
		for _, r := range o.r.Servicerequests {
			if r.o.alreadyPersisted {
				m.R.Servicerequests = append(m.R.Servicerequests, r.o.Build())
			} else {
				rel22, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachServicerequests(ctx, exec, rel22...)
				if err != nil {
					return err
				}
			}
		}
	}

	isSpeciesabundancesDone, _ := organizationRelSpeciesabundancesCtx.Value(ctx)
	if !isSpeciesabundancesDone && o.r.Speciesabundances != nil {
		ctx = organizationRelSpeciesabundancesCtx.WithValue(ctx, true)
		for _, r := range o.r.Speciesabundances {
			if r.o.alreadyPersisted {
				m.R.Speciesabundances = append(m.R.Speciesabundances, r.o.Build())
			} else {
				rel23, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachSpeciesabundances(ctx, exec, rel23...)
				if err != nil {
					return err
				}
			}
		}
	}

	isStormdrainsDone, _ := organizationRelStormdrainsCtx.Value(ctx)
	if !isStormdrainsDone && o.r.Stormdrains != nil {
		ctx = organizationRelStormdrainsCtx.WithValue(ctx, true)
		for _, r := range o.r.Stormdrains {
			if r.o.alreadyPersisted {
				m.R.Stormdrains = append(m.R.Stormdrains, r.o.Build())
			} else {
				rel24, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachStormdrains(ctx, exec, rel24...)
				if err != nil {
					return err
				}
			}
		}
	}

	isTimecardsDone, _ := organizationRelTimecardsCtx.Value(ctx)
	if !isTimecardsDone && o.r.Timecards != nil {
		ctx = organizationRelTimecardsCtx.WithValue(ctx, true)
		for _, r := range o.r.Timecards {
			if r.o.alreadyPersisted {
				m.R.Timecards = append(m.R.Timecards, r.o.Build())
			} else {
				rel25, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachTimecards(ctx, exec, rel25...)
				if err != nil {
					return err
				}
			}
		}
	}

	isTrapdataDone, _ := organizationRelTrapdataCtx.Value(ctx)
	if !isTrapdataDone && o.r.Trapdata != nil {
		ctx = organizationRelTrapdataCtx.WithValue(ctx, true)
		for _, r := range o.r.Trapdata {
			if r.o.alreadyPersisted {
				m.R.Trapdata = append(m.R.Trapdata, r.o.Build())
			} else {
				rel26, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachTrapdata(ctx, exec, rel26...)
				if err != nil {
					return err
				}
			}
		}
	}

	isTraplocationsDone, _ := organizationRelTraplocationsCtx.Value(ctx)
	if !isTraplocationsDone && o.r.Traplocations != nil {
		ctx = organizationRelTraplocationsCtx.WithValue(ctx, true)
		for _, r := range o.r.Traplocations {
			if r.o.alreadyPersisted {
				m.R.Traplocations = append(m.R.Traplocations, r.o.Build())
			} else {
				rel27, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachTraplocations(ctx, exec, rel27...)
				if err != nil {
					return err
				}
			}
		}
	}

	isTreatmentsDone, _ := organizationRelTreatmentsCtx.Value(ctx)
	if !isTreatmentsDone && o.r.Treatments != nil {
		ctx = organizationRelTreatmentsCtx.WithValue(ctx, true)
		for _, r := range o.r.Treatments {
			if r.o.alreadyPersisted {
				m.R.Treatments = append(m.R.Treatments, r.o.Build())
			} else {
				rel28, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachTreatments(ctx, exec, rel28...)
				if err != nil {
					return err
				}
			}
		}
	}

	isTreatmentareasDone, _ := organizationRelTreatmentareasCtx.Value(ctx)
	if !isTreatmentareasDone && o.r.Treatmentareas != nil {
		ctx = organizationRelTreatmentareasCtx.WithValue(ctx, true)
		for _, r := range o.r.Treatmentareas {
			if r.o.alreadyPersisted {
				m.R.Treatmentareas = append(m.R.Treatmentareas, r.o.Build())
			} else {
				rel29, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachTreatmentareas(ctx, exec, rel29...)
				if err != nil {
					return err
				}
			}
		}
	}

	isZonesDone, _ := organizationRelZonesCtx.Value(ctx)
	if !isZonesDone && o.r.Zones != nil {
		ctx = organizationRelZonesCtx.WithValue(ctx, true)
		for _, r := range o.r.Zones {
			if r.o.alreadyPersisted {
				m.R.Zones = append(m.R.Zones, r.o.Build())
			} else {
				rel30, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachZones(ctx, exec, rel30...)
				if err != nil {
					return err
				}
			}
		}
	}

	isZones2sDone, _ := organizationRelZones2sCtx.Value(ctx)
	if !isZones2sDone && o.r.Zones2s != nil {
		ctx = organizationRelZones2sCtx.WithValue(ctx, true)
		for _, r := range o.r.Zones2s {
			if r.o.alreadyPersisted {
				m.R.Zones2s = append(m.R.Zones2s, r.o.Build())
			} else {
				rel31, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachZones2s(ctx, exec, rel31...)
				if err != nil {
					return err
				}
			}
		}
	}

	isFieldseekerSyncsDone, _ := organizationRelFieldseekerSyncsCtx.Value(ctx)
	if !isFieldseekerSyncsDone && o.r.FieldseekerSyncs != nil {
		ctx = organizationRelFieldseekerSyncsCtx.WithValue(ctx, true)
		for _, r := range o.r.FieldseekerSyncs {
			if r.o.alreadyPersisted {
				m.R.FieldseekerSyncs = append(m.R.FieldseekerSyncs, r.o.Build())
			} else {
				rel32, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachFieldseekerSyncs(ctx, exec, rel32...)
				if err != nil {
					return err
				}
			}
		}
	}

	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 {
				rel33, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachFiles(ctx, exec, rel33...)
				if err != nil {
					return err
				}
			}
		}
	}

	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 {
				rel34, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachPools(ctx, exec, rel34...)
				if err != nil {
					return err
				}
			}
		}
	}

	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 {
				rel35, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachH3Aggregations(ctx, exec, rel35...)
				if err != nil {
					return err
				}
			}
		}
	}

	isNoteAudiosDone, _ := organizationRelNoteAudiosCtx.Value(ctx)
	if !isNoteAudiosDone && o.r.NoteAudios != nil {
		ctx = organizationRelNoteAudiosCtx.WithValue(ctx, true)
		for _, r := range o.r.NoteAudios {
			if r.o.alreadyPersisted {
				m.R.NoteAudios = append(m.R.NoteAudios, r.o.Build())
			} else {
				rel36, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachNoteAudios(ctx, exec, rel36...)
				if err != nil {
					return err
				}
			}
		}
	}

	isNoteImagesDone, _ := organizationRelNoteImagesCtx.Value(ctx)
	if !isNoteImagesDone && o.r.NoteImages != nil {
		ctx = organizationRelNoteImagesCtx.WithValue(ctx, true)
		for _, r := range o.r.NoteImages {
			if r.o.alreadyPersisted {
				m.R.NoteImages = append(m.R.NoteImages, r.o.Build())
			} else {
				rel37, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachNoteImages(ctx, exec, rel37...)
				if err != nil {
					return err
				}
			}
		}
	}

	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 {
			var rel38 *models.ArcgisAccount
			rel38, err = o.r.ArcgisAccountAccount.o.Create(ctx, exec)
			if err != nil {
				return err
			}
			err = m.AttachArcgisAccountAccount(ctx, exec, rel38)
			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 {
			var rel39 *models.ArcgisServiceFeature
			rel39, err = o.r.FieldseekerServiceFeatureItemServiceFeature.o.Create(ctx, exec)
			if err != nil {
				return err
			}
			err = m.AttachFieldseekerServiceFeatureItemServiceFeature(ctx, exec, rel39)
			if err != nil {
				return err
			}
		}

	}

	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 {
				rel40, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachNuisances(ctx, exec, rel40...)
				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 {
				rel41, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachPublicreportPool(ctx, exec, rel41...)
				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 {
				rel42, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachQuicks(ctx, exec, rel42...)
				if err != nil {
					return err
				}
			}
		}
	}

	isUserDone, _ := organizationRelUserCtx.Value(ctx)
	if !isUserDone && o.r.User != nil {
		ctx = organizationRelUserCtx.WithValue(ctx, true)
		for _, r := range o.r.User {
			if r.o.alreadyPersisted {
				m.R.User = append(m.R.User, r.o.Build())
			} else {
				rel43, err := r.o.CreateMany(ctx, exec, r.number)
				if err != nil {
					return err
				}

				err = m.AttachUser(ctx, exec, rel43...)
				if err != nil {
					return err
				}
			}
		}
	}

	return err
}

// 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)

	m, err := models.Organizations.Insert(opt).One(ctx, exec)
	if err != nil {
		return nil, err
	}

	if err := o.insertOptRels(ctx, exec, m); err != nil {
		return nil, err
	}
	return m, err
}

// 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)
	}
	return m
}

// 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
	}
	return m
}

// 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)

	for i := range m {
		m[i], err = o.Create(ctx, exec)
		if err != nil {
			return nil, err
		}
	}

	return m, nil
}

// 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)
	}
	return m
}

// 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
	}
	return m
}

// Organization has methods that act as mods for the OrganizationTemplate
var OrganizationMods organizationMods

type organizationMods struct{}

func (m organizationMods) RandomizeAllColumns(f *faker.Faker) OrganizationMod {
	return OrganizationModSlice{
		OrganizationMods.RandomID(f),
		OrganizationMods.RandomName(f),
		OrganizationMods.RandomImportDistrictGid(f),
		OrganizationMods.RandomWebsite(f),
		OrganizationMods.RandomLogoUUID(f),
		OrganizationMods.RandomSlug(f),
		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),
		OrganizationMods.RandomServiceAreaCentroidX(f),
		OrganizationMods.RandomServiceAreaCentroidY(f),
		OrganizationMods.RandomMailingAddressCountry(f),
		OrganizationMods.RandomMailingAddressState(f),
		OrganizationMods.RandomOfficeAddressCountry(f),
		OrganizationMods.RandomOfficeAddressState(f),
		OrganizationMods.RandomArcgisAccountID(f),
		OrganizationMods.RandomFieldseekerServiceFeatureItemID(f),
	}
}

// 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 }
	})
}

// Set the Column from the function
func (m organizationMods) IDFunc(f func() int32) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.ID = f
	})
}

// Clear any values for the column
func (m organizationMods) UnsetID() OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.ID = nil
	})
}

// 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)
		}
	})
}

// Set the model columns to this value
func (m organizationMods) Name(val string) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Name = func() string { return val }
	})
}

// Set the Column from the function
func (m organizationMods) NameFunc(f func() string) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Name = f
	})
}

// Clear any values for the column
func (m organizationMods) UnsetName() OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Name = nil
	})
}

// 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) {
		o.Name = func() string {
			return random_string(f)
		}
	})
}

// Set the model columns to this value
func (m organizationMods) ImportDistrictGid(val null.Val[int32]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.ImportDistrictGid = func() null.Val[int32] { return val }
	})
}

// Set the Column from the function
func (m organizationMods) ImportDistrictGidFunc(f func() null.Val[int32]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.ImportDistrictGid = f
	})
}

// Clear any values for the column
func (m organizationMods) UnsetImportDistrictGid() OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.ImportDistrictGid = 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) RandomImportDistrictGid(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.ImportDistrictGid = func() null.Val[int32] {
			if f == nil {
				f = &defaultFaker
			}

			val := random_int32(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) RandomImportDistrictGidNotNull(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.ImportDistrictGid = func() null.Val[int32] {
			if f == nil {
				f = &defaultFaker
			}

			val := random_int32(f)
			return null.From(val)
		}
	})
}

// Set the model columns to this value
func (m organizationMods) Website(val null.Val[string]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Website = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m organizationMods) WebsiteFunc(f func() null.Val[string]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Website = f
	})
}

// Clear any values for the column
func (m organizationMods) UnsetWebsite() OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Website = 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) RandomWebsite(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Website = 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) RandomWebsiteNotNull(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Website = 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) LogoUUID(val null.Val[uuid.UUID]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.LogoUUID = func() null.Val[uuid.UUID] { return val }
	})
}

// Set the Column from the function
func (m organizationMods) LogoUUIDFunc(f func() null.Val[uuid.UUID]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.LogoUUID = f
	})
}

// Clear any values for the column
func (m organizationMods) UnsetLogoUUID() OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.LogoUUID = 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) RandomLogoUUID(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.LogoUUID = func() null.Val[uuid.UUID] {
			if f == nil {
				f = &defaultFaker
			}

			val := random_uuid_UUID(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) RandomLogoUUIDNotNull(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.LogoUUID = func() null.Val[uuid.UUID] {
			if f == nil {
				f = &defaultFaker
			}

			val := random_uuid_UUID(f)
			return null.From(val)
		}
	})
}

// Set the model columns to this value
func (m organizationMods) Slug(val null.Val[string]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Slug = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m organizationMods) SlugFunc(f func() null.Val[string]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Slug = f
	})
}

// Clear any values for the column
func (m organizationMods) UnsetSlug() OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Slug = 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) RandomSlug(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Slug = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

			val := random_string(f, "24")
			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) RandomSlugNotNull(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.Slug = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

			val := random_string(f, "24")
			return null.From(val)
		}
	})
}

// Set the model columns to this value
func (m organizationMods) GeneralManagerName(val null.Val[string]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.GeneralManagerName = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m organizationMods) GeneralManagerNameFunc(f func() null.Val[string]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.GeneralManagerName = f
	})
}

// Clear any values for the column
func (m organizationMods) UnsetGeneralManagerName() OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.GeneralManagerName = 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) RandomGeneralManagerName(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.GeneralManagerName = 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) RandomGeneralManagerNameNotNull(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.GeneralManagerName = 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) MailingAddressCity(val null.Val[string]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.MailingAddressCity = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m organizationMods) MailingAddressCityFunc(f func() null.Val[string]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.MailingAddressCity = f
	})
}

// Clear any values for the column
func (m organizationMods) UnsetMailingAddressCity() OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.MailingAddressCity = 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) RandomMailingAddressCity(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.MailingAddressCity = 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) RandomMailingAddressCityNotNull(f *faker.Faker) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.MailingAddressCity = 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) MailingAddressPostalCode(val null.Val[string]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.MailingAddressPostalCode = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m organizationMods) MailingAddressPostalCodeFunc(f func() null.Val[string]) OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.MailingAddressPostalCode = f
	})
}

// Clear any values for the column
func (m organizationMods) UnsetMailingAddressPostalCode() OrganizationMod {
	return OrganizationModFunc(func(_ context.Context, o *OrganizationTemplate) {
		o.MailingAddressPostalCode = 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) 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)
		}
	})
}

// 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)
		}
	})
}

// 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)
		}
	})
}

// 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)
		}
	})
}

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)
		{

			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
	})
}

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
	})
}

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
	})
}

func (m organizationMods) WithContainerrelates(number int, related *FieldseekerContainerrelateTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Containerrelates = []*organizationRContainerrelatesR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewContainerrelates(number int, mods ...FieldseekerContainerrelateMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerContainerrelateWithContext(ctx, mods...)
		m.WithContainerrelates(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddContainerrelates(number int, related *FieldseekerContainerrelateTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Containerrelates = append(o.r.Containerrelates, &organizationRContainerrelatesR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewContainerrelates(number int, mods ...FieldseekerContainerrelateMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerContainerrelateWithContext(ctx, mods...)
		m.AddContainerrelates(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingContainerrelates(existingModels ...*models.FieldseekerContainerrelate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Containerrelates = append(o.r.Containerrelates, &organizationRContainerrelatesR{
				o: o.f.FromExistingFieldseekerContainerrelate(em),
			})
		}
	})
}

func (m organizationMods) WithoutContainerrelates() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Containerrelates = nil
	})
}

func (m organizationMods) WithFieldscoutinglogs(number int, related *FieldseekerFieldscoutinglogTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Fieldscoutinglogs = []*organizationRFieldscoutinglogsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewFieldscoutinglogs(number int, mods ...FieldseekerFieldscoutinglogMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerFieldscoutinglogWithContext(ctx, mods...)
		m.WithFieldscoutinglogs(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddFieldscoutinglogs(number int, related *FieldseekerFieldscoutinglogTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Fieldscoutinglogs = append(o.r.Fieldscoutinglogs, &organizationRFieldscoutinglogsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewFieldscoutinglogs(number int, mods ...FieldseekerFieldscoutinglogMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerFieldscoutinglogWithContext(ctx, mods...)
		m.AddFieldscoutinglogs(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingFieldscoutinglogs(existingModels ...*models.FieldseekerFieldscoutinglog) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Fieldscoutinglogs = append(o.r.Fieldscoutinglogs, &organizationRFieldscoutinglogsR{
				o: o.f.FromExistingFieldseekerFieldscoutinglog(em),
			})
		}
	})
}

func (m organizationMods) WithoutFieldscoutinglogs() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Fieldscoutinglogs = nil
	})
}

func (m organizationMods) WithHabitatrelates(number int, related *FieldseekerHabitatrelateTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Habitatrelates = []*organizationRHabitatrelatesR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewHabitatrelates(number int, mods ...FieldseekerHabitatrelateMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerHabitatrelateWithContext(ctx, mods...)
		m.WithHabitatrelates(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddHabitatrelates(number int, related *FieldseekerHabitatrelateTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Habitatrelates = append(o.r.Habitatrelates, &organizationRHabitatrelatesR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewHabitatrelates(number int, mods ...FieldseekerHabitatrelateMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerHabitatrelateWithContext(ctx, mods...)
		m.AddHabitatrelates(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingHabitatrelates(existingModels ...*models.FieldseekerHabitatrelate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Habitatrelates = append(o.r.Habitatrelates, &organizationRHabitatrelatesR{
				o: o.f.FromExistingFieldseekerHabitatrelate(em),
			})
		}
	})
}

func (m organizationMods) WithoutHabitatrelates() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Habitatrelates = nil
	})
}

func (m organizationMods) WithInspectionsamples(number int, related *FieldseekerInspectionsampleTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Inspectionsamples = []*organizationRInspectionsamplesR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewInspectionsamples(number int, mods ...FieldseekerInspectionsampleMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerInspectionsampleWithContext(ctx, mods...)
		m.WithInspectionsamples(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddInspectionsamples(number int, related *FieldseekerInspectionsampleTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Inspectionsamples = append(o.r.Inspectionsamples, &organizationRInspectionsamplesR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewInspectionsamples(number int, mods ...FieldseekerInspectionsampleMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerInspectionsampleWithContext(ctx, mods...)
		m.AddInspectionsamples(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingInspectionsamples(existingModels ...*models.FieldseekerInspectionsample) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Inspectionsamples = append(o.r.Inspectionsamples, &organizationRInspectionsamplesR{
				o: o.f.FromExistingFieldseekerInspectionsample(em),
			})
		}
	})
}

func (m organizationMods) WithoutInspectionsamples() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Inspectionsamples = nil
	})
}

func (m organizationMods) WithInspectionsampledetails(number int, related *FieldseekerInspectionsampledetailTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Inspectionsampledetails = []*organizationRInspectionsampledetailsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewInspectionsampledetails(number int, mods ...FieldseekerInspectionsampledetailMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerInspectionsampledetailWithContext(ctx, mods...)
		m.WithInspectionsampledetails(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddInspectionsampledetails(number int, related *FieldseekerInspectionsampledetailTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Inspectionsampledetails = append(o.r.Inspectionsampledetails, &organizationRInspectionsampledetailsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewInspectionsampledetails(number int, mods ...FieldseekerInspectionsampledetailMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerInspectionsampledetailWithContext(ctx, mods...)
		m.AddInspectionsampledetails(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingInspectionsampledetails(existingModels ...*models.FieldseekerInspectionsampledetail) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Inspectionsampledetails = append(o.r.Inspectionsampledetails, &organizationRInspectionsampledetailsR{
				o: o.f.FromExistingFieldseekerInspectionsampledetail(em),
			})
		}
	})
}

func (m organizationMods) WithoutInspectionsampledetails() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Inspectionsampledetails = nil
	})
}

func (m organizationMods) WithLinelocations(number int, related *FieldseekerLinelocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Linelocations = []*organizationRLinelocationsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewLinelocations(number int, mods ...FieldseekerLinelocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerLinelocationWithContext(ctx, mods...)
		m.WithLinelocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddLinelocations(number int, related *FieldseekerLinelocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Linelocations = append(o.r.Linelocations, &organizationRLinelocationsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewLinelocations(number int, mods ...FieldseekerLinelocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerLinelocationWithContext(ctx, mods...)
		m.AddLinelocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingLinelocations(existingModels ...*models.FieldseekerLinelocation) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Linelocations = append(o.r.Linelocations, &organizationRLinelocationsR{
				o: o.f.FromExistingFieldseekerLinelocation(em),
			})
		}
	})
}

func (m organizationMods) WithoutLinelocations() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Linelocations = nil
	})
}

func (m organizationMods) WithLocationtrackings(number int, related *FieldseekerLocationtrackingTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Locationtrackings = []*organizationRLocationtrackingsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewLocationtrackings(number int, mods ...FieldseekerLocationtrackingMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerLocationtrackingWithContext(ctx, mods...)
		m.WithLocationtrackings(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddLocationtrackings(number int, related *FieldseekerLocationtrackingTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Locationtrackings = append(o.r.Locationtrackings, &organizationRLocationtrackingsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewLocationtrackings(number int, mods ...FieldseekerLocationtrackingMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerLocationtrackingWithContext(ctx, mods...)
		m.AddLocationtrackings(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingLocationtrackings(existingModels ...*models.FieldseekerLocationtracking) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Locationtrackings = append(o.r.Locationtrackings, &organizationRLocationtrackingsR{
				o: o.f.FromExistingFieldseekerLocationtracking(em),
			})
		}
	})
}

func (m organizationMods) WithoutLocationtrackings() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Locationtrackings = nil
	})
}

func (m organizationMods) WithMosquitoinspections(number int, related *FieldseekerMosquitoinspectionTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Mosquitoinspections = []*organizationRMosquitoinspectionsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewMosquitoinspections(number int, mods ...FieldseekerMosquitoinspectionMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerMosquitoinspectionWithContext(ctx, mods...)
		m.WithMosquitoinspections(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddMosquitoinspections(number int, related *FieldseekerMosquitoinspectionTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Mosquitoinspections = append(o.r.Mosquitoinspections, &organizationRMosquitoinspectionsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewMosquitoinspections(number int, mods ...FieldseekerMosquitoinspectionMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerMosquitoinspectionWithContext(ctx, mods...)
		m.AddMosquitoinspections(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingMosquitoinspections(existingModels ...*models.FieldseekerMosquitoinspection) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Mosquitoinspections = append(o.r.Mosquitoinspections, &organizationRMosquitoinspectionsR{
				o: o.f.FromExistingFieldseekerMosquitoinspection(em),
			})
		}
	})
}

func (m organizationMods) WithoutMosquitoinspections() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Mosquitoinspections = nil
	})
}

func (m organizationMods) WithPointlocations(number int, related *FieldseekerPointlocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Pointlocations = []*organizationRPointlocationsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewPointlocations(number int, mods ...FieldseekerPointlocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerPointlocationWithContext(ctx, mods...)
		m.WithPointlocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddPointlocations(number int, related *FieldseekerPointlocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Pointlocations = append(o.r.Pointlocations, &organizationRPointlocationsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewPointlocations(number int, mods ...FieldseekerPointlocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerPointlocationWithContext(ctx, mods...)
		m.AddPointlocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingPointlocations(existingModels ...*models.FieldseekerPointlocation) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Pointlocations = append(o.r.Pointlocations, &organizationRPointlocationsR{
				o: o.f.FromExistingFieldseekerPointlocation(em),
			})
		}
	})
}

func (m organizationMods) WithoutPointlocations() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Pointlocations = nil
	})
}

func (m organizationMods) WithPolygonlocations(number int, related *FieldseekerPolygonlocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Polygonlocations = []*organizationRPolygonlocationsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewPolygonlocations(number int, mods ...FieldseekerPolygonlocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerPolygonlocationWithContext(ctx, mods...)
		m.WithPolygonlocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddPolygonlocations(number int, related *FieldseekerPolygonlocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Polygonlocations = append(o.r.Polygonlocations, &organizationRPolygonlocationsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewPolygonlocations(number int, mods ...FieldseekerPolygonlocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerPolygonlocationWithContext(ctx, mods...)
		m.AddPolygonlocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingPolygonlocations(existingModels ...*models.FieldseekerPolygonlocation) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Polygonlocations = append(o.r.Polygonlocations, &organizationRPolygonlocationsR{
				o: o.f.FromExistingFieldseekerPolygonlocation(em),
			})
		}
	})
}

func (m organizationMods) WithoutPolygonlocations() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Polygonlocations = nil
	})
}

func (m organizationMods) WithFieldseekerPool(number int, related *FieldseekerPoolTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.FieldseekerPool = []*organizationRFieldseekerPoolR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewFieldseekerPool(number int, mods ...FieldseekerPoolMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerPoolWithContext(ctx, mods...)
		m.WithFieldseekerPool(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddFieldseekerPool(number int, related *FieldseekerPoolTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.FieldseekerPool = append(o.r.FieldseekerPool, &organizationRFieldseekerPoolR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewFieldseekerPool(number int, mods ...FieldseekerPoolMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerPoolWithContext(ctx, mods...)
		m.AddFieldseekerPool(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingFieldseekerPool(existingModels ...*models.FieldseekerPool) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.FieldseekerPool = append(o.r.FieldseekerPool, &organizationRFieldseekerPoolR{
				o: o.f.FromExistingFieldseekerPool(em),
			})
		}
	})
}

func (m organizationMods) WithoutFieldseekerPool() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.FieldseekerPool = nil
	})
}

func (m organizationMods) WithPooldetails(number int, related *FieldseekerPooldetailTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Pooldetails = []*organizationRPooldetailsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewPooldetails(number int, mods ...FieldseekerPooldetailMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerPooldetailWithContext(ctx, mods...)
		m.WithPooldetails(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddPooldetails(number int, related *FieldseekerPooldetailTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Pooldetails = append(o.r.Pooldetails, &organizationRPooldetailsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewPooldetails(number int, mods ...FieldseekerPooldetailMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerPooldetailWithContext(ctx, mods...)
		m.AddPooldetails(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingPooldetails(existingModels ...*models.FieldseekerPooldetail) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Pooldetails = append(o.r.Pooldetails, &organizationRPooldetailsR{
				o: o.f.FromExistingFieldseekerPooldetail(em),
			})
		}
	})
}

func (m organizationMods) WithoutPooldetails() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Pooldetails = nil
	})
}

func (m organizationMods) WithProposedtreatmentareas(number int, related *FieldseekerProposedtreatmentareaTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Proposedtreatmentareas = []*organizationRProposedtreatmentareasR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewProposedtreatmentareas(number int, mods ...FieldseekerProposedtreatmentareaMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerProposedtreatmentareaWithContext(ctx, mods...)
		m.WithProposedtreatmentareas(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddProposedtreatmentareas(number int, related *FieldseekerProposedtreatmentareaTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Proposedtreatmentareas = append(o.r.Proposedtreatmentareas, &organizationRProposedtreatmentareasR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewProposedtreatmentareas(number int, mods ...FieldseekerProposedtreatmentareaMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerProposedtreatmentareaWithContext(ctx, mods...)
		m.AddProposedtreatmentareas(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingProposedtreatmentareas(existingModels ...*models.FieldseekerProposedtreatmentarea) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Proposedtreatmentareas = append(o.r.Proposedtreatmentareas, &organizationRProposedtreatmentareasR{
				o: o.f.FromExistingFieldseekerProposedtreatmentarea(em),
			})
		}
	})
}

func (m organizationMods) WithoutProposedtreatmentareas() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Proposedtreatmentareas = nil
	})
}

func (m organizationMods) WithQamosquitoinspections(number int, related *FieldseekerQamosquitoinspectionTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Qamosquitoinspections = []*organizationRQamosquitoinspectionsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewQamosquitoinspections(number int, mods ...FieldseekerQamosquitoinspectionMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerQamosquitoinspectionWithContext(ctx, mods...)
		m.WithQamosquitoinspections(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddQamosquitoinspections(number int, related *FieldseekerQamosquitoinspectionTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Qamosquitoinspections = append(o.r.Qamosquitoinspections, &organizationRQamosquitoinspectionsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewQamosquitoinspections(number int, mods ...FieldseekerQamosquitoinspectionMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerQamosquitoinspectionWithContext(ctx, mods...)
		m.AddQamosquitoinspections(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingQamosquitoinspections(existingModels ...*models.FieldseekerQamosquitoinspection) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Qamosquitoinspections = append(o.r.Qamosquitoinspections, &organizationRQamosquitoinspectionsR{
				o: o.f.FromExistingFieldseekerQamosquitoinspection(em),
			})
		}
	})
}

func (m organizationMods) WithoutQamosquitoinspections() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Qamosquitoinspections = nil
	})
}

func (m organizationMods) WithRodentlocations(number int, related *FieldseekerRodentlocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Rodentlocations = []*organizationRRodentlocationsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewRodentlocations(number int, mods ...FieldseekerRodentlocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerRodentlocationWithContext(ctx, mods...)
		m.WithRodentlocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddRodentlocations(number int, related *FieldseekerRodentlocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Rodentlocations = append(o.r.Rodentlocations, &organizationRRodentlocationsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewRodentlocations(number int, mods ...FieldseekerRodentlocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerRodentlocationWithContext(ctx, mods...)
		m.AddRodentlocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingRodentlocations(existingModels ...*models.FieldseekerRodentlocation) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Rodentlocations = append(o.r.Rodentlocations, &organizationRRodentlocationsR{
				o: o.f.FromExistingFieldseekerRodentlocation(em),
			})
		}
	})
}

func (m organizationMods) WithoutRodentlocations() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Rodentlocations = nil
	})
}

func (m organizationMods) WithSamplecollections(number int, related *FieldseekerSamplecollectionTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Samplecollections = []*organizationRSamplecollectionsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewSamplecollections(number int, mods ...FieldseekerSamplecollectionMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerSamplecollectionWithContext(ctx, mods...)
		m.WithSamplecollections(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddSamplecollections(number int, related *FieldseekerSamplecollectionTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Samplecollections = append(o.r.Samplecollections, &organizationRSamplecollectionsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewSamplecollections(number int, mods ...FieldseekerSamplecollectionMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerSamplecollectionWithContext(ctx, mods...)
		m.AddSamplecollections(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingSamplecollections(existingModels ...*models.FieldseekerSamplecollection) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Samplecollections = append(o.r.Samplecollections, &organizationRSamplecollectionsR{
				o: o.f.FromExistingFieldseekerSamplecollection(em),
			})
		}
	})
}

func (m organizationMods) WithoutSamplecollections() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Samplecollections = nil
	})
}

func (m organizationMods) WithSamplelocations(number int, related *FieldseekerSamplelocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Samplelocations = []*organizationRSamplelocationsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewSamplelocations(number int, mods ...FieldseekerSamplelocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerSamplelocationWithContext(ctx, mods...)
		m.WithSamplelocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddSamplelocations(number int, related *FieldseekerSamplelocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Samplelocations = append(o.r.Samplelocations, &organizationRSamplelocationsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewSamplelocations(number int, mods ...FieldseekerSamplelocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerSamplelocationWithContext(ctx, mods...)
		m.AddSamplelocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingSamplelocations(existingModels ...*models.FieldseekerSamplelocation) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Samplelocations = append(o.r.Samplelocations, &organizationRSamplelocationsR{
				o: o.f.FromExistingFieldseekerSamplelocation(em),
			})
		}
	})
}

func (m organizationMods) WithoutSamplelocations() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Samplelocations = nil
	})
}

func (m organizationMods) WithServicerequests(number int, related *FieldseekerServicerequestTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Servicerequests = []*organizationRServicerequestsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewServicerequests(number int, mods ...FieldseekerServicerequestMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerServicerequestWithContext(ctx, mods...)
		m.WithServicerequests(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddServicerequests(number int, related *FieldseekerServicerequestTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Servicerequests = append(o.r.Servicerequests, &organizationRServicerequestsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewServicerequests(number int, mods ...FieldseekerServicerequestMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerServicerequestWithContext(ctx, mods...)
		m.AddServicerequests(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingServicerequests(existingModels ...*models.FieldseekerServicerequest) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Servicerequests = append(o.r.Servicerequests, &organizationRServicerequestsR{
				o: o.f.FromExistingFieldseekerServicerequest(em),
			})
		}
	})
}

func (m organizationMods) WithoutServicerequests() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Servicerequests = nil
	})
}

func (m organizationMods) WithSpeciesabundances(number int, related *FieldseekerSpeciesabundanceTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Speciesabundances = []*organizationRSpeciesabundancesR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewSpeciesabundances(number int, mods ...FieldseekerSpeciesabundanceMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerSpeciesabundanceWithContext(ctx, mods...)
		m.WithSpeciesabundances(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddSpeciesabundances(number int, related *FieldseekerSpeciesabundanceTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Speciesabundances = append(o.r.Speciesabundances, &organizationRSpeciesabundancesR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewSpeciesabundances(number int, mods ...FieldseekerSpeciesabundanceMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerSpeciesabundanceWithContext(ctx, mods...)
		m.AddSpeciesabundances(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingSpeciesabundances(existingModels ...*models.FieldseekerSpeciesabundance) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Speciesabundances = append(o.r.Speciesabundances, &organizationRSpeciesabundancesR{
				o: o.f.FromExistingFieldseekerSpeciesabundance(em),
			})
		}
	})
}

func (m organizationMods) WithoutSpeciesabundances() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Speciesabundances = nil
	})
}

func (m organizationMods) WithStormdrains(number int, related *FieldseekerStormdrainTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Stormdrains = []*organizationRStormdrainsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewStormdrains(number int, mods ...FieldseekerStormdrainMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerStormdrainWithContext(ctx, mods...)
		m.WithStormdrains(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddStormdrains(number int, related *FieldseekerStormdrainTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Stormdrains = append(o.r.Stormdrains, &organizationRStormdrainsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewStormdrains(number int, mods ...FieldseekerStormdrainMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerStormdrainWithContext(ctx, mods...)
		m.AddStormdrains(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingStormdrains(existingModels ...*models.FieldseekerStormdrain) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Stormdrains = append(o.r.Stormdrains, &organizationRStormdrainsR{
				o: o.f.FromExistingFieldseekerStormdrain(em),
			})
		}
	})
}

func (m organizationMods) WithoutStormdrains() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Stormdrains = nil
	})
}

func (m organizationMods) WithTimecards(number int, related *FieldseekerTimecardTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Timecards = []*organizationRTimecardsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewTimecards(number int, mods ...FieldseekerTimecardMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerTimecardWithContext(ctx, mods...)
		m.WithTimecards(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddTimecards(number int, related *FieldseekerTimecardTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Timecards = append(o.r.Timecards, &organizationRTimecardsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewTimecards(number int, mods ...FieldseekerTimecardMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerTimecardWithContext(ctx, mods...)
		m.AddTimecards(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingTimecards(existingModels ...*models.FieldseekerTimecard) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Timecards = append(o.r.Timecards, &organizationRTimecardsR{
				o: o.f.FromExistingFieldseekerTimecard(em),
			})
		}
	})
}

func (m organizationMods) WithoutTimecards() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Timecards = nil
	})
}

func (m organizationMods) WithTrapdata(number int, related *FieldseekerTrapdatumTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Trapdata = []*organizationRTrapdataR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewTrapdata(number int, mods ...FieldseekerTrapdatumMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerTrapdatumWithContext(ctx, mods...)
		m.WithTrapdata(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddTrapdata(number int, related *FieldseekerTrapdatumTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Trapdata = append(o.r.Trapdata, &organizationRTrapdataR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewTrapdata(number int, mods ...FieldseekerTrapdatumMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerTrapdatumWithContext(ctx, mods...)
		m.AddTrapdata(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingTrapdata(existingModels ...*models.FieldseekerTrapdatum) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Trapdata = append(o.r.Trapdata, &organizationRTrapdataR{
				o: o.f.FromExistingFieldseekerTrapdatum(em),
			})
		}
	})
}

func (m organizationMods) WithoutTrapdata() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Trapdata = nil
	})
}

func (m organizationMods) WithTraplocations(number int, related *FieldseekerTraplocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Traplocations = []*organizationRTraplocationsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewTraplocations(number int, mods ...FieldseekerTraplocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerTraplocationWithContext(ctx, mods...)
		m.WithTraplocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddTraplocations(number int, related *FieldseekerTraplocationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Traplocations = append(o.r.Traplocations, &organizationRTraplocationsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewTraplocations(number int, mods ...FieldseekerTraplocationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerTraplocationWithContext(ctx, mods...)
		m.AddTraplocations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingTraplocations(existingModels ...*models.FieldseekerTraplocation) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Traplocations = append(o.r.Traplocations, &organizationRTraplocationsR{
				o: o.f.FromExistingFieldseekerTraplocation(em),
			})
		}
	})
}

func (m organizationMods) WithoutTraplocations() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Traplocations = nil
	})
}

func (m organizationMods) WithTreatments(number int, related *FieldseekerTreatmentTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Treatments = []*organizationRTreatmentsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewTreatments(number int, mods ...FieldseekerTreatmentMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerTreatmentWithContext(ctx, mods...)
		m.WithTreatments(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddTreatments(number int, related *FieldseekerTreatmentTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Treatments = append(o.r.Treatments, &organizationRTreatmentsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewTreatments(number int, mods ...FieldseekerTreatmentMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerTreatmentWithContext(ctx, mods...)
		m.AddTreatments(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingTreatments(existingModels ...*models.FieldseekerTreatment) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Treatments = append(o.r.Treatments, &organizationRTreatmentsR{
				o: o.f.FromExistingFieldseekerTreatment(em),
			})
		}
	})
}

func (m organizationMods) WithoutTreatments() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Treatments = nil
	})
}

func (m organizationMods) WithTreatmentareas(number int, related *FieldseekerTreatmentareaTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Treatmentareas = []*organizationRTreatmentareasR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewTreatmentareas(number int, mods ...FieldseekerTreatmentareaMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerTreatmentareaWithContext(ctx, mods...)
		m.WithTreatmentareas(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddTreatmentareas(number int, related *FieldseekerTreatmentareaTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Treatmentareas = append(o.r.Treatmentareas, &organizationRTreatmentareasR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewTreatmentareas(number int, mods ...FieldseekerTreatmentareaMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerTreatmentareaWithContext(ctx, mods...)
		m.AddTreatmentareas(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingTreatmentareas(existingModels ...*models.FieldseekerTreatmentarea) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Treatmentareas = append(o.r.Treatmentareas, &organizationRTreatmentareasR{
				o: o.f.FromExistingFieldseekerTreatmentarea(em),
			})
		}
	})
}

func (m organizationMods) WithoutTreatmentareas() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Treatmentareas = nil
	})
}

func (m organizationMods) WithZones(number int, related *FieldseekerZoneTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Zones = []*organizationRZonesR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewZones(number int, mods ...FieldseekerZoneMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerZoneWithContext(ctx, mods...)
		m.WithZones(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddZones(number int, related *FieldseekerZoneTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Zones = append(o.r.Zones, &organizationRZonesR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewZones(number int, mods ...FieldseekerZoneMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerZoneWithContext(ctx, mods...)
		m.AddZones(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingZones(existingModels ...*models.FieldseekerZone) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Zones = append(o.r.Zones, &organizationRZonesR{
				o: o.f.FromExistingFieldseekerZone(em),
			})
		}
	})
}

func (m organizationMods) WithoutZones() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Zones = nil
	})
}

func (m organizationMods) WithZones2s(number int, related *FieldseekerZones2Template) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Zones2s = []*organizationRZones2sR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewZones2s(number int, mods ...FieldseekerZones2Mod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerZones2WithContext(ctx, mods...)
		m.WithZones2s(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddZones2s(number int, related *FieldseekerZones2Template) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Zones2s = append(o.r.Zones2s, &organizationRZones2sR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewZones2s(number int, mods ...FieldseekerZones2Mod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerZones2WithContext(ctx, mods...)
		m.AddZones2s(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingZones2s(existingModels ...*models.FieldseekerZones2) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.Zones2s = append(o.r.Zones2s, &organizationRZones2sR{
				o: o.f.FromExistingFieldseekerZones2(em),
			})
		}
	})
}

func (m organizationMods) WithoutZones2s() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.Zones2s = nil
	})
}

func (m organizationMods) WithFieldseekerSyncs(number int, related *FieldseekerSyncTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.FieldseekerSyncs = []*organizationRFieldseekerSyncsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewFieldseekerSyncs(number int, mods ...FieldseekerSyncMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerSyncWithContext(ctx, mods...)
		m.WithFieldseekerSyncs(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddFieldseekerSyncs(number int, related *FieldseekerSyncTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.FieldseekerSyncs = append(o.r.FieldseekerSyncs, &organizationRFieldseekerSyncsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewFieldseekerSyncs(number int, mods ...FieldseekerSyncMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewFieldseekerSyncWithContext(ctx, mods...)
		m.AddFieldseekerSyncs(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingFieldseekerSyncs(existingModels ...*models.FieldseekerSync) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.FieldseekerSyncs = append(o.r.FieldseekerSyncs, &organizationRFieldseekerSyncsR{
				o: o.f.FromExistingFieldseekerSync(em),
			})
		}
	})
}

func (m organizationMods) WithoutFieldseekerSyncs() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.FieldseekerSyncs = nil
	})
}

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
	})
}

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
	})
}

func (m organizationMods) WithH3Aggregations(number int, related *H3AggregationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.H3Aggregations = []*organizationRH3AggregationsR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewH3Aggregations(number int, mods ...H3AggregationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewH3AggregationWithContext(ctx, mods...)
		m.WithH3Aggregations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddH3Aggregations(number int, related *H3AggregationTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.H3Aggregations = append(o.r.H3Aggregations, &organizationRH3AggregationsR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewH3Aggregations(number int, mods ...H3AggregationMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewH3AggregationWithContext(ctx, mods...)
		m.AddH3Aggregations(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingH3Aggregations(existingModels ...*models.H3Aggregation) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.H3Aggregations = append(o.r.H3Aggregations, &organizationRH3AggregationsR{
				o: o.f.FromExistingH3Aggregation(em),
			})
		}
	})
}

func (m organizationMods) WithoutH3Aggregations() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.H3Aggregations = nil
	})
}

func (m organizationMods) WithNoteAudios(number int, related *NoteAudioTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.NoteAudios = []*organizationRNoteAudiosR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewNoteAudios(number int, mods ...NoteAudioMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewNoteAudioWithContext(ctx, mods...)
		m.WithNoteAudios(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddNoteAudios(number int, related *NoteAudioTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.NoteAudios = append(o.r.NoteAudios, &organizationRNoteAudiosR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewNoteAudios(number int, mods ...NoteAudioMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewNoteAudioWithContext(ctx, mods...)
		m.AddNoteAudios(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingNoteAudios(existingModels ...*models.NoteAudio) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.NoteAudios = append(o.r.NoteAudios, &organizationRNoteAudiosR{
				o: o.f.FromExistingNoteAudio(em),
			})
		}
	})
}

func (m organizationMods) WithoutNoteAudios() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.NoteAudios = nil
	})
}

func (m organizationMods) WithNoteImages(number int, related *NoteImageTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.NoteImages = []*organizationRNoteImagesR{{
			number: number,
			o:      related,
		}}
	})
}

func (m organizationMods) WithNewNoteImages(number int, mods ...NoteImageMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewNoteImageWithContext(ctx, mods...)
		m.WithNoteImages(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddNoteImages(number int, related *NoteImageTemplate) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.NoteImages = append(o.r.NoteImages, &organizationRNoteImagesR{
			number: number,
			o:      related,
		})
	})
}

func (m organizationMods) AddNewNoteImages(number int, mods ...NoteImageMod) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		related := o.f.NewNoteImageWithContext(ctx, mods...)
		m.AddNoteImages(number, related).Apply(ctx, o)
	})
}

func (m organizationMods) AddExistingNoteImages(existingModels ...*models.NoteImage) OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		for _, em := range existingModels {
			o.r.NoteImages = append(o.r.NoteImages, &organizationRNoteImagesR{
				o: o.f.FromExistingNoteImage(em),
			})
		}
	})
}

func (m organizationMods) WithoutNoteImages() OrganizationMod {
	return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) {
		o.r.NoteImages = nil
	})
}

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
	})
}

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
	})
}
