diff --git a/arcgis-go b/arcgis-go index 6344702f..587561f7 160000 --- a/arcgis-go +++ b/arcgis-go @@ -1 +1 @@ -Subproject commit 6344702fe14c9f64a1ea856e9629248bbaabe894 +Subproject commit 587561f779b018d0701a3353c85f8da48519340b diff --git a/arcgis.go b/arcgis.go index 475d9de7..ed8a21fe 100644 --- a/arcgis.go +++ b/arcgis.go @@ -13,6 +13,7 @@ import ( "net/http" "net/url" "os" + "path/filepath" "sort" "strconv" "strings" diff --git a/db/bobgen.yaml b/db/bobgen.yaml index 514c9e12..04edc43a 100644 --- a/db/bobgen.yaml +++ b/db/bobgen.yaml @@ -5,6 +5,9 @@ aliases: down_plural: "users" down_singular: "user" psql: + schemas: + - "public" + - "fieldseeker" queries: - ./sql plugins_preset: "all" diff --git a/db/dberrors/bob_errors.bob.go b/db/dberrors/bob_errors.bob.go index 9195df5a..352ac860 100644 --- a/db/dberrors/bob_errors.bob.go +++ b/db/dberrors/bob_errors.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/bob_main.bob_test.go b/db/dberrors/bob_main.bob_test.go index b9da2c5e..67cde417 100644 --- a/db/dberrors/bob_main.bob_test.go +++ b/db/dberrors/bob_main.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fieldseeker.containerrelate.bob.go b/db/dberrors/fieldseeker.containerrelate.bob.go new file mode 100644 index 00000000..c9fea5de --- /dev/null +++ b/db/dberrors/fieldseeker.containerrelate.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerContainerrelateErrors = &fieldseekerContainerrelateErrors{ + ErrUniqueContainerrelatePkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "containerrelate", + columns: []string{"objectid"}, + s: "containerrelate_pkey", + }, +} + +type fieldseekerContainerrelateErrors struct { + ErrUniqueContainerrelatePkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.fieldscoutinglog.bob.go b/db/dberrors/fieldseeker.fieldscoutinglog.bob.go new file mode 100644 index 00000000..063e1be6 --- /dev/null +++ b/db/dberrors/fieldseeker.fieldscoutinglog.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerFieldscoutinglogErrors = &fieldseekerFieldscoutinglogErrors{ + ErrUniqueFieldscoutinglogPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "fieldscoutinglog", + columns: []string{"objectid"}, + s: "fieldscoutinglog_pkey", + }, +} + +type fieldseekerFieldscoutinglogErrors struct { + ErrUniqueFieldscoutinglogPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.habitatrelate.bob.go b/db/dberrors/fieldseeker.habitatrelate.bob.go new file mode 100644 index 00000000..2a653662 --- /dev/null +++ b/db/dberrors/fieldseeker.habitatrelate.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerHabitatrelateErrors = &fieldseekerHabitatrelateErrors{ + ErrUniqueHabitatrelatePkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "habitatrelate", + columns: []string{"objectid"}, + s: "habitatrelate_pkey", + }, +} + +type fieldseekerHabitatrelateErrors struct { + ErrUniqueHabitatrelatePkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.inspectionsample.bob.go b/db/dberrors/fieldseeker.inspectionsample.bob.go new file mode 100644 index 00000000..52724ece --- /dev/null +++ b/db/dberrors/fieldseeker.inspectionsample.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerInspectionsampleErrors = &fieldseekerInspectionsampleErrors{ + ErrUniqueInspectionsamplePkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "inspectionsample", + columns: []string{"objectid"}, + s: "inspectionsample_pkey", + }, +} + +type fieldseekerInspectionsampleErrors struct { + ErrUniqueInspectionsamplePkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.inspectionsampledetail.bob.go b/db/dberrors/fieldseeker.inspectionsampledetail.bob.go new file mode 100644 index 00000000..b048c104 --- /dev/null +++ b/db/dberrors/fieldseeker.inspectionsampledetail.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerInspectionsampledetailErrors = &fieldseekerInspectionsampledetailErrors{ + ErrUniqueInspectionsampledetailPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "inspectionsampledetail", + columns: []string{"objectid"}, + s: "inspectionsampledetail_pkey", + }, +} + +type fieldseekerInspectionsampledetailErrors struct { + ErrUniqueInspectionsampledetailPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.linelocation.bob.go b/db/dberrors/fieldseeker.linelocation.bob.go new file mode 100644 index 00000000..c58921d6 --- /dev/null +++ b/db/dberrors/fieldseeker.linelocation.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerLinelocationErrors = &fieldseekerLinelocationErrors{ + ErrUniqueLinelocationPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "linelocation", + columns: []string{"objectid"}, + s: "linelocation_pkey", + }, +} + +type fieldseekerLinelocationErrors struct { + ErrUniqueLinelocationPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.locationtracking.bob.go b/db/dberrors/fieldseeker.locationtracking.bob.go new file mode 100644 index 00000000..6e0a0c79 --- /dev/null +++ b/db/dberrors/fieldseeker.locationtracking.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerLocationtrackingErrors = &fieldseekerLocationtrackingErrors{ + ErrUniqueLocationtrackingPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "locationtracking", + columns: []string{"objectid"}, + s: "locationtracking_pkey", + }, +} + +type fieldseekerLocationtrackingErrors struct { + ErrUniqueLocationtrackingPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.mosquitoinspection.bob.go b/db/dberrors/fieldseeker.mosquitoinspection.bob.go new file mode 100644 index 00000000..bc0905a8 --- /dev/null +++ b/db/dberrors/fieldseeker.mosquitoinspection.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerMosquitoinspectionErrors = &fieldseekerMosquitoinspectionErrors{ + ErrUniqueMosquitoinspectionPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "mosquitoinspection", + columns: []string{"objectid"}, + s: "mosquitoinspection_pkey", + }, +} + +type fieldseekerMosquitoinspectionErrors struct { + ErrUniqueMosquitoinspectionPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.pointlocation.bob.go b/db/dberrors/fieldseeker.pointlocation.bob.go new file mode 100644 index 00000000..842a8bba --- /dev/null +++ b/db/dberrors/fieldseeker.pointlocation.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerPointlocationErrors = &fieldseekerPointlocationErrors{ + ErrUniquePointlocationPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "pointlocation", + columns: []string{"objectid"}, + s: "pointlocation_pkey", + }, +} + +type fieldseekerPointlocationErrors struct { + ErrUniquePointlocationPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.polygonlocation.bob.go b/db/dberrors/fieldseeker.polygonlocation.bob.go new file mode 100644 index 00000000..6fe7c8d5 --- /dev/null +++ b/db/dberrors/fieldseeker.polygonlocation.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerPolygonlocationErrors = &fieldseekerPolygonlocationErrors{ + ErrUniquePolygonlocationPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "polygonlocation", + columns: []string{"objectid"}, + s: "polygonlocation_pkey", + }, +} + +type fieldseekerPolygonlocationErrors struct { + ErrUniquePolygonlocationPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.pool.bob.go b/db/dberrors/fieldseeker.pool.bob.go new file mode 100644 index 00000000..a3fe5e55 --- /dev/null +++ b/db/dberrors/fieldseeker.pool.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerPoolErrors = &fieldseekerPoolErrors{ + ErrUniquePoolPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "pool", + columns: []string{"objectid"}, + s: "pool_pkey", + }, +} + +type fieldseekerPoolErrors struct { + ErrUniquePoolPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.pooldetail.bob.go b/db/dberrors/fieldseeker.pooldetail.bob.go new file mode 100644 index 00000000..317460b5 --- /dev/null +++ b/db/dberrors/fieldseeker.pooldetail.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerPooldetailErrors = &fieldseekerPooldetailErrors{ + ErrUniquePooldetailPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "pooldetail", + columns: []string{"objectid"}, + s: "pooldetail_pkey", + }, +} + +type fieldseekerPooldetailErrors struct { + ErrUniquePooldetailPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.proposedtreatmentarea.bob.go b/db/dberrors/fieldseeker.proposedtreatmentarea.bob.go new file mode 100644 index 00000000..3a914a33 --- /dev/null +++ b/db/dberrors/fieldseeker.proposedtreatmentarea.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerProposedtreatmentareaErrors = &fieldseekerProposedtreatmentareaErrors{ + ErrUniqueProposedtreatmentareaPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "proposedtreatmentarea", + columns: []string{"objectid"}, + s: "proposedtreatmentarea_pkey", + }, +} + +type fieldseekerProposedtreatmentareaErrors struct { + ErrUniqueProposedtreatmentareaPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.qamosquitoinspection.bob.go b/db/dberrors/fieldseeker.qamosquitoinspection.bob.go new file mode 100644 index 00000000..fa3cd5d3 --- /dev/null +++ b/db/dberrors/fieldseeker.qamosquitoinspection.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerQamosquitoinspectionErrors = &fieldseekerQamosquitoinspectionErrors{ + ErrUniqueQamosquitoinspectionPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "qamosquitoinspection", + columns: []string{"objectid"}, + s: "qamosquitoinspection_pkey", + }, +} + +type fieldseekerQamosquitoinspectionErrors struct { + ErrUniqueQamosquitoinspectionPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.rodentlocation.bob.go b/db/dberrors/fieldseeker.rodentlocation.bob.go new file mode 100644 index 00000000..47d2500e --- /dev/null +++ b/db/dberrors/fieldseeker.rodentlocation.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerRodentlocationErrors = &fieldseekerRodentlocationErrors{ + ErrUniqueRodentlocationPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "rodentlocation", + columns: []string{"objectid"}, + s: "rodentlocation_pkey", + }, +} + +type fieldseekerRodentlocationErrors struct { + ErrUniqueRodentlocationPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.samplecollection.bob.go b/db/dberrors/fieldseeker.samplecollection.bob.go new file mode 100644 index 00000000..d243fe94 --- /dev/null +++ b/db/dberrors/fieldseeker.samplecollection.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerSamplecollectionErrors = &fieldseekerSamplecollectionErrors{ + ErrUniqueSamplecollectionPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "samplecollection", + columns: []string{"objectid"}, + s: "samplecollection_pkey", + }, +} + +type fieldseekerSamplecollectionErrors struct { + ErrUniqueSamplecollectionPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.samplelocation.bob.go b/db/dberrors/fieldseeker.samplelocation.bob.go new file mode 100644 index 00000000..918b5b60 --- /dev/null +++ b/db/dberrors/fieldseeker.samplelocation.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerSamplelocationErrors = &fieldseekerSamplelocationErrors{ + ErrUniqueSamplelocationPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "samplelocation", + columns: []string{"objectid"}, + s: "samplelocation_pkey", + }, +} + +type fieldseekerSamplelocationErrors struct { + ErrUniqueSamplelocationPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.servicerequest.bob.go b/db/dberrors/fieldseeker.servicerequest.bob.go new file mode 100644 index 00000000..4592c068 --- /dev/null +++ b/db/dberrors/fieldseeker.servicerequest.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerServicerequestErrors = &fieldseekerServicerequestErrors{ + ErrUniqueServicerequestPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "servicerequest", + columns: []string{"objectid"}, + s: "servicerequest_pkey", + }, +} + +type fieldseekerServicerequestErrors struct { + ErrUniqueServicerequestPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.speciesabundance.bob.go b/db/dberrors/fieldseeker.speciesabundance.bob.go new file mode 100644 index 00000000..20a29f74 --- /dev/null +++ b/db/dberrors/fieldseeker.speciesabundance.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerSpeciesabundanceErrors = &fieldseekerSpeciesabundanceErrors{ + ErrUniqueSpeciesabundancePkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "speciesabundance", + columns: []string{"objectid"}, + s: "speciesabundance_pkey", + }, +} + +type fieldseekerSpeciesabundanceErrors struct { + ErrUniqueSpeciesabundancePkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.stormdrain.bob.go b/db/dberrors/fieldseeker.stormdrain.bob.go new file mode 100644 index 00000000..ab28ff51 --- /dev/null +++ b/db/dberrors/fieldseeker.stormdrain.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerStormdrainErrors = &fieldseekerStormdrainErrors{ + ErrUniqueStormdrainPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "stormdrain", + columns: []string{"objectid"}, + s: "stormdrain_pkey", + }, +} + +type fieldseekerStormdrainErrors struct { + ErrUniqueStormdrainPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.timecard.bob.go b/db/dberrors/fieldseeker.timecard.bob.go new file mode 100644 index 00000000..2c0052f9 --- /dev/null +++ b/db/dberrors/fieldseeker.timecard.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerTimecardErrors = &fieldseekerTimecardErrors{ + ErrUniqueTimecardPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "timecard", + columns: []string{"objectid"}, + s: "timecard_pkey", + }, +} + +type fieldseekerTimecardErrors struct { + ErrUniqueTimecardPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.trapdata.bob.go b/db/dberrors/fieldseeker.trapdata.bob.go new file mode 100644 index 00000000..bf7710c9 --- /dev/null +++ b/db/dberrors/fieldseeker.trapdata.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerTrapdatumErrors = &fieldseekerTrapdatumErrors{ + ErrUniqueTrapdataPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "trapdata", + columns: []string{"objectid"}, + s: "trapdata_pkey", + }, +} + +type fieldseekerTrapdatumErrors struct { + ErrUniqueTrapdataPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.traplocation.bob.go b/db/dberrors/fieldseeker.traplocation.bob.go new file mode 100644 index 00000000..6b9ad066 --- /dev/null +++ b/db/dberrors/fieldseeker.traplocation.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerTraplocationErrors = &fieldseekerTraplocationErrors{ + ErrUniqueTraplocationPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "traplocation", + columns: []string{"objectid"}, + s: "traplocation_pkey", + }, +} + +type fieldseekerTraplocationErrors struct { + ErrUniqueTraplocationPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.treatment.bob.go b/db/dberrors/fieldseeker.treatment.bob.go new file mode 100644 index 00000000..0559b8ef --- /dev/null +++ b/db/dberrors/fieldseeker.treatment.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerTreatmentErrors = &fieldseekerTreatmentErrors{ + ErrUniqueTreatmentPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "treatment", + columns: []string{"objectid"}, + s: "treatment_pkey", + }, +} + +type fieldseekerTreatmentErrors struct { + ErrUniqueTreatmentPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.treatmentarea.bob.go b/db/dberrors/fieldseeker.treatmentarea.bob.go new file mode 100644 index 00000000..031dd88e --- /dev/null +++ b/db/dberrors/fieldseeker.treatmentarea.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerTreatmentareaErrors = &fieldseekerTreatmentareaErrors{ + ErrUniqueTreatmentareaPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "treatmentarea", + columns: []string{"objectid"}, + s: "treatmentarea_pkey", + }, +} + +type fieldseekerTreatmentareaErrors struct { + ErrUniqueTreatmentareaPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.zones.bob.go b/db/dberrors/fieldseeker.zones.bob.go new file mode 100644 index 00000000..7ae04980 --- /dev/null +++ b/db/dberrors/fieldseeker.zones.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerZoneErrors = &fieldseekerZoneErrors{ + ErrUniqueZonesPkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "zones", + columns: []string{"objectid"}, + s: "zones_pkey", + }, +} + +type fieldseekerZoneErrors struct { + ErrUniqueZonesPkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker.zones2.bob.go b/db/dberrors/fieldseeker.zones2.bob.go new file mode 100644 index 00000000..c4d7bdb3 --- /dev/null +++ b/db/dberrors/fieldseeker.zones2.bob.go @@ -0,0 +1,17 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dberrors + +var FieldseekerZones2Errors = &fieldseekerZones2Errors{ + ErrUniqueZones2Pkey: &UniqueConstraintError{ + schema: "fieldseeker", + table: "zones2", + columns: []string{"objectid"}, + s: "zones2_pkey", + }, +} + +type fieldseekerZones2Errors struct { + ErrUniqueZones2Pkey *UniqueConstraintError +} diff --git a/db/dberrors/fieldseeker_sync.bob.go b/db/dberrors/fieldseeker_sync.bob.go index 22112a0b..8128df32 100644 --- a/db/dberrors/fieldseeker_sync.bob.go +++ b/db/dberrors/fieldseeker_sync.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_containerrelate.bob.go b/db/dberrors/fs_containerrelate.bob.go index 8515c169..7806cbab 100644 --- a/db/dberrors/fs_containerrelate.bob.go +++ b/db/dberrors/fs_containerrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_fieldscoutinglog.bob.go b/db/dberrors/fs_fieldscoutinglog.bob.go index 827cfb69..01b30548 100644 --- a/db/dberrors/fs_fieldscoutinglog.bob.go +++ b/db/dberrors/fs_fieldscoutinglog.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_habitatrelate.bob.go b/db/dberrors/fs_habitatrelate.bob.go index a201f0af..bcfc8df9 100644 --- a/db/dberrors/fs_habitatrelate.bob.go +++ b/db/dberrors/fs_habitatrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_inspectionsample.bob.go b/db/dberrors/fs_inspectionsample.bob.go index eb1c67fc..ccdb7b15 100644 --- a/db/dberrors/fs_inspectionsample.bob.go +++ b/db/dberrors/fs_inspectionsample.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_inspectionsampledetail.bob.go b/db/dberrors/fs_inspectionsampledetail.bob.go index 88bb551e..a8ce43c2 100644 --- a/db/dberrors/fs_inspectionsampledetail.bob.go +++ b/db/dberrors/fs_inspectionsampledetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_linelocation.bob.go b/db/dberrors/fs_linelocation.bob.go index 4992a2af..2e04536f 100644 --- a/db/dberrors/fs_linelocation.bob.go +++ b/db/dberrors/fs_linelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_locationtracking.bob.go b/db/dberrors/fs_locationtracking.bob.go index ff9d7a16..b8d6ac8f 100644 --- a/db/dberrors/fs_locationtracking.bob.go +++ b/db/dberrors/fs_locationtracking.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_mosquitoinspection.bob.go b/db/dberrors/fs_mosquitoinspection.bob.go index 538874b9..6783adda 100644 --- a/db/dberrors/fs_mosquitoinspection.bob.go +++ b/db/dberrors/fs_mosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_pointlocation.bob.go b/db/dberrors/fs_pointlocation.bob.go index 2257af9e..50cc24ff 100644 --- a/db/dberrors/fs_pointlocation.bob.go +++ b/db/dberrors/fs_pointlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_polygonlocation.bob.go b/db/dberrors/fs_polygonlocation.bob.go index 0c878aee..0b2a146e 100644 --- a/db/dberrors/fs_polygonlocation.bob.go +++ b/db/dberrors/fs_polygonlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_pool.bob.go b/db/dberrors/fs_pool.bob.go index bb0df722..54af0b20 100644 --- a/db/dberrors/fs_pool.bob.go +++ b/db/dberrors/fs_pool.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_pooldetail.bob.go b/db/dberrors/fs_pooldetail.bob.go index 9a1fa47a..0e1e3815 100644 --- a/db/dberrors/fs_pooldetail.bob.go +++ b/db/dberrors/fs_pooldetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_proposedtreatmentarea.bob.go b/db/dberrors/fs_proposedtreatmentarea.bob.go index 16908ce4..5a873647 100644 --- a/db/dberrors/fs_proposedtreatmentarea.bob.go +++ b/db/dberrors/fs_proposedtreatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_qamosquitoinspection.bob.go b/db/dberrors/fs_qamosquitoinspection.bob.go index 2f43b453..4d43ee97 100644 --- a/db/dberrors/fs_qamosquitoinspection.bob.go +++ b/db/dberrors/fs_qamosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_rodentlocation.bob.go b/db/dberrors/fs_rodentlocation.bob.go index dd17e17b..e350fae2 100644 --- a/db/dberrors/fs_rodentlocation.bob.go +++ b/db/dberrors/fs_rodentlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_samplecollection.bob.go b/db/dberrors/fs_samplecollection.bob.go index 71660e3c..0af415bf 100644 --- a/db/dberrors/fs_samplecollection.bob.go +++ b/db/dberrors/fs_samplecollection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_samplelocation.bob.go b/db/dberrors/fs_samplelocation.bob.go index 1c54fd28..5e072bd9 100644 --- a/db/dberrors/fs_samplelocation.bob.go +++ b/db/dberrors/fs_samplelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_servicerequest.bob.go b/db/dberrors/fs_servicerequest.bob.go index 7a95d4ab..1c7e8194 100644 --- a/db/dberrors/fs_servicerequest.bob.go +++ b/db/dberrors/fs_servicerequest.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_speciesabundance.bob.go b/db/dberrors/fs_speciesabundance.bob.go index 9661dce4..a24952ae 100644 --- a/db/dberrors/fs_speciesabundance.bob.go +++ b/db/dberrors/fs_speciesabundance.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_stormdrain.bob.go b/db/dberrors/fs_stormdrain.bob.go index ac616098..233684b8 100644 --- a/db/dberrors/fs_stormdrain.bob.go +++ b/db/dberrors/fs_stormdrain.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_timecard.bob.go b/db/dberrors/fs_timecard.bob.go index aade2db0..abfa0584 100644 --- a/db/dberrors/fs_timecard.bob.go +++ b/db/dberrors/fs_timecard.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_trapdata.bob.go b/db/dberrors/fs_trapdata.bob.go index f81ba3f6..a1a2f938 100644 --- a/db/dberrors/fs_trapdata.bob.go +++ b/db/dberrors/fs_trapdata.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_traplocation.bob.go b/db/dberrors/fs_traplocation.bob.go index b0b516f5..df2e110f 100644 --- a/db/dberrors/fs_traplocation.bob.go +++ b/db/dberrors/fs_traplocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_treatment.bob.go b/db/dberrors/fs_treatment.bob.go index 7977b513..5bbbf4d4 100644 --- a/db/dberrors/fs_treatment.bob.go +++ b/db/dberrors/fs_treatment.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_treatmentarea.bob.go b/db/dberrors/fs_treatmentarea.bob.go index e676c1b5..8910b50c 100644 --- a/db/dberrors/fs_treatmentarea.bob.go +++ b/db/dberrors/fs_treatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_zones.bob.go b/db/dberrors/fs_zones.bob.go index de8a0774..f6923d58 100644 --- a/db/dberrors/fs_zones.bob.go +++ b/db/dberrors/fs_zones.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/fs_zones2.bob.go b/db/dberrors/fs_zones2.bob.go index bb8c7468..1df17a14 100644 --- a/db/dberrors/fs_zones2.bob.go +++ b/db/dberrors/fs_zones2.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/goose_db_version.bob.go b/db/dberrors/goose_db_version.bob.go index c3308b22..867d0b85 100644 --- a/db/dberrors/goose_db_version.bob.go +++ b/db/dberrors/goose_db_version.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/h3_aggregation.bob.go b/db/dberrors/h3_aggregation.bob.go index 11582aa2..83a93779 100644 --- a/db/dberrors/h3_aggregation.bob.go +++ b/db/dberrors/h3_aggregation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/h3_aggregation.bob_test.go b/db/dberrors/h3_aggregation.bob_test.go index 6b3c05d0..0fb602d8 100644 --- a/db/dberrors/h3_aggregation.bob_test.go +++ b/db/dberrors/h3_aggregation.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_containerrelate.bob.go b/db/dberrors/history_containerrelate.bob.go index d05706df..a0272455 100644 --- a/db/dberrors/history_containerrelate.bob.go +++ b/db/dberrors/history_containerrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_fieldscoutinglog.bob.go b/db/dberrors/history_fieldscoutinglog.bob.go index d43668bf..eb3af697 100644 --- a/db/dberrors/history_fieldscoutinglog.bob.go +++ b/db/dberrors/history_fieldscoutinglog.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_habitatrelate.bob.go b/db/dberrors/history_habitatrelate.bob.go index 61be02f2..b2713d8b 100644 --- a/db/dberrors/history_habitatrelate.bob.go +++ b/db/dberrors/history_habitatrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_inspectionsample.bob.go b/db/dberrors/history_inspectionsample.bob.go index 7574296d..b47c6e20 100644 --- a/db/dberrors/history_inspectionsample.bob.go +++ b/db/dberrors/history_inspectionsample.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_inspectionsampledetail.bob.go b/db/dberrors/history_inspectionsampledetail.bob.go index b0ed7ecd..3ec3e8b9 100644 --- a/db/dberrors/history_inspectionsampledetail.bob.go +++ b/db/dberrors/history_inspectionsampledetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_linelocation.bob.go b/db/dberrors/history_linelocation.bob.go index e3b2b1d9..4fc1df93 100644 --- a/db/dberrors/history_linelocation.bob.go +++ b/db/dberrors/history_linelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_locationtracking.bob.go b/db/dberrors/history_locationtracking.bob.go index 39ede938..0d8b455a 100644 --- a/db/dberrors/history_locationtracking.bob.go +++ b/db/dberrors/history_locationtracking.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_mosquitoinspection.bob.go b/db/dberrors/history_mosquitoinspection.bob.go index a0f3dbdb..8a75c779 100644 --- a/db/dberrors/history_mosquitoinspection.bob.go +++ b/db/dberrors/history_mosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_pointlocation.bob.go b/db/dberrors/history_pointlocation.bob.go index cd782c8c..4b6bc493 100644 --- a/db/dberrors/history_pointlocation.bob.go +++ b/db/dberrors/history_pointlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_polygonlocation.bob.go b/db/dberrors/history_polygonlocation.bob.go index 36b29190..1d32153f 100644 --- a/db/dberrors/history_polygonlocation.bob.go +++ b/db/dberrors/history_polygonlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_pool.bob.go b/db/dberrors/history_pool.bob.go index adb6f415..981f805f 100644 --- a/db/dberrors/history_pool.bob.go +++ b/db/dberrors/history_pool.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_pooldetail.bob.go b/db/dberrors/history_pooldetail.bob.go index 5c5b57fc..f6142e51 100644 --- a/db/dberrors/history_pooldetail.bob.go +++ b/db/dberrors/history_pooldetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_proposedtreatmentarea.bob.go b/db/dberrors/history_proposedtreatmentarea.bob.go index 3a1315fe..85a9bffd 100644 --- a/db/dberrors/history_proposedtreatmentarea.bob.go +++ b/db/dberrors/history_proposedtreatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_qamosquitoinspection.bob.go b/db/dberrors/history_qamosquitoinspection.bob.go index 5a52689b..e47ab6cd 100644 --- a/db/dberrors/history_qamosquitoinspection.bob.go +++ b/db/dberrors/history_qamosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_rodentlocation.bob.go b/db/dberrors/history_rodentlocation.bob.go index c6a0372a..54871347 100644 --- a/db/dberrors/history_rodentlocation.bob.go +++ b/db/dberrors/history_rodentlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_samplecollection.bob.go b/db/dberrors/history_samplecollection.bob.go index 11dfff94..6a2eb921 100644 --- a/db/dberrors/history_samplecollection.bob.go +++ b/db/dberrors/history_samplecollection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_samplelocation.bob.go b/db/dberrors/history_samplelocation.bob.go index e7013de7..2414369f 100644 --- a/db/dberrors/history_samplelocation.bob.go +++ b/db/dberrors/history_samplelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_servicerequest.bob.go b/db/dberrors/history_servicerequest.bob.go index 49ae7a00..acc99957 100644 --- a/db/dberrors/history_servicerequest.bob.go +++ b/db/dberrors/history_servicerequest.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_speciesabundance.bob.go b/db/dberrors/history_speciesabundance.bob.go index 4ea93258..b76156b7 100644 --- a/db/dberrors/history_speciesabundance.bob.go +++ b/db/dberrors/history_speciesabundance.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_stormdrain.bob.go b/db/dberrors/history_stormdrain.bob.go index d26b9c3b..c118d2d3 100644 --- a/db/dberrors/history_stormdrain.bob.go +++ b/db/dberrors/history_stormdrain.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_timecard.bob.go b/db/dberrors/history_timecard.bob.go index 54f5abf9..b57a8b37 100644 --- a/db/dberrors/history_timecard.bob.go +++ b/db/dberrors/history_timecard.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_trapdata.bob.go b/db/dberrors/history_trapdata.bob.go index 71786691..53e1e0c9 100644 --- a/db/dberrors/history_trapdata.bob.go +++ b/db/dberrors/history_trapdata.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_traplocation.bob.go b/db/dberrors/history_traplocation.bob.go index f427076f..bcb56b5a 100644 --- a/db/dberrors/history_traplocation.bob.go +++ b/db/dberrors/history_traplocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_treatment.bob.go b/db/dberrors/history_treatment.bob.go index 6492cd44..23fcbf9a 100644 --- a/db/dberrors/history_treatment.bob.go +++ b/db/dberrors/history_treatment.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_treatmentarea.bob.go b/db/dberrors/history_treatmentarea.bob.go index 23422352..e38da3f2 100644 --- a/db/dberrors/history_treatmentarea.bob.go +++ b/db/dberrors/history_treatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_zones.bob.go b/db/dberrors/history_zones.bob.go index af05f79f..8ca16c8e 100644 --- a/db/dberrors/history_zones.bob.go +++ b/db/dberrors/history_zones.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/history_zones2.bob.go b/db/dberrors/history_zones2.bob.go index 824370d7..273e5777 100644 --- a/db/dberrors/history_zones2.bob.go +++ b/db/dberrors/history_zones2.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/notification.bob.go b/db/dberrors/notification.bob.go index 49b22b5b..df71850b 100644 --- a/db/dberrors/notification.bob.go +++ b/db/dberrors/notification.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/oauth_token.bob.go b/db/dberrors/oauth_token.bob.go index 2517c6e5..01d3a92c 100644 --- a/db/dberrors/oauth_token.bob.go +++ b/db/dberrors/oauth_token.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/organization.bob.go b/db/dberrors/organization.bob.go index 2914c985..486a777c 100644 --- a/db/dberrors/organization.bob.go +++ b/db/dberrors/organization.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/sessions.bob.go b/db/dberrors/sessions.bob.go index 99196ded..291a41b8 100644 --- a/db/dberrors/sessions.bob.go +++ b/db/dberrors/sessions.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/spatial_ref_sys.bob.go b/db/dberrors/spatial_ref_sys.bob.go index dc348773..b3f65a50 100644 --- a/db/dberrors/spatial_ref_sys.bob.go +++ b/db/dberrors/spatial_ref_sys.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dberrors/user_.bob.go b/db/dberrors/user_.bob.go index fb5945c6..1dc3f51f 100644 --- a/db/dberrors/user_.bob.go +++ b/db/dberrors/user_.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dberrors diff --git a/db/dbinfo/bob_types.bob.go b/db/dbinfo/bob_types.bob.go index 138299c0..c987ed5d 100644 --- a/db/dbinfo/bob_types.bob.go +++ b/db/dbinfo/bob_types.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fieldseeker.aerialsprayline.bob.go b/db/dbinfo/fieldseeker.aerialsprayline.bob.go new file mode 100644 index 00000000..183bafd0 --- /dev/null +++ b/db/dbinfo/fieldseeker.aerialsprayline.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerAerialspraylines = Table[ + fieldseekerAerialspraylineColumns, + fieldseekerAerialspraylineIndexes, + fieldseekerAerialspraylineForeignKeys, + fieldseekerAerialspraylineUniques, + fieldseekerAerialspraylineChecks, +]{ + Schema: "fieldseeker", + Name: "aerialsprayline", + Columns: fieldseekerAerialspraylineColumns{}, + + Comment: "", +} + +type fieldseekerAerialspraylineColumns struct{} + +func (c fieldseekerAerialspraylineColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerAerialspraylineIndexes struct{} + +func (i fieldseekerAerialspraylineIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerAerialspraylineForeignKeys struct{} + +func (f fieldseekerAerialspraylineForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerAerialspraylineUniques struct{} + +func (u fieldseekerAerialspraylineUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerAerialspraylineChecks struct{} + +func (c fieldseekerAerialspraylineChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.aerialspraysession.bob.go b/db/dbinfo/fieldseeker.aerialspraysession.bob.go new file mode 100644 index 00000000..0a019864 --- /dev/null +++ b/db/dbinfo/fieldseeker.aerialspraysession.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerAerialspraysessions = Table[ + fieldseekerAerialspraysessionColumns, + fieldseekerAerialspraysessionIndexes, + fieldseekerAerialspraysessionForeignKeys, + fieldseekerAerialspraysessionUniques, + fieldseekerAerialspraysessionChecks, +]{ + Schema: "fieldseeker", + Name: "aerialspraysession", + Columns: fieldseekerAerialspraysessionColumns{}, + + Comment: "", +} + +type fieldseekerAerialspraysessionColumns struct{} + +func (c fieldseekerAerialspraysessionColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerAerialspraysessionIndexes struct{} + +func (i fieldseekerAerialspraysessionIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerAerialspraysessionForeignKeys struct{} + +func (f fieldseekerAerialspraysessionForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerAerialspraysessionUniques struct{} + +func (u fieldseekerAerialspraysessionUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerAerialspraysessionChecks struct{} + +func (c fieldseekerAerialspraysessionChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.barrierspray.bob.go b/db/dbinfo/fieldseeker.barrierspray.bob.go new file mode 100644 index 00000000..eb704b8a --- /dev/null +++ b/db/dbinfo/fieldseeker.barrierspray.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerBarriersprays = Table[ + fieldseekerBarriersprayColumns, + fieldseekerBarriersprayIndexes, + fieldseekerBarriersprayForeignKeys, + fieldseekerBarriersprayUniques, + fieldseekerBarriersprayChecks, +]{ + Schema: "fieldseeker", + Name: "barrierspray", + Columns: fieldseekerBarriersprayColumns{}, + + Comment: "", +} + +type fieldseekerBarriersprayColumns struct{} + +func (c fieldseekerBarriersprayColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerBarriersprayIndexes struct{} + +func (i fieldseekerBarriersprayIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerBarriersprayForeignKeys struct{} + +func (f fieldseekerBarriersprayForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerBarriersprayUniques struct{} + +func (u fieldseekerBarriersprayUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerBarriersprayChecks struct{} + +func (c fieldseekerBarriersprayChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.barriersprayroute.bob.go b/db/dbinfo/fieldseeker.barriersprayroute.bob.go new file mode 100644 index 00000000..66244508 --- /dev/null +++ b/db/dbinfo/fieldseeker.barriersprayroute.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerBarriersprayroutes = Table[ + fieldseekerBarriersprayrouteColumns, + fieldseekerBarriersprayrouteIndexes, + fieldseekerBarriersprayrouteForeignKeys, + fieldseekerBarriersprayrouteUniques, + fieldseekerBarriersprayrouteChecks, +]{ + Schema: "fieldseeker", + Name: "barriersprayroute", + Columns: fieldseekerBarriersprayrouteColumns{}, + + Comment: "", +} + +type fieldseekerBarriersprayrouteColumns struct{} + +func (c fieldseekerBarriersprayrouteColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerBarriersprayrouteIndexes struct{} + +func (i fieldseekerBarriersprayrouteIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerBarriersprayrouteForeignKeys struct{} + +func (f fieldseekerBarriersprayrouteForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerBarriersprayrouteUniques struct{} + +func (u fieldseekerBarriersprayrouteUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerBarriersprayrouteChecks struct{} + +func (c fieldseekerBarriersprayrouteChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.containerrelate.bob.go b/db/dbinfo/fieldseeker.containerrelate.bob.go new file mode 100644 index 00000000..29c72c27 --- /dev/null +++ b/db/dbinfo/fieldseeker.containerrelate.bob.go @@ -0,0 +1,222 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerContainerrelates = Table[ + fieldseekerContainerrelateColumns, + fieldseekerContainerrelateIndexes, + fieldseekerContainerrelateForeignKeys, + fieldseekerContainerrelateUniques, + fieldseekerContainerrelateChecks, +]{ + Schema: "fieldseeker", + Name: "containerrelate", + Columns: fieldseekerContainerrelateColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.containerrelate_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Inspsampleid: column{ + Name: "inspsampleid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Mosquitoinspid: column{ + Name: "mosquitoinspid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Treatmentid: column{ + Name: "treatmentid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Containertype: column{ + Name: "containertype", + DBType: "fieldseeker.containerrelate_mosquitocontainertype_enum", + Default: "NULL", + Comment: "Container Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerContainerrelateIndexes{ + ContainerrelatePkey: index{ + Type: "btree", + Name: "containerrelate_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "containerrelate_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerContainerrelateColumns struct { + Objectid column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Inspsampleid column + Mosquitoinspid column + Treatmentid column + Containertype column + Creationdate column + Creator column + Editdate column + Editor column +} + +func (c fieldseekerContainerrelateColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Inspsampleid, c.Mosquitoinspid, c.Treatmentid, c.Containertype, c.Creationdate, c.Creator, c.Editdate, c.Editor, + } +} + +type fieldseekerContainerrelateIndexes struct { + ContainerrelatePkey index +} + +func (i fieldseekerContainerrelateIndexes) AsSlice() []index { + return []index{ + i.ContainerrelatePkey, + } +} + +type fieldseekerContainerrelateForeignKeys struct{} + +func (f fieldseekerContainerrelateForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerContainerrelateUniques struct{} + +func (u fieldseekerContainerrelateUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerContainerrelateChecks struct{} + +func (c fieldseekerContainerrelateChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.fieldscoutinglog.bob.go b/db/dbinfo/fieldseeker.fieldscoutinglog.bob.go new file mode 100644 index 00000000..a41d78f8 --- /dev/null +++ b/db/dbinfo/fieldseeker.fieldscoutinglog.bob.go @@ -0,0 +1,192 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerFieldscoutinglogs = Table[ + fieldseekerFieldscoutinglogColumns, + fieldseekerFieldscoutinglogIndexes, + fieldseekerFieldscoutinglogForeignKeys, + fieldseekerFieldscoutinglogUniques, + fieldseekerFieldscoutinglogChecks, +]{ + Schema: "fieldseeker", + Name: "fieldscoutinglog", + Columns: fieldseekerFieldscoutinglogColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.fieldscoutinglog_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Status: column{ + Name: "status", + DBType: "fieldseeker.fieldscoutinglog_fieldscoutingsymbology_enum", + Default: "NULL", + Comment: "Status", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerFieldscoutinglogIndexes{ + FieldscoutinglogPkey: index{ + Type: "btree", + Name: "fieldscoutinglog_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "fieldscoutinglog_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerFieldscoutinglogColumns struct { + Objectid column + Status column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Creationdate column + Creator column + Editdate column + Editor column +} + +func (c fieldseekerFieldscoutinglogColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Status, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Creationdate, c.Creator, c.Editdate, c.Editor, + } +} + +type fieldseekerFieldscoutinglogIndexes struct { + FieldscoutinglogPkey index +} + +func (i fieldseekerFieldscoutinglogIndexes) AsSlice() []index { + return []index{ + i.FieldscoutinglogPkey, + } +} + +type fieldseekerFieldscoutinglogForeignKeys struct{} + +func (f fieldseekerFieldscoutinglogForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerFieldscoutinglogUniques struct{} + +func (u fieldseekerFieldscoutinglogUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerFieldscoutinglogChecks struct{} + +func (c fieldseekerFieldscoutinglogChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.habitatrelate.bob.go b/db/dbinfo/fieldseeker.habitatrelate.bob.go new file mode 100644 index 00000000..4d95e3ec --- /dev/null +++ b/db/dbinfo/fieldseeker.habitatrelate.bob.go @@ -0,0 +1,202 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerHabitatrelates = Table[ + fieldseekerHabitatrelateColumns, + fieldseekerHabitatrelateIndexes, + fieldseekerHabitatrelateForeignKeys, + fieldseekerHabitatrelateUniques, + fieldseekerHabitatrelateChecks, +]{ + Schema: "fieldseeker", + Name: "habitatrelate", + Columns: fieldseekerHabitatrelateColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.habitatrelate_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + ForeignID: column{ + Name: "foreign_id", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habitattype: column{ + Name: "habitattype", + DBType: "fieldseeker.habitatrelate_habitatrelate_habitattype_2e81cf2f550e400783cf284", + Default: "NULL", + Comment: "Habitat Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerHabitatrelateIndexes{ + HabitatrelatePkey: index{ + Type: "btree", + Name: "habitatrelate_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "habitatrelate_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerHabitatrelateColumns struct { + Objectid column + ForeignID column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Habitattype column + Creationdate column + Creator column + Editdate column + Editor column +} + +func (c fieldseekerHabitatrelateColumns) AsSlice() []column { + return []column{ + c.Objectid, c.ForeignID, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Habitattype, c.Creationdate, c.Creator, c.Editdate, c.Editor, + } +} + +type fieldseekerHabitatrelateIndexes struct { + HabitatrelatePkey index +} + +func (i fieldseekerHabitatrelateIndexes) AsSlice() []index { + return []index{ + i.HabitatrelatePkey, + } +} + +type fieldseekerHabitatrelateForeignKeys struct{} + +func (f fieldseekerHabitatrelateForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerHabitatrelateUniques struct{} + +func (u fieldseekerHabitatrelateUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerHabitatrelateChecks struct{} + +func (c fieldseekerHabitatrelateChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.inspectionsample.bob.go b/db/dbinfo/fieldseeker.inspectionsample.bob.go new file mode 100644 index 00000000..0e8e2246 --- /dev/null +++ b/db/dbinfo/fieldseeker.inspectionsample.bob.go @@ -0,0 +1,222 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerInspectionsamples = Table[ + fieldseekerInspectionsampleColumns, + fieldseekerInspectionsampleIndexes, + fieldseekerInspectionsampleForeignKeys, + fieldseekerInspectionsampleUniques, + fieldseekerInspectionsampleChecks, +]{ + Schema: "fieldseeker", + Name: "inspectionsample", + Columns: fieldseekerInspectionsampleColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.inspectionsample_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + InspID: column{ + Name: "insp_id", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sampleid: column{ + Name: "sampleid", + DBType: "character varying", + Default: "NULL", + Comment: "Sample ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Processed: column{ + Name: "processed", + DBType: "fieldseeker.inspectionsample_notinuit_f_enum", + Default: "NULL", + Comment: "Processed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Idbytech: column{ + Name: "idbytech", + DBType: "character varying", + Default: "NULL", + Comment: "Tech Identifying Species in Lab", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerInspectionsampleIndexes{ + InspectionsamplePkey: index{ + Type: "btree", + Name: "inspectionsample_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "inspectionsample_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerInspectionsampleColumns struct { + Objectid column + InspID column + Sampleid column + Processed column + Idbytech column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Creationdate column + Creator column + Editdate column + Editor column +} + +func (c fieldseekerInspectionsampleColumns) AsSlice() []column { + return []column{ + c.Objectid, c.InspID, c.Sampleid, c.Processed, c.Idbytech, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Creationdate, c.Creator, c.Editdate, c.Editor, + } +} + +type fieldseekerInspectionsampleIndexes struct { + InspectionsamplePkey index +} + +func (i fieldseekerInspectionsampleIndexes) AsSlice() []index { + return []index{ + i.InspectionsamplePkey, + } +} + +type fieldseekerInspectionsampleForeignKeys struct{} + +func (f fieldseekerInspectionsampleForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerInspectionsampleUniques struct{} + +func (u fieldseekerInspectionsampleUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerInspectionsampleChecks struct{} + +func (c fieldseekerInspectionsampleChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.inspectionsampledetail.bob.go b/db/dbinfo/fieldseeker.inspectionsampledetail.bob.go new file mode 100644 index 00000000..4001e2c4 --- /dev/null +++ b/db/dbinfo/fieldseeker.inspectionsampledetail.bob.go @@ -0,0 +1,332 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerInspectionsampledetails = Table[ + fieldseekerInspectionsampledetailColumns, + fieldseekerInspectionsampledetailIndexes, + fieldseekerInspectionsampledetailForeignKeys, + fieldseekerInspectionsampledetailUniques, + fieldseekerInspectionsampledetailChecks, +]{ + Schema: "fieldseeker", + Name: "inspectionsampledetail", + Columns: fieldseekerInspectionsampledetailColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.inspectionsampledetail_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + InspsampleID: column{ + Name: "inspsample_id", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fieldspecies: column{ + Name: "fieldspecies", + DBType: "fieldseeker.inspectionsampledetail_mosquitofieldspecies_enum", + Default: "NULL", + Comment: "Field Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Flarvcount: column{ + Name: "flarvcount", + DBType: "smallint", + Default: "NULL", + Comment: "Field Larva Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fpupcount: column{ + Name: "fpupcount", + DBType: "smallint", + Default: "NULL", + Comment: "Field Pupa Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Feggcount: column{ + Name: "feggcount", + DBType: "smallint", + Default: "NULL", + Comment: "Field Egg Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Flstages: column{ + Name: "flstages", + DBType: "character varying", + Default: "NULL", + Comment: "Field Larval Stages", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fdomstage: column{ + Name: "fdomstage", + DBType: "fieldseeker.inspectionsampledetail_mosquitodominantstage_enum", + Default: "NULL", + Comment: "Field Dominant Stage", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fadultact: column{ + Name: "fadultact", + DBType: "fieldseeker.inspectionsampledetail_mosquitoadultactivity_enum", + Default: "NULL", + Comment: "Field Adult Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Labspecies: column{ + Name: "labspecies", + DBType: "character varying", + Default: "NULL", + Comment: "Lab Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Llarvcount: column{ + Name: "llarvcount", + DBType: "smallint", + Default: "NULL", + Comment: "Lab Larva Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lpupcount: column{ + Name: "lpupcount", + DBType: "smallint", + Default: "NULL", + Comment: "Lab Pupa Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Leggcount: column{ + Name: "leggcount", + DBType: "smallint", + Default: "NULL", + Comment: "Lab Egg Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Ldomstage: column{ + Name: "ldomstage", + DBType: "fieldseeker.inspectionsampledetail_mosquitodominantstage_enum", + Default: "NULL", + Comment: "Lab Dominant Stage", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Processed: column{ + Name: "processed", + DBType: "smallint", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerInspectionsampledetailIndexes{ + InspectionsampledetailPkey: index{ + Type: "btree", + Name: "inspectionsampledetail_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "inspectionsampledetail_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerInspectionsampledetailColumns struct { + Objectid column + InspsampleID column + Fieldspecies column + Flarvcount column + Fpupcount column + Feggcount column + Flstages column + Fdomstage column + Fadultact column + Labspecies column + Llarvcount column + Lpupcount column + Leggcount column + Ldomstage column + Comments column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Processed column + Creationdate column + Creator column + Editdate column + Editor column +} + +func (c fieldseekerInspectionsampledetailColumns) AsSlice() []column { + return []column{ + c.Objectid, c.InspsampleID, c.Fieldspecies, c.Flarvcount, c.Fpupcount, c.Feggcount, c.Flstages, c.Fdomstage, c.Fadultact, c.Labspecies, c.Llarvcount, c.Lpupcount, c.Leggcount, c.Ldomstage, c.Comments, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Processed, c.Creationdate, c.Creator, c.Editdate, c.Editor, + } +} + +type fieldseekerInspectionsampledetailIndexes struct { + InspectionsampledetailPkey index +} + +func (i fieldseekerInspectionsampledetailIndexes) AsSlice() []index { + return []index{ + i.InspectionsampledetailPkey, + } +} + +type fieldseekerInspectionsampledetailForeignKeys struct{} + +func (f fieldseekerInspectionsampledetailForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerInspectionsampledetailUniques struct{} + +func (u fieldseekerInspectionsampledetailUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerInspectionsampledetailChecks struct{} + +func (c fieldseekerInspectionsampledetailChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.landingcount.bob.go b/db/dbinfo/fieldseeker.landingcount.bob.go new file mode 100644 index 00000000..49f70d17 --- /dev/null +++ b/db/dbinfo/fieldseeker.landingcount.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerLandingcounts = Table[ + fieldseekerLandingcountColumns, + fieldseekerLandingcountIndexes, + fieldseekerLandingcountForeignKeys, + fieldseekerLandingcountUniques, + fieldseekerLandingcountChecks, +]{ + Schema: "fieldseeker", + Name: "landingcount", + Columns: fieldseekerLandingcountColumns{}, + + Comment: "", +} + +type fieldseekerLandingcountColumns struct{} + +func (c fieldseekerLandingcountColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerLandingcountIndexes struct{} + +func (i fieldseekerLandingcountIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerLandingcountForeignKeys struct{} + +func (f fieldseekerLandingcountForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerLandingcountUniques struct{} + +func (u fieldseekerLandingcountUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerLandingcountChecks struct{} + +func (c fieldseekerLandingcountChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.landingcountlocation.bob.go b/db/dbinfo/fieldseeker.landingcountlocation.bob.go new file mode 100644 index 00000000..9c7a0e17 --- /dev/null +++ b/db/dbinfo/fieldseeker.landingcountlocation.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerLandingcountlocations = Table[ + fieldseekerLandingcountlocationColumns, + fieldseekerLandingcountlocationIndexes, + fieldseekerLandingcountlocationForeignKeys, + fieldseekerLandingcountlocationUniques, + fieldseekerLandingcountlocationChecks, +]{ + Schema: "fieldseeker", + Name: "landingcountlocation", + Columns: fieldseekerLandingcountlocationColumns{}, + + Comment: "", +} + +type fieldseekerLandingcountlocationColumns struct{} + +func (c fieldseekerLandingcountlocationColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerLandingcountlocationIndexes struct{} + +func (i fieldseekerLandingcountlocationIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerLandingcountlocationForeignKeys struct{} + +func (f fieldseekerLandingcountlocationForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerLandingcountlocationUniques struct{} + +func (u fieldseekerLandingcountlocationUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerLandingcountlocationChecks struct{} + +func (c fieldseekerLandingcountlocationChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.linelocation.bob.go b/db/dbinfo/fieldseeker.linelocation.bob.go new file mode 100644 index 00000000..f78cbbfc --- /dev/null +++ b/db/dbinfo/fieldseeker.linelocation.bob.go @@ -0,0 +1,562 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerLinelocations = Table[ + fieldseekerLinelocationColumns, + fieldseekerLinelocationIndexes, + fieldseekerLinelocationForeignKeys, + fieldseekerLinelocationUniques, + fieldseekerLinelocationChecks, +]{ + Schema: "fieldseeker", + Name: "linelocation", + Columns: fieldseekerLinelocationColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.linelocation_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Name: column{ + Name: "name", + DBType: "character varying", + Default: "NULL", + Comment: "Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habitat: column{ + Name: "habitat", + DBType: "fieldseeker.linelocation_linelocation_habitat_fc51bdc4f1954df58206d69ce1418", + Default: "NULL", + Comment: "Habitat", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Priority: column{ + Name: "priority", + DBType: "fieldseeker.linelocation_locationpriority_enum", + Default: "NULL", + Comment: "Priority", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Usetype: column{ + Name: "usetype", + DBType: "fieldseeker.linelocation_linelocation_usetype_2aeca2e60d2f455c86fc34895dc80", + Default: "NULL", + Comment: "Use Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Active: column{ + Name: "active", + DBType: "fieldseeker.linelocation_notinuit_f_enum", + Default: "NULL", + Comment: "Active", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Description: column{ + Name: "description", + DBType: "character varying", + Default: "NULL", + Comment: "Description", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Accessdesc: column{ + Name: "accessdesc", + DBType: "character varying", + Default: "NULL", + Comment: "Access Description", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Symbology: column{ + Name: "symbology", + DBType: "fieldseeker.linelocation_locationsymbology_enum", + Default: "NULL", + Comment: "Symbology", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Externalid: column{ + Name: "externalid", + DBType: "character varying", + Default: "NULL", + Comment: "External ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Acres: column{ + Name: "acres", + DBType: "double precision", + Default: "NULL", + Comment: "Acres", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Nextactiondatescheduled: column{ + Name: "nextactiondatescheduled", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Next Scheduled Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Larvinspectinterval: column{ + Name: "larvinspectinterval", + DBType: "smallint", + Default: "NULL", + Comment: "Larval Inspection Interval", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LengthFT: column{ + Name: "length_ft", + DBType: "double precision", + Default: "NULL", + Comment: "Length", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + WidthFT: column{ + Name: "width_ft", + DBType: "double precision", + Default: "NULL", + Comment: "Width", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationnumber: column{ + Name: "locationnumber", + DBType: "integer", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectdate: column{ + Name: "lastinspectdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Last Inspection Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectbreeding: column{ + Name: "lastinspectbreeding", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Breeding", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectavglarvae: column{ + Name: "lastinspectavglarvae", + DBType: "double precision", + Default: "NULL", + Comment: "Last Inspection Average Larvae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectavgpupae: column{ + Name: "lastinspectavgpupae", + DBType: "double precision", + Default: "NULL", + Comment: "Last Inspection Average Pupae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectlstages: column{ + Name: "lastinspectlstages", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Larval Stages", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectactiontaken: column{ + Name: "lastinspectactiontaken", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectfieldspecies: column{ + Name: "lastinspectfieldspecies", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Field Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatdate: column{ + Name: "lasttreatdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Last Treatment Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatproduct: column{ + Name: "lasttreatproduct", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Product", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatqty: column{ + Name: "lasttreatqty", + DBType: "double precision", + Default: "NULL", + Comment: "Last Treatment Quantity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatqtyunit: column{ + Name: "lasttreatqtyunit", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Quantity Unit", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Hectares: column{ + Name: "hectares", + DBType: "double precision", + Default: "NULL", + Comment: "Hectares", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectactivity: column{ + Name: "lastinspectactivity", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatactivity: column{ + Name: "lasttreatactivity", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LengthMeters: column{ + Name: "length_meters", + DBType: "double precision", + Default: "NULL", + Comment: "Length Meters", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + WidthMeters: column{ + Name: "width_meters", + DBType: "double precision", + Default: "NULL", + Comment: "Width Meters", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectconditions: column{ + Name: "lastinspectconditions", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Conditions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Waterorigin: column{ + Name: "waterorigin", + DBType: "fieldseeker.linelocation_linelocation_waterorigin_84723d92_306a_46f4_8ef1_6", + Default: "NULL", + Comment: "Water Origin", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Jurisdiction: column{ + Name: "jurisdiction", + DBType: "character varying", + Default: "NULL", + Comment: "Jurisdiction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ShapeLength: column{ + Name: "shape__length", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerLinelocationIndexes{ + LinelocationPkey: index{ + Type: "btree", + Name: "linelocation_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "linelocation_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerLinelocationColumns struct { + Objectid column + Name column + Zone column + Habitat column + Priority column + Usetype column + Active column + Description column + Accessdesc column + Comments column + Symbology column + Externalid column + Acres column + Nextactiondatescheduled column + Larvinspectinterval column + LengthFT column + WidthFT column + Zone2 column + Locationnumber column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Lastinspectdate column + Lastinspectbreeding column + Lastinspectavglarvae column + Lastinspectavgpupae column + Lastinspectlstages column + Lastinspectactiontaken column + Lastinspectfieldspecies column + Lasttreatdate column + Lasttreatproduct column + Lasttreatqty column + Lasttreatqtyunit column + Hectares column + Lastinspectactivity column + Lasttreatactivity column + LengthMeters column + WidthMeters column + Lastinspectconditions column + Waterorigin column + Creationdate column + Creator column + Editdate column + Editor column + Jurisdiction column + ShapeLength column +} + +func (c fieldseekerLinelocationColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Name, c.Zone, c.Habitat, c.Priority, c.Usetype, c.Active, c.Description, c.Accessdesc, c.Comments, c.Symbology, c.Externalid, c.Acres, c.Nextactiondatescheduled, c.Larvinspectinterval, c.LengthFT, c.WidthFT, c.Zone2, c.Locationnumber, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Lastinspectdate, c.Lastinspectbreeding, c.Lastinspectavglarvae, c.Lastinspectavgpupae, c.Lastinspectlstages, c.Lastinspectactiontaken, c.Lastinspectfieldspecies, c.Lasttreatdate, c.Lasttreatproduct, c.Lasttreatqty, c.Lasttreatqtyunit, c.Hectares, c.Lastinspectactivity, c.Lasttreatactivity, c.LengthMeters, c.WidthMeters, c.Lastinspectconditions, c.Waterorigin, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Jurisdiction, c.ShapeLength, + } +} + +type fieldseekerLinelocationIndexes struct { + LinelocationPkey index +} + +func (i fieldseekerLinelocationIndexes) AsSlice() []index { + return []index{ + i.LinelocationPkey, + } +} + +type fieldseekerLinelocationForeignKeys struct{} + +func (f fieldseekerLinelocationForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerLinelocationUniques struct{} + +func (u fieldseekerLinelocationUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerLinelocationChecks struct{} + +func (c fieldseekerLinelocationChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.locationtracking.bob.go b/db/dbinfo/fieldseeker.locationtracking.bob.go new file mode 100644 index 00000000..908efc56 --- /dev/null +++ b/db/dbinfo/fieldseeker.locationtracking.bob.go @@ -0,0 +1,202 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerLocationtrackings = Table[ + fieldseekerLocationtrackingColumns, + fieldseekerLocationtrackingIndexes, + fieldseekerLocationtrackingForeignKeys, + fieldseekerLocationtrackingUniques, + fieldseekerLocationtrackingChecks, +]{ + Schema: "fieldseeker", + Name: "locationtracking", + Columns: fieldseekerLocationtrackingColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.locationtracking_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Accuracy: column{ + Name: "accuracy", + DBType: "double precision", + Default: "NULL", + Comment: "Accuracy(m)", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fieldtech: column{ + Name: "fieldtech", + DBType: "character varying", + Default: "NULL", + Comment: "Field Tech", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerLocationtrackingIndexes{ + LocationtrackingPkey: index{ + Type: "btree", + Name: "locationtracking_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "locationtracking_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerLocationtrackingColumns struct { + Objectid column + Accuracy column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Globalid column + Fieldtech column + Creationdate column + Creator column + Editdate column + Editor column +} + +func (c fieldseekerLocationtrackingColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Accuracy, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Globalid, c.Fieldtech, c.Creationdate, c.Creator, c.Editdate, c.Editor, + } +} + +type fieldseekerLocationtrackingIndexes struct { + LocationtrackingPkey index +} + +func (i fieldseekerLocationtrackingIndexes) AsSlice() []index { + return []index{ + i.LocationtrackingPkey, + } +} + +type fieldseekerLocationtrackingForeignKeys struct{} + +func (f fieldseekerLocationtrackingForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerLocationtrackingUniques struct{} + +func (u fieldseekerLocationtrackingUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerLocationtrackingChecks struct{} + +func (c fieldseekerLocationtrackingChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.mosquitoinspection.bob.go b/db/dbinfo/fieldseeker.mosquitoinspection.bob.go new file mode 100644 index 00000000..fad15fa5 --- /dev/null +++ b/db/dbinfo/fieldseeker.mosquitoinspection.bob.go @@ -0,0 +1,652 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerMosquitoinspections = Table[ + fieldseekerMosquitoinspectionColumns, + fieldseekerMosquitoinspectionIndexes, + fieldseekerMosquitoinspectionForeignKeys, + fieldseekerMosquitoinspectionUniques, + fieldseekerMosquitoinspectionChecks, +]{ + Schema: "fieldseeker", + Name: "mosquitoinspection", + Columns: fieldseekerMosquitoinspectionColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.mosquitoinspection_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Numdips: column{ + Name: "numdips", + DBType: "smallint", + Default: "NULL", + Comment: "# Dips", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Activity: column{ + Name: "activity", + DBType: "fieldseeker.mosquitoinspection_mosquitoactivity_enum", + Default: "NULL", + Comment: "Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Breeding: column{ + Name: "breeding", + DBType: "fieldseeker.mosquitoinspection_mosquitobreeding_enum", + Default: "NULL", + Comment: "Breeding", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Totlarvae: column{ + Name: "totlarvae", + DBType: "smallint", + Default: "NULL", + Comment: "Total Larvae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Totpupae: column{ + Name: "totpupae", + DBType: "smallint", + Default: "NULL", + Comment: "Total Pupae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Eggs: column{ + Name: "eggs", + DBType: "smallint", + Default: "NULL", + Comment: "Eggs", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Posdips: column{ + Name: "posdips", + DBType: "smallint", + Default: "NULL", + Comment: "Positive Dips", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Adultact: column{ + Name: "adultact", + DBType: "fieldseeker.mosquitoinspection_mosquitoadultactivity_enum", + Default: "NULL", + Comment: "Adult Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lstages: column{ + Name: "lstages", + DBType: "character varying", + Default: "NULL", + Comment: "Larval Stages", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Domstage: column{ + Name: "domstage", + DBType: "fieldseeker.mosquitoinspection_mosquitoinspection_domstage_b7a6c36bccde49a2", + Default: "NULL", + Comment: "Dominant Stage", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Actiontaken: column{ + Name: "actiontaken", + DBType: "fieldseeker.mosquitoinspection_mosquitoinspection_actiontaken_252243d69b0b4", + Default: "NULL", + Comment: "Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Avetemp: column{ + Name: "avetemp", + DBType: "double precision", + Default: "NULL", + Comment: "Average Temperature", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Windspeed: column{ + Name: "windspeed", + DBType: "double precision", + Default: "NULL", + Comment: "Wind Speed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Raingauge: column{ + Name: "raingauge", + DBType: "double precision", + Default: "NULL", + Comment: "Rain Gauge", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Startdatetime: column{ + Name: "startdatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Start", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Enddatetime: column{ + Name: "enddatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Finish", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Winddir: column{ + Name: "winddir", + DBType: "fieldseeker.mosquitoinspection_notinuiwinddirection_enum", + Default: "NULL", + Comment: "Wind Direction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Avglarvae: column{ + Name: "avglarvae", + DBType: "double precision", + Default: "NULL", + Comment: "Average Larvae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Avgpupae: column{ + Name: "avgpupae", + DBType: "double precision", + Default: "NULL", + Comment: "Average Pupae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewed: column{ + Name: "reviewed", + DBType: "fieldseeker.mosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Reviewed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewedby: column{ + Name: "reviewedby", + DBType: "character varying", + Default: "NULL", + Comment: "Reviewed By", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Revieweddate: column{ + Name: "revieweddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Reviewed Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationname: column{ + Name: "locationname", + DBType: "character varying", + Default: "NULL", + Comment: "Location Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Recordstatus: column{ + Name: "recordstatus", + DBType: "smallint", + Default: "NULL", + Comment: "RecordStatus", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Personalcontact: column{ + Name: "personalcontact", + DBType: "fieldseeker.mosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Personal Contact", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Tirecount: column{ + Name: "tirecount", + DBType: "smallint", + Default: "NULL", + Comment: "Tire Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Cbcount: column{ + Name: "cbcount", + DBType: "smallint", + Default: "NULL", + Comment: "Catch Basin Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Containercount: column{ + Name: "containercount", + DBType: "smallint", + Default: "NULL", + Comment: "Container Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fieldspecies: column{ + Name: "fieldspecies", + DBType: "fieldseeker.mosquitoinspection_mosquitofieldspecies_enum", + Default: "NULL", + Comment: "Field Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Linelocid: column{ + Name: "linelocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Pointlocid: column{ + Name: "pointlocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Polygonlocid: column{ + Name: "polygonlocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Srid: column{ + Name: "srid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fieldtech: column{ + Name: "fieldtech", + DBType: "character varying", + Default: "NULL", + Comment: "Field Tech", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Larvaepresent: column{ + Name: "larvaepresent", + DBType: "fieldseeker.mosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Larvae Present", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Pupaepresent: column{ + Name: "pupaepresent", + DBType: "fieldseeker.mosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Pupae Present", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sdid: column{ + Name: "sdid", + DBType: "uuid", + Default: "NULL", + Comment: "Storm Drain ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sitecond: column{ + Name: "sitecond", + DBType: "fieldseeker.mosquitoinspection_mosquitoinspection_sitecond_db7350bc_81e5_40", + Default: "NULL", + Comment: "Conditions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Positivecontainercount: column{ + Name: "positivecontainercount", + DBType: "smallint", + Default: "NULL", + Comment: "Positive Container Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Jurisdiction: column{ + Name: "jurisdiction", + DBType: "character varying", + Default: "NULL", + Comment: "Jurisdiction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Visualmonitoring: column{ + Name: "visualmonitoring", + DBType: "fieldseeker.mosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Visual Monitoring", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Vmcomments: column{ + Name: "vmcomments", + DBType: "character varying", + Default: "NULL", + Comment: "VM Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Adminaction: column{ + Name: "adminaction", + DBType: "fieldseeker.mosquitoinspection_mosquitoinspection_adminaction_b74ae1bb_c98b", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Ptaid: column{ + Name: "ptaid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerMosquitoinspectionIndexes{ + MosquitoinspectionPkey: index{ + Type: "btree", + Name: "mosquitoinspection_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "mosquitoinspection_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerMosquitoinspectionColumns struct { + Objectid column + Numdips column + Activity column + Breeding column + Totlarvae column + Totpupae column + Eggs column + Posdips column + Adultact column + Lstages column + Domstage column + Actiontaken column + Comments column + Avetemp column + Windspeed column + Raingauge column + Startdatetime column + Enddatetime column + Winddir column + Avglarvae column + Avgpupae column + Reviewed column + Reviewedby column + Revieweddate column + Locationname column + Zone column + Recordstatus column + Zone2 column + Personalcontact column + Tirecount column + Cbcount column + Containercount column + Fieldspecies column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Linelocid column + Pointlocid column + Polygonlocid column + Srid column + Fieldtech column + Larvaepresent column + Pupaepresent column + Sdid column + Sitecond column + Positivecontainercount column + Creationdate column + Creator column + Editdate column + Editor column + Jurisdiction column + Visualmonitoring column + Vmcomments column + Adminaction column + Ptaid column +} + +func (c fieldseekerMosquitoinspectionColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Numdips, c.Activity, c.Breeding, c.Totlarvae, c.Totpupae, c.Eggs, c.Posdips, c.Adultact, c.Lstages, c.Domstage, c.Actiontaken, c.Comments, c.Avetemp, c.Windspeed, c.Raingauge, c.Startdatetime, c.Enddatetime, c.Winddir, c.Avglarvae, c.Avgpupae, c.Reviewed, c.Reviewedby, c.Revieweddate, c.Locationname, c.Zone, c.Recordstatus, c.Zone2, c.Personalcontact, c.Tirecount, c.Cbcount, c.Containercount, c.Fieldspecies, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Linelocid, c.Pointlocid, c.Polygonlocid, c.Srid, c.Fieldtech, c.Larvaepresent, c.Pupaepresent, c.Sdid, c.Sitecond, c.Positivecontainercount, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Jurisdiction, c.Visualmonitoring, c.Vmcomments, c.Adminaction, c.Ptaid, + } +} + +type fieldseekerMosquitoinspectionIndexes struct { + MosquitoinspectionPkey index +} + +func (i fieldseekerMosquitoinspectionIndexes) AsSlice() []index { + return []index{ + i.MosquitoinspectionPkey, + } +} + +type fieldseekerMosquitoinspectionForeignKeys struct{} + +func (f fieldseekerMosquitoinspectionForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerMosquitoinspectionUniques struct{} + +func (u fieldseekerMosquitoinspectionUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerMosquitoinspectionChecks struct{} + +func (c fieldseekerMosquitoinspectionChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.pointlocation.bob.go b/db/dbinfo/fieldseeker.pointlocation.bob.go new file mode 100644 index 00000000..dbd6a41a --- /dev/null +++ b/db/dbinfo/fieldseeker.pointlocation.bob.go @@ -0,0 +1,522 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerPointlocations = Table[ + fieldseekerPointlocationColumns, + fieldseekerPointlocationIndexes, + fieldseekerPointlocationForeignKeys, + fieldseekerPointlocationUniques, + fieldseekerPointlocationChecks, +]{ + Schema: "fieldseeker", + Name: "pointlocation", + Columns: fieldseekerPointlocationColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.pointlocation_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Name: column{ + Name: "name", + DBType: "character varying", + Default: "NULL", + Comment: "Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habitat: column{ + Name: "habitat", + DBType: "fieldseeker.pointlocation_pointlocation_habitat_b4d8135a_4979_49c8_8bb3_67e", + Default: "NULL", + Comment: "Habitat", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Priority: column{ + Name: "priority", + DBType: "fieldseeker.pointlocation_locationpriority_enum", + Default: "NULL", + Comment: "Priority", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Usetype: column{ + Name: "usetype", + DBType: "fieldseeker.pointlocation_pointlocation_usetype_58d62d18ef4f47fc8cb9874df86", + Default: "NULL", + Comment: "Use Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Active: column{ + Name: "active", + DBType: "fieldseeker.pointlocation_notinuit_f_enum", + Default: "NULL", + Comment: "Active", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Description: column{ + Name: "description", + DBType: "character varying", + Default: "NULL", + Comment: "Description", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Accessdesc: column{ + Name: "accessdesc", + DBType: "character varying", + Default: "NULL", + Comment: "Access Description", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Symbology: column{ + Name: "symbology", + DBType: "fieldseeker.pointlocation_locationsymbology_enum", + Default: "NULL", + Comment: "Symbology", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Externalid: column{ + Name: "externalid", + DBType: "character varying", + Default: "NULL", + Comment: "External ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Nextactiondatescheduled: column{ + Name: "nextactiondatescheduled", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Next Scheduled Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Larvinspectinterval: column{ + Name: "larvinspectinterval", + DBType: "smallint", + Default: "NULL", + Comment: "Larval Inspection Interval", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationnumber: column{ + Name: "locationnumber", + DBType: "integer", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Stype: column{ + Name: "stype", + DBType: "character varying", + Default: "NULL", + Comment: "SourceType", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectdate: column{ + Name: "lastinspectdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Last Inspection Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectbreeding: column{ + Name: "lastinspectbreeding", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Breeding", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectavglarvae: column{ + Name: "lastinspectavglarvae", + DBType: "double precision", + Default: "NULL", + Comment: "Last Inspection Average Larvae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectavgpupae: column{ + Name: "lastinspectavgpupae", + DBType: "double precision", + Default: "NULL", + Comment: "Last Inspection Average Pupae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectlstages: column{ + Name: "lastinspectlstages", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Larval Stages", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectactiontaken: column{ + Name: "lastinspectactiontaken", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectfieldspecies: column{ + Name: "lastinspectfieldspecies", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Field Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatdate: column{ + Name: "lasttreatdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Last Treatment Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatproduct: column{ + Name: "lasttreatproduct", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Product", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatqty: column{ + Name: "lasttreatqty", + DBType: "double precision", + Default: "NULL", + Comment: "Last Treatment Quantity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatqtyunit: column{ + Name: "lasttreatqtyunit", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Quantity Unit", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectactivity: column{ + Name: "lastinspectactivity", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatactivity: column{ + Name: "lasttreatactivity", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectconditions: column{ + Name: "lastinspectconditions", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Conditions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Waterorigin: column{ + Name: "waterorigin", + DBType: "fieldseeker.pointlocation_pointlocation_waterorigin_197b22bf_f3eb_4dad_8899", + Default: "NULL", + Comment: "Water Origin", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + X: column{ + Name: "x", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Y: column{ + Name: "y", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Assignedtech: column{ + Name: "assignedtech", + DBType: "fieldseeker.pointlocation_pointlocation_assignedtech_9393a162_2474_429d_85b", + Default: "NULL", + Comment: "Assigned Tech", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Jurisdiction: column{ + Name: "jurisdiction", + DBType: "character varying", + Default: "NULL", + Comment: "Jurisdiction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + DeactivateReason: column{ + Name: "deactivate_reason", + DBType: "fieldseeker.pointlocation_pointlocation_deactivate_reason_dd303085_b33c_489", + Default: "NULL", + Comment: "Reason for Deactivation", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Scalarpriority: column{ + Name: "scalarpriority", + DBType: "integer", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sourcestatus: column{ + Name: "sourcestatus", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerPointlocationIndexes{ + PointlocationPkey: index{ + Type: "btree", + Name: "pointlocation_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "pointlocation_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerPointlocationColumns struct { + Objectid column + Name column + Zone column + Habitat column + Priority column + Usetype column + Active column + Description column + Accessdesc column + Comments column + Symbology column + Externalid column + Nextactiondatescheduled column + Larvinspectinterval column + Zone2 column + Locationnumber column + Globalid column + Stype column + Lastinspectdate column + Lastinspectbreeding column + Lastinspectavglarvae column + Lastinspectavgpupae column + Lastinspectlstages column + Lastinspectactiontaken column + Lastinspectfieldspecies column + Lasttreatdate column + Lasttreatproduct column + Lasttreatqty column + Lasttreatqtyunit column + Lastinspectactivity column + Lasttreatactivity column + Lastinspectconditions column + Waterorigin column + X column + Y column + Assignedtech column + Creationdate column + Creator column + Editdate column + Editor column + Jurisdiction column + DeactivateReason column + Scalarpriority column + Sourcestatus column +} + +func (c fieldseekerPointlocationColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Name, c.Zone, c.Habitat, c.Priority, c.Usetype, c.Active, c.Description, c.Accessdesc, c.Comments, c.Symbology, c.Externalid, c.Nextactiondatescheduled, c.Larvinspectinterval, c.Zone2, c.Locationnumber, c.Globalid, c.Stype, c.Lastinspectdate, c.Lastinspectbreeding, c.Lastinspectavglarvae, c.Lastinspectavgpupae, c.Lastinspectlstages, c.Lastinspectactiontaken, c.Lastinspectfieldspecies, c.Lasttreatdate, c.Lasttreatproduct, c.Lasttreatqty, c.Lasttreatqtyunit, c.Lastinspectactivity, c.Lasttreatactivity, c.Lastinspectconditions, c.Waterorigin, c.X, c.Y, c.Assignedtech, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Jurisdiction, c.DeactivateReason, c.Scalarpriority, c.Sourcestatus, + } +} + +type fieldseekerPointlocationIndexes struct { + PointlocationPkey index +} + +func (i fieldseekerPointlocationIndexes) AsSlice() []index { + return []index{ + i.PointlocationPkey, + } +} + +type fieldseekerPointlocationForeignKeys struct{} + +func (f fieldseekerPointlocationForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerPointlocationUniques struct{} + +func (u fieldseekerPointlocationUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerPointlocationChecks struct{} + +func (c fieldseekerPointlocationChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.polygonlocation.bob.go b/db/dbinfo/fieldseeker.polygonlocation.bob.go new file mode 100644 index 00000000..20a63625 --- /dev/null +++ b/db/dbinfo/fieldseeker.polygonlocation.bob.go @@ -0,0 +1,502 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerPolygonlocations = Table[ + fieldseekerPolygonlocationColumns, + fieldseekerPolygonlocationIndexes, + fieldseekerPolygonlocationForeignKeys, + fieldseekerPolygonlocationUniques, + fieldseekerPolygonlocationChecks, +]{ + Schema: "fieldseeker", + Name: "polygonlocation", + Columns: fieldseekerPolygonlocationColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.polygonlocation_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Name: column{ + Name: "name", + DBType: "character varying", + Default: "NULL", + Comment: "Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habitat: column{ + Name: "habitat", + DBType: "fieldseeker.polygonlocation_polygonlocation_habitat_45e9dde79ac84d959df8b65", + Default: "NULL", + Comment: "Habitat", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Priority: column{ + Name: "priority", + DBType: "fieldseeker.polygonlocation_locationpriority_enum", + Default: "NULL", + Comment: "Priority", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Usetype: column{ + Name: "usetype", + DBType: "fieldseeker.polygonlocation_polygonlocation_usetype_e546154cb9544b9aa8e7b13", + Default: "NULL", + Comment: "Use Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Active: column{ + Name: "active", + DBType: "fieldseeker.polygonlocation_notinuit_f_enum", + Default: "NULL", + Comment: "Active", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Description: column{ + Name: "description", + DBType: "character varying", + Default: "NULL", + Comment: "Description", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Accessdesc: column{ + Name: "accessdesc", + DBType: "character varying", + Default: "NULL", + Comment: "Access Description", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Symbology: column{ + Name: "symbology", + DBType: "fieldseeker.polygonlocation_locationsymbology_enum", + Default: "NULL", + Comment: "Symbology", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Externalid: column{ + Name: "externalid", + DBType: "character varying", + Default: "NULL", + Comment: "External ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Acres: column{ + Name: "acres", + DBType: "double precision", + Default: "NULL", + Comment: "Acres", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Nextactiondatescheduled: column{ + Name: "nextactiondatescheduled", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Next Scheduled Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Larvinspectinterval: column{ + Name: "larvinspectinterval", + DBType: "smallint", + Default: "NULL", + Comment: "Larval Inspection Interval", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationnumber: column{ + Name: "locationnumber", + DBType: "integer", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectdate: column{ + Name: "lastinspectdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Last Inspection Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectbreeding: column{ + Name: "lastinspectbreeding", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Breeding", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectavglarvae: column{ + Name: "lastinspectavglarvae", + DBType: "double precision", + Default: "NULL", + Comment: "Last Inspection Average Larvae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectavgpupae: column{ + Name: "lastinspectavgpupae", + DBType: "double precision", + Default: "NULL", + Comment: "Last Inspection Average Pupae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectlstages: column{ + Name: "lastinspectlstages", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Larval Stages", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectactiontaken: column{ + Name: "lastinspectactiontaken", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectfieldspecies: column{ + Name: "lastinspectfieldspecies", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Field Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatdate: column{ + Name: "lasttreatdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Last Treatment Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatproduct: column{ + Name: "lasttreatproduct", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Product", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatqty: column{ + Name: "lasttreatqty", + DBType: "double precision", + Default: "NULL", + Comment: "Last Treatment Quantity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatqtyunit: column{ + Name: "lasttreatqtyunit", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Quantity Unit", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Hectares: column{ + Name: "hectares", + DBType: "double precision", + Default: "NULL", + Comment: "Hectares", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectactivity: column{ + Name: "lastinspectactivity", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatactivity: column{ + Name: "lasttreatactivity", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectconditions: column{ + Name: "lastinspectconditions", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Conditions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Waterorigin: column{ + Name: "waterorigin", + DBType: "fieldseeker.polygonlocation_polygonlocation_waterorigin_e9018e92_5f47_4ff9_", + Default: "NULL", + Comment: "Water Origin", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Filter: column{ + Name: "filter", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Jurisdiction: column{ + Name: "jurisdiction", + DBType: "character varying", + Default: "NULL", + Comment: "Jurisdiction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ShapeArea: column{ + Name: "shape__area", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ShapeLength: column{ + Name: "shape__length", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerPolygonlocationIndexes{ + PolygonlocationPkey: index{ + Type: "btree", + Name: "polygonlocation_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "polygonlocation_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerPolygonlocationColumns struct { + Objectid column + Name column + Zone column + Habitat column + Priority column + Usetype column + Active column + Description column + Accessdesc column + Comments column + Symbology column + Externalid column + Acres column + Nextactiondatescheduled column + Larvinspectinterval column + Zone2 column + Locationnumber column + Globalid column + Lastinspectdate column + Lastinspectbreeding column + Lastinspectavglarvae column + Lastinspectavgpupae column + Lastinspectlstages column + Lastinspectactiontaken column + Lastinspectfieldspecies column + Lasttreatdate column + Lasttreatproduct column + Lasttreatqty column + Lasttreatqtyunit column + Hectares column + Lastinspectactivity column + Lasttreatactivity column + Lastinspectconditions column + Waterorigin column + Filter column + Creationdate column + Creator column + Editdate column + Editor column + Jurisdiction column + ShapeArea column + ShapeLength column +} + +func (c fieldseekerPolygonlocationColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Name, c.Zone, c.Habitat, c.Priority, c.Usetype, c.Active, c.Description, c.Accessdesc, c.Comments, c.Symbology, c.Externalid, c.Acres, c.Nextactiondatescheduled, c.Larvinspectinterval, c.Zone2, c.Locationnumber, c.Globalid, c.Lastinspectdate, c.Lastinspectbreeding, c.Lastinspectavglarvae, c.Lastinspectavgpupae, c.Lastinspectlstages, c.Lastinspectactiontaken, c.Lastinspectfieldspecies, c.Lasttreatdate, c.Lasttreatproduct, c.Lasttreatqty, c.Lasttreatqtyunit, c.Hectares, c.Lastinspectactivity, c.Lasttreatactivity, c.Lastinspectconditions, c.Waterorigin, c.Filter, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Jurisdiction, c.ShapeArea, c.ShapeLength, + } +} + +type fieldseekerPolygonlocationIndexes struct { + PolygonlocationPkey index +} + +func (i fieldseekerPolygonlocationIndexes) AsSlice() []index { + return []index{ + i.PolygonlocationPkey, + } +} + +type fieldseekerPolygonlocationForeignKeys struct{} + +func (f fieldseekerPolygonlocationForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerPolygonlocationUniques struct{} + +func (u fieldseekerPolygonlocationUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerPolygonlocationChecks struct{} + +func (c fieldseekerPolygonlocationChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.pool.bob.go b/db/dbinfo/fieldseeker.pool.bob.go new file mode 100644 index 00000000..c562e8bf --- /dev/null +++ b/db/dbinfo/fieldseeker.pool.bob.go @@ -0,0 +1,362 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerPools = Table[ + fieldseekerPoolColumns, + fieldseekerPoolIndexes, + fieldseekerPoolForeignKeys, + fieldseekerPoolUniques, + fieldseekerPoolChecks, +]{ + Schema: "fieldseeker", + Name: "pool", + Columns: fieldseekerPoolColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.pool_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + TrapdataID: column{ + Name: "trapdata_id", + DBType: "uuid", + Default: "NULL", + Comment: "Trap Data ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Datesent: column{ + Name: "datesent", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Date Sent", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Survtech: column{ + Name: "survtech", + DBType: "character varying", + Default: "NULL", + Comment: "Survey Tech", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Datetested: column{ + Name: "datetested", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Date Tested", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Testtech: column{ + Name: "testtech", + DBType: "character varying", + Default: "NULL", + Comment: "Test Tech", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sampleid: column{ + Name: "sampleid", + DBType: "character varying", + Default: "NULL", + Comment: "Sample ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Processed: column{ + Name: "processed", + DBType: "fieldseeker.pool_notinuit_f_enum", + Default: "NULL", + Comment: "Processed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LabID: column{ + Name: "lab_id", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Testmethod: column{ + Name: "testmethod", + DBType: "fieldseeker.pool_pool_testmethod_670efbfba86d41ba8e2d3cab5d749e7f_enum", + Default: "NULL", + Comment: "Test Methods", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Diseasetested: column{ + Name: "diseasetested", + DBType: "fieldseeker.pool_pool_diseasetested_0f02232949c04c7e8de820b9b515ed97_enum", + Default: "NULL", + Comment: "Diseases Tested", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Diseasepos: column{ + Name: "diseasepos", + DBType: "fieldseeker.pool_pool_diseasepos_6889f8dd00074874aa726907e78497fa_enum", + Default: "NULL", + Comment: "Diseases Positive", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lab: column{ + Name: "lab", + DBType: "fieldseeker.pool_mosquitolabname_enum", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Poolyear: column{ + Name: "poolyear", + DBType: "smallint", + Default: "NULL", + Comment: "Pool Year", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Gatewaysync: column{ + Name: "gatewaysync", + DBType: "smallint", + Default: "NULL", + Comment: "Gateway Sync", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Vectorsurvcollectionid: column{ + Name: "vectorsurvcollectionid", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Vectorsurvpoolid: column{ + Name: "vectorsurvpoolid", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Vectorsurvtrapdataid: column{ + Name: "vectorsurvtrapdataid", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerPoolIndexes{ + PoolPkey: index{ + Type: "btree", + Name: "pool_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "pool_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerPoolColumns struct { + Objectid column + TrapdataID column + Datesent column + Survtech column + Datetested column + Testtech column + Comments column + Sampleid column + Processed column + LabID column + Testmethod column + Diseasetested column + Diseasepos column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Lab column + Poolyear column + Gatewaysync column + Vectorsurvcollectionid column + Vectorsurvpoolid column + Vectorsurvtrapdataid column + Creationdate column + Creator column + Editdate column + Editor column +} + +func (c fieldseekerPoolColumns) AsSlice() []column { + return []column{ + c.Objectid, c.TrapdataID, c.Datesent, c.Survtech, c.Datetested, c.Testtech, c.Comments, c.Sampleid, c.Processed, c.LabID, c.Testmethod, c.Diseasetested, c.Diseasepos, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Lab, c.Poolyear, c.Gatewaysync, c.Vectorsurvcollectionid, c.Vectorsurvpoolid, c.Vectorsurvtrapdataid, c.Creationdate, c.Creator, c.Editdate, c.Editor, + } +} + +type fieldseekerPoolIndexes struct { + PoolPkey index +} + +func (i fieldseekerPoolIndexes) AsSlice() []index { + return []index{ + i.PoolPkey, + } +} + +type fieldseekerPoolForeignKeys struct{} + +func (f fieldseekerPoolForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerPoolUniques struct{} + +func (u fieldseekerPoolUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerPoolChecks struct{} + +func (c fieldseekerPoolChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.poolbuffer.bob.go b/db/dbinfo/fieldseeker.poolbuffer.bob.go new file mode 100644 index 00000000..2cde8886 --- /dev/null +++ b/db/dbinfo/fieldseeker.poolbuffer.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerPoolbuffers = Table[ + fieldseekerPoolbufferColumns, + fieldseekerPoolbufferIndexes, + fieldseekerPoolbufferForeignKeys, + fieldseekerPoolbufferUniques, + fieldseekerPoolbufferChecks, +]{ + Schema: "fieldseeker", + Name: "poolbuffer", + Columns: fieldseekerPoolbufferColumns{}, + + Comment: "", +} + +type fieldseekerPoolbufferColumns struct{} + +func (c fieldseekerPoolbufferColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerPoolbufferIndexes struct{} + +func (i fieldseekerPoolbufferIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerPoolbufferForeignKeys struct{} + +func (f fieldseekerPoolbufferForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerPoolbufferUniques struct{} + +func (u fieldseekerPoolbufferUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerPoolbufferChecks struct{} + +func (c fieldseekerPoolbufferChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.pooldetail.bob.go b/db/dbinfo/fieldseeker.pooldetail.bob.go new file mode 100644 index 00000000..af87223a --- /dev/null +++ b/db/dbinfo/fieldseeker.pooldetail.bob.go @@ -0,0 +1,222 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerPooldetails = Table[ + fieldseekerPooldetailColumns, + fieldseekerPooldetailIndexes, + fieldseekerPooldetailForeignKeys, + fieldseekerPooldetailUniques, + fieldseekerPooldetailChecks, +]{ + Schema: "fieldseeker", + Name: "pooldetail", + Columns: fieldseekerPooldetailColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.pooldetail_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + TrapdataID: column{ + Name: "trapdata_id", + DBType: "uuid", + Default: "NULL", + Comment: "Trap Data ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + PoolID: column{ + Name: "pool_id", + DBType: "uuid", + Default: "NULL", + Comment: "Pool ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Species: column{ + Name: "species", + DBType: "character varying", + Default: "NULL", + Comment: "Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Females: column{ + Name: "females", + DBType: "smallint", + Default: "NULL", + Comment: "Females", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerPooldetailIndexes{ + PooldetailPkey: index{ + Type: "btree", + Name: "pooldetail_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "pooldetail_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerPooldetailColumns struct { + Objectid column + TrapdataID column + PoolID column + Species column + Females column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Creationdate column + Creator column + Editdate column + Editor column +} + +func (c fieldseekerPooldetailColumns) AsSlice() []column { + return []column{ + c.Objectid, c.TrapdataID, c.PoolID, c.Species, c.Females, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Creationdate, c.Creator, c.Editdate, c.Editor, + } +} + +type fieldseekerPooldetailIndexes struct { + PooldetailPkey index +} + +func (i fieldseekerPooldetailIndexes) AsSlice() []index { + return []index{ + i.PooldetailPkey, + } +} + +type fieldseekerPooldetailForeignKeys struct{} + +func (f fieldseekerPooldetailForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerPooldetailUniques struct{} + +func (u fieldseekerPooldetailUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerPooldetailChecks struct{} + +func (c fieldseekerPooldetailChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.proposedtreatmentarea.bob.go b/db/dbinfo/fieldseeker.proposedtreatmentarea.bob.go new file mode 100644 index 00000000..ca97f867 --- /dev/null +++ b/db/dbinfo/fieldseeker.proposedtreatmentarea.bob.go @@ -0,0 +1,412 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerProposedtreatmentareas = Table[ + fieldseekerProposedtreatmentareaColumns, + fieldseekerProposedtreatmentareaIndexes, + fieldseekerProposedtreatmentareaForeignKeys, + fieldseekerProposedtreatmentareaUniques, + fieldseekerProposedtreatmentareaChecks, +]{ + Schema: "fieldseeker", + Name: "proposedtreatmentarea", + Columns: fieldseekerProposedtreatmentareaColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.proposedtreatmentarea_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Method: column{ + Name: "method", + DBType: "fieldseeker.proposedtreatmentarea_mosquitotreatmentmethod_enum", + Default: "NULL", + Comment: "Method", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewed: column{ + Name: "reviewed", + DBType: "fieldseeker.proposedtreatmentarea_notinuit_f_enum", + Default: "NULL", + Comment: "Reviewed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewedby: column{ + Name: "reviewedby", + DBType: "character varying", + Default: "NULL", + Comment: "Reviewed By", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Revieweddate: column{ + Name: "revieweddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Reviewed Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Completeddate: column{ + Name: "completeddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Completed Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Completedby: column{ + Name: "completedby", + DBType: "character varying", + Default: "NULL", + Comment: "Completed By", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Completed: column{ + Name: "completed", + DBType: "fieldseeker.proposedtreatmentarea_notinuit_f_enum", + Default: "NULL", + Comment: "Completed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Issprayroute: column{ + Name: "issprayroute", + DBType: "fieldseeker.proposedtreatmentarea_notinuit_f_enum", + Default: "NULL", + Comment: "Is Spray Route", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Name: column{ + Name: "name", + DBType: "character varying", + Default: "NULL", + Comment: "Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Acres: column{ + Name: "acres", + DBType: "double precision", + Default: "NULL", + Comment: "Acres", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Exported: column{ + Name: "exported", + DBType: "fieldseeker.proposedtreatmentarea_notinuit_f_enum", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Targetproduct: column{ + Name: "targetproduct", + DBType: "character varying", + Default: "NULL", + Comment: "Target Product", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Targetapprate: column{ + Name: "targetapprate", + DBType: "double precision", + Default: "NULL", + Comment: "Target App Rate", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Hectares: column{ + Name: "hectares", + DBType: "double precision", + Default: "NULL", + Comment: "Hectares", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatactivity: column{ + Name: "lasttreatactivity", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatdate: column{ + Name: "lasttreatdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Last Treatment Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatproduct: column{ + Name: "lasttreatproduct", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Product", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatqty: column{ + Name: "lasttreatqty", + DBType: "double precision", + Default: "NULL", + Comment: "Last Treatment Quantity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatqtyunit: column{ + Name: "lasttreatqtyunit", + DBType: "character varying", + Default: "NULL", + Comment: "Last Treatment Quantity Unit", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Priority: column{ + Name: "priority", + DBType: "fieldseeker.proposedtreatmentarea_locationpriority_enum", + Default: "NULL", + Comment: "Priority", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Duedate: column{ + Name: "duedate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Due Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Targetspecies: column{ + Name: "targetspecies", + DBType: "character varying", + Default: "NULL", + Comment: "Target Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ShapeArea: column{ + Name: "shape__area", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ShapeLength: column{ + Name: "shape__length", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerProposedtreatmentareaIndexes{ + ProposedtreatmentareaPkey: index{ + Type: "btree", + Name: "proposedtreatmentarea_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "proposedtreatmentarea_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerProposedtreatmentareaColumns struct { + Objectid column + Method column + Comments column + Zone column + Reviewed column + Reviewedby column + Revieweddate column + Zone2 column + Completeddate column + Completedby column + Completed column + Issprayroute column + Name column + Acres column + Globalid column + Exported column + Targetproduct column + Targetapprate column + Hectares column + Lasttreatactivity column + Lasttreatdate column + Lasttreatproduct column + Lasttreatqty column + Lasttreatqtyunit column + Priority column + Duedate column + Creationdate column + Creator column + Editdate column + Editor column + Targetspecies column + ShapeArea column + ShapeLength column +} + +func (c fieldseekerProposedtreatmentareaColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Method, c.Comments, c.Zone, c.Reviewed, c.Reviewedby, c.Revieweddate, c.Zone2, c.Completeddate, c.Completedby, c.Completed, c.Issprayroute, c.Name, c.Acres, c.Globalid, c.Exported, c.Targetproduct, c.Targetapprate, c.Hectares, c.Lasttreatactivity, c.Lasttreatdate, c.Lasttreatproduct, c.Lasttreatqty, c.Lasttreatqtyunit, c.Priority, c.Duedate, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Targetspecies, c.ShapeArea, c.ShapeLength, + } +} + +type fieldseekerProposedtreatmentareaIndexes struct { + ProposedtreatmentareaPkey index +} + +func (i fieldseekerProposedtreatmentareaIndexes) AsSlice() []index { + return []index{ + i.ProposedtreatmentareaPkey, + } +} + +type fieldseekerProposedtreatmentareaForeignKeys struct{} + +func (f fieldseekerProposedtreatmentareaForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerProposedtreatmentareaUniques struct{} + +func (u fieldseekerProposedtreatmentareaUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerProposedtreatmentareaChecks struct{} + +func (c fieldseekerProposedtreatmentareaChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.qalarvcount.bob.go b/db/dbinfo/fieldseeker.qalarvcount.bob.go new file mode 100644 index 00000000..889e2986 --- /dev/null +++ b/db/dbinfo/fieldseeker.qalarvcount.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerQalarvcounts = Table[ + fieldseekerQalarvcountColumns, + fieldseekerQalarvcountIndexes, + fieldseekerQalarvcountForeignKeys, + fieldseekerQalarvcountUniques, + fieldseekerQalarvcountChecks, +]{ + Schema: "fieldseeker", + Name: "qalarvcount", + Columns: fieldseekerQalarvcountColumns{}, + + Comment: "", +} + +type fieldseekerQalarvcountColumns struct{} + +func (c fieldseekerQalarvcountColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerQalarvcountIndexes struct{} + +func (i fieldseekerQalarvcountIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerQalarvcountForeignKeys struct{} + +func (f fieldseekerQalarvcountForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerQalarvcountUniques struct{} + +func (u fieldseekerQalarvcountUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerQalarvcountChecks struct{} + +func (c fieldseekerQalarvcountChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.qamosquitoinspection.bob.go b/db/dbinfo/fieldseeker.qamosquitoinspection.bob.go new file mode 100644 index 00000000..030de2d2 --- /dev/null +++ b/db/dbinfo/fieldseeker.qamosquitoinspection.bob.go @@ -0,0 +1,702 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerQamosquitoinspections = Table[ + fieldseekerQamosquitoinspectionColumns, + fieldseekerQamosquitoinspectionIndexes, + fieldseekerQamosquitoinspectionForeignKeys, + fieldseekerQamosquitoinspectionUniques, + fieldseekerQamosquitoinspectionChecks, +]{ + Schema: "fieldseeker", + Name: "qamosquitoinspection", + Columns: fieldseekerQamosquitoinspectionColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.qamosquitoinspection_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Posdips: column{ + Name: "posdips", + DBType: "smallint", + Default: "NULL", + Comment: "Positive Dips", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Actiontaken: column{ + Name: "actiontaken", + DBType: "fieldseeker.qamosquitoinspection_mosquitoaction_enum", + Default: "NULL", + Comment: "Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Avetemp: column{ + Name: "avetemp", + DBType: "double precision", + Default: "NULL", + Comment: "Average Temperature", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Windspeed: column{ + Name: "windspeed", + DBType: "double precision", + Default: "NULL", + Comment: "Wind Speed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Raingauge: column{ + Name: "raingauge", + DBType: "double precision", + Default: "NULL", + Comment: "Rain Gauge", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Startdatetime: column{ + Name: "startdatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Start", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Enddatetime: column{ + Name: "enddatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Finish", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Winddir: column{ + Name: "winddir", + DBType: "character varying", + Default: "NULL", + Comment: "Wind Direction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewed: column{ + Name: "reviewed", + DBType: "fieldseeker.qamosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewedby: column{ + Name: "reviewedby", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Revieweddate: column{ + Name: "revieweddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationname: column{ + Name: "locationname", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Recordstatus: column{ + Name: "recordstatus", + DBType: "smallint", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LR: column{ + Name: "lr", + DBType: "smallint", + Default: "NULL", + Comment: "Landing Rate", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Negdips: column{ + Name: "negdips", + DBType: "smallint", + Default: "NULL", + Comment: "Negative Dips", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Totalacres: column{ + Name: "totalacres", + DBType: "double precision", + Default: "NULL", + Comment: "Total Acres", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Acresbreeding: column{ + Name: "acresbreeding", + DBType: "double precision", + Default: "NULL", + Comment: "Acres Breeding", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fish: column{ + Name: "fish", + DBType: "fieldseeker.qamosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Fish Present?", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sitetype: column{ + Name: "sitetype", + DBType: "fieldseeker.qamosquitoinspection_qasitetype_enum", + Default: "NULL", + Comment: "Site Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Breedingpotential: column{ + Name: "breedingpotential", + DBType: "fieldseeker.qamosquitoinspection_qabreedingpotential_enum", + Default: "NULL", + Comment: "Breeding Potential", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Movingwater: column{ + Name: "movingwater", + DBType: "fieldseeker.qamosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Moving Water", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Nowaterever: column{ + Name: "nowaterever", + DBType: "fieldseeker.qamosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "No Evidence of Water Ever", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Mosquitohabitat: column{ + Name: "mosquitohabitat", + DBType: "fieldseeker.qamosquitoinspection_qamosquitohabitat_enum", + Default: "NULL", + Comment: "Mosquito Habitat Indicators", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habvalue1: column{ + Name: "habvalue1", + DBType: "smallint", + Default: "NULL", + Comment: "Habitat Value", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habvalue1percent: column{ + Name: "habvalue1percent", + DBType: "smallint", + Default: "NULL", + Comment: "%", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habvalue2: column{ + Name: "habvalue2", + DBType: "smallint", + Default: "NULL", + Comment: "Habitat Value", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habvalue2percent: column{ + Name: "habvalue2percent", + DBType: "smallint", + Default: "NULL", + Comment: "%", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Potential: column{ + Name: "potential", + DBType: "smallint", + Default: "NULL", + Comment: "Potential", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Larvaepresent: column{ + Name: "larvaepresent", + DBType: "fieldseeker.qamosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Larvae Present", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Larvaeinsidetreatedarea: column{ + Name: "larvaeinsidetreatedarea", + DBType: "fieldseeker.qamosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Larvae Inside Treated Area?", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Larvaeoutsidetreatedarea: column{ + Name: "larvaeoutsidetreatedarea", + DBType: "fieldseeker.qamosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Larvae Outside Treated Area?", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Larvaereason: column{ + Name: "larvaereason", + DBType: "fieldseeker.qamosquitoinspection_qalarvaereason_enum", + Default: "NULL", + Comment: "Reason Larvae Present", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Aquaticorganisms: column{ + Name: "aquaticorganisms", + DBType: "fieldseeker.qamosquitoinspection_qaaquaticorganisms_enum", + Default: "NULL", + Comment: "Aquatic Organisms", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Vegetation: column{ + Name: "vegetation", + DBType: "fieldseeker.qamosquitoinspection_qavegetation_enum", + Default: "NULL", + Comment: "Vegetation", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sourcereduction: column{ + Name: "sourcereduction", + DBType: "fieldseeker.qamosquitoinspection_qasourcereduction_enum", + Default: "NULL", + Comment: "Source Reduction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Waterpresent: column{ + Name: "waterpresent", + DBType: "fieldseeker.qamosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Water Present?", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Watermovement1: column{ + Name: "watermovement1", + DBType: "fieldseeker.qamosquitoinspection_qawatermovement_enum", + Default: "NULL", + Comment: "Water Movement", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Watermovement1percent: column{ + Name: "watermovement1percent", + DBType: "smallint", + Default: "NULL", + Comment: "%", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Watermovement2: column{ + Name: "watermovement2", + DBType: "fieldseeker.qamosquitoinspection_qawatermovement_enum", + Default: "NULL", + Comment: "Water Movement", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Watermovement2percent: column{ + Name: "watermovement2percent", + DBType: "smallint", + Default: "NULL", + Comment: "%", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Soilconditions: column{ + Name: "soilconditions", + DBType: "fieldseeker.qamosquitoinspection_qasoilcondition_enum", + Default: "NULL", + Comment: "Soil Conditions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Waterduration: column{ + Name: "waterduration", + DBType: "fieldseeker.qamosquitoinspection_qawaterduration_enum", + Default: "NULL", + Comment: "How Long Water Present?", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Watersource: column{ + Name: "watersource", + DBType: "fieldseeker.qamosquitoinspection_qawatersource_enum", + Default: "NULL", + Comment: "Water Source", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Waterconditions: column{ + Name: "waterconditions", + DBType: "fieldseeker.qamosquitoinspection_qawaterconditions_enum", + Default: "NULL", + Comment: "Water Conditions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Adultactivity: column{ + Name: "adultactivity", + DBType: "fieldseeker.qamosquitoinspection_notinuit_f_enum", + Default: "NULL", + Comment: "Adult Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Linelocid: column{ + Name: "linelocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Pointlocid: column{ + Name: "pointlocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Polygonlocid: column{ + Name: "polygonlocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fieldtech: column{ + Name: "fieldtech", + DBType: "character varying", + Default: "NULL", + Comment: "Field Tech", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerQamosquitoinspectionIndexes{ + QamosquitoinspectionPkey: index{ + Type: "btree", + Name: "qamosquitoinspection_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "qamosquitoinspection_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerQamosquitoinspectionColumns struct { + Objectid column + Posdips column + Actiontaken column + Comments column + Avetemp column + Windspeed column + Raingauge column + Globalid column + Startdatetime column + Enddatetime column + Winddir column + Reviewed column + Reviewedby column + Revieweddate column + Locationname column + Zone column + Recordstatus column + Zone2 column + LR column + Negdips column + Totalacres column + Acresbreeding column + Fish column + Sitetype column + Breedingpotential column + Movingwater column + Nowaterever column + Mosquitohabitat column + Habvalue1 column + Habvalue1percent column + Habvalue2 column + Habvalue2percent column + Potential column + Larvaepresent column + Larvaeinsidetreatedarea column + Larvaeoutsidetreatedarea column + Larvaereason column + Aquaticorganisms column + Vegetation column + Sourcereduction column + Waterpresent column + Watermovement1 column + Watermovement1percent column + Watermovement2 column + Watermovement2percent column + Soilconditions column + Waterduration column + Watersource column + Waterconditions column + Adultactivity column + Linelocid column + Pointlocid column + Polygonlocid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Fieldtech column + Creationdate column + Creator column + Editdate column + Editor column +} + +func (c fieldseekerQamosquitoinspectionColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Posdips, c.Actiontaken, c.Comments, c.Avetemp, c.Windspeed, c.Raingauge, c.Globalid, c.Startdatetime, c.Enddatetime, c.Winddir, c.Reviewed, c.Reviewedby, c.Revieweddate, c.Locationname, c.Zone, c.Recordstatus, c.Zone2, c.LR, c.Negdips, c.Totalacres, c.Acresbreeding, c.Fish, c.Sitetype, c.Breedingpotential, c.Movingwater, c.Nowaterever, c.Mosquitohabitat, c.Habvalue1, c.Habvalue1percent, c.Habvalue2, c.Habvalue2percent, c.Potential, c.Larvaepresent, c.Larvaeinsidetreatedarea, c.Larvaeoutsidetreatedarea, c.Larvaereason, c.Aquaticorganisms, c.Vegetation, c.Sourcereduction, c.Waterpresent, c.Watermovement1, c.Watermovement1percent, c.Watermovement2, c.Watermovement2percent, c.Soilconditions, c.Waterduration, c.Watersource, c.Waterconditions, c.Adultactivity, c.Linelocid, c.Pointlocid, c.Polygonlocid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Fieldtech, c.Creationdate, c.Creator, c.Editdate, c.Editor, + } +} + +type fieldseekerQamosquitoinspectionIndexes struct { + QamosquitoinspectionPkey index +} + +func (i fieldseekerQamosquitoinspectionIndexes) AsSlice() []index { + return []index{ + i.QamosquitoinspectionPkey, + } +} + +type fieldseekerQamosquitoinspectionForeignKeys struct{} + +func (f fieldseekerQamosquitoinspectionForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerQamosquitoinspectionUniques struct{} + +func (u fieldseekerQamosquitoinspectionUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerQamosquitoinspectionChecks struct{} + +func (c fieldseekerQamosquitoinspectionChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.qaproductobservation.bob.go b/db/dbinfo/fieldseeker.qaproductobservation.bob.go new file mode 100644 index 00000000..840b6ba0 --- /dev/null +++ b/db/dbinfo/fieldseeker.qaproductobservation.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerQaproductobservations = Table[ + fieldseekerQaproductobservationColumns, + fieldseekerQaproductobservationIndexes, + fieldseekerQaproductobservationForeignKeys, + fieldseekerQaproductobservationUniques, + fieldseekerQaproductobservationChecks, +]{ + Schema: "fieldseeker", + Name: "qaproductobservation", + Columns: fieldseekerQaproductobservationColumns{}, + + Comment: "", +} + +type fieldseekerQaproductobservationColumns struct{} + +func (c fieldseekerQaproductobservationColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerQaproductobservationIndexes struct{} + +func (i fieldseekerQaproductobservationIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerQaproductobservationForeignKeys struct{} + +func (f fieldseekerQaproductobservationForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerQaproductobservationUniques struct{} + +func (u fieldseekerQaproductobservationUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerQaproductobservationChecks struct{} + +func (c fieldseekerQaproductobservationChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.restrictedarea.bob.go b/db/dbinfo/fieldseeker.restrictedarea.bob.go new file mode 100644 index 00000000..d349a586 --- /dev/null +++ b/db/dbinfo/fieldseeker.restrictedarea.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerRestrictedareas = Table[ + fieldseekerRestrictedareaColumns, + fieldseekerRestrictedareaIndexes, + fieldseekerRestrictedareaForeignKeys, + fieldseekerRestrictedareaUniques, + fieldseekerRestrictedareaChecks, +]{ + Schema: "fieldseeker", + Name: "restrictedarea", + Columns: fieldseekerRestrictedareaColumns{}, + + Comment: "", +} + +type fieldseekerRestrictedareaColumns struct{} + +func (c fieldseekerRestrictedareaColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerRestrictedareaIndexes struct{} + +func (i fieldseekerRestrictedareaIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerRestrictedareaForeignKeys struct{} + +func (f fieldseekerRestrictedareaForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerRestrictedareaUniques struct{} + +func (u fieldseekerRestrictedareaUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerRestrictedareaChecks struct{} + +func (c fieldseekerRestrictedareaChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.rodentinspection.bob.go b/db/dbinfo/fieldseeker.rodentinspection.bob.go new file mode 100644 index 00000000..4dd91691 --- /dev/null +++ b/db/dbinfo/fieldseeker.rodentinspection.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerRodentinspections = Table[ + fieldseekerRodentinspectionColumns, + fieldseekerRodentinspectionIndexes, + fieldseekerRodentinspectionForeignKeys, + fieldseekerRodentinspectionUniques, + fieldseekerRodentinspectionChecks, +]{ + Schema: "fieldseeker", + Name: "rodentinspection", + Columns: fieldseekerRodentinspectionColumns{}, + + Comment: "", +} + +type fieldseekerRodentinspectionColumns struct{} + +func (c fieldseekerRodentinspectionColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerRodentinspectionIndexes struct{} + +func (i fieldseekerRodentinspectionIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerRodentinspectionForeignKeys struct{} + +func (f fieldseekerRodentinspectionForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerRodentinspectionUniques struct{} + +func (u fieldseekerRodentinspectionUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerRodentinspectionChecks struct{} + +func (c fieldseekerRodentinspectionChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.rodentlocation.bob.go b/db/dbinfo/fieldseeker.rodentlocation.bob.go new file mode 100644 index 00000000..1b4b3029 --- /dev/null +++ b/db/dbinfo/fieldseeker.rodentlocation.bob.go @@ -0,0 +1,407 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerRodentlocations = Table[ + fieldseekerRodentlocationColumns, + fieldseekerRodentlocationIndexes, + fieldseekerRodentlocationForeignKeys, + fieldseekerRodentlocationUniques, + fieldseekerRodentlocationChecks, +]{ + Schema: "fieldseeker", + Name: "rodentlocation", + Columns: fieldseekerRodentlocationColumns{ + OrganizationID: column{ + Name: "organization_id", + DBType: "integer", + Default: "", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.rodentlocation_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Locationname: column{ + Name: "locationname", + DBType: "character varying", + Default: "NULL", + Comment: "Location Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habitat: column{ + Name: "habitat", + DBType: "fieldseeker.rodentlocation_rodentlocationhabitat_enum", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Priority: column{ + Name: "priority", + DBType: "fieldseeker.rodentlocation_locationpriority_1_enum", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Usetype: column{ + Name: "usetype", + DBType: "fieldseeker.rodentlocation_locationusetype_1_enum", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Active: column{ + Name: "active", + DBType: "fieldseeker.rodentlocation_notinuit_f_1_enum", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Description: column{ + Name: "description", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Accessdesc: column{ + Name: "accessdesc", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Symbology: column{ + Name: "symbology", + DBType: "fieldseeker.rodentlocation_rodentlocation_symbology_enum", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Externalid: column{ + Name: "externalid", + DBType: "character varying", + Default: "NULL", + Comment: "External ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Nextactiondatescheduled: column{ + Name: "nextactiondatescheduled", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationnumber: column{ + Name: "locationnumber", + DBType: "integer", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectdate: column{ + Name: "lastinspectdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Last Inspection Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectspecies: column{ + Name: "lastinspectspecies", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectaction: column{ + Name: "lastinspectaction", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectconditions: column{ + Name: "lastinspectconditions", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Conditions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastinspectrodentevidence: column{ + Name: "lastinspectrodentevidence", + DBType: "character varying", + Default: "NULL", + Comment: "Last Inspection Rodent Evidence", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Jurisdiction: column{ + Name: "jurisdiction", + DBType: "character varying", + Default: "NULL", + Comment: "Jurisdiction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerRodentlocationIndexes{ + RodentlocationPkey: index{ + Type: "btree", + Name: "rodentlocation_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "rodentlocation_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + ForeignKeys: fieldseekerRodentlocationForeignKeys{ + FieldseekerRodentlocationRodentlocationOrganizationIDFkey: foreignKey{ + constraint: constraint{ + Name: "fieldseeker.rodentlocation.rodentlocation_organization_id_fkey", + Columns: []string{"organization_id"}, + Comment: "", + }, + ForeignTable: "organization", + ForeignColumns: []string{"id"}, + }, + }, + + Comment: "", +} + +type fieldseekerRodentlocationColumns struct { + OrganizationID column + Objectid column + Locationname column + Zone column + Zone2 column + Habitat column + Priority column + Usetype column + Active column + Description column + Accessdesc column + Comments column + Symbology column + Externalid column + Nextactiondatescheduled column + Locationnumber column + Lastinspectdate column + Lastinspectspecies column + Lastinspectaction column + Lastinspectconditions column + Lastinspectrodentevidence column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Creationdate column + Creator column + Editdate column + Editor column + Jurisdiction column +} + +func (c fieldseekerRodentlocationColumns) AsSlice() []column { + return []column{ + c.OrganizationID, c.Objectid, c.Locationname, c.Zone, c.Zone2, c.Habitat, c.Priority, c.Usetype, c.Active, c.Description, c.Accessdesc, c.Comments, c.Symbology, c.Externalid, c.Nextactiondatescheduled, c.Locationnumber, c.Lastinspectdate, c.Lastinspectspecies, c.Lastinspectaction, c.Lastinspectconditions, c.Lastinspectrodentevidence, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Jurisdiction, + } +} + +type fieldseekerRodentlocationIndexes struct { + RodentlocationPkey index +} + +func (i fieldseekerRodentlocationIndexes) AsSlice() []index { + return []index{ + i.RodentlocationPkey, + } +} + +type fieldseekerRodentlocationForeignKeys struct { + FieldseekerRodentlocationRodentlocationOrganizationIDFkey foreignKey +} + +func (f fieldseekerRodentlocationForeignKeys) AsSlice() []foreignKey { + return []foreignKey{ + f.FieldseekerRodentlocationRodentlocationOrganizationIDFkey, + } +} + +type fieldseekerRodentlocationUniques struct{} + +func (u fieldseekerRodentlocationUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerRodentlocationChecks struct{} + +func (c fieldseekerRodentlocationChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.samplecollection.bob.go b/db/dbinfo/fieldseeker.samplecollection.bob.go new file mode 100644 index 00000000..67de6dbc --- /dev/null +++ b/db/dbinfo/fieldseeker.samplecollection.bob.go @@ -0,0 +1,542 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerSamplecollections = Table[ + fieldseekerSamplecollectionColumns, + fieldseekerSamplecollectionIndexes, + fieldseekerSamplecollectionForeignKeys, + fieldseekerSamplecollectionUniques, + fieldseekerSamplecollectionChecks, +]{ + Schema: "fieldseeker", + Name: "samplecollection", + Columns: fieldseekerSamplecollectionColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.samplecollection_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + LocID: column{ + Name: "loc_id", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Startdatetime: column{ + Name: "startdatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Start", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Enddatetime: column{ + Name: "enddatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Finish", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sitecond: column{ + Name: "sitecond", + DBType: "fieldseeker.samplecollection_mosquitositecondition_enum", + Default: "NULL", + Comment: "Conditions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sampleid: column{ + Name: "sampleid", + DBType: "character varying", + Default: "NULL", + Comment: "Sample ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Survtech: column{ + Name: "survtech", + DBType: "character varying", + Default: "NULL", + Comment: "Surveillance Technician", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Datesent: column{ + Name: "datesent", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Sent", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Datetested: column{ + Name: "datetested", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Tested", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Testtech: column{ + Name: "testtech", + DBType: "character varying", + Default: "NULL", + Comment: "Test Technician", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Processed: column{ + Name: "processed", + DBType: "fieldseeker.samplecollection_notinuit_f_enum", + Default: "NULL", + Comment: "Processed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sampletype: column{ + Name: "sampletype", + DBType: "fieldseeker.samplecollection_mosquitosampletype_enum", + Default: "NULL", + Comment: "Sample Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Samplecond: column{ + Name: "samplecond", + DBType: "fieldseeker.samplecollection_mosquitosamplecondition_enum", + Default: "NULL", + Comment: "Sample Condition", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Species: column{ + Name: "species", + DBType: "fieldseeker.samplecollection_mosquitosamplespecies_enum", + Default: "NULL", + Comment: "Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sex: column{ + Name: "sex", + DBType: "fieldseeker.samplecollection_notinuisex_enum", + Default: "NULL", + Comment: "Sex", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Avetemp: column{ + Name: "avetemp", + DBType: "double precision", + Default: "NULL", + Comment: "Average Temperature", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Windspeed: column{ + Name: "windspeed", + DBType: "double precision", + Default: "NULL", + Comment: "Wind Speed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Winddir: column{ + Name: "winddir", + DBType: "fieldseeker.samplecollection_notinuiwinddirection_enum", + Default: "NULL", + Comment: "Wind Direction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Raingauge: column{ + Name: "raingauge", + DBType: "double precision", + Default: "NULL", + Comment: "Rain Gauge", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Activity: column{ + Name: "activity", + DBType: "fieldseeker.samplecollection_mosquitoactivity_enum", + Default: "NULL", + Comment: "Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Testmethod: column{ + Name: "testmethod", + DBType: "fieldseeker.samplecollection_mosquitotestmethod_enum", + Default: "NULL", + Comment: "Test Method", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Diseasetested: column{ + Name: "diseasetested", + DBType: "fieldseeker.samplecollection_mosquitodisease_enum", + Default: "NULL", + Comment: "Disease Tested", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Diseasepos: column{ + Name: "diseasepos", + DBType: "fieldseeker.samplecollection_mosquitodisease_enum", + Default: "NULL", + Comment: "Disease Positive", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewed: column{ + Name: "reviewed", + DBType: "fieldseeker.samplecollection_notinuit_f_enum", + Default: "NULL", + Comment: "Reviewed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewedby: column{ + Name: "reviewedby", + DBType: "character varying", + Default: "NULL", + Comment: "Reviewed By", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Revieweddate: column{ + Name: "revieweddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Reviewed Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationname: column{ + Name: "locationname", + DBType: "character varying", + Default: "NULL", + Comment: "Location Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Recordstatus: column{ + Name: "recordstatus", + DBType: "smallint", + Default: "NULL", + Comment: "RecordStatus", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lab: column{ + Name: "lab", + DBType: "fieldseeker.samplecollection_mosquitolabname_enum", + Default: "NULL", + Comment: "Lab", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fieldtech: column{ + Name: "fieldtech", + DBType: "character varying", + Default: "NULL", + Comment: "Field Tech", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Flockid: column{ + Name: "flockid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Samplecount: column{ + Name: "samplecount", + DBType: "smallint", + Default: "NULL", + Comment: "Sample Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Chickenid: column{ + Name: "chickenid", + DBType: "uuid", + Default: "NULL", + Comment: "ChickenID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Gatewaysync: column{ + Name: "gatewaysync", + DBType: "smallint", + Default: "NULL", + Comment: "Gateway Sync", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerSamplecollectionIndexes{ + SamplecollectionPkey: index{ + Type: "btree", + Name: "samplecollection_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "samplecollection_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerSamplecollectionColumns struct { + Objectid column + LocID column + Startdatetime column + Enddatetime column + Sitecond column + Sampleid column + Survtech column + Datesent column + Datetested column + Testtech column + Comments column + Processed column + Sampletype column + Samplecond column + Species column + Sex column + Avetemp column + Windspeed column + Winddir column + Raingauge column + Activity column + Testmethod column + Diseasetested column + Diseasepos column + Reviewed column + Reviewedby column + Revieweddate column + Locationname column + Zone column + Recordstatus column + Zone2 column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Lab column + Fieldtech column + Flockid column + Samplecount column + Chickenid column + Gatewaysync column + Creationdate column + Creator column + Editdate column + Editor column +} + +func (c fieldseekerSamplecollectionColumns) AsSlice() []column { + return []column{ + c.Objectid, c.LocID, c.Startdatetime, c.Enddatetime, c.Sitecond, c.Sampleid, c.Survtech, c.Datesent, c.Datetested, c.Testtech, c.Comments, c.Processed, c.Sampletype, c.Samplecond, c.Species, c.Sex, c.Avetemp, c.Windspeed, c.Winddir, c.Raingauge, c.Activity, c.Testmethod, c.Diseasetested, c.Diseasepos, c.Reviewed, c.Reviewedby, c.Revieweddate, c.Locationname, c.Zone, c.Recordstatus, c.Zone2, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Lab, c.Fieldtech, c.Flockid, c.Samplecount, c.Chickenid, c.Gatewaysync, c.Creationdate, c.Creator, c.Editdate, c.Editor, + } +} + +type fieldseekerSamplecollectionIndexes struct { + SamplecollectionPkey index +} + +func (i fieldseekerSamplecollectionIndexes) AsSlice() []index { + return []index{ + i.SamplecollectionPkey, + } +} + +type fieldseekerSamplecollectionForeignKeys struct{} + +func (f fieldseekerSamplecollectionForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerSamplecollectionUniques struct{} + +func (u fieldseekerSamplecollectionUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerSamplecollectionChecks struct{} + +func (c fieldseekerSamplecollectionChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.samplelocation.bob.go b/db/dbinfo/fieldseeker.samplelocation.bob.go new file mode 100644 index 00000000..44c878b3 --- /dev/null +++ b/db/dbinfo/fieldseeker.samplelocation.bob.go @@ -0,0 +1,322 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerSamplelocations = Table[ + fieldseekerSamplelocationColumns, + fieldseekerSamplelocationIndexes, + fieldseekerSamplelocationForeignKeys, + fieldseekerSamplelocationUniques, + fieldseekerSamplelocationChecks, +]{ + Schema: "fieldseeker", + Name: "samplelocation", + Columns: fieldseekerSamplelocationColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.samplelocation_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Name: column{ + Name: "name", + DBType: "character varying", + Default: "NULL", + Comment: "Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habitat: column{ + Name: "habitat", + DBType: "fieldseeker.samplelocation_locationhabitattype_enum", + Default: "NULL", + Comment: "Habitat", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Priority: column{ + Name: "priority", + DBType: "fieldseeker.samplelocation_locationpriority_enum", + Default: "NULL", + Comment: "Priority", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Usetype: column{ + Name: "usetype", + DBType: "fieldseeker.samplelocation_samplelocationusetype_enum", + Default: "NULL", + Comment: "Use Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Active: column{ + Name: "active", + DBType: "fieldseeker.samplelocation_notinuit_f_enum", + Default: "NULL", + Comment: "Active", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Description: column{ + Name: "description", + DBType: "character varying", + Default: "NULL", + Comment: "Description", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Accessdesc: column{ + Name: "accessdesc", + DBType: "character varying", + Default: "NULL", + Comment: "Access Description", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Externalid: column{ + Name: "externalid", + DBType: "character varying", + Default: "NULL", + Comment: "External ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Nextactiondatescheduled: column{ + Name: "nextactiondatescheduled", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Next Scheduled Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationnumber: column{ + Name: "locationnumber", + DBType: "integer", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Gatewaysync: column{ + Name: "gatewaysync", + DBType: "smallint", + Default: "NULL", + Comment: "Gateway Sync", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerSamplelocationIndexes{ + SamplelocationPkey: index{ + Type: "btree", + Name: "samplelocation_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "samplelocation_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerSamplelocationColumns struct { + Objectid column + Name column + Zone column + Habitat column + Priority column + Usetype column + Active column + Description column + Accessdesc column + Comments column + Externalid column + Nextactiondatescheduled column + Zone2 column + Locationnumber column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Gatewaysync column + Creationdate column + Creator column + Editdate column + Editor column +} + +func (c fieldseekerSamplelocationColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Name, c.Zone, c.Habitat, c.Priority, c.Usetype, c.Active, c.Description, c.Accessdesc, c.Comments, c.Externalid, c.Nextactiondatescheduled, c.Zone2, c.Locationnumber, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Gatewaysync, c.Creationdate, c.Creator, c.Editdate, c.Editor, + } +} + +type fieldseekerSamplelocationIndexes struct { + SamplelocationPkey index +} + +func (i fieldseekerSamplelocationIndexes) AsSlice() []index { + return []index{ + i.SamplelocationPkey, + } +} + +type fieldseekerSamplelocationForeignKeys struct{} + +func (f fieldseekerSamplelocationForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerSamplelocationUniques struct{} + +func (u fieldseekerSamplelocationUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerSamplelocationChecks struct{} + +func (c fieldseekerSamplelocationChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.servicerequest.bob.go b/db/dbinfo/fieldseeker.servicerequest.bob.go new file mode 100644 index 00000000..f3db45aa --- /dev/null +++ b/db/dbinfo/fieldseeker.servicerequest.bob.go @@ -0,0 +1,942 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerServicerequests = Table[ + fieldseekerServicerequestColumns, + fieldseekerServicerequestIndexes, + fieldseekerServicerequestForeignKeys, + fieldseekerServicerequestUniques, + fieldseekerServicerequestChecks, +]{ + Schema: "fieldseeker", + Name: "servicerequest", + Columns: fieldseekerServicerequestColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.servicerequest_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Recdatetime: column{ + Name: "recdatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Received", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Source: column{ + Name: "source", + DBType: "fieldseeker.servicerequest_servicerequestsource_enum", + Default: "NULL", + Comment: "Source", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Entrytech: column{ + Name: "entrytech", + DBType: "character varying", + Default: "NULL", + Comment: "Entered By", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Priority: column{ + Name: "priority", + DBType: "fieldseeker.servicerequest_servicerequestpriority_enum", + Default: "NULL", + Comment: "Priority", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Supervisor: column{ + Name: "supervisor", + DBType: "fieldseeker.servicerequest_servicerequest_supervisor_eba07b90_c885_4fe6_808", + Default: "NULL", + Comment: "Supervisor", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Assignedtech: column{ + Name: "assignedtech", + DBType: "fieldseeker.servicerequest_servicerequest_assignedtech_71d0d685_868f_4b7a_8", + Default: "NULL", + Comment: "Assigned To", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Status: column{ + Name: "status", + DBType: "fieldseeker.servicerequest_servicerequeststatus_enum", + Default: "NULL", + Comment: "Status", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clranon: column{ + Name: "clranon", + DBType: "fieldseeker.servicerequest_notinuit_f_enum", + Default: "NULL", + Comment: "Anonymous Caller", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clrfname: column{ + Name: "clrfname", + DBType: "character varying", + Default: "NULL", + Comment: "Caller Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clrphone1: column{ + Name: "clrphone1", + DBType: "character varying", + Default: "NULL", + Comment: "Caller Phone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clrphone2: column{ + Name: "clrphone2", + DBType: "character varying", + Default: "NULL", + Comment: "Caller Alternate Phone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clremail: column{ + Name: "clremail", + DBType: "character varying", + Default: "NULL", + Comment: "Caller Email", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clrcompany: column{ + Name: "clrcompany", + DBType: "character varying", + Default: "NULL", + Comment: "Caller Company", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clraddr1: column{ + Name: "clraddr1", + DBType: "character varying", + Default: "NULL", + Comment: "Caller Address", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clraddr2: column{ + Name: "clraddr2", + DBType: "character varying", + Default: "NULL", + Comment: "Caller Address 2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clrcity: column{ + Name: "clrcity", + DBType: "character varying", + Default: "NULL", + Comment: "Caller City", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clrstate: column{ + Name: "clrstate", + DBType: "fieldseeker.servicerequest_servicerequestregion_enum", + Default: "NULL", + Comment: "Caller State", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clrzip: column{ + Name: "clrzip", + DBType: "character varying", + Default: "NULL", + Comment: "Caller ZIP", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clrother: column{ + Name: "clrother", + DBType: "character varying", + Default: "NULL", + Comment: "Caller Other", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Clrcontpref: column{ + Name: "clrcontpref", + DBType: "fieldseeker.servicerequest_servicerequestcontactpreferences_enum", + Default: "NULL", + Comment: "Caller Contact Preference", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqcompany: column{ + Name: "reqcompany", + DBType: "character varying", + Default: "NULL", + Comment: "Request Company", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqaddr1: column{ + Name: "reqaddr1", + DBType: "character varying", + Default: "NULL", + Comment: "Request Address", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqaddr2: column{ + Name: "reqaddr2", + DBType: "character varying", + Default: "NULL", + Comment: "Request Address 2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqcity: column{ + Name: "reqcity", + DBType: "character varying", + Default: "NULL", + Comment: "Request City", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqstate: column{ + Name: "reqstate", + DBType: "fieldseeker.servicerequest_servicerequestregion_enum", + Default: "NULL", + Comment: "Request State", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqzip: column{ + Name: "reqzip", + DBType: "character varying", + Default: "NULL", + Comment: "Request ZIP", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqcrossst: column{ + Name: "reqcrossst", + DBType: "character varying", + Default: "NULL", + Comment: "Request Cross Street", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqsubdiv: column{ + Name: "reqsubdiv", + DBType: "character varying", + Default: "NULL", + Comment: "Request Subdivision", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqmapgrid: column{ + Name: "reqmapgrid", + DBType: "character varying", + Default: "NULL", + Comment: "Request Map Grid", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqpermission: column{ + Name: "reqpermission", + DBType: "fieldseeker.servicerequest_notinuit_f_enum", + Default: "NULL", + Comment: "Permission to Enter", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqtarget: column{ + Name: "reqtarget", + DBType: "fieldseeker.servicerequest_servicerequesttarget_enum", + Default: "NULL", + Comment: "Request Target", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqdescr: column{ + Name: "reqdescr", + DBType: "character varying", + Default: "NULL", + Comment: "Request Description", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqnotesfortech: column{ + Name: "reqnotesfortech", + DBType: "character varying", + Default: "NULL", + Comment: "Notes for Field Technician", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqnotesforcust: column{ + Name: "reqnotesforcust", + DBType: "character varying", + Default: "NULL", + Comment: "Notes for Customer", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqfldnotes: column{ + Name: "reqfldnotes", + DBType: "character varying", + Default: "NULL", + Comment: "Request Field Notes", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reqprogramactions: column{ + Name: "reqprogramactions", + DBType: "character varying", + Default: "NULL", + Comment: "Request Program Actions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Datetimeclosed: column{ + Name: "datetimeclosed", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Closed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Techclosed: column{ + Name: "techclosed", + DBType: "character varying", + Default: "NULL", + Comment: "Closed By", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + SRNumber: column{ + Name: "sr_number", + DBType: "integer", + Default: "NULL", + Comment: "SR#", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewed: column{ + Name: "reviewed", + DBType: "fieldseeker.servicerequest_notinuit_f_enum", + Default: "NULL", + Comment: "Reviewed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewedby: column{ + Name: "reviewedby", + DBType: "character varying", + Default: "NULL", + Comment: "Reviewed By", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Revieweddate: column{ + Name: "revieweddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Reviewed Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Accepted: column{ + Name: "accepted", + DBType: "fieldseeker.servicerequest_notinuit_f_enum", + Default: "NULL", + Comment: "Accepted", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Accepteddate: column{ + Name: "accepteddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Accepted Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Rejectedby: column{ + Name: "rejectedby", + DBType: "character varying", + Default: "NULL", + Comment: "Rejected By", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Rejecteddate: column{ + Name: "rejecteddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Rejected Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Rejectedreason: column{ + Name: "rejectedreason", + DBType: "fieldseeker.servicerequest_servicerequestrejectedreason_enum", + Default: "NULL", + Comment: "Rejected Reason", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Duedate: column{ + Name: "duedate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Due Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Acceptedby: column{ + Name: "acceptedby", + DBType: "character varying", + Default: "NULL", + Comment: "Accepted By", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Estcompletedate: column{ + Name: "estcompletedate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Estimated Completion Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Nextaction: column{ + Name: "nextaction", + DBType: "fieldseeker.servicerequest_servicerequestnextaction_enum", + Default: "NULL", + Comment: "Next Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Recordstatus: column{ + Name: "recordstatus", + DBType: "smallint", + Default: "NULL", + Comment: "Record Status", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Firstresponsedate: column{ + Name: "firstresponsedate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "First Response Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Responsedaycount: column{ + Name: "responsedaycount", + DBType: "smallint", + Default: "NULL", + Comment: "Response Day Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Allowed: column{ + Name: "allowed", + DBType: "character varying", + Default: "NULL", + Comment: "Verify Correct Location", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Xvalue: column{ + Name: "xvalue", + DBType: "character varying", + Default: "NULL", + Comment: "Xvalue", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Yvalue: column{ + Name: "yvalue", + DBType: "character varying", + Default: "NULL", + Comment: "Yvalue", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Validx: column{ + Name: "validx", + DBType: "character varying", + Default: "NULL", + Comment: "ValidX", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Validy: column{ + Name: "validy", + DBType: "character varying", + Default: "NULL", + Comment: "ValidY", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Externalid: column{ + Name: "externalid", + DBType: "character varying", + Default: "NULL", + Comment: "External ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Externalerror: column{ + Name: "externalerror", + DBType: "character varying", + Default: "NULL", + Comment: "External Error", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Pointlocid: column{ + Name: "pointlocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Notified: column{ + Name: "notified", + DBType: "smallint", + Default: "NULL", + Comment: "Notified", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Notifieddate: column{ + Name: "notifieddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Notified Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Scheduled: column{ + Name: "scheduled", + DBType: "smallint", + Default: "NULL", + Comment: "Scheduled", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Scheduleddate: column{ + Name: "scheduleddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Scheduled Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Dog: column{ + Name: "dog", + DBType: "fieldseeker.servicerequest_servicerequest_dog_2b95ec97_1286_4fcd_88f4_f0e31", + Default: "NULL", + Comment: "Dog", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + SchedulePeriod: column{ + Name: "schedule_period", + DBType: "fieldseeker.servicerequest_servicerequest_schedule_period_3f40c046_afd1_4ab", + Default: "NULL", + Comment: "Schedule Period", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ScheduleNotes: column{ + Name: "schedule_notes", + DBType: "character varying", + Default: "NULL", + Comment: "Schedule Notes", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Spanish: column{ + Name: "spanish", + DBType: "fieldseeker.servicerequest_servicerequest_spanish_aaa3dc66_9f9a_4527_8ecd_c", + Default: "NULL", + Comment: "Prefer speaking Spanish", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Issuesreported: column{ + Name: "issuesreported", + DBType: "fieldseeker.servicerequest_servicerequestissues_enum", + Default: "NULL", + Comment: "Issues Reported", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Jurisdiction: column{ + Name: "jurisdiction", + DBType: "character varying", + Default: "NULL", + Comment: "Jurisdiction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Notificationtimestamp: column{ + Name: "notificationtimestamp", + DBType: "character varying", + Default: "NULL", + Comment: "Notification Timestamp", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerServicerequestIndexes{ + ServicerequestPkey: index{ + Type: "btree", + Name: "servicerequest_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "servicerequest_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerServicerequestColumns struct { + Objectid column + Recdatetime column + Source column + Entrytech column + Priority column + Supervisor column + Assignedtech column + Status column + Clranon column + Clrfname column + Clrphone1 column + Clrphone2 column + Clremail column + Clrcompany column + Clraddr1 column + Clraddr2 column + Clrcity column + Clrstate column + Clrzip column + Clrother column + Clrcontpref column + Reqcompany column + Reqaddr1 column + Reqaddr2 column + Reqcity column + Reqstate column + Reqzip column + Reqcrossst column + Reqsubdiv column + Reqmapgrid column + Reqpermission column + Reqtarget column + Reqdescr column + Reqnotesfortech column + Reqnotesforcust column + Reqfldnotes column + Reqprogramactions column + Datetimeclosed column + Techclosed column + SRNumber column + Reviewed column + Reviewedby column + Revieweddate column + Accepted column + Accepteddate column + Rejectedby column + Rejecteddate column + Rejectedreason column + Duedate column + Acceptedby column + Comments column + Estcompletedate column + Nextaction column + Recordstatus column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Firstresponsedate column + Responsedaycount column + Allowed column + Xvalue column + Yvalue column + Validx column + Validy column + Externalid column + Externalerror column + Pointlocid column + Notified column + Notifieddate column + Scheduled column + Scheduleddate column + Dog column + SchedulePeriod column + ScheduleNotes column + Spanish column + Creationdate column + Creator column + Editdate column + Editor column + Issuesreported column + Jurisdiction column + Notificationtimestamp column + Zone column + Zone2 column +} + +func (c fieldseekerServicerequestColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Recdatetime, c.Source, c.Entrytech, c.Priority, c.Supervisor, c.Assignedtech, c.Status, c.Clranon, c.Clrfname, c.Clrphone1, c.Clrphone2, c.Clremail, c.Clrcompany, c.Clraddr1, c.Clraddr2, c.Clrcity, c.Clrstate, c.Clrzip, c.Clrother, c.Clrcontpref, c.Reqcompany, c.Reqaddr1, c.Reqaddr2, c.Reqcity, c.Reqstate, c.Reqzip, c.Reqcrossst, c.Reqsubdiv, c.Reqmapgrid, c.Reqpermission, c.Reqtarget, c.Reqdescr, c.Reqnotesfortech, c.Reqnotesforcust, c.Reqfldnotes, c.Reqprogramactions, c.Datetimeclosed, c.Techclosed, c.SRNumber, c.Reviewed, c.Reviewedby, c.Revieweddate, c.Accepted, c.Accepteddate, c.Rejectedby, c.Rejecteddate, c.Rejectedreason, c.Duedate, c.Acceptedby, c.Comments, c.Estcompletedate, c.Nextaction, c.Recordstatus, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Firstresponsedate, c.Responsedaycount, c.Allowed, c.Xvalue, c.Yvalue, c.Validx, c.Validy, c.Externalid, c.Externalerror, c.Pointlocid, c.Notified, c.Notifieddate, c.Scheduled, c.Scheduleddate, c.Dog, c.SchedulePeriod, c.ScheduleNotes, c.Spanish, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Issuesreported, c.Jurisdiction, c.Notificationtimestamp, c.Zone, c.Zone2, + } +} + +type fieldseekerServicerequestIndexes struct { + ServicerequestPkey index +} + +func (i fieldseekerServicerequestIndexes) AsSlice() []index { + return []index{ + i.ServicerequestPkey, + } +} + +type fieldseekerServicerequestForeignKeys struct{} + +func (f fieldseekerServicerequestForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerServicerequestUniques struct{} + +func (u fieldseekerServicerequestUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerServicerequestChecks struct{} + +func (c fieldseekerServicerequestChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.speciesabundance.bob.go b/db/dbinfo/fieldseeker.speciesabundance.bob.go new file mode 100644 index 00000000..c492caac --- /dev/null +++ b/db/dbinfo/fieldseeker.speciesabundance.bob.go @@ -0,0 +1,372 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerSpeciesabundances = Table[ + fieldseekerSpeciesabundanceColumns, + fieldseekerSpeciesabundanceIndexes, + fieldseekerSpeciesabundanceForeignKeys, + fieldseekerSpeciesabundanceUniques, + fieldseekerSpeciesabundanceChecks, +]{ + Schema: "fieldseeker", + Name: "speciesabundance", + Columns: fieldseekerSpeciesabundanceColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.speciesabundance_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + TrapdataID: column{ + Name: "trapdata_id", + DBType: "uuid", + Default: "NULL", + Comment: "Trap Data ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Species: column{ + Name: "species", + DBType: "character varying", + Default: "NULL", + Comment: "Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Males: column{ + Name: "males", + DBType: "smallint", + Default: "NULL", + Comment: "Males", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Unknown: column{ + Name: "unknown", + DBType: "smallint", + Default: "NULL", + Comment: "Unknown", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Bloodedfem: column{ + Name: "bloodedfem", + DBType: "smallint", + Default: "NULL", + Comment: "Blooded Females", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Gravidfem: column{ + Name: "gravidfem", + DBType: "smallint", + Default: "NULL", + Comment: "Gravid Females", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Larvae: column{ + Name: "larvae", + DBType: "smallint", + Default: "NULL", + Comment: "Larvae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Poolstogen: column{ + Name: "poolstogen", + DBType: "smallint", + Default: "NULL", + Comment: "Pools to Generate", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Processed: column{ + Name: "processed", + DBType: "fieldseeker.speciesabundance_notinuit_f_enum", + Default: "NULL", + Comment: "Processed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Pupae: column{ + Name: "pupae", + DBType: "smallint", + Default: "NULL", + Comment: "Pupae", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Eggs: column{ + Name: "eggs", + DBType: "smallint", + Default: "NULL", + Comment: "Eggs", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Females: column{ + Name: "females", + DBType: "integer", + Default: "NULL", + Comment: "Females", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Total: column{ + Name: "total", + DBType: "integer", + Default: "NULL", + Comment: "Total Adults", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Yearweek: column{ + Name: "yearweek", + DBType: "integer", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalzscore: column{ + Name: "globalzscore", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + R7score: column{ + Name: "r7score", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + R8score: column{ + Name: "r8score", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + H3R7: column{ + Name: "h3r7", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + H3R8: column{ + Name: "h3r8", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerSpeciesabundanceIndexes{ + SpeciesabundancePkey: index{ + Type: "btree", + Name: "speciesabundance_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "speciesabundance_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerSpeciesabundanceColumns struct { + Objectid column + TrapdataID column + Species column + Males column + Unknown column + Bloodedfem column + Gravidfem column + Larvae column + Poolstogen column + Processed column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Pupae column + Eggs column + Females column + Total column + Creationdate column + Creator column + Editdate column + Editor column + Yearweek column + Globalzscore column + R7score column + R8score column + H3R7 column + H3R8 column +} + +func (c fieldseekerSpeciesabundanceColumns) AsSlice() []column { + return []column{ + c.Objectid, c.TrapdataID, c.Species, c.Males, c.Unknown, c.Bloodedfem, c.Gravidfem, c.Larvae, c.Poolstogen, c.Processed, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Pupae, c.Eggs, c.Females, c.Total, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Yearweek, c.Globalzscore, c.R7score, c.R8score, c.H3R7, c.H3R8, + } +} + +type fieldseekerSpeciesabundanceIndexes struct { + SpeciesabundancePkey index +} + +func (i fieldseekerSpeciesabundanceIndexes) AsSlice() []index { + return []index{ + i.SpeciesabundancePkey, + } +} + +type fieldseekerSpeciesabundanceForeignKeys struct{} + +func (f fieldseekerSpeciesabundanceForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerSpeciesabundanceUniques struct{} + +func (u fieldseekerSpeciesabundanceUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerSpeciesabundanceChecks struct{} + +func (c fieldseekerSpeciesabundanceChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.stormdrain.bob.go b/db/dbinfo/fieldseeker.stormdrain.bob.go new file mode 100644 index 00000000..1ea5ae48 --- /dev/null +++ b/db/dbinfo/fieldseeker.stormdrain.bob.go @@ -0,0 +1,272 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerStormdrains = Table[ + fieldseekerStormdrainColumns, + fieldseekerStormdrainIndexes, + fieldseekerStormdrainForeignKeys, + fieldseekerStormdrainUniques, + fieldseekerStormdrainChecks, +]{ + Schema: "fieldseeker", + Name: "stormdrain", + Columns: fieldseekerStormdrainColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.stormdrain_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Nexttreatmentdate: column{ + Name: "nexttreatmentdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lasttreatdate: column{ + Name: "lasttreatdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lastaction: column{ + Name: "lastaction", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Symbology: column{ + Name: "symbology", + DBType: "fieldseeker.stormdrain_stormdrainsymbology_enum", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Laststatus: column{ + Name: "laststatus", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Type: column{ + Name: "type", + DBType: "character varying", + Default: "NULL", + Comment: "Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Jurisdiction: column{ + Name: "jurisdiction", + DBType: "character varying", + Default: "NULL", + Comment: "Jurisdiction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerStormdrainIndexes{ + StormdrainPkey: index{ + Type: "btree", + Name: "stormdrain_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "stormdrain_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerStormdrainColumns struct { + Objectid column + Nexttreatmentdate column + Lasttreatdate column + Lastaction column + Symbology column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Laststatus column + Zone column + Zone2 column + Creationdate column + Creator column + Editdate column + Editor column + Type column + Jurisdiction column +} + +func (c fieldseekerStormdrainColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Nexttreatmentdate, c.Lasttreatdate, c.Lastaction, c.Symbology, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Laststatus, c.Zone, c.Zone2, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Type, c.Jurisdiction, + } +} + +type fieldseekerStormdrainIndexes struct { + StormdrainPkey index +} + +func (i fieldseekerStormdrainIndexes) AsSlice() []index { + return []index{ + i.StormdrainPkey, + } +} + +type fieldseekerStormdrainForeignKeys struct{} + +func (f fieldseekerStormdrainForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerStormdrainUniques struct{} + +func (u fieldseekerStormdrainUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerStormdrainChecks struct{} + +func (c fieldseekerStormdrainChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.timecard.bob.go b/db/dbinfo/fieldseeker.timecard.bob.go new file mode 100644 index 00000000..dd44e5c3 --- /dev/null +++ b/db/dbinfo/fieldseeker.timecard.bob.go @@ -0,0 +1,362 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerTimecards = Table[ + fieldseekerTimecardColumns, + fieldseekerTimecardIndexes, + fieldseekerTimecardForeignKeys, + fieldseekerTimecardUniques, + fieldseekerTimecardChecks, +]{ + Schema: "fieldseeker", + Name: "timecard", + Columns: fieldseekerTimecardColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.timecard_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Activity: column{ + Name: "activity", + DBType: "fieldseeker.timecard_timecard_activity_451e67260c084304a35457170dc13366_enu", + Default: "NULL", + Comment: "Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Startdatetime: column{ + Name: "startdatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Start", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Enddatetime: column{ + Name: "enddatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Finish", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Externalid: column{ + Name: "externalid", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Equiptype: column{ + Name: "equiptype", + DBType: "fieldseeker.timecard_timecardequipmenttype_enum", + Default: "NULL", + Comment: "Equipment Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationname: column{ + Name: "locationname", + DBType: "character varying", + Default: "NULL", + Comment: "Location Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Linelocid: column{ + Name: "linelocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Pointlocid: column{ + Name: "pointlocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Polygonlocid: column{ + Name: "polygonlocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lclocid: column{ + Name: "lclocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Samplelocid: column{ + Name: "samplelocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Srid: column{ + Name: "srid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Traplocid: column{ + Name: "traplocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fieldtech: column{ + Name: "fieldtech", + DBType: "character varying", + Default: "NULL", + Comment: "Field Tech", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Rodentlocid: column{ + Name: "rodentlocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerTimecardIndexes{ + TimecardPkey: index{ + Type: "btree", + Name: "timecard_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "timecard_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerTimecardColumns struct { + Objectid column + Activity column + Startdatetime column + Enddatetime column + Comments column + Externalid column + Equiptype column + Locationname column + Zone column + Zone2 column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Linelocid column + Pointlocid column + Polygonlocid column + Lclocid column + Samplelocid column + Srid column + Traplocid column + Fieldtech column + Creationdate column + Creator column + Editdate column + Editor column + Rodentlocid column +} + +func (c fieldseekerTimecardColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Activity, c.Startdatetime, c.Enddatetime, c.Comments, c.Externalid, c.Equiptype, c.Locationname, c.Zone, c.Zone2, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Linelocid, c.Pointlocid, c.Polygonlocid, c.Lclocid, c.Samplelocid, c.Srid, c.Traplocid, c.Fieldtech, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Rodentlocid, + } +} + +type fieldseekerTimecardIndexes struct { + TimecardPkey index +} + +func (i fieldseekerTimecardIndexes) AsSlice() []index { + return []index{ + i.TimecardPkey, + } +} + +type fieldseekerTimecardForeignKeys struct{} + +func (f fieldseekerTimecardForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerTimecardUniques struct{} + +func (u fieldseekerTimecardUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerTimecardChecks struct{} + +func (c fieldseekerTimecardChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.tracklog.bob.go b/db/dbinfo/fieldseeker.tracklog.bob.go new file mode 100644 index 00000000..9cf01dd3 --- /dev/null +++ b/db/dbinfo/fieldseeker.tracklog.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerTracklogs = Table[ + fieldseekerTracklogColumns, + fieldseekerTracklogIndexes, + fieldseekerTracklogForeignKeys, + fieldseekerTracklogUniques, + fieldseekerTracklogChecks, +]{ + Schema: "fieldseeker", + Name: "tracklog", + Columns: fieldseekerTracklogColumns{}, + + Comment: "", +} + +type fieldseekerTracklogColumns struct{} + +func (c fieldseekerTracklogColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerTracklogIndexes struct{} + +func (i fieldseekerTracklogIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerTracklogForeignKeys struct{} + +func (f fieldseekerTracklogForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerTracklogUniques struct{} + +func (u fieldseekerTracklogUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerTracklogChecks struct{} + +func (c fieldseekerTracklogChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.trapdata.bob.go b/db/dbinfo/fieldseeker.trapdata.bob.go new file mode 100644 index 00000000..54e45fac --- /dev/null +++ b/db/dbinfo/fieldseeker.trapdata.bob.go @@ -0,0 +1,502 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerTrapdata = Table[ + fieldseekerTrapdatumColumns, + fieldseekerTrapdatumIndexes, + fieldseekerTrapdatumForeignKeys, + fieldseekerTrapdatumUniques, + fieldseekerTrapdatumChecks, +]{ + Schema: "fieldseeker", + Name: "trapdata", + Columns: fieldseekerTrapdatumColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.trapdata_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Traptype: column{ + Name: "traptype", + DBType: "fieldseeker.trapdata_mosquitotraptype_enum", + Default: "NULL", + Comment: "Trap Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Trapactivitytype: column{ + Name: "trapactivitytype", + DBType: "fieldseeker.trapdata_notinuitrapactivitytype_enum", + Default: "NULL", + Comment: "Trap Activity Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Startdatetime: column{ + Name: "startdatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Start", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Enddatetime: column{ + Name: "enddatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Finish", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Idbytech: column{ + Name: "idbytech", + DBType: "character varying", + Default: "NULL", + Comment: "Tech Identifying Species in Lab", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sortbytech: column{ + Name: "sortbytech", + DBType: "character varying", + Default: "NULL", + Comment: "Tech Sorting Trap Results in Lab", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Processed: column{ + Name: "processed", + DBType: "fieldseeker.trapdata_notinuit_f_enum", + Default: "NULL", + Comment: "Processed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sitecond: column{ + Name: "sitecond", + DBType: "fieldseeker.trapdata_mosquitositecondition_enum", + Default: "NULL", + Comment: "Site Conditions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationname: column{ + Name: "locationname", + DBType: "character varying", + Default: "NULL", + Comment: "Location Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Recordstatus: column{ + Name: "recordstatus", + DBType: "smallint", + Default: "NULL", + Comment: "RecordStatus", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewed: column{ + Name: "reviewed", + DBType: "fieldseeker.trapdata_notinuit_f_enum", + Default: "NULL", + Comment: "Reviewed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewedby: column{ + Name: "reviewedby", + DBType: "character varying", + Default: "NULL", + Comment: "Reviewed By", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Revieweddate: column{ + Name: "revieweddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Reviewed Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Trapcondition: column{ + Name: "trapcondition", + DBType: "fieldseeker.trapdata_mosquitotrapcondition_enum", + Default: "NULL", + Comment: "Trap Condition", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Trapnights: column{ + Name: "trapnights", + DBType: "smallint", + Default: "NULL", + Comment: "Trap Nights", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Srid: column{ + Name: "srid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fieldtech: column{ + Name: "fieldtech", + DBType: "character varying", + Default: "NULL", + Comment: "Field Tech", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Gatewaysync: column{ + Name: "gatewaysync", + DBType: "smallint", + Default: "NULL", + Comment: "Gateway Sync", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LocID: column{ + Name: "loc_id", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Voltage: column{ + Name: "voltage", + DBType: "double precision", + Default: "NULL", + Comment: "Voltage", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Winddir: column{ + Name: "winddir", + DBType: "fieldseeker.trapdata_trapdata_winddir_c1a31e05_d0b9_4b22_8800_be127bb3f166_", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Windspeed: column{ + Name: "windspeed", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Avetemp: column{ + Name: "avetemp", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Raingauge: column{ + Name: "raingauge", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LR: column{ + Name: "lr", + DBType: "smallint", + Default: "NULL", + Comment: "Landing Rate", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Field: column{ + Name: "field", + DBType: "integer", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Vectorsurvtrapdataid: column{ + Name: "vectorsurvtrapdataid", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Vectorsurvtraplocationid: column{ + Name: "vectorsurvtraplocationid", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Lure: column{ + Name: "lure", + DBType: "fieldseeker.trapdata_trapdata_lure_25fe542f_077f_4254_8681_76e8f436354b_enu", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerTrapdatumIndexes{ + TrapdataPkey: index{ + Type: "btree", + Name: "trapdata_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "trapdata_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerTrapdatumColumns struct { + Objectid column + Traptype column + Trapactivitytype column + Startdatetime column + Enddatetime column + Comments column + Idbytech column + Sortbytech column + Processed column + Sitecond column + Locationname column + Recordstatus column + Reviewed column + Reviewedby column + Revieweddate column + Trapcondition column + Trapnights column + Zone column + Zone2 column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Srid column + Fieldtech column + Gatewaysync column + LocID column + Voltage column + Winddir column + Windspeed column + Avetemp column + Raingauge column + LR column + Field column + Vectorsurvtrapdataid column + Vectorsurvtraplocationid column + Creationdate column + Creator column + Editdate column + Editor column + Lure column +} + +func (c fieldseekerTrapdatumColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Traptype, c.Trapactivitytype, c.Startdatetime, c.Enddatetime, c.Comments, c.Idbytech, c.Sortbytech, c.Processed, c.Sitecond, c.Locationname, c.Recordstatus, c.Reviewed, c.Reviewedby, c.Revieweddate, c.Trapcondition, c.Trapnights, c.Zone, c.Zone2, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Srid, c.Fieldtech, c.Gatewaysync, c.LocID, c.Voltage, c.Winddir, c.Windspeed, c.Avetemp, c.Raingauge, c.LR, c.Field, c.Vectorsurvtrapdataid, c.Vectorsurvtraplocationid, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Lure, + } +} + +type fieldseekerTrapdatumIndexes struct { + TrapdataPkey index +} + +func (i fieldseekerTrapdatumIndexes) AsSlice() []index { + return []index{ + i.TrapdataPkey, + } +} + +type fieldseekerTrapdatumForeignKeys struct{} + +func (f fieldseekerTrapdatumForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerTrapdatumUniques struct{} + +func (u fieldseekerTrapdatumUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerTrapdatumChecks struct{} + +func (c fieldseekerTrapdatumChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.traplocation.bob.go b/db/dbinfo/fieldseeker.traplocation.bob.go new file mode 100644 index 00000000..dfef8f49 --- /dev/null +++ b/db/dbinfo/fieldseeker.traplocation.bob.go @@ -0,0 +1,382 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerTraplocations = Table[ + fieldseekerTraplocationColumns, + fieldseekerTraplocationIndexes, + fieldseekerTraplocationForeignKeys, + fieldseekerTraplocationUniques, + fieldseekerTraplocationChecks, +]{ + Schema: "fieldseeker", + Name: "traplocation", + Columns: fieldseekerTraplocationColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.traplocation_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Name: column{ + Name: "name", + DBType: "character varying", + Default: "NULL", + Comment: "Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habitat: column{ + Name: "habitat", + DBType: "fieldseeker.traplocation_traplocation_habitat_5c349680f5ff40b1aeca88c17993e", + Default: "NULL", + Comment: "Habitat", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Priority: column{ + Name: "priority", + DBType: "fieldseeker.traplocation_traplocation_priority_680fb011063b41d59f39271c959b", + Default: "NULL", + Comment: "Priority", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Usetype: column{ + Name: "usetype", + DBType: "fieldseeker.traplocation_traplocation_usetype_5e0eff9231fb404c98cc53c1d49a2", + Default: "NULL", + Comment: "Use Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Active: column{ + Name: "active", + DBType: "fieldseeker.traplocation_notinuit_f_enum", + Default: "NULL", + Comment: "Active", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Description: column{ + Name: "description", + DBType: "character varying", + Default: "NULL", + Comment: "Description", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Accessdesc: column{ + Name: "accessdesc", + DBType: "fieldseeker.traplocation_traplocation_accessdesc_154cbd10_4524_4e3a_8ca0_f0", + Default: "NULL", + Comment: "Access Description", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Externalid: column{ + Name: "externalid", + DBType: "character varying", + Default: "NULL", + Comment: "External ID", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Nextactiondatescheduled: column{ + Name: "nextactiondatescheduled", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Next Scheduled Action", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationnumber: column{ + Name: "locationnumber", + DBType: "integer", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Gatewaysync: column{ + Name: "gatewaysync", + DBType: "smallint", + Default: "NULL", + Comment: "Gateway Sync", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Route: column{ + Name: "route", + DBType: "integer", + Default: "NULL", + Comment: "Route", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + SetDow: column{ + Name: "set_dow", + DBType: "integer", + Default: "NULL", + Comment: "Set Day of Week", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + RouteOrder: column{ + Name: "route_order", + DBType: "integer", + Default: "NULL", + Comment: "Route order", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Vectorsurvsiteid: column{ + Name: "vectorsurvsiteid", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + H3R7: column{ + Name: "h3r7", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + H3R8: column{ + Name: "h3r8", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerTraplocationIndexes{ + TraplocationPkey: index{ + Type: "btree", + Name: "traplocation_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "traplocation_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerTraplocationColumns struct { + Objectid column + Name column + Zone column + Habitat column + Priority column + Usetype column + Active column + Description column + Accessdesc column + Comments column + Externalid column + Nextactiondatescheduled column + Zone2 column + Locationnumber column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Gatewaysync column + Route column + SetDow column + RouteOrder column + Vectorsurvsiteid column + Creationdate column + Creator column + Editdate column + Editor column + H3R7 column + H3R8 column +} + +func (c fieldseekerTraplocationColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Name, c.Zone, c.Habitat, c.Priority, c.Usetype, c.Active, c.Description, c.Accessdesc, c.Comments, c.Externalid, c.Nextactiondatescheduled, c.Zone2, c.Locationnumber, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Gatewaysync, c.Route, c.SetDow, c.RouteOrder, c.Vectorsurvsiteid, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.H3R7, c.H3R8, + } +} + +type fieldseekerTraplocationIndexes struct { + TraplocationPkey index +} + +func (i fieldseekerTraplocationIndexes) AsSlice() []index { + return []index{ + i.TraplocationPkey, + } +} + +type fieldseekerTraplocationForeignKeys struct{} + +func (f fieldseekerTraplocationForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerTraplocationUniques struct{} + +func (u fieldseekerTraplocationUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerTraplocationChecks struct{} + +func (c fieldseekerTraplocationChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.treatment.bob.go b/db/dbinfo/fieldseeker.treatment.bob.go new file mode 100644 index 00000000..b4289faa --- /dev/null +++ b/db/dbinfo/fieldseeker.treatment.bob.go @@ -0,0 +1,622 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerTreatments = Table[ + fieldseekerTreatmentColumns, + fieldseekerTreatmentIndexes, + fieldseekerTreatmentForeignKeys, + fieldseekerTreatmentUniques, + fieldseekerTreatmentChecks, +]{ + Schema: "fieldseeker", + Name: "treatment", + Columns: fieldseekerTreatmentColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.treatment_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Activity: column{ + Name: "activity", + DBType: "fieldseeker.treatment_mosquitoactivity_enum", + Default: "NULL", + Comment: "Activity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Treatarea: column{ + Name: "treatarea", + DBType: "double precision", + Default: "NULL", + Comment: "Area Treated", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Areaunit: column{ + Name: "areaunit", + DBType: "fieldseeker.treatment_mosquitoproductareaunit_enum", + Default: "NULL", + Comment: "Area Unit", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Product: column{ + Name: "product", + DBType: "character varying", + Default: "NULL", + Comment: "Product", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Qty: column{ + Name: "qty", + DBType: "double precision", + Default: "NULL", + Comment: "Quantity", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Qtyunit: column{ + Name: "qtyunit", + DBType: "fieldseeker.treatment_mosquitoproductmeasureunit_enum", + Default: "NULL", + Comment: "Quantity Unit", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Method: column{ + Name: "method", + DBType: "fieldseeker.treatment_treatment_method_d558ca3ccf43440c8160758253967621_enu", + Default: "NULL", + Comment: "Method", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Equiptype: column{ + Name: "equiptype", + DBType: "fieldseeker.treatment_treatment_equiptype_45694d79_ff21_42cc_be4f_a0d1def4f", + Default: "NULL", + Comment: "Equipment Type", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "Comments", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Avetemp: column{ + Name: "avetemp", + DBType: "double precision", + Default: "NULL", + Comment: "Average Temperature", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Windspeed: column{ + Name: "windspeed", + DBType: "double precision", + Default: "NULL", + Comment: "Wind Speed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Winddir: column{ + Name: "winddir", + DBType: "fieldseeker.treatment_notinuiwinddirection_enum", + Default: "NULL", + Comment: "Wind Direction", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Raingauge: column{ + Name: "raingauge", + DBType: "double precision", + Default: "NULL", + Comment: "Rain Gauge", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Startdatetime: column{ + Name: "startdatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Start", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Enddatetime: column{ + Name: "enddatetime", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Finish", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + InspID: column{ + Name: "insp_id", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewed: column{ + Name: "reviewed", + DBType: "fieldseeker.treatment_notinuit_f_enum", + Default: "NULL", + Comment: "Reviewed", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Reviewedby: column{ + Name: "reviewedby", + DBType: "character varying", + Default: "NULL", + Comment: "Reviewed By", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Revieweddate: column{ + Name: "revieweddate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Reviewed Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Locationname: column{ + Name: "locationname", + DBType: "character varying", + Default: "NULL", + Comment: "Location Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone: column{ + Name: "zone", + DBType: "character varying", + Default: "NULL", + Comment: "Zone", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Warningoverride: column{ + Name: "warningoverride", + DBType: "fieldseeker.treatment_notinuit_f_enum", + Default: "NULL", + Comment: "Warning Override", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Recordstatus: column{ + Name: "recordstatus", + DBType: "smallint", + Default: "NULL", + Comment: "RecordStatus", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Zone2: column{ + Name: "zone2", + DBType: "character varying", + Default: "NULL", + Comment: "Zone2", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Treatacres: column{ + Name: "treatacres", + DBType: "double precision", + Default: "NULL", + Comment: "Treated Acres", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Tirecount: column{ + Name: "tirecount", + DBType: "smallint", + Default: "NULL", + Comment: "Tire Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Cbcount: column{ + Name: "cbcount", + DBType: "smallint", + Default: "NULL", + Comment: "Catch Basin Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Containercount: column{ + Name: "containercount", + DBType: "smallint", + Default: "NULL", + Comment: "Container Count", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Treatmentlength: column{ + Name: "treatmentlength", + DBType: "double precision", + Default: "NULL", + Comment: "Treatment Length", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Treatmenthours: column{ + Name: "treatmenthours", + DBType: "double precision", + Default: "NULL", + Comment: "Treatment Hours", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Treatmentlengthunits: column{ + Name: "treatmentlengthunits", + DBType: "character varying", + Default: "NULL", + Comment: "Treatment Length Units", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Linelocid: column{ + Name: "linelocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Pointlocid: column{ + Name: "pointlocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Polygonlocid: column{ + Name: "polygonlocid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Srid: column{ + Name: "srid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sdid: column{ + Name: "sdid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Barrierrouteid: column{ + Name: "barrierrouteid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Ulvrouteid: column{ + Name: "ulvrouteid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Fieldtech: column{ + Name: "fieldtech", + DBType: "character varying", + Default: "NULL", + Comment: "Field Tech", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Ptaid: column{ + Name: "ptaid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Flowrate: column{ + Name: "flowrate", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Habitat: column{ + Name: "habitat", + DBType: "fieldseeker.treatment_treatment_habitat_0afee7eb_f9ea_4707_8483_cccfe60f0d1", + Default: "NULL", + Comment: "Habitat", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Treathectares: column{ + Name: "treathectares", + DBType: "double precision", + Default: "NULL", + Comment: "Treat Hectares", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Invloc: column{ + Name: "invloc", + DBType: "character varying", + Default: "NULL", + Comment: "Inventory Location", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + TempSitecond: column{ + Name: "temp_sitecond", + DBType: "fieldseeker.treatment_treatment_sitecond_f812e1f64dcb4dc9a75da9d00abe6169_e", + Default: "NULL", + Comment: "temp_Conditions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Sitecond: column{ + Name: "sitecond", + DBType: "fieldseeker.treatment_treatment_sitecond_5a15bf36fa124280b961f31cd1a9b571_e", + Default: "NULL", + Comment: "Conditions", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Totalcostprodcut: column{ + Name: "totalcostprodcut", + DBType: "double precision", + Default: "NULL", + Comment: "TotalCostProduct", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Targetspecies: column{ + Name: "targetspecies", + DBType: "character varying", + Default: "NULL", + Comment: "Target Species", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerTreatmentIndexes{ + TreatmentPkey: index{ + Type: "btree", + Name: "treatment_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "treatment_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerTreatmentColumns struct { + Objectid column + Activity column + Treatarea column + Areaunit column + Product column + Qty column + Qtyunit column + Method column + Equiptype column + Comments column + Avetemp column + Windspeed column + Winddir column + Raingauge column + Startdatetime column + Enddatetime column + InspID column + Reviewed column + Reviewedby column + Revieweddate column + Locationname column + Zone column + Warningoverride column + Recordstatus column + Zone2 column + Treatacres column + Tirecount column + Cbcount column + Containercount column + Globalid column + Treatmentlength column + Treatmenthours column + Treatmentlengthunits column + Linelocid column + Pointlocid column + Polygonlocid column + Srid column + Sdid column + Barrierrouteid column + Ulvrouteid column + Fieldtech column + Ptaid column + Flowrate column + Habitat column + Treathectares column + Invloc column + TempSitecond column + Sitecond column + Totalcostprodcut column + Creationdate column + Creator column + Editdate column + Editor column + Targetspecies column +} + +func (c fieldseekerTreatmentColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Activity, c.Treatarea, c.Areaunit, c.Product, c.Qty, c.Qtyunit, c.Method, c.Equiptype, c.Comments, c.Avetemp, c.Windspeed, c.Winddir, c.Raingauge, c.Startdatetime, c.Enddatetime, c.InspID, c.Reviewed, c.Reviewedby, c.Revieweddate, c.Locationname, c.Zone, c.Warningoverride, c.Recordstatus, c.Zone2, c.Treatacres, c.Tirecount, c.Cbcount, c.Containercount, c.Globalid, c.Treatmentlength, c.Treatmenthours, c.Treatmentlengthunits, c.Linelocid, c.Pointlocid, c.Polygonlocid, c.Srid, c.Sdid, c.Barrierrouteid, c.Ulvrouteid, c.Fieldtech, c.Ptaid, c.Flowrate, c.Habitat, c.Treathectares, c.Invloc, c.TempSitecond, c.Sitecond, c.Totalcostprodcut, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.Targetspecies, + } +} + +type fieldseekerTreatmentIndexes struct { + TreatmentPkey index +} + +func (i fieldseekerTreatmentIndexes) AsSlice() []index { + return []index{ + i.TreatmentPkey, + } +} + +type fieldseekerTreatmentForeignKeys struct{} + +func (f fieldseekerTreatmentForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerTreatmentUniques struct{} + +func (u fieldseekerTreatmentUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerTreatmentChecks struct{} + +func (c fieldseekerTreatmentChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.treatmentarea.bob.go b/db/dbinfo/fieldseeker.treatmentarea.bob.go new file mode 100644 index 00000000..667fa34c --- /dev/null +++ b/db/dbinfo/fieldseeker.treatmentarea.bob.go @@ -0,0 +1,262 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerTreatmentareas = Table[ + fieldseekerTreatmentareaColumns, + fieldseekerTreatmentareaIndexes, + fieldseekerTreatmentareaForeignKeys, + fieldseekerTreatmentareaUniques, + fieldseekerTreatmentareaChecks, +]{ + Schema: "fieldseeker", + Name: "treatmentarea", + Columns: fieldseekerTreatmentareaColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.treatmentarea_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + TreatID: column{ + Name: "treat_id", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + SessionID: column{ + Name: "session_id", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Treatdate: column{ + Name: "treatdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "Treatment Date", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Comments: column{ + Name: "comments", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Notified: column{ + Name: "notified", + DBType: "smallint", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Type: column{ + Name: "type", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ShapeArea: column{ + Name: "shape__area", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ShapeLength: column{ + Name: "shape__length", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerTreatmentareaIndexes{ + TreatmentareaPkey: index{ + Type: "btree", + Name: "treatmentarea_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "treatmentarea_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerTreatmentareaColumns struct { + Objectid column + TreatID column + SessionID column + Treatdate column + Comments column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Notified column + Type column + Creationdate column + Creator column + Editdate column + Editor column + ShapeArea column + ShapeLength column +} + +func (c fieldseekerTreatmentareaColumns) AsSlice() []column { + return []column{ + c.Objectid, c.TreatID, c.SessionID, c.Treatdate, c.Comments, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Notified, c.Type, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.ShapeArea, c.ShapeLength, + } +} + +type fieldseekerTreatmentareaIndexes struct { + TreatmentareaPkey index +} + +func (i fieldseekerTreatmentareaIndexes) AsSlice() []index { + return []index{ + i.TreatmentareaPkey, + } +} + +type fieldseekerTreatmentareaForeignKeys struct{} + +func (f fieldseekerTreatmentareaForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerTreatmentareaUniques struct{} + +func (u fieldseekerTreatmentareaUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerTreatmentareaChecks struct{} + +func (c fieldseekerTreatmentareaChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.ulvsprayroute.bob.go b/db/dbinfo/fieldseeker.ulvsprayroute.bob.go new file mode 100644 index 00000000..7366fed5 --- /dev/null +++ b/db/dbinfo/fieldseeker.ulvsprayroute.bob.go @@ -0,0 +1,48 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +var FieldseekerUlvsprayroutes = Table[ + fieldseekerUlvsprayrouteColumns, + fieldseekerUlvsprayrouteIndexes, + fieldseekerUlvsprayrouteForeignKeys, + fieldseekerUlvsprayrouteUniques, + fieldseekerUlvsprayrouteChecks, +]{ + Schema: "fieldseeker", + Name: "ulvsprayroute", + Columns: fieldseekerUlvsprayrouteColumns{}, + + Comment: "", +} + +type fieldseekerUlvsprayrouteColumns struct{} + +func (c fieldseekerUlvsprayrouteColumns) AsSlice() []column { + return []column{} +} + +type fieldseekerUlvsprayrouteIndexes struct{} + +func (i fieldseekerUlvsprayrouteIndexes) AsSlice() []index { + return []index{} +} + +type fieldseekerUlvsprayrouteForeignKeys struct{} + +func (f fieldseekerUlvsprayrouteForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerUlvsprayrouteUniques struct{} + +func (u fieldseekerUlvsprayrouteUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerUlvsprayrouteChecks struct{} + +func (c fieldseekerUlvsprayrouteChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.zones.bob.go b/db/dbinfo/fieldseeker.zones.bob.go new file mode 100644 index 00000000..a9cf7d04 --- /dev/null +++ b/db/dbinfo/fieldseeker.zones.bob.go @@ -0,0 +1,222 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerZones = Table[ + fieldseekerZoneColumns, + fieldseekerZoneIndexes, + fieldseekerZoneForeignKeys, + fieldseekerZoneUniques, + fieldseekerZoneChecks, +]{ + Schema: "fieldseeker", + Name: "zones", + Columns: fieldseekerZoneColumns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.zones_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Name: column{ + Name: "name", + DBType: "character varying", + Default: "NULL", + Comment: "Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Active: column{ + Name: "active", + DBType: "integer", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ShapeArea: column{ + Name: "shape__area", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ShapeLength: column{ + Name: "shape__length", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerZoneIndexes{ + ZonesPkey: index{ + Type: "btree", + Name: "zones_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "zones_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerZoneColumns struct { + Objectid column + Name column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Active column + Creationdate column + Creator column + Editdate column + Editor column + ShapeArea column + ShapeLength column +} + +func (c fieldseekerZoneColumns) AsSlice() []column { + return []column{ + c.Objectid, c.Name, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Active, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.ShapeArea, c.ShapeLength, + } +} + +type fieldseekerZoneIndexes struct { + ZonesPkey index +} + +func (i fieldseekerZoneIndexes) AsSlice() []index { + return []index{ + i.ZonesPkey, + } +} + +type fieldseekerZoneForeignKeys struct{} + +func (f fieldseekerZoneForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerZoneUniques struct{} + +func (u fieldseekerZoneUniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerZoneChecks struct{} + +func (c fieldseekerZoneChecks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker.zones2.bob.go b/db/dbinfo/fieldseeker.zones2.bob.go new file mode 100644 index 00000000..ca012d59 --- /dev/null +++ b/db/dbinfo/fieldseeker.zones2.bob.go @@ -0,0 +1,212 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package dbinfo + +import "github.com/aarondl/opt/null" + +var FieldseekerZones2s = Table[ + fieldseekerZones2Columns, + fieldseekerZones2Indexes, + fieldseekerZones2ForeignKeys, + fieldseekerZones2Uniques, + fieldseekerZones2Checks, +]{ + Schema: "fieldseeker", + Name: "zones2", + Columns: fieldseekerZones2Columns{ + Objectid: column{ + Name: "objectid", + DBType: "bigint", + Default: "nextval('fieldseeker.zones2_objectid_seq'::regclass)", + Comment: "", + Nullable: false, + Generated: false, + AutoIncr: false, + }, + Name: column{ + Name: "name", + DBType: "character varying", + Default: "NULL", + Comment: "Name", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Globalid: column{ + Name: "globalid", + DBType: "uuid", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedUser: column{ + Name: "created_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + CreatedDate: column{ + Name: "created_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedUser: column{ + Name: "last_edited_user", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + LastEditedDate: column{ + Name: "last_edited_date", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creationdate: column{ + Name: "creationdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Creator: column{ + Name: "creator", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editdate: column{ + Name: "editdate", + DBType: "timestamp without time zone", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + Editor: column{ + Name: "editor", + DBType: "character varying", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ShapeArea: column{ + Name: "shape__area", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + ShapeLength: column{ + Name: "shape__length", + DBType: "double precision", + Default: "NULL", + Comment: "", + Nullable: true, + Generated: false, + AutoIncr: false, + }, + }, + Indexes: fieldseekerZones2Indexes{ + Zones2Pkey: index{ + Type: "btree", + Name: "zones2_pkey", + Columns: []indexColumn{ + { + Name: "objectid", + Desc: null.FromCond(false, true), + IsExpression: false, + }, + }, + Unique: true, + Comment: "", + NullsFirst: []bool{false}, + NullsDistinct: false, + Where: "", + Include: []string{}, + }, + }, + PrimaryKey: &constraint{ + Name: "zones2_pkey", + Columns: []string{"objectid"}, + Comment: "", + }, + + Comment: "", +} + +type fieldseekerZones2Columns struct { + Objectid column + Name column + Globalid column + CreatedUser column + CreatedDate column + LastEditedUser column + LastEditedDate column + Creationdate column + Creator column + Editdate column + Editor column + ShapeArea column + ShapeLength column +} + +func (c fieldseekerZones2Columns) AsSlice() []column { + return []column{ + c.Objectid, c.Name, c.Globalid, c.CreatedUser, c.CreatedDate, c.LastEditedUser, c.LastEditedDate, c.Creationdate, c.Creator, c.Editdate, c.Editor, c.ShapeArea, c.ShapeLength, + } +} + +type fieldseekerZones2Indexes struct { + Zones2Pkey index +} + +func (i fieldseekerZones2Indexes) AsSlice() []index { + return []index{ + i.Zones2Pkey, + } +} + +type fieldseekerZones2ForeignKeys struct{} + +func (f fieldseekerZones2ForeignKeys) AsSlice() []foreignKey { + return []foreignKey{} +} + +type fieldseekerZones2Uniques struct{} + +func (u fieldseekerZones2Uniques) AsSlice() []constraint { + return []constraint{} +} + +type fieldseekerZones2Checks struct{} + +func (c fieldseekerZones2Checks) AsSlice() []check { + return []check{} +} diff --git a/db/dbinfo/fieldseeker_sync.bob.go b/db/dbinfo/fieldseeker_sync.bob.go index 01c30cf6..7422cef9 100644 --- a/db/dbinfo/fieldseeker_sync.bob.go +++ b/db/dbinfo/fieldseeker_sync.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_containerrelate.bob.go b/db/dbinfo/fs_containerrelate.bob.go index 13c9cc0f..eef0ea58 100644 --- a/db/dbinfo/fs_containerrelate.bob.go +++ b/db/dbinfo/fs_containerrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_fieldscoutinglog.bob.go b/db/dbinfo/fs_fieldscoutinglog.bob.go index 17cfa9b4..8b02eaf0 100644 --- a/db/dbinfo/fs_fieldscoutinglog.bob.go +++ b/db/dbinfo/fs_fieldscoutinglog.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_habitatrelate.bob.go b/db/dbinfo/fs_habitatrelate.bob.go index e23ddd0b..38dce854 100644 --- a/db/dbinfo/fs_habitatrelate.bob.go +++ b/db/dbinfo/fs_habitatrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_inspectionsample.bob.go b/db/dbinfo/fs_inspectionsample.bob.go index 63c73fc5..20fd01e4 100644 --- a/db/dbinfo/fs_inspectionsample.bob.go +++ b/db/dbinfo/fs_inspectionsample.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_inspectionsampledetail.bob.go b/db/dbinfo/fs_inspectionsampledetail.bob.go index c384869a..894f9d35 100644 --- a/db/dbinfo/fs_inspectionsampledetail.bob.go +++ b/db/dbinfo/fs_inspectionsampledetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_linelocation.bob.go b/db/dbinfo/fs_linelocation.bob.go index 40e99b23..4a6ac196 100644 --- a/db/dbinfo/fs_linelocation.bob.go +++ b/db/dbinfo/fs_linelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_locationtracking.bob.go b/db/dbinfo/fs_locationtracking.bob.go index 9ed3c3c0..18ec8312 100644 --- a/db/dbinfo/fs_locationtracking.bob.go +++ b/db/dbinfo/fs_locationtracking.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_mosquitoinspection.bob.go b/db/dbinfo/fs_mosquitoinspection.bob.go index 7f1ff0c7..410c1ce7 100644 --- a/db/dbinfo/fs_mosquitoinspection.bob.go +++ b/db/dbinfo/fs_mosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_pointlocation.bob.go b/db/dbinfo/fs_pointlocation.bob.go index 667d46ae..0d10f351 100644 --- a/db/dbinfo/fs_pointlocation.bob.go +++ b/db/dbinfo/fs_pointlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_polygonlocation.bob.go b/db/dbinfo/fs_polygonlocation.bob.go index c94baeda..5c381545 100644 --- a/db/dbinfo/fs_polygonlocation.bob.go +++ b/db/dbinfo/fs_polygonlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_pool.bob.go b/db/dbinfo/fs_pool.bob.go index cfdc70dc..bcbedcc4 100644 --- a/db/dbinfo/fs_pool.bob.go +++ b/db/dbinfo/fs_pool.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_pooldetail.bob.go b/db/dbinfo/fs_pooldetail.bob.go index 0b0fe823..debaf6db 100644 --- a/db/dbinfo/fs_pooldetail.bob.go +++ b/db/dbinfo/fs_pooldetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_proposedtreatmentarea.bob.go b/db/dbinfo/fs_proposedtreatmentarea.bob.go index 799cb705..34e57cf4 100644 --- a/db/dbinfo/fs_proposedtreatmentarea.bob.go +++ b/db/dbinfo/fs_proposedtreatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_qamosquitoinspection.bob.go b/db/dbinfo/fs_qamosquitoinspection.bob.go index 11cf045c..e4356a11 100644 --- a/db/dbinfo/fs_qamosquitoinspection.bob.go +++ b/db/dbinfo/fs_qamosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_rodentlocation.bob.go b/db/dbinfo/fs_rodentlocation.bob.go index 98b7fb47..a882d91c 100644 --- a/db/dbinfo/fs_rodentlocation.bob.go +++ b/db/dbinfo/fs_rodentlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_samplecollection.bob.go b/db/dbinfo/fs_samplecollection.bob.go index b7487354..2bedeebe 100644 --- a/db/dbinfo/fs_samplecollection.bob.go +++ b/db/dbinfo/fs_samplecollection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_samplelocation.bob.go b/db/dbinfo/fs_samplelocation.bob.go index 02b16754..0aac77ea 100644 --- a/db/dbinfo/fs_samplelocation.bob.go +++ b/db/dbinfo/fs_samplelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_servicerequest.bob.go b/db/dbinfo/fs_servicerequest.bob.go index f4520540..977350a4 100644 --- a/db/dbinfo/fs_servicerequest.bob.go +++ b/db/dbinfo/fs_servicerequest.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_speciesabundance.bob.go b/db/dbinfo/fs_speciesabundance.bob.go index fbe911de..1083b49f 100644 --- a/db/dbinfo/fs_speciesabundance.bob.go +++ b/db/dbinfo/fs_speciesabundance.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_stormdrain.bob.go b/db/dbinfo/fs_stormdrain.bob.go index 1d653a9a..30569d7c 100644 --- a/db/dbinfo/fs_stormdrain.bob.go +++ b/db/dbinfo/fs_stormdrain.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_timecard.bob.go b/db/dbinfo/fs_timecard.bob.go index 1c50a5d4..3432ad07 100644 --- a/db/dbinfo/fs_timecard.bob.go +++ b/db/dbinfo/fs_timecard.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_trapdata.bob.go b/db/dbinfo/fs_trapdata.bob.go index 3b40e5de..dba6d914 100644 --- a/db/dbinfo/fs_trapdata.bob.go +++ b/db/dbinfo/fs_trapdata.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_traplocation.bob.go b/db/dbinfo/fs_traplocation.bob.go index 7fae1806..f1a9c6d9 100644 --- a/db/dbinfo/fs_traplocation.bob.go +++ b/db/dbinfo/fs_traplocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_treatment.bob.go b/db/dbinfo/fs_treatment.bob.go index c3a868f0..4a62f732 100644 --- a/db/dbinfo/fs_treatment.bob.go +++ b/db/dbinfo/fs_treatment.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_treatmentarea.bob.go b/db/dbinfo/fs_treatmentarea.bob.go index 5db5d545..7b5a5817 100644 --- a/db/dbinfo/fs_treatmentarea.bob.go +++ b/db/dbinfo/fs_treatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_zones.bob.go b/db/dbinfo/fs_zones.bob.go index 280405f0..ebf92a70 100644 --- a/db/dbinfo/fs_zones.bob.go +++ b/db/dbinfo/fs_zones.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/fs_zones2.bob.go b/db/dbinfo/fs_zones2.bob.go index 150be8de..b6c5cb7b 100644 --- a/db/dbinfo/fs_zones2.bob.go +++ b/db/dbinfo/fs_zones2.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/geography_columns.bob.go b/db/dbinfo/geography_columns.bob.go index c421ab69..f4140c80 100644 --- a/db/dbinfo/geography_columns.bob.go +++ b/db/dbinfo/geography_columns.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/geometry_columns.bob.go b/db/dbinfo/geometry_columns.bob.go index cb6f339a..7a594abf 100644 --- a/db/dbinfo/geometry_columns.bob.go +++ b/db/dbinfo/geometry_columns.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/goose_db_version.bob.go b/db/dbinfo/goose_db_version.bob.go index b62e2e9c..794a8304 100644 --- a/db/dbinfo/goose_db_version.bob.go +++ b/db/dbinfo/goose_db_version.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/h3_aggregation.bob.go b/db/dbinfo/h3_aggregation.bob.go index a150291e..560aa8d5 100644 --- a/db/dbinfo/h3_aggregation.bob.go +++ b/db/dbinfo/h3_aggregation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_containerrelate.bob.go b/db/dbinfo/history_containerrelate.bob.go index 67c0e44a..aa8a476b 100644 --- a/db/dbinfo/history_containerrelate.bob.go +++ b/db/dbinfo/history_containerrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_fieldscoutinglog.bob.go b/db/dbinfo/history_fieldscoutinglog.bob.go index 6dd8dd63..ccc5f997 100644 --- a/db/dbinfo/history_fieldscoutinglog.bob.go +++ b/db/dbinfo/history_fieldscoutinglog.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_habitatrelate.bob.go b/db/dbinfo/history_habitatrelate.bob.go index fce6721d..06678a43 100644 --- a/db/dbinfo/history_habitatrelate.bob.go +++ b/db/dbinfo/history_habitatrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_inspectionsample.bob.go b/db/dbinfo/history_inspectionsample.bob.go index ae273e08..f8226a11 100644 --- a/db/dbinfo/history_inspectionsample.bob.go +++ b/db/dbinfo/history_inspectionsample.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_inspectionsampledetail.bob.go b/db/dbinfo/history_inspectionsampledetail.bob.go index be401bc9..1ab9932f 100644 --- a/db/dbinfo/history_inspectionsampledetail.bob.go +++ b/db/dbinfo/history_inspectionsampledetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_linelocation.bob.go b/db/dbinfo/history_linelocation.bob.go index 738ed468..82f05b5c 100644 --- a/db/dbinfo/history_linelocation.bob.go +++ b/db/dbinfo/history_linelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_locationtracking.bob.go b/db/dbinfo/history_locationtracking.bob.go index a71d1972..6841413b 100644 --- a/db/dbinfo/history_locationtracking.bob.go +++ b/db/dbinfo/history_locationtracking.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_mosquitoinspection.bob.go b/db/dbinfo/history_mosquitoinspection.bob.go index de4847e9..bd02f9c7 100644 --- a/db/dbinfo/history_mosquitoinspection.bob.go +++ b/db/dbinfo/history_mosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_pointlocation.bob.go b/db/dbinfo/history_pointlocation.bob.go index 804350f5..f2f7e86a 100644 --- a/db/dbinfo/history_pointlocation.bob.go +++ b/db/dbinfo/history_pointlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_polygonlocation.bob.go b/db/dbinfo/history_polygonlocation.bob.go index 6ea7b3ba..30c6f196 100644 --- a/db/dbinfo/history_polygonlocation.bob.go +++ b/db/dbinfo/history_polygonlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_pool.bob.go b/db/dbinfo/history_pool.bob.go index d507f7a2..18c1f87b 100644 --- a/db/dbinfo/history_pool.bob.go +++ b/db/dbinfo/history_pool.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_pooldetail.bob.go b/db/dbinfo/history_pooldetail.bob.go index f7fac0e1..9ca74073 100644 --- a/db/dbinfo/history_pooldetail.bob.go +++ b/db/dbinfo/history_pooldetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_proposedtreatmentarea.bob.go b/db/dbinfo/history_proposedtreatmentarea.bob.go index 50c29ae6..b40925fc 100644 --- a/db/dbinfo/history_proposedtreatmentarea.bob.go +++ b/db/dbinfo/history_proposedtreatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_qamosquitoinspection.bob.go b/db/dbinfo/history_qamosquitoinspection.bob.go index 4b2e1606..ccf3ab6d 100644 --- a/db/dbinfo/history_qamosquitoinspection.bob.go +++ b/db/dbinfo/history_qamosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_rodentlocation.bob.go b/db/dbinfo/history_rodentlocation.bob.go index 5e2f1c56..9829f97e 100644 --- a/db/dbinfo/history_rodentlocation.bob.go +++ b/db/dbinfo/history_rodentlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_samplecollection.bob.go b/db/dbinfo/history_samplecollection.bob.go index 7dd10855..b02adb81 100644 --- a/db/dbinfo/history_samplecollection.bob.go +++ b/db/dbinfo/history_samplecollection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_samplelocation.bob.go b/db/dbinfo/history_samplelocation.bob.go index 818ea356..ce4380b2 100644 --- a/db/dbinfo/history_samplelocation.bob.go +++ b/db/dbinfo/history_samplelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_servicerequest.bob.go b/db/dbinfo/history_servicerequest.bob.go index 6b4148c1..f04b99c0 100644 --- a/db/dbinfo/history_servicerequest.bob.go +++ b/db/dbinfo/history_servicerequest.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_speciesabundance.bob.go b/db/dbinfo/history_speciesabundance.bob.go index 9f46221c..a739c089 100644 --- a/db/dbinfo/history_speciesabundance.bob.go +++ b/db/dbinfo/history_speciesabundance.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_stormdrain.bob.go b/db/dbinfo/history_stormdrain.bob.go index b46ad30b..6f587d7d 100644 --- a/db/dbinfo/history_stormdrain.bob.go +++ b/db/dbinfo/history_stormdrain.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_timecard.bob.go b/db/dbinfo/history_timecard.bob.go index 7a12f222..ce42d572 100644 --- a/db/dbinfo/history_timecard.bob.go +++ b/db/dbinfo/history_timecard.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_trapdata.bob.go b/db/dbinfo/history_trapdata.bob.go index fbf57aeb..b1c816a3 100644 --- a/db/dbinfo/history_trapdata.bob.go +++ b/db/dbinfo/history_trapdata.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_traplocation.bob.go b/db/dbinfo/history_traplocation.bob.go index a8cff6f7..3c38f380 100644 --- a/db/dbinfo/history_traplocation.bob.go +++ b/db/dbinfo/history_traplocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_treatment.bob.go b/db/dbinfo/history_treatment.bob.go index 3983d0f6..095b4e13 100644 --- a/db/dbinfo/history_treatment.bob.go +++ b/db/dbinfo/history_treatment.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_treatmentarea.bob.go b/db/dbinfo/history_treatmentarea.bob.go index 48ebd752..3bba1751 100644 --- a/db/dbinfo/history_treatmentarea.bob.go +++ b/db/dbinfo/history_treatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_zones.bob.go b/db/dbinfo/history_zones.bob.go index 0a8baaf3..8366a107 100644 --- a/db/dbinfo/history_zones.bob.go +++ b/db/dbinfo/history_zones.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/history_zones2.bob.go b/db/dbinfo/history_zones2.bob.go index 41cf67a4..731b4068 100644 --- a/db/dbinfo/history_zones2.bob.go +++ b/db/dbinfo/history_zones2.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/notification.bob.go b/db/dbinfo/notification.bob.go index 08c313c3..29ddb560 100644 --- a/db/dbinfo/notification.bob.go +++ b/db/dbinfo/notification.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/oauth_token.bob.go b/db/dbinfo/oauth_token.bob.go index 227a4bbd..5b051e10 100644 --- a/db/dbinfo/oauth_token.bob.go +++ b/db/dbinfo/oauth_token.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/organization.bob.go b/db/dbinfo/organization.bob.go index 15a8522a..a1c9b3a0 100644 --- a/db/dbinfo/organization.bob.go +++ b/db/dbinfo/organization.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/raster_columns.bob.go b/db/dbinfo/raster_columns.bob.go index 13ea9f8a..6c9fcd11 100644 --- a/db/dbinfo/raster_columns.bob.go +++ b/db/dbinfo/raster_columns.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/raster_overviews.bob.go b/db/dbinfo/raster_overviews.bob.go index 723291f3..3ba89bb3 100644 --- a/db/dbinfo/raster_overviews.bob.go +++ b/db/dbinfo/raster_overviews.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/sessions.bob.go b/db/dbinfo/sessions.bob.go index 848632ef..876a5667 100644 --- a/db/dbinfo/sessions.bob.go +++ b/db/dbinfo/sessions.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/spatial_ref_sys.bob.go b/db/dbinfo/spatial_ref_sys.bob.go index 555b7497..6315d501 100644 --- a/db/dbinfo/spatial_ref_sys.bob.go +++ b/db/dbinfo/spatial_ref_sys.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/dbinfo/user_.bob.go b/db/dbinfo/user_.bob.go index ef700eee..0e764208 100644 --- a/db/dbinfo/user_.bob.go +++ b/db/dbinfo/user_.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package dbinfo diff --git a/db/enums/enums.bob.go b/db/enums/enums.bob.go index 2750bb05..2572ffaf 100644 --- a/db/enums/enums.bob.go +++ b/db/enums/enums.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package enums @@ -117,6 +117,10788 @@ func (e *Arcgislicensetype) Scan(value any) error { return nil } +// Enum values for FieldseekerContainerrelateMosquitocontainertypeEnum +const ( + FieldseekerContainerrelateMosquitocontainertypeEnumAquarium FieldseekerContainerrelateMosquitocontainertypeEnum = "Aquarium" + FieldseekerContainerrelateMosquitocontainertypeEnumFlowerPot FieldseekerContainerrelateMosquitocontainertypeEnum = "Flower pot" + FieldseekerContainerrelateMosquitocontainertypeEnum5GallonBucket FieldseekerContainerrelateMosquitocontainertypeEnum = "5 gallon bucket" + FieldseekerContainerrelateMosquitocontainertypeEnumFountain FieldseekerContainerrelateMosquitocontainertypeEnum = "Fountain" + FieldseekerContainerrelateMosquitocontainertypeEnumBirdBath FieldseekerContainerrelateMosquitocontainertypeEnum = "Bird bath" +) + +func AllFieldseekerContainerrelateMosquitocontainertypeEnum() []FieldseekerContainerrelateMosquitocontainertypeEnum { + return []FieldseekerContainerrelateMosquitocontainertypeEnum{ + FieldseekerContainerrelateMosquitocontainertypeEnumAquarium, + FieldseekerContainerrelateMosquitocontainertypeEnumFlowerPot, + FieldseekerContainerrelateMosquitocontainertypeEnum5GallonBucket, + FieldseekerContainerrelateMosquitocontainertypeEnumFountain, + FieldseekerContainerrelateMosquitocontainertypeEnumBirdBath, + } +} + +type FieldseekerContainerrelateMosquitocontainertypeEnum string + +func (e FieldseekerContainerrelateMosquitocontainertypeEnum) String() string { + return string(e) +} + +func (e FieldseekerContainerrelateMosquitocontainertypeEnum) Valid() bool { + switch e { + case FieldseekerContainerrelateMosquitocontainertypeEnumAquarium, + FieldseekerContainerrelateMosquitocontainertypeEnumFlowerPot, + FieldseekerContainerrelateMosquitocontainertypeEnum5GallonBucket, + FieldseekerContainerrelateMosquitocontainertypeEnumFountain, + FieldseekerContainerrelateMosquitocontainertypeEnumBirdBath: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerContainerrelateMosquitocontainertypeEnum) All() []FieldseekerContainerrelateMosquitocontainertypeEnum { + return AllFieldseekerContainerrelateMosquitocontainertypeEnum() +} + +func (e FieldseekerContainerrelateMosquitocontainertypeEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerContainerrelateMosquitocontainertypeEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerContainerrelateMosquitocontainertypeEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerContainerrelateMosquitocontainertypeEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerContainerrelateMosquitocontainertypeEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerContainerrelateMosquitocontainertypeEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerContainerrelateMosquitocontainertypeEnum(x) + case []byte: + *e = FieldseekerContainerrelateMosquitocontainertypeEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerContainerrelateMosquitocontainertypeEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerContainerrelateMosquitocontainertypeEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum +const ( + FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum0 FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum = "0" + FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum1 FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum = "1" + FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum2 FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum = "2" + FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum3 FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum = "3" +) + +func AllFieldseekerFieldscoutinglogFieldscoutingsymbologyEnum() []FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum { + return []FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum{ + FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum0, + FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum1, + FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum2, + FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum3, + } +} + +type FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum string + +func (e FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum) String() string { + return string(e) +} + +func (e FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum) Valid() bool { + switch e { + case FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum0, + FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum1, + FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum2, + FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum3: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum) All() []FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum { + return AllFieldseekerFieldscoutinglogFieldscoutingsymbologyEnum() +} + +func (e FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum(x) + case []byte: + *e = FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 +const ( + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Orchard FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "orchard" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284RowCrops FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "row_crops" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284VineCrops FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "vine_crops" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284AgGrassesOrGrain FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "ag_grasses_or_grain" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Pasture FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "pasture" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284IrrigationStandpipe FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "irrigation_standpipe" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Ditch FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "ditch" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Pond FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "pond" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Sump FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "sump" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Drain FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "drain" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284DairyLagoon FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "dairy_lagoon" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284WastewaterTreatment FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "wastewater_treatment" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Trough FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "trough" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Depression FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "depression" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Gutter FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "gutter" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284RainGutter FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "rain_gutter" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Culvert FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "culvert" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Utility FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "utility" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284CatchBasin FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "catch_basin" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284StreamOrCreek FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "stream_or_creek" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Slough FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "slough" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284River FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "river" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284MarshOrWetlands FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "marsh_or_wetlands" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Containers FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "containers" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284WateringBowl FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "watering_bowl" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284PlantSaucer FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "plant_saucer" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284YardDrain FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "yard_drain" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284PlantAxil FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "plant_axil" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Treehole FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "treehole" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284FountainOrWaterFeature FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "fountain_or_water_feature" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284BirdBath FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "bird_bath" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284MiscWaterAccumulation FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "misc_water_accumulation" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284TarpOrCover FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "tarp_or_cover" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284SwimmingPool FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "swimming_pool" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284AbovegroundPool FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "aboveground_pool" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284KidPool FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "kid_pool" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284HotTub FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "hot_tub" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Appliance FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "appliance" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Tires FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "tires" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284FloodedStructure FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "flooded_structure" + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284LowPoint FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 = "low_point" +) + +func AllFieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284() []FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 { + return []FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284{ + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Orchard, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284RowCrops, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284VineCrops, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284AgGrassesOrGrain, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Pasture, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284IrrigationStandpipe, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Ditch, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Pond, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Sump, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Drain, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284DairyLagoon, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284WastewaterTreatment, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Trough, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Depression, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Gutter, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284RainGutter, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Culvert, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Utility, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284CatchBasin, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284StreamOrCreek, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Slough, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284River, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284MarshOrWetlands, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Containers, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284WateringBowl, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284PlantSaucer, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284YardDrain, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284PlantAxil, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Treehole, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284FountainOrWaterFeature, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284BirdBath, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284MiscWaterAccumulation, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284TarpOrCover, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284SwimmingPool, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284AbovegroundPool, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284KidPool, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284HotTub, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Appliance, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Tires, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284FloodedStructure, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284LowPoint, + } +} + +type FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 string + +func (e FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284) String() string { + return string(e) +} + +func (e FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284) Valid() bool { + switch e { + case FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Orchard, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284RowCrops, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284VineCrops, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284AgGrassesOrGrain, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Pasture, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284IrrigationStandpipe, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Ditch, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Pond, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Sump, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Drain, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284DairyLagoon, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284WastewaterTreatment, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Trough, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Depression, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Gutter, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284RainGutter, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Culvert, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Utility, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284CatchBasin, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284StreamOrCreek, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Slough, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284River, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284MarshOrWetlands, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Containers, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284WateringBowl, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284PlantSaucer, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284YardDrain, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284PlantAxil, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Treehole, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284FountainOrWaterFeature, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284BirdBath, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284MiscWaterAccumulation, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284TarpOrCover, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284SwimmingPool, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284AbovegroundPool, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284KidPool, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284HotTub, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Appliance, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284Tires, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284FloodedStructure, + FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284LowPoint: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284) All() []FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 { + return AllFieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284() +} + +func (e FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284(x) + case []byte: + *e = FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerInspectionsampleNotinuitFEnum +const ( + FieldseekerInspectionsampleNotinuitFEnum1 FieldseekerInspectionsampleNotinuitFEnum = "1" + FieldseekerInspectionsampleNotinuitFEnum0 FieldseekerInspectionsampleNotinuitFEnum = "0" +) + +func AllFieldseekerInspectionsampleNotinuitFEnum() []FieldseekerInspectionsampleNotinuitFEnum { + return []FieldseekerInspectionsampleNotinuitFEnum{ + FieldseekerInspectionsampleNotinuitFEnum1, + FieldseekerInspectionsampleNotinuitFEnum0, + } +} + +type FieldseekerInspectionsampleNotinuitFEnum string + +func (e FieldseekerInspectionsampleNotinuitFEnum) String() string { + return string(e) +} + +func (e FieldseekerInspectionsampleNotinuitFEnum) Valid() bool { + switch e { + case FieldseekerInspectionsampleNotinuitFEnum1, + FieldseekerInspectionsampleNotinuitFEnum0: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerInspectionsampleNotinuitFEnum) All() []FieldseekerInspectionsampleNotinuitFEnum { + return AllFieldseekerInspectionsampleNotinuitFEnum() +} + +func (e FieldseekerInspectionsampleNotinuitFEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerInspectionsampleNotinuitFEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerInspectionsampleNotinuitFEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerInspectionsampleNotinuitFEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerInspectionsampleNotinuitFEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerInspectionsampleNotinuitFEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerInspectionsampleNotinuitFEnum(x) + case []byte: + *e = FieldseekerInspectionsampleNotinuitFEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerInspectionsampleNotinuitFEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerInspectionsampleNotinuitFEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerInspectionsampledetailMosquitoadultactivityEnum +const ( + FieldseekerInspectionsampledetailMosquitoadultactivityEnumNone FieldseekerInspectionsampledetailMosquitoadultactivityEnum = "None" + FieldseekerInspectionsampledetailMosquitoadultactivityEnumLight FieldseekerInspectionsampledetailMosquitoadultactivityEnum = "Light" + FieldseekerInspectionsampledetailMosquitoadultactivityEnumModerate FieldseekerInspectionsampledetailMosquitoadultactivityEnum = "Moderate" + FieldseekerInspectionsampledetailMosquitoadultactivityEnumIntense FieldseekerInspectionsampledetailMosquitoadultactivityEnum = "Intense" +) + +func AllFieldseekerInspectionsampledetailMosquitoadultactivityEnum() []FieldseekerInspectionsampledetailMosquitoadultactivityEnum { + return []FieldseekerInspectionsampledetailMosquitoadultactivityEnum{ + FieldseekerInspectionsampledetailMosquitoadultactivityEnumNone, + FieldseekerInspectionsampledetailMosquitoadultactivityEnumLight, + FieldseekerInspectionsampledetailMosquitoadultactivityEnumModerate, + FieldseekerInspectionsampledetailMosquitoadultactivityEnumIntense, + } +} + +type FieldseekerInspectionsampledetailMosquitoadultactivityEnum string + +func (e FieldseekerInspectionsampledetailMosquitoadultactivityEnum) String() string { + return string(e) +} + +func (e FieldseekerInspectionsampledetailMosquitoadultactivityEnum) Valid() bool { + switch e { + case FieldseekerInspectionsampledetailMosquitoadultactivityEnumNone, + FieldseekerInspectionsampledetailMosquitoadultactivityEnumLight, + FieldseekerInspectionsampledetailMosquitoadultactivityEnumModerate, + FieldseekerInspectionsampledetailMosquitoadultactivityEnumIntense: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerInspectionsampledetailMosquitoadultactivityEnum) All() []FieldseekerInspectionsampledetailMosquitoadultactivityEnum { + return AllFieldseekerInspectionsampledetailMosquitoadultactivityEnum() +} + +func (e FieldseekerInspectionsampledetailMosquitoadultactivityEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerInspectionsampledetailMosquitoadultactivityEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerInspectionsampledetailMosquitoadultactivityEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerInspectionsampledetailMosquitoadultactivityEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerInspectionsampledetailMosquitoadultactivityEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerInspectionsampledetailMosquitoadultactivityEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerInspectionsampledetailMosquitoadultactivityEnum(x) + case []byte: + *e = FieldseekerInspectionsampledetailMosquitoadultactivityEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerInspectionsampledetailMosquitoadultactivityEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerInspectionsampledetailMosquitoadultactivityEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerInspectionsampledetailMosquitodominantstageEnum +const ( + FieldseekerInspectionsampledetailMosquitodominantstageEnum1 FieldseekerInspectionsampledetailMosquitodominantstageEnum = "1" + FieldseekerInspectionsampledetailMosquitodominantstageEnum2 FieldseekerInspectionsampledetailMosquitodominantstageEnum = "2" + FieldseekerInspectionsampledetailMosquitodominantstageEnum3 FieldseekerInspectionsampledetailMosquitodominantstageEnum = "3" + FieldseekerInspectionsampledetailMosquitodominantstageEnum4 FieldseekerInspectionsampledetailMosquitodominantstageEnum = "4" + FieldseekerInspectionsampledetailMosquitodominantstageEnum1_2 FieldseekerInspectionsampledetailMosquitodominantstageEnum = "1-2" + FieldseekerInspectionsampledetailMosquitodominantstageEnum3_4 FieldseekerInspectionsampledetailMosquitodominantstageEnum = "3-4" +) + +func AllFieldseekerInspectionsampledetailMosquitodominantstageEnum() []FieldseekerInspectionsampledetailMosquitodominantstageEnum { + return []FieldseekerInspectionsampledetailMosquitodominantstageEnum{ + FieldseekerInspectionsampledetailMosquitodominantstageEnum1, + FieldseekerInspectionsampledetailMosquitodominantstageEnum2, + FieldseekerInspectionsampledetailMosquitodominantstageEnum3, + FieldseekerInspectionsampledetailMosquitodominantstageEnum4, + FieldseekerInspectionsampledetailMosquitodominantstageEnum1_2, + FieldseekerInspectionsampledetailMosquitodominantstageEnum3_4, + } +} + +type FieldseekerInspectionsampledetailMosquitodominantstageEnum string + +func (e FieldseekerInspectionsampledetailMosquitodominantstageEnum) String() string { + return string(e) +} + +func (e FieldseekerInspectionsampledetailMosquitodominantstageEnum) Valid() bool { + switch e { + case FieldseekerInspectionsampledetailMosquitodominantstageEnum1, + FieldseekerInspectionsampledetailMosquitodominantstageEnum2, + FieldseekerInspectionsampledetailMosquitodominantstageEnum3, + FieldseekerInspectionsampledetailMosquitodominantstageEnum4, + FieldseekerInspectionsampledetailMosquitodominantstageEnum1_2, + FieldseekerInspectionsampledetailMosquitodominantstageEnum3_4: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerInspectionsampledetailMosquitodominantstageEnum) All() []FieldseekerInspectionsampledetailMosquitodominantstageEnum { + return AllFieldseekerInspectionsampledetailMosquitodominantstageEnum() +} + +func (e FieldseekerInspectionsampledetailMosquitodominantstageEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerInspectionsampledetailMosquitodominantstageEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerInspectionsampledetailMosquitodominantstageEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerInspectionsampledetailMosquitodominantstageEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerInspectionsampledetailMosquitodominantstageEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerInspectionsampledetailMosquitodominantstageEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerInspectionsampledetailMosquitodominantstageEnum(x) + case []byte: + *e = FieldseekerInspectionsampledetailMosquitodominantstageEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerInspectionsampledetailMosquitodominantstageEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerInspectionsampledetailMosquitodominantstageEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerInspectionsampledetailMosquitofieldspeciesEnum +const ( + FieldseekerInspectionsampledetailMosquitofieldspeciesEnumAedes FieldseekerInspectionsampledetailMosquitofieldspeciesEnum = "Aedes" + FieldseekerInspectionsampledetailMosquitofieldspeciesEnumCulex FieldseekerInspectionsampledetailMosquitofieldspeciesEnum = "Culex" +) + +func AllFieldseekerInspectionsampledetailMosquitofieldspeciesEnum() []FieldseekerInspectionsampledetailMosquitofieldspeciesEnum { + return []FieldseekerInspectionsampledetailMosquitofieldspeciesEnum{ + FieldseekerInspectionsampledetailMosquitofieldspeciesEnumAedes, + FieldseekerInspectionsampledetailMosquitofieldspeciesEnumCulex, + } +} + +type FieldseekerInspectionsampledetailMosquitofieldspeciesEnum string + +func (e FieldseekerInspectionsampledetailMosquitofieldspeciesEnum) String() string { + return string(e) +} + +func (e FieldseekerInspectionsampledetailMosquitofieldspeciesEnum) Valid() bool { + switch e { + case FieldseekerInspectionsampledetailMosquitofieldspeciesEnumAedes, + FieldseekerInspectionsampledetailMosquitofieldspeciesEnumCulex: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerInspectionsampledetailMosquitofieldspeciesEnum) All() []FieldseekerInspectionsampledetailMosquitofieldspeciesEnum { + return AllFieldseekerInspectionsampledetailMosquitofieldspeciesEnum() +} + +func (e FieldseekerInspectionsampledetailMosquitofieldspeciesEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerInspectionsampledetailMosquitofieldspeciesEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerInspectionsampledetailMosquitofieldspeciesEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerInspectionsampledetailMosquitofieldspeciesEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerInspectionsampledetailMosquitofieldspeciesEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerInspectionsampledetailMosquitofieldspeciesEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerInspectionsampledetailMosquitofieldspeciesEnum(x) + case []byte: + *e = FieldseekerInspectionsampledetailMosquitofieldspeciesEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerInspectionsampledetailMosquitofieldspeciesEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerInspectionsampledetailMosquitofieldspeciesEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 +const ( + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Orchard FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "orchard" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418RowCrops FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "row_crops" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418VineCrops FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "vine_crops" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418AgGrassesOrGrain FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "ag_grasses_or_grain" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Pasture FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "pasture" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418IrrigationStandpipe FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "irrigation_standpipe" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Ditch FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "ditch" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Pond FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "pond" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Sump FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "sump" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Drain FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "drain" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418DairyLagoon FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "dairy_lagoon" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418WastewaterTreatment FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "wastewater_treatment" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Trough FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "trough" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Depression FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "depression" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Gutter FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "gutter" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418RainGutter FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "rain_gutter" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Culvert FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "culvert" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Utility FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "utility" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418CatchBasin FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "catch_basin" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418StreamOrCreek FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "stream_or_creek" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Slough FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "slough" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418River FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "river" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418MarshOrWetland FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "marsh_or_wetland" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Containers FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "containers" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418WateringBowl FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "watering_bowl" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418PlantSaucer FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "plant_saucer" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418YardDrain FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "yard_drain" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418PlantAxil FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "plant_axil" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Treehole FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "treehole" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418FountainOrWaterFeature FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "fountain_or_water_feature" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418BirdBath FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "bird_bath" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418MiscWaterAccumulation FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "misc_water_accumulation" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418TarpOrCover FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "tarp_or_cover" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418SwimmingPool FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "swimming_pool" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418AbovegroundPool FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "aboveground_pool" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418KidPool FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "kid_pool" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418HotTub FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "hot_tub" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Appliance FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "appliance" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Tires FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "tires" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418FloodedStructure FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "flooded_structure" + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418LowPoint FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 = "low_point" +) + +func AllFieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418() []FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 { + return []FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418{ + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Orchard, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418RowCrops, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418VineCrops, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418AgGrassesOrGrain, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Pasture, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418IrrigationStandpipe, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Ditch, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Pond, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Sump, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Drain, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418DairyLagoon, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418WastewaterTreatment, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Trough, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Depression, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Gutter, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418RainGutter, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Culvert, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Utility, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418CatchBasin, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418StreamOrCreek, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Slough, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418River, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418MarshOrWetland, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Containers, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418WateringBowl, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418PlantSaucer, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418YardDrain, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418PlantAxil, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Treehole, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418FountainOrWaterFeature, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418BirdBath, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418MiscWaterAccumulation, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418TarpOrCover, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418SwimmingPool, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418AbovegroundPool, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418KidPool, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418HotTub, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Appliance, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Tires, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418FloodedStructure, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418LowPoint, + } +} + +type FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 string + +func (e FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418) String() string { + return string(e) +} + +func (e FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418) Valid() bool { + switch e { + case FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Orchard, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418RowCrops, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418VineCrops, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418AgGrassesOrGrain, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Pasture, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418IrrigationStandpipe, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Ditch, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Pond, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Sump, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Drain, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418DairyLagoon, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418WastewaterTreatment, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Trough, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Depression, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Gutter, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418RainGutter, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Culvert, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Utility, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418CatchBasin, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418StreamOrCreek, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Slough, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418River, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418MarshOrWetland, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Containers, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418WateringBowl, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418PlantSaucer, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418YardDrain, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418PlantAxil, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Treehole, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418FountainOrWaterFeature, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418BirdBath, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418MiscWaterAccumulation, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418TarpOrCover, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418SwimmingPool, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418AbovegroundPool, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418KidPool, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418HotTub, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Appliance, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418Tires, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418FloodedStructure, + FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418LowPoint: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418) All() []FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 { + return AllFieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418() +} + +func (e FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418(x) + case []byte: + *e = FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 +const ( + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Residential FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 = "residential" + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Commercial FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 = "commercial" + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Industrial FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 = "industrial" + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Agricultural FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 = "agricultural" + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80MixedUse FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 = "mixed_use" + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80PublicDomain FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 = "public_domain" + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Natural FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 = "natural" + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Municipal FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 = "municipal" +) + +func AllFieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80() []FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 { + return []FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80{ + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Residential, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Commercial, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Industrial, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Agricultural, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80MixedUse, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80PublicDomain, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Natural, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Municipal, + } +} + +type FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 string + +func (e FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80) String() string { + return string(e) +} + +func (e FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80) Valid() bool { + switch e { + case FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Residential, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Commercial, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Industrial, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Agricultural, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80MixedUse, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80PublicDomain, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Natural, + FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80Municipal: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80) All() []FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 { + return AllFieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80() +} + +func (e FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80(x) + case []byte: + *e = FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 +const ( + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16FloodIrrigation FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "flood_irrigation" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16FurrowIrrigation FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "furrow_irrigation" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16DripIrrigation FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "drip_irrigation" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16SprinklerIrrigation FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "sprinkler_irrigation" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16WastewaterIrrigation FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "wastewater_irrigation" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16IrrigationRunoff FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "irrigation_runoff" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16RainwaterAccumulation FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "rainwater_accumulation" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16Leak FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "leak" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16Seepage FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "seepage" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16StoredWater FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "stored_water" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16WastewaterSystem FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "wastewater_system" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16PermanentNaturalWater FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "permanent_natural_water" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16TemporaryNaturalWater FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "temporary_natural_water" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16RecreationalOrOrnamentalWater FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "recreational_or_ornamental_water" + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16WaterConveyance FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 = "water_conveyance" +) + +func AllFieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16() []FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 { + return []FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16{ + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16FloodIrrigation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16FurrowIrrigation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16DripIrrigation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16SprinklerIrrigation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16WastewaterIrrigation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16IrrigationRunoff, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16RainwaterAccumulation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16Leak, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16Seepage, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16StoredWater, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16WastewaterSystem, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16PermanentNaturalWater, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16TemporaryNaturalWater, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16RecreationalOrOrnamentalWater, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16WaterConveyance, + } +} + +type FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 string + +func (e FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16) String() string { + return string(e) +} + +func (e FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16) Valid() bool { + switch e { + case FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16FloodIrrigation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16FurrowIrrigation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16DripIrrigation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16SprinklerIrrigation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16WastewaterIrrigation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16IrrigationRunoff, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16RainwaterAccumulation, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16Leak, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16Seepage, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16StoredWater, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16WastewaterSystem, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16PermanentNaturalWater, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16TemporaryNaturalWater, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16RecreationalOrOrnamentalWater, + FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16WaterConveyance: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16) All() []FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 { + return AllFieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16() +} + +func (e FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16(x) + case []byte: + *e = FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerLinelocationLocationpriorityEnum +const ( + FieldseekerLinelocationLocationpriorityEnumLow FieldseekerLinelocationLocationpriorityEnum = "Low" + FieldseekerLinelocationLocationpriorityEnumMedium FieldseekerLinelocationLocationpriorityEnum = "Medium" + FieldseekerLinelocationLocationpriorityEnumHigh FieldseekerLinelocationLocationpriorityEnum = "High" + FieldseekerLinelocationLocationpriorityEnumNone FieldseekerLinelocationLocationpriorityEnum = "None" +) + +func AllFieldseekerLinelocationLocationpriorityEnum() []FieldseekerLinelocationLocationpriorityEnum { + return []FieldseekerLinelocationLocationpriorityEnum{ + FieldseekerLinelocationLocationpriorityEnumLow, + FieldseekerLinelocationLocationpriorityEnumMedium, + FieldseekerLinelocationLocationpriorityEnumHigh, + FieldseekerLinelocationLocationpriorityEnumNone, + } +} + +type FieldseekerLinelocationLocationpriorityEnum string + +func (e FieldseekerLinelocationLocationpriorityEnum) String() string { + return string(e) +} + +func (e FieldseekerLinelocationLocationpriorityEnum) Valid() bool { + switch e { + case FieldseekerLinelocationLocationpriorityEnumLow, + FieldseekerLinelocationLocationpriorityEnumMedium, + FieldseekerLinelocationLocationpriorityEnumHigh, + FieldseekerLinelocationLocationpriorityEnumNone: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerLinelocationLocationpriorityEnum) All() []FieldseekerLinelocationLocationpriorityEnum { + return AllFieldseekerLinelocationLocationpriorityEnum() +} + +func (e FieldseekerLinelocationLocationpriorityEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationLocationpriorityEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerLinelocationLocationpriorityEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationLocationpriorityEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerLinelocationLocationpriorityEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerLinelocationLocationpriorityEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerLinelocationLocationpriorityEnum(x) + case []byte: + *e = FieldseekerLinelocationLocationpriorityEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerLinelocationLocationpriorityEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerLinelocationLocationpriorityEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerLinelocationLocationsymbologyEnum +const ( + FieldseekerLinelocationLocationsymbologyEnumAction FieldseekerLinelocationLocationsymbologyEnum = "ACTION" + FieldseekerLinelocationLocationsymbologyEnumInactive FieldseekerLinelocationLocationsymbologyEnum = "INACTIVE" + FieldseekerLinelocationLocationsymbologyEnumNone FieldseekerLinelocationLocationsymbologyEnum = "NONE" +) + +func AllFieldseekerLinelocationLocationsymbologyEnum() []FieldseekerLinelocationLocationsymbologyEnum { + return []FieldseekerLinelocationLocationsymbologyEnum{ + FieldseekerLinelocationLocationsymbologyEnumAction, + FieldseekerLinelocationLocationsymbologyEnumInactive, + FieldseekerLinelocationLocationsymbologyEnumNone, + } +} + +type FieldseekerLinelocationLocationsymbologyEnum string + +func (e FieldseekerLinelocationLocationsymbologyEnum) String() string { + return string(e) +} + +func (e FieldseekerLinelocationLocationsymbologyEnum) Valid() bool { + switch e { + case FieldseekerLinelocationLocationsymbologyEnumAction, + FieldseekerLinelocationLocationsymbologyEnumInactive, + FieldseekerLinelocationLocationsymbologyEnumNone: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerLinelocationLocationsymbologyEnum) All() []FieldseekerLinelocationLocationsymbologyEnum { + return AllFieldseekerLinelocationLocationsymbologyEnum() +} + +func (e FieldseekerLinelocationLocationsymbologyEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationLocationsymbologyEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerLinelocationLocationsymbologyEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationLocationsymbologyEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerLinelocationLocationsymbologyEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerLinelocationLocationsymbologyEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerLinelocationLocationsymbologyEnum(x) + case []byte: + *e = FieldseekerLinelocationLocationsymbologyEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerLinelocationLocationsymbologyEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerLinelocationLocationsymbologyEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerLinelocationNotinuitFEnum +const ( + FieldseekerLinelocationNotinuitFEnum1 FieldseekerLinelocationNotinuitFEnum = "1" + FieldseekerLinelocationNotinuitFEnum0 FieldseekerLinelocationNotinuitFEnum = "0" +) + +func AllFieldseekerLinelocationNotinuitFEnum() []FieldseekerLinelocationNotinuitFEnum { + return []FieldseekerLinelocationNotinuitFEnum{ + FieldseekerLinelocationNotinuitFEnum1, + FieldseekerLinelocationNotinuitFEnum0, + } +} + +type FieldseekerLinelocationNotinuitFEnum string + +func (e FieldseekerLinelocationNotinuitFEnum) String() string { + return string(e) +} + +func (e FieldseekerLinelocationNotinuitFEnum) Valid() bool { + switch e { + case FieldseekerLinelocationNotinuitFEnum1, + FieldseekerLinelocationNotinuitFEnum0: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerLinelocationNotinuitFEnum) All() []FieldseekerLinelocationNotinuitFEnum { + return AllFieldseekerLinelocationNotinuitFEnum() +} + +func (e FieldseekerLinelocationNotinuitFEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationNotinuitFEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerLinelocationNotinuitFEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerLinelocationNotinuitFEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerLinelocationNotinuitFEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerLinelocationNotinuitFEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerLinelocationNotinuitFEnum(x) + case []byte: + *e = FieldseekerLinelocationNotinuitFEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerLinelocationNotinuitFEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerLinelocationNotinuitFEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerMosquitoinspectionMosquitoactivityEnum +const ( + FieldseekerMosquitoinspectionMosquitoactivityEnumRoutineInspection FieldseekerMosquitoinspectionMosquitoactivityEnum = "Routine inspection" + FieldseekerMosquitoinspectionMosquitoactivityEnumPreTreatment FieldseekerMosquitoinspectionMosquitoactivityEnum = "Pre-treatment" + FieldseekerMosquitoinspectionMosquitoactivityEnumMaintenance FieldseekerMosquitoinspectionMosquitoactivityEnum = "Maintenance" + FieldseekerMosquitoinspectionMosquitoactivityEnumUlv FieldseekerMosquitoinspectionMosquitoactivityEnum = "ULV" + FieldseekerMosquitoinspectionMosquitoactivityEnumBarrier FieldseekerMosquitoinspectionMosquitoactivityEnum = "BARRIER" + FieldseekerMosquitoinspectionMosquitoactivityEnumLogin FieldseekerMosquitoinspectionMosquitoactivityEnum = "LOGIN" + FieldseekerMosquitoinspectionMosquitoactivityEnumTreatsd FieldseekerMosquitoinspectionMosquitoactivityEnum = "TREATSD" + FieldseekerMosquitoinspectionMosquitoactivityEnumSD FieldseekerMosquitoinspectionMosquitoactivityEnum = "SD" + FieldseekerMosquitoinspectionMosquitoactivityEnumSitevisit FieldseekerMosquitoinspectionMosquitoactivityEnum = "SITEVISIT" + FieldseekerMosquitoinspectionMosquitoactivityEnumOnline FieldseekerMosquitoinspectionMosquitoactivityEnum = "ONLINE" + FieldseekerMosquitoinspectionMosquitoactivityEnumSync FieldseekerMosquitoinspectionMosquitoactivityEnum = "SYNC" + FieldseekerMosquitoinspectionMosquitoactivityEnumCreatesr FieldseekerMosquitoinspectionMosquitoactivityEnum = "CREATESR" + FieldseekerMosquitoinspectionMosquitoactivityEnumLC FieldseekerMosquitoinspectionMosquitoactivityEnum = "LC" + FieldseekerMosquitoinspectionMosquitoactivityEnumAcceptsr FieldseekerMosquitoinspectionMosquitoactivityEnum = "ACCEPTSR" + FieldseekerMosquitoinspectionMosquitoactivityEnumPoint FieldseekerMosquitoinspectionMosquitoactivityEnum = "POINT" + FieldseekerMosquitoinspectionMosquitoactivityEnumDownload FieldseekerMosquitoinspectionMosquitoactivityEnum = "DOWNLOAD" + FieldseekerMosquitoinspectionMosquitoactivityEnumCompletesr FieldseekerMosquitoinspectionMosquitoactivityEnum = "COMPLETESR" + FieldseekerMosquitoinspectionMosquitoactivityEnumPolygon FieldseekerMosquitoinspectionMosquitoactivityEnum = "POLYGON" + FieldseekerMosquitoinspectionMosquitoactivityEnumTrap FieldseekerMosquitoinspectionMosquitoactivityEnum = "TRAP" + FieldseekerMosquitoinspectionMosquitoactivityEnumSample FieldseekerMosquitoinspectionMosquitoactivityEnum = "SAMPLE" + FieldseekerMosquitoinspectionMosquitoactivityEnumQa FieldseekerMosquitoinspectionMosquitoactivityEnum = "QA" + FieldseekerMosquitoinspectionMosquitoactivityEnumPta FieldseekerMosquitoinspectionMosquitoactivityEnum = "PTA" + FieldseekerMosquitoinspectionMosquitoactivityEnumFieldscouting FieldseekerMosquitoinspectionMosquitoactivityEnum = "FIELDSCOUTING" + FieldseekerMosquitoinspectionMosquitoactivityEnumOffline FieldseekerMosquitoinspectionMosquitoactivityEnum = "OFFLINE" + FieldseekerMosquitoinspectionMosquitoactivityEnumLine FieldseekerMosquitoinspectionMosquitoactivityEnum = "LINE" + FieldseekerMosquitoinspectionMosquitoactivityEnumTraplocation FieldseekerMosquitoinspectionMosquitoactivityEnum = "TRAPLOCATION" + FieldseekerMosquitoinspectionMosquitoactivityEnumSamplelocation FieldseekerMosquitoinspectionMosquitoactivityEnum = "SAMPLELOCATION" + FieldseekerMosquitoinspectionMosquitoactivityEnumLclocation FieldseekerMosquitoinspectionMosquitoactivityEnum = "LCLOCATION" +) + +func AllFieldseekerMosquitoinspectionMosquitoactivityEnum() []FieldseekerMosquitoinspectionMosquitoactivityEnum { + return []FieldseekerMosquitoinspectionMosquitoactivityEnum{ + FieldseekerMosquitoinspectionMosquitoactivityEnumRoutineInspection, + FieldseekerMosquitoinspectionMosquitoactivityEnumPreTreatment, + FieldseekerMosquitoinspectionMosquitoactivityEnumMaintenance, + FieldseekerMosquitoinspectionMosquitoactivityEnumUlv, + FieldseekerMosquitoinspectionMosquitoactivityEnumBarrier, + FieldseekerMosquitoinspectionMosquitoactivityEnumLogin, + FieldseekerMosquitoinspectionMosquitoactivityEnumTreatsd, + FieldseekerMosquitoinspectionMosquitoactivityEnumSD, + FieldseekerMosquitoinspectionMosquitoactivityEnumSitevisit, + FieldseekerMosquitoinspectionMosquitoactivityEnumOnline, + FieldseekerMosquitoinspectionMosquitoactivityEnumSync, + FieldseekerMosquitoinspectionMosquitoactivityEnumCreatesr, + FieldseekerMosquitoinspectionMosquitoactivityEnumLC, + FieldseekerMosquitoinspectionMosquitoactivityEnumAcceptsr, + FieldseekerMosquitoinspectionMosquitoactivityEnumPoint, + FieldseekerMosquitoinspectionMosquitoactivityEnumDownload, + FieldseekerMosquitoinspectionMosquitoactivityEnumCompletesr, + FieldseekerMosquitoinspectionMosquitoactivityEnumPolygon, + FieldseekerMosquitoinspectionMosquitoactivityEnumTrap, + FieldseekerMosquitoinspectionMosquitoactivityEnumSample, + FieldseekerMosquitoinspectionMosquitoactivityEnumQa, + FieldseekerMosquitoinspectionMosquitoactivityEnumPta, + FieldseekerMosquitoinspectionMosquitoactivityEnumFieldscouting, + FieldseekerMosquitoinspectionMosquitoactivityEnumOffline, + FieldseekerMosquitoinspectionMosquitoactivityEnumLine, + FieldseekerMosquitoinspectionMosquitoactivityEnumTraplocation, + FieldseekerMosquitoinspectionMosquitoactivityEnumSamplelocation, + FieldseekerMosquitoinspectionMosquitoactivityEnumLclocation, + } +} + +type FieldseekerMosquitoinspectionMosquitoactivityEnum string + +func (e FieldseekerMosquitoinspectionMosquitoactivityEnum) String() string { + return string(e) +} + +func (e FieldseekerMosquitoinspectionMosquitoactivityEnum) Valid() bool { + switch e { + case FieldseekerMosquitoinspectionMosquitoactivityEnumRoutineInspection, + FieldseekerMosquitoinspectionMosquitoactivityEnumPreTreatment, + FieldseekerMosquitoinspectionMosquitoactivityEnumMaintenance, + FieldseekerMosquitoinspectionMosquitoactivityEnumUlv, + FieldseekerMosquitoinspectionMosquitoactivityEnumBarrier, + FieldseekerMosquitoinspectionMosquitoactivityEnumLogin, + FieldseekerMosquitoinspectionMosquitoactivityEnumTreatsd, + FieldseekerMosquitoinspectionMosquitoactivityEnumSD, + FieldseekerMosquitoinspectionMosquitoactivityEnumSitevisit, + FieldseekerMosquitoinspectionMosquitoactivityEnumOnline, + FieldseekerMosquitoinspectionMosquitoactivityEnumSync, + FieldseekerMosquitoinspectionMosquitoactivityEnumCreatesr, + FieldseekerMosquitoinspectionMosquitoactivityEnumLC, + FieldseekerMosquitoinspectionMosquitoactivityEnumAcceptsr, + FieldseekerMosquitoinspectionMosquitoactivityEnumPoint, + FieldseekerMosquitoinspectionMosquitoactivityEnumDownload, + FieldseekerMosquitoinspectionMosquitoactivityEnumCompletesr, + FieldseekerMosquitoinspectionMosquitoactivityEnumPolygon, + FieldseekerMosquitoinspectionMosquitoactivityEnumTrap, + FieldseekerMosquitoinspectionMosquitoactivityEnumSample, + FieldseekerMosquitoinspectionMosquitoactivityEnumQa, + FieldseekerMosquitoinspectionMosquitoactivityEnumPta, + FieldseekerMosquitoinspectionMosquitoactivityEnumFieldscouting, + FieldseekerMosquitoinspectionMosquitoactivityEnumOffline, + FieldseekerMosquitoinspectionMosquitoactivityEnumLine, + FieldseekerMosquitoinspectionMosquitoactivityEnumTraplocation, + FieldseekerMosquitoinspectionMosquitoactivityEnumSamplelocation, + FieldseekerMosquitoinspectionMosquitoactivityEnumLclocation: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerMosquitoinspectionMosquitoactivityEnum) All() []FieldseekerMosquitoinspectionMosquitoactivityEnum { + return AllFieldseekerMosquitoinspectionMosquitoactivityEnum() +} + +func (e FieldseekerMosquitoinspectionMosquitoactivityEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoactivityEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerMosquitoinspectionMosquitoactivityEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoactivityEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerMosquitoinspectionMosquitoactivityEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoactivityEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerMosquitoinspectionMosquitoactivityEnum(x) + case []byte: + *e = FieldseekerMosquitoinspectionMosquitoactivityEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerMosquitoinspectionMosquitoactivityEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerMosquitoinspectionMosquitoactivityEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerMosquitoinspectionMosquitoadultactivityEnum +const ( + FieldseekerMosquitoinspectionMosquitoadultactivityEnumNone FieldseekerMosquitoinspectionMosquitoadultactivityEnum = "None" + FieldseekerMosquitoinspectionMosquitoadultactivityEnumLight FieldseekerMosquitoinspectionMosquitoadultactivityEnum = "Light" + FieldseekerMosquitoinspectionMosquitoadultactivityEnumModerate FieldseekerMosquitoinspectionMosquitoadultactivityEnum = "Moderate" + FieldseekerMosquitoinspectionMosquitoadultactivityEnumIntense FieldseekerMosquitoinspectionMosquitoadultactivityEnum = "Intense" +) + +func AllFieldseekerMosquitoinspectionMosquitoadultactivityEnum() []FieldseekerMosquitoinspectionMosquitoadultactivityEnum { + return []FieldseekerMosquitoinspectionMosquitoadultactivityEnum{ + FieldseekerMosquitoinspectionMosquitoadultactivityEnumNone, + FieldseekerMosquitoinspectionMosquitoadultactivityEnumLight, + FieldseekerMosquitoinspectionMosquitoadultactivityEnumModerate, + FieldseekerMosquitoinspectionMosquitoadultactivityEnumIntense, + } +} + +type FieldseekerMosquitoinspectionMosquitoadultactivityEnum string + +func (e FieldseekerMosquitoinspectionMosquitoadultactivityEnum) String() string { + return string(e) +} + +func (e FieldseekerMosquitoinspectionMosquitoadultactivityEnum) Valid() bool { + switch e { + case FieldseekerMosquitoinspectionMosquitoadultactivityEnumNone, + FieldseekerMosquitoinspectionMosquitoadultactivityEnumLight, + FieldseekerMosquitoinspectionMosquitoadultactivityEnumModerate, + FieldseekerMosquitoinspectionMosquitoadultactivityEnumIntense: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerMosquitoinspectionMosquitoadultactivityEnum) All() []FieldseekerMosquitoinspectionMosquitoadultactivityEnum { + return AllFieldseekerMosquitoinspectionMosquitoadultactivityEnum() +} + +func (e FieldseekerMosquitoinspectionMosquitoadultactivityEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoadultactivityEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerMosquitoinspectionMosquitoadultactivityEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoadultactivityEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerMosquitoinspectionMosquitoadultactivityEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoadultactivityEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerMosquitoinspectionMosquitoadultactivityEnum(x) + case []byte: + *e = FieldseekerMosquitoinspectionMosquitoadultactivityEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerMosquitoinspectionMosquitoadultactivityEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerMosquitoinspectionMosquitoadultactivityEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerMosquitoinspectionMosquitobreedingEnum +const ( + FieldseekerMosquitoinspectionMosquitobreedingEnumNone FieldseekerMosquitoinspectionMosquitobreedingEnum = "None" + FieldseekerMosquitoinspectionMosquitobreedingEnumLight FieldseekerMosquitoinspectionMosquitobreedingEnum = "Light" + FieldseekerMosquitoinspectionMosquitobreedingEnumModerate FieldseekerMosquitoinspectionMosquitobreedingEnum = "Moderate" + FieldseekerMosquitoinspectionMosquitobreedingEnumIntense FieldseekerMosquitoinspectionMosquitobreedingEnum = "Intense" +) + +func AllFieldseekerMosquitoinspectionMosquitobreedingEnum() []FieldseekerMosquitoinspectionMosquitobreedingEnum { + return []FieldseekerMosquitoinspectionMosquitobreedingEnum{ + FieldseekerMosquitoinspectionMosquitobreedingEnumNone, + FieldseekerMosquitoinspectionMosquitobreedingEnumLight, + FieldseekerMosquitoinspectionMosquitobreedingEnumModerate, + FieldseekerMosquitoinspectionMosquitobreedingEnumIntense, + } +} + +type FieldseekerMosquitoinspectionMosquitobreedingEnum string + +func (e FieldseekerMosquitoinspectionMosquitobreedingEnum) String() string { + return string(e) +} + +func (e FieldseekerMosquitoinspectionMosquitobreedingEnum) Valid() bool { + switch e { + case FieldseekerMosquitoinspectionMosquitobreedingEnumNone, + FieldseekerMosquitoinspectionMosquitobreedingEnumLight, + FieldseekerMosquitoinspectionMosquitobreedingEnumModerate, + FieldseekerMosquitoinspectionMosquitobreedingEnumIntense: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerMosquitoinspectionMosquitobreedingEnum) All() []FieldseekerMosquitoinspectionMosquitobreedingEnum { + return AllFieldseekerMosquitoinspectionMosquitobreedingEnum() +} + +func (e FieldseekerMosquitoinspectionMosquitobreedingEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitobreedingEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerMosquitoinspectionMosquitobreedingEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitobreedingEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerMosquitoinspectionMosquitobreedingEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitobreedingEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerMosquitoinspectionMosquitobreedingEnum(x) + case []byte: + *e = FieldseekerMosquitoinspectionMosquitobreedingEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerMosquitoinspectionMosquitobreedingEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerMosquitoinspectionMosquitobreedingEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerMosquitoinspectionMosquitofieldspeciesEnum +const ( + FieldseekerMosquitoinspectionMosquitofieldspeciesEnumAedes FieldseekerMosquitoinspectionMosquitofieldspeciesEnum = "Aedes" + FieldseekerMosquitoinspectionMosquitofieldspeciesEnumCulex FieldseekerMosquitoinspectionMosquitofieldspeciesEnum = "Culex" +) + +func AllFieldseekerMosquitoinspectionMosquitofieldspeciesEnum() []FieldseekerMosquitoinspectionMosquitofieldspeciesEnum { + return []FieldseekerMosquitoinspectionMosquitofieldspeciesEnum{ + FieldseekerMosquitoinspectionMosquitofieldspeciesEnumAedes, + FieldseekerMosquitoinspectionMosquitofieldspeciesEnumCulex, + } +} + +type FieldseekerMosquitoinspectionMosquitofieldspeciesEnum string + +func (e FieldseekerMosquitoinspectionMosquitofieldspeciesEnum) String() string { + return string(e) +} + +func (e FieldseekerMosquitoinspectionMosquitofieldspeciesEnum) Valid() bool { + switch e { + case FieldseekerMosquitoinspectionMosquitofieldspeciesEnumAedes, + FieldseekerMosquitoinspectionMosquitofieldspeciesEnumCulex: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerMosquitoinspectionMosquitofieldspeciesEnum) All() []FieldseekerMosquitoinspectionMosquitofieldspeciesEnum { + return AllFieldseekerMosquitoinspectionMosquitofieldspeciesEnum() +} + +func (e FieldseekerMosquitoinspectionMosquitofieldspeciesEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitofieldspeciesEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerMosquitoinspectionMosquitofieldspeciesEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitofieldspeciesEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerMosquitoinspectionMosquitofieldspeciesEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitofieldspeciesEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerMosquitoinspectionMosquitofieldspeciesEnum(x) + case []byte: + *e = FieldseekerMosquitoinspectionMosquitofieldspeciesEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerMosquitoinspectionMosquitofieldspeciesEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerMosquitoinspectionMosquitofieldspeciesEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 +const ( + FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4Treatment FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 = "Treatment" + FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4MechanicalOrBiologicalTreatment FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 = "Mechanical or Biological Treatment" + FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4ResidentScheduleRequest FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 = "Resident Schedule Request" + FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4Administrative FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 = "Administrative" +) + +func AllFieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4() []FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 { + return []FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4{ + FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4Treatment, + FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4MechanicalOrBiologicalTreatment, + FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4ResidentScheduleRequest, + FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4Administrative, + } +} + +type FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 string + +func (e FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4) String() string { + return string(e) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4) Valid() bool { + switch e { + case FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4Treatment, + FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4MechanicalOrBiologicalTreatment, + FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4ResidentScheduleRequest, + FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4Administrative: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4) All() []FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 { + return AllFieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4() +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4(x) + case []byte: + *e = FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B +const ( + FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98BYes FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B = "yes" + FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98BNo FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B = "no" +) + +func AllFieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B() []FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B { + return []FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B{ + FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98BYes, + FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98BNo, + } +} + +type FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B string + +func (e FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B) String() string { + return string(e) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B) Valid() bool { + switch e { + case FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98BYes, + FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98BNo: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B) All() []FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B { + return AllFieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B() +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B(x) + case []byte: + *e = FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 +const ( + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a21 FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 = "1" + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a22 FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 = "2" + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a23 FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 = "3" + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a24 FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 = "4" + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a25 FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 = "5" + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a21_2 FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 = "1-2" + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a22_3 FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 = "2-3" + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a23_4 FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 = "3-4" +) + +func AllFieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2() []FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 { + return []FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2{ + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a21, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a22, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a23, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a24, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a25, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a21_2, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a22_3, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a23_4, + } +} + +type FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 string + +func (e FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2) String() string { + return string(e) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2) Valid() bool { + switch e { + case FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a21, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a22, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a23, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a24, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a25, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a21_2, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a22_3, + FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a23_4: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2) All() []FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 { + return AllFieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2() +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2(x) + case []byte: + *e = FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 +const ( + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Dry FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "Dry" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Flowing FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "Flowing" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Maintained FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "Maintained" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Unmaintained FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "Unmaintained" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540HighOrganic FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "High Organic" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Unknown FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "Unknown" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Stagnant FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "Stagnant" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540NeedsMonitoring FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "Needs Monitoring" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540DryingOut FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "Drying Out" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540AppearsVacant FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "Appears Vacant" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540EntryDenied FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "Entry Denied" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540PoolRemoved FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "Pool Removed" + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540FalsePool FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 = "False Pool" +) + +func AllFieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540() []FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 { + return []FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540{ + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Dry, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Flowing, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Maintained, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Unmaintained, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540HighOrganic, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Unknown, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Stagnant, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540NeedsMonitoring, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540DryingOut, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540AppearsVacant, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540EntryDenied, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540PoolRemoved, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540FalsePool, + } +} + +type FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 string + +func (e FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540) String() string { + return string(e) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540) Valid() bool { + switch e { + case FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Dry, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Flowing, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Maintained, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Unmaintained, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540HighOrganic, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Unknown, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540Stagnant, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540NeedsMonitoring, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540DryingOut, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540AppearsVacant, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540EntryDenied, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540PoolRemoved, + FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540FalsePool: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540) All() []FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 { + return AllFieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540() +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540(x) + case []byte: + *e = FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerMosquitoinspectionNotinuitFEnum +const ( + FieldseekerMosquitoinspectionNotinuitFEnum1 FieldseekerMosquitoinspectionNotinuitFEnum = "1" + FieldseekerMosquitoinspectionNotinuitFEnum0 FieldseekerMosquitoinspectionNotinuitFEnum = "0" +) + +func AllFieldseekerMosquitoinspectionNotinuitFEnum() []FieldseekerMosquitoinspectionNotinuitFEnum { + return []FieldseekerMosquitoinspectionNotinuitFEnum{ + FieldseekerMosquitoinspectionNotinuitFEnum1, + FieldseekerMosquitoinspectionNotinuitFEnum0, + } +} + +type FieldseekerMosquitoinspectionNotinuitFEnum string + +func (e FieldseekerMosquitoinspectionNotinuitFEnum) String() string { + return string(e) +} + +func (e FieldseekerMosquitoinspectionNotinuitFEnum) Valid() bool { + switch e { + case FieldseekerMosquitoinspectionNotinuitFEnum1, + FieldseekerMosquitoinspectionNotinuitFEnum0: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerMosquitoinspectionNotinuitFEnum) All() []FieldseekerMosquitoinspectionNotinuitFEnum { + return AllFieldseekerMosquitoinspectionNotinuitFEnum() +} + +func (e FieldseekerMosquitoinspectionNotinuitFEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionNotinuitFEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerMosquitoinspectionNotinuitFEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionNotinuitFEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerMosquitoinspectionNotinuitFEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerMosquitoinspectionNotinuitFEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerMosquitoinspectionNotinuitFEnum(x) + case []byte: + *e = FieldseekerMosquitoinspectionNotinuitFEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerMosquitoinspectionNotinuitFEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerMosquitoinspectionNotinuitFEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerMosquitoinspectionNotinuiwinddirectionEnum +const ( + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumN FieldseekerMosquitoinspectionNotinuiwinddirectionEnum = "N" + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumNe FieldseekerMosquitoinspectionNotinuiwinddirectionEnum = "NE" + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumE FieldseekerMosquitoinspectionNotinuiwinddirectionEnum = "E" + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumSe FieldseekerMosquitoinspectionNotinuiwinddirectionEnum = "SE" + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumS FieldseekerMosquitoinspectionNotinuiwinddirectionEnum = "S" + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumSW FieldseekerMosquitoinspectionNotinuiwinddirectionEnum = "SW" + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumW FieldseekerMosquitoinspectionNotinuiwinddirectionEnum = "W" + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumNW FieldseekerMosquitoinspectionNotinuiwinddirectionEnum = "NW" +) + +func AllFieldseekerMosquitoinspectionNotinuiwinddirectionEnum() []FieldseekerMosquitoinspectionNotinuiwinddirectionEnum { + return []FieldseekerMosquitoinspectionNotinuiwinddirectionEnum{ + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumN, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumNe, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumE, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumSe, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumS, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumSW, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumW, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumNW, + } +} + +type FieldseekerMosquitoinspectionNotinuiwinddirectionEnum string + +func (e FieldseekerMosquitoinspectionNotinuiwinddirectionEnum) String() string { + return string(e) +} + +func (e FieldseekerMosquitoinspectionNotinuiwinddirectionEnum) Valid() bool { + switch e { + case FieldseekerMosquitoinspectionNotinuiwinddirectionEnumN, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumNe, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumE, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumSe, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumS, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumSW, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumW, + FieldseekerMosquitoinspectionNotinuiwinddirectionEnumNW: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerMosquitoinspectionNotinuiwinddirectionEnum) All() []FieldseekerMosquitoinspectionNotinuiwinddirectionEnum { + return AllFieldseekerMosquitoinspectionNotinuiwinddirectionEnum() +} + +func (e FieldseekerMosquitoinspectionNotinuiwinddirectionEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionNotinuiwinddirectionEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerMosquitoinspectionNotinuiwinddirectionEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerMosquitoinspectionNotinuiwinddirectionEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerMosquitoinspectionNotinuiwinddirectionEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerMosquitoinspectionNotinuiwinddirectionEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerMosquitoinspectionNotinuiwinddirectionEnum(x) + case []byte: + *e = FieldseekerMosquitoinspectionNotinuiwinddirectionEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerMosquitoinspectionNotinuiwinddirectionEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerMosquitoinspectionNotinuiwinddirectionEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPointlocationLocationpriorityEnum +const ( + FieldseekerPointlocationLocationpriorityEnumLow FieldseekerPointlocationLocationpriorityEnum = "Low" + FieldseekerPointlocationLocationpriorityEnumMedium FieldseekerPointlocationLocationpriorityEnum = "Medium" + FieldseekerPointlocationLocationpriorityEnumHigh FieldseekerPointlocationLocationpriorityEnum = "High" + FieldseekerPointlocationLocationpriorityEnumNone FieldseekerPointlocationLocationpriorityEnum = "None" +) + +func AllFieldseekerPointlocationLocationpriorityEnum() []FieldseekerPointlocationLocationpriorityEnum { + return []FieldseekerPointlocationLocationpriorityEnum{ + FieldseekerPointlocationLocationpriorityEnumLow, + FieldseekerPointlocationLocationpriorityEnumMedium, + FieldseekerPointlocationLocationpriorityEnumHigh, + FieldseekerPointlocationLocationpriorityEnumNone, + } +} + +type FieldseekerPointlocationLocationpriorityEnum string + +func (e FieldseekerPointlocationLocationpriorityEnum) String() string { + return string(e) +} + +func (e FieldseekerPointlocationLocationpriorityEnum) Valid() bool { + switch e { + case FieldseekerPointlocationLocationpriorityEnumLow, + FieldseekerPointlocationLocationpriorityEnumMedium, + FieldseekerPointlocationLocationpriorityEnumHigh, + FieldseekerPointlocationLocationpriorityEnumNone: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPointlocationLocationpriorityEnum) All() []FieldseekerPointlocationLocationpriorityEnum { + return AllFieldseekerPointlocationLocationpriorityEnum() +} + +func (e FieldseekerPointlocationLocationpriorityEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationLocationpriorityEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPointlocationLocationpriorityEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationLocationpriorityEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPointlocationLocationpriorityEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPointlocationLocationpriorityEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPointlocationLocationpriorityEnum(x) + case []byte: + *e = FieldseekerPointlocationLocationpriorityEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPointlocationLocationpriorityEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPointlocationLocationpriorityEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPointlocationLocationsymbologyEnum +const ( + FieldseekerPointlocationLocationsymbologyEnumAction FieldseekerPointlocationLocationsymbologyEnum = "ACTION" + FieldseekerPointlocationLocationsymbologyEnumInactive FieldseekerPointlocationLocationsymbologyEnum = "INACTIVE" + FieldseekerPointlocationLocationsymbologyEnumNone FieldseekerPointlocationLocationsymbologyEnum = "NONE" +) + +func AllFieldseekerPointlocationLocationsymbologyEnum() []FieldseekerPointlocationLocationsymbologyEnum { + return []FieldseekerPointlocationLocationsymbologyEnum{ + FieldseekerPointlocationLocationsymbologyEnumAction, + FieldseekerPointlocationLocationsymbologyEnumInactive, + FieldseekerPointlocationLocationsymbologyEnumNone, + } +} + +type FieldseekerPointlocationLocationsymbologyEnum string + +func (e FieldseekerPointlocationLocationsymbologyEnum) String() string { + return string(e) +} + +func (e FieldseekerPointlocationLocationsymbologyEnum) Valid() bool { + switch e { + case FieldseekerPointlocationLocationsymbologyEnumAction, + FieldseekerPointlocationLocationsymbologyEnumInactive, + FieldseekerPointlocationLocationsymbologyEnumNone: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPointlocationLocationsymbologyEnum) All() []FieldseekerPointlocationLocationsymbologyEnum { + return AllFieldseekerPointlocationLocationsymbologyEnum() +} + +func (e FieldseekerPointlocationLocationsymbologyEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationLocationsymbologyEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPointlocationLocationsymbologyEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationLocationsymbologyEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPointlocationLocationsymbologyEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPointlocationLocationsymbologyEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPointlocationLocationsymbologyEnum(x) + case []byte: + *e = FieldseekerPointlocationLocationsymbologyEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPointlocationLocationsymbologyEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPointlocationLocationsymbologyEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPointlocationNotinuitFEnum +const ( + FieldseekerPointlocationNotinuitFEnum1 FieldseekerPointlocationNotinuitFEnum = "1" + FieldseekerPointlocationNotinuitFEnum0 FieldseekerPointlocationNotinuitFEnum = "0" +) + +func AllFieldseekerPointlocationNotinuitFEnum() []FieldseekerPointlocationNotinuitFEnum { + return []FieldseekerPointlocationNotinuitFEnum{ + FieldseekerPointlocationNotinuitFEnum1, + FieldseekerPointlocationNotinuitFEnum0, + } +} + +type FieldseekerPointlocationNotinuitFEnum string + +func (e FieldseekerPointlocationNotinuitFEnum) String() string { + return string(e) +} + +func (e FieldseekerPointlocationNotinuitFEnum) Valid() bool { + switch e { + case FieldseekerPointlocationNotinuitFEnum1, + FieldseekerPointlocationNotinuitFEnum0: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPointlocationNotinuitFEnum) All() []FieldseekerPointlocationNotinuitFEnum { + return AllFieldseekerPointlocationNotinuitFEnum() +} + +func (e FieldseekerPointlocationNotinuitFEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationNotinuitFEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPointlocationNotinuitFEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationNotinuitFEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPointlocationNotinuitFEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPointlocationNotinuitFEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPointlocationNotinuitFEnum(x) + case []byte: + *e = FieldseekerPointlocationNotinuitFEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPointlocationNotinuitFEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPointlocationNotinuitFEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B +const ( + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BBryanFeguson FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Bryan Feguson" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BRickAlverez FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Rick Alverez" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAlysiaDavis FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Alysia Davis" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BBryanRuiz FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Bryan Ruiz" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BKoryWilson FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Kory Wilson" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAdrianSifuentes FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Adrian Sifuentes" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BMarcoMartinez FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Marco Martinez" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BCarlosRodriguez FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Carlos Rodriguez" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLandonMcgill FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Landon McGill" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BTedMcgill FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Ted McGill" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BMarioSanchez FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Mario Sanchez" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BJorgePerez FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Jorge Perez" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BArturoGarciaTrejo FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Arturo Garcia-Trejo" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLisaSalgado FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Lisa Salgado" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLawrenceGuzman FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Lawrence Guzman" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BTriciaSnowden FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Tricia Snowden" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BRyanSpratt FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Ryan Spratt" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAndreaTroupin FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Andrea Troupin" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BMarkNakata FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Mark Nakata" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BPabloOrtega FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Pablo Ortega" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BBenjaminSperry FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Benjamin Sperry" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BFatimaHidalgo FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Fatima Hidalgo" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BZackeryBarragan FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Zackery Barragan" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BYajairaGodinez FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Yajaira Godinez" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BJakeMaldonado FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Jake Maldonado" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BRafaelRamirez FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Rafael Ramirez" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BCarlosPalacios FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Carlos Palacios" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAaronFredrick FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Aaron Fredrick" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BJoshMalone FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Josh Malone" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAlecCaposella FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Alec Caposella" + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLauraRamos FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B = "Laura Ramos" +) + +func AllFieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B() []FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B { + return []FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B{ + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BBryanFeguson, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BRickAlverez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAlysiaDavis, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BBryanRuiz, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BKoryWilson, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAdrianSifuentes, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BMarcoMartinez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BCarlosRodriguez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLandonMcgill, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BTedMcgill, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BMarioSanchez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BJorgePerez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BArturoGarciaTrejo, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLisaSalgado, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLawrenceGuzman, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BTriciaSnowden, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BRyanSpratt, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAndreaTroupin, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BMarkNakata, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BPabloOrtega, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BBenjaminSperry, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BFatimaHidalgo, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BZackeryBarragan, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BYajairaGodinez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BJakeMaldonado, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BRafaelRamirez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BCarlosPalacios, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAaronFredrick, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BJoshMalone, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAlecCaposella, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLauraRamos, + } +} + +type FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B string + +func (e FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B) String() string { + return string(e) +} + +func (e FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B) Valid() bool { + switch e { + case FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BBryanFeguson, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BRickAlverez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAlysiaDavis, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BBryanRuiz, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BKoryWilson, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAdrianSifuentes, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BMarcoMartinez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BCarlosRodriguez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLandonMcgill, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BTedMcgill, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BMarioSanchez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BJorgePerez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BArturoGarciaTrejo, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLisaSalgado, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLawrenceGuzman, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BTriciaSnowden, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BRyanSpratt, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAndreaTroupin, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BMarkNakata, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BPabloOrtega, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BBenjaminSperry, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BFatimaHidalgo, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BZackeryBarragan, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BYajairaGodinez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BJakeMaldonado, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BRafaelRamirez, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BCarlosPalacios, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAaronFredrick, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BJoshMalone, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BAlecCaposella, + FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85BLauraRamos: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B) All() []FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B { + return AllFieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B() +} + +func (e FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B(x) + case []byte: + *e = FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 +const ( + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489SourceRemoved FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 = "Source Removed" + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489PoolMaintained FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 = "Pool Maintained" + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489SourceScreened FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 = "Source Screened" + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489CropChange FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 = "Crop Change" + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489LowOrNoMosquitoActivity FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 = "Low or No Mosquito Activity" + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489ConsistentFishPresence FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 = "Consistent Fish Presence" +) + +func AllFieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489() []FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 { + return []FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489{ + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489SourceRemoved, + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489PoolMaintained, + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489SourceScreened, + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489CropChange, + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489LowOrNoMosquitoActivity, + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489ConsistentFishPresence, + } +} + +type FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 string + +func (e FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489) String() string { + return string(e) +} + +func (e FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489) Valid() bool { + switch e { + case FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489SourceRemoved, + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489PoolMaintained, + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489SourceScreened, + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489CropChange, + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489LowOrNoMosquitoActivity, + FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489ConsistentFishPresence: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489) All() []FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 { + return AllFieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489() +} + +func (e FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489(x) + case []byte: + *e = FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e +const ( + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eOrchard FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "orchard" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eRowCrops FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "row_crops" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eVineCrops FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "vine_crops" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eAgGrassesOrGrain FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "ag_grasses_or_grain" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePasture FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "pasture" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eIrrigationStandpipe FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "irrigation_standpipe" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDitch FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "ditch" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePond FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "pond" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eSump FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "sump" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDrain FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "drain" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDairyLagoon FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "dairy_lagoon" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eWastewaterTreatment FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "wastewater_treatment" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTrough FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "trough" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDepression FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "depression" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eGutter FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "gutter" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eRainGutter FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "rain_gutter" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eCulvert FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "culvert" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eUtility FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "utility" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eCatchBasin FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "catch_basin" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eStreamOrCreek FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "stream_or_creek" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eSlough FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "slough" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eRiver FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "river" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eMarshOrWetlands FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "marsh_or_wetlands" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eContainers FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "containers" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eWateringBowl FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "watering_bowl" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePlantSaucer FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "plant_saucer" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eYardDrain FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "yard_drain" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePlantAxil FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "plant_axil" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTreehole FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "treehole" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eFountainOrWaterFeature FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "fountain_or_water_feature" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eBirdBath FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "bird_bath" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eMiscWaterAccumulation FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "misc_water_accumulation" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTarpOrCover FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "tarp_or_cover" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eSwimmingPool FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "swimming_pool" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eAbovegroundPool FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "aboveground_pool" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eKidPool FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "kid_pool" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eHotTub FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "hot_tub" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eAppliance FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "appliance" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTires FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "tires" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eFloodedStructure FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "flooded_structure" + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eLowPoint FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e = "low_point" +) + +func AllFieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e() []FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e { + return []FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e{ + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eOrchard, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eRowCrops, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eVineCrops, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eAgGrassesOrGrain, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePasture, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eIrrigationStandpipe, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDitch, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePond, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eSump, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDrain, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDairyLagoon, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eWastewaterTreatment, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTrough, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDepression, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eGutter, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eRainGutter, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eCulvert, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eUtility, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eCatchBasin, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eStreamOrCreek, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eSlough, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eRiver, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eMarshOrWetlands, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eContainers, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eWateringBowl, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePlantSaucer, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eYardDrain, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePlantAxil, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTreehole, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eFountainOrWaterFeature, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eBirdBath, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eMiscWaterAccumulation, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTarpOrCover, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eSwimmingPool, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eAbovegroundPool, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eKidPool, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eHotTub, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eAppliance, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTires, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eFloodedStructure, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eLowPoint, + } +} + +type FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e string + +func (e FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e) String() string { + return string(e) +} + +func (e FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e) Valid() bool { + switch e { + case FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eOrchard, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eRowCrops, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eVineCrops, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eAgGrassesOrGrain, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePasture, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eIrrigationStandpipe, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDitch, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePond, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eSump, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDrain, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDairyLagoon, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eWastewaterTreatment, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTrough, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eDepression, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eGutter, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eRainGutter, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eCulvert, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eUtility, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eCatchBasin, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eStreamOrCreek, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eSlough, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eRiver, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eMarshOrWetlands, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eContainers, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eWateringBowl, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePlantSaucer, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eYardDrain, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367ePlantAxil, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTreehole, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eFountainOrWaterFeature, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eBirdBath, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eMiscWaterAccumulation, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTarpOrCover, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eSwimmingPool, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eAbovegroundPool, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eKidPool, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eHotTub, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eAppliance, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eTires, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eFloodedStructure, + FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367eLowPoint: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e) All() []FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e { + return AllFieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e() +} + +func (e FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e(x) + case []byte: + *e = FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 +const ( + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Residential FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 = "residential" + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Commercial FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 = "commercial" + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Agricultural FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 = "agricultural" + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Industrial FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 = "industrial" + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86MixedUse FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 = "mixed_use" + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86PublicDomain FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 = "public_domain" + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Natural FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 = "natural" + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Municipal FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 = "municipal" +) + +func AllFieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86() []FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 { + return []FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86{ + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Residential, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Commercial, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Agricultural, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Industrial, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86MixedUse, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86PublicDomain, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Natural, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Municipal, + } +} + +type FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 string + +func (e FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86) String() string { + return string(e) +} + +func (e FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86) Valid() bool { + switch e { + case FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Residential, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Commercial, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Agricultural, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Industrial, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86MixedUse, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86PublicDomain, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Natural, + FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86Municipal: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86) All() []FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 { + return AllFieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86() +} + +func (e FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86(x) + case []byte: + *e = FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 +const ( + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899FloodIrrigation FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "flood_irrigation" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899FurrowIrrigation FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "furrow_irrigation" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899DripIrrigation FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "drip_irrigation" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899SprinklerIrrigation FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "sprinkler_irrigation" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899WastewaterIrrigation FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "wastewater_irrigation" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899IrrigationRunoff FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "irrigation_runoff" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899StormwaterOrMunicipalRunoff FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "stormwater_or_municipal_runoff" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899IndustrialRunoff FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "industrial_runoff" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899RainwaterAccumulation FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "rainwater_accumulation" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899Leak FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "leak" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899Seepage FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "seepage" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899StoredWater FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "stored_water" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899WastewaterSystem FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "wastewater_system" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899PermanentNaturalWater FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "permanent_natural_water" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899TemporaryNaturalWater FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "temporary_natural_water" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899RecreationalOrOrenamentalWater FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "recreational_or_orenamental_water" + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899WaterConveyance FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 = "water_conveyance" +) + +func AllFieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899() []FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 { + return []FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899{ + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899FloodIrrigation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899FurrowIrrigation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899DripIrrigation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899SprinklerIrrigation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899WastewaterIrrigation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899IrrigationRunoff, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899StormwaterOrMunicipalRunoff, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899IndustrialRunoff, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899RainwaterAccumulation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899Leak, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899Seepage, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899StoredWater, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899WastewaterSystem, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899PermanentNaturalWater, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899TemporaryNaturalWater, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899RecreationalOrOrenamentalWater, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899WaterConveyance, + } +} + +type FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 string + +func (e FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899) String() string { + return string(e) +} + +func (e FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899) Valid() bool { + switch e { + case FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899FloodIrrigation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899FurrowIrrigation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899DripIrrigation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899SprinklerIrrigation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899WastewaterIrrigation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899IrrigationRunoff, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899StormwaterOrMunicipalRunoff, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899IndustrialRunoff, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899RainwaterAccumulation, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899Leak, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899Seepage, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899StoredWater, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899WastewaterSystem, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899PermanentNaturalWater, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899TemporaryNaturalWater, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899RecreationalOrOrenamentalWater, + FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899WaterConveyance: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899) All() []FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 { + return AllFieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899() +} + +func (e FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899(x) + case []byte: + *e = FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPolygonlocationLocationpriorityEnum +const ( + FieldseekerPolygonlocationLocationpriorityEnumLow FieldseekerPolygonlocationLocationpriorityEnum = "Low" + FieldseekerPolygonlocationLocationpriorityEnumMedium FieldseekerPolygonlocationLocationpriorityEnum = "Medium" + FieldseekerPolygonlocationLocationpriorityEnumHigh FieldseekerPolygonlocationLocationpriorityEnum = "High" + FieldseekerPolygonlocationLocationpriorityEnumNone FieldseekerPolygonlocationLocationpriorityEnum = "None" +) + +func AllFieldseekerPolygonlocationLocationpriorityEnum() []FieldseekerPolygonlocationLocationpriorityEnum { + return []FieldseekerPolygonlocationLocationpriorityEnum{ + FieldseekerPolygonlocationLocationpriorityEnumLow, + FieldseekerPolygonlocationLocationpriorityEnumMedium, + FieldseekerPolygonlocationLocationpriorityEnumHigh, + FieldseekerPolygonlocationLocationpriorityEnumNone, + } +} + +type FieldseekerPolygonlocationLocationpriorityEnum string + +func (e FieldseekerPolygonlocationLocationpriorityEnum) String() string { + return string(e) +} + +func (e FieldseekerPolygonlocationLocationpriorityEnum) Valid() bool { + switch e { + case FieldseekerPolygonlocationLocationpriorityEnumLow, + FieldseekerPolygonlocationLocationpriorityEnumMedium, + FieldseekerPolygonlocationLocationpriorityEnumHigh, + FieldseekerPolygonlocationLocationpriorityEnumNone: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPolygonlocationLocationpriorityEnum) All() []FieldseekerPolygonlocationLocationpriorityEnum { + return AllFieldseekerPolygonlocationLocationpriorityEnum() +} + +func (e FieldseekerPolygonlocationLocationpriorityEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationLocationpriorityEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPolygonlocationLocationpriorityEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationLocationpriorityEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPolygonlocationLocationpriorityEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPolygonlocationLocationpriorityEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPolygonlocationLocationpriorityEnum(x) + case []byte: + *e = FieldseekerPolygonlocationLocationpriorityEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPolygonlocationLocationpriorityEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPolygonlocationLocationpriorityEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPolygonlocationLocationsymbologyEnum +const ( + FieldseekerPolygonlocationLocationsymbologyEnumAction FieldseekerPolygonlocationLocationsymbologyEnum = "ACTION" + FieldseekerPolygonlocationLocationsymbologyEnumInactive FieldseekerPolygonlocationLocationsymbologyEnum = "INACTIVE" + FieldseekerPolygonlocationLocationsymbologyEnumNone FieldseekerPolygonlocationLocationsymbologyEnum = "NONE" +) + +func AllFieldseekerPolygonlocationLocationsymbologyEnum() []FieldseekerPolygonlocationLocationsymbologyEnum { + return []FieldseekerPolygonlocationLocationsymbologyEnum{ + FieldseekerPolygonlocationLocationsymbologyEnumAction, + FieldseekerPolygonlocationLocationsymbologyEnumInactive, + FieldseekerPolygonlocationLocationsymbologyEnumNone, + } +} + +type FieldseekerPolygonlocationLocationsymbologyEnum string + +func (e FieldseekerPolygonlocationLocationsymbologyEnum) String() string { + return string(e) +} + +func (e FieldseekerPolygonlocationLocationsymbologyEnum) Valid() bool { + switch e { + case FieldseekerPolygonlocationLocationsymbologyEnumAction, + FieldseekerPolygonlocationLocationsymbologyEnumInactive, + FieldseekerPolygonlocationLocationsymbologyEnumNone: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPolygonlocationLocationsymbologyEnum) All() []FieldseekerPolygonlocationLocationsymbologyEnum { + return AllFieldseekerPolygonlocationLocationsymbologyEnum() +} + +func (e FieldseekerPolygonlocationLocationsymbologyEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationLocationsymbologyEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPolygonlocationLocationsymbologyEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationLocationsymbologyEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPolygonlocationLocationsymbologyEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPolygonlocationLocationsymbologyEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPolygonlocationLocationsymbologyEnum(x) + case []byte: + *e = FieldseekerPolygonlocationLocationsymbologyEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPolygonlocationLocationsymbologyEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPolygonlocationLocationsymbologyEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPolygonlocationNotinuitFEnum +const ( + FieldseekerPolygonlocationNotinuitFEnum1 FieldseekerPolygonlocationNotinuitFEnum = "1" + FieldseekerPolygonlocationNotinuitFEnum0 FieldseekerPolygonlocationNotinuitFEnum = "0" +) + +func AllFieldseekerPolygonlocationNotinuitFEnum() []FieldseekerPolygonlocationNotinuitFEnum { + return []FieldseekerPolygonlocationNotinuitFEnum{ + FieldseekerPolygonlocationNotinuitFEnum1, + FieldseekerPolygonlocationNotinuitFEnum0, + } +} + +type FieldseekerPolygonlocationNotinuitFEnum string + +func (e FieldseekerPolygonlocationNotinuitFEnum) String() string { + return string(e) +} + +func (e FieldseekerPolygonlocationNotinuitFEnum) Valid() bool { + switch e { + case FieldseekerPolygonlocationNotinuitFEnum1, + FieldseekerPolygonlocationNotinuitFEnum0: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPolygonlocationNotinuitFEnum) All() []FieldseekerPolygonlocationNotinuitFEnum { + return AllFieldseekerPolygonlocationNotinuitFEnum() +} + +func (e FieldseekerPolygonlocationNotinuitFEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationNotinuitFEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPolygonlocationNotinuitFEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationNotinuitFEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPolygonlocationNotinuitFEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPolygonlocationNotinuitFEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPolygonlocationNotinuitFEnum(x) + case []byte: + *e = FieldseekerPolygonlocationNotinuitFEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPolygonlocationNotinuitFEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPolygonlocationNotinuitFEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 +const ( + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Orchard FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "orchard" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65RowCrops FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "row_crops" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65VineCrops FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "vine_crops" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65AgGrassesOrGrain FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "ag_grasses_or_grain" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Pasture FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "pasture" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65IrrigationStandpipe FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "irrigation_standpipe" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Ditch FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "ditch" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65DairyLagoon FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "dairy_lagoon" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65WastewaterTreatment FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "wastewater_treatment" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Trough FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "trough" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Depression FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "depression" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Gutter FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "gutter" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65RainGutter FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "rain_gutter" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Culvert FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "culvert" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Utility FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "utility" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65CatchBasin FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "catch_basin" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65StreamOrCreek FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "stream_or_creek" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Slough FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "slough" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65River FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "river" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65MarshOrWetland FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "marsh_or_wetland" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Containers FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "containers" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65WateringBowl FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "watering_bowl" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65PlantSaucer FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "plant_saucer" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65YardDrain FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "yard_drain" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65PlantAxil FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "plant_axil" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Treehole FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "treehole" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65FountainOrWaterFeature FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "fountain_or_water_feature" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65BirdBath FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "bird_bath" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65MiscWaterAccumulation FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "misc_water_accumulation" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65TarpOrCover FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "tarp_or_cover" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65SwimmingPool FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "swimming_pool" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65AbovegroundPool FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "aboveground_pool" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65KidPool FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "kid_pool" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65HotTub FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "hot_tub" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Appliance FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "appliance" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Tires FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "tires" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65FloodedStructure FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "flooded_structure" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65LowPoint FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "low_point" + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Unknown FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 = "unknown" +) + +func AllFieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65() []FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 { + return []FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65{ + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Orchard, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65RowCrops, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65VineCrops, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65AgGrassesOrGrain, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Pasture, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65IrrigationStandpipe, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Ditch, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65DairyLagoon, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65WastewaterTreatment, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Trough, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Depression, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Gutter, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65RainGutter, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Culvert, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Utility, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65CatchBasin, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65StreamOrCreek, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Slough, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65River, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65MarshOrWetland, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Containers, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65WateringBowl, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65PlantSaucer, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65YardDrain, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65PlantAxil, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Treehole, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65FountainOrWaterFeature, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65BirdBath, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65MiscWaterAccumulation, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65TarpOrCover, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65SwimmingPool, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65AbovegroundPool, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65KidPool, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65HotTub, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Appliance, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Tires, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65FloodedStructure, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65LowPoint, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Unknown, + } +} + +type FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 string + +func (e FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65) String() string { + return string(e) +} + +func (e FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65) Valid() bool { + switch e { + case FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Orchard, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65RowCrops, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65VineCrops, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65AgGrassesOrGrain, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Pasture, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65IrrigationStandpipe, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Ditch, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65DairyLagoon, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65WastewaterTreatment, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Trough, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Depression, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Gutter, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65RainGutter, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Culvert, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Utility, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65CatchBasin, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65StreamOrCreek, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Slough, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65River, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65MarshOrWetland, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Containers, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65WateringBowl, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65PlantSaucer, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65YardDrain, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65PlantAxil, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Treehole, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65FountainOrWaterFeature, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65BirdBath, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65MiscWaterAccumulation, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65TarpOrCover, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65SwimmingPool, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65AbovegroundPool, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65KidPool, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65HotTub, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Appliance, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Tires, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65FloodedStructure, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65LowPoint, + FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65Unknown: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65) All() []FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 { + return AllFieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65() +} + +func (e FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65(x) + case []byte: + *e = FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 +const ( + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Residential FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 = "residential" + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Commercial FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 = "commercial" + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Industrial FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 = "industrial" + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Agricultural FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 = "agricultural" + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13MixedUse FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 = "mixed_use" + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13PublicDomain FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 = "public_domain" + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Natural FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 = "natural" + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Municipal FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 = "municipal" +) + +func AllFieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13() []FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 { + return []FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13{ + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Residential, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Commercial, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Industrial, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Agricultural, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13MixedUse, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13PublicDomain, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Natural, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Municipal, + } +} + +type FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 string + +func (e FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13) String() string { + return string(e) +} + +func (e FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13) Valid() bool { + switch e { + case FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Residential, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Commercial, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Industrial, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Agricultural, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13MixedUse, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13PublicDomain, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Natural, + FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13Municipal: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13) All() []FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 { + return AllFieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13() +} + +func (e FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13(x) + case []byte: + *e = FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 +const ( + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9FloodIrrigation FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "flood_irrigation" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9FurrowIrrigation FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "furrow_irrigation" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9DripIrritation FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "drip_irritation" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9SprinklerIrrigation FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "sprinkler_irrigation" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9WastewaterIrrigation FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "wastewater_irrigation" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9IrrigationRunoff FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "irrigation_runoff" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9RainwaterAccumulation FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "rainwater_accumulation" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9Leak FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "leak" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9Seepage FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "seepage" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9StoredWater FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "stored_water" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9WastewaterSystem FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "wastewater_system" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9PermanentNaturalWater FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "permanent_natural_water" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9TemporaryNaturalWater FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "temporary_natural_water" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9RecreationalOrOrnamentalWater FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "recreational_or_ornamental_water" + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9WaterConveyance FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 = "water_conveyance" +) + +func AllFieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9() []FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 { + return []FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9{ + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9FloodIrrigation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9FurrowIrrigation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9DripIrritation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9SprinklerIrrigation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9WastewaterIrrigation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9IrrigationRunoff, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9RainwaterAccumulation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9Leak, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9Seepage, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9StoredWater, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9WastewaterSystem, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9PermanentNaturalWater, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9TemporaryNaturalWater, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9RecreationalOrOrnamentalWater, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9WaterConveyance, + } +} + +type FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 string + +func (e FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9) String() string { + return string(e) +} + +func (e FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9) Valid() bool { + switch e { + case FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9FloodIrrigation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9FurrowIrrigation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9DripIrritation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9SprinklerIrrigation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9WastewaterIrrigation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9IrrigationRunoff, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9RainwaterAccumulation, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9Leak, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9Seepage, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9StoredWater, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9WastewaterSystem, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9PermanentNaturalWater, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9TemporaryNaturalWater, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9RecreationalOrOrnamentalWater, + FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9WaterConveyance: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9) All() []FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 { + return AllFieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9() +} + +func (e FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9(x) + case []byte: + *e = FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPoolMosquitolabnameEnum +const ( + FieldseekerPoolMosquitolabnameEnumInternalLab FieldseekerPoolMosquitolabnameEnum = "Internal Lab" + FieldseekerPoolMosquitolabnameEnumStateLab FieldseekerPoolMosquitolabnameEnum = "State Lab" +) + +func AllFieldseekerPoolMosquitolabnameEnum() []FieldseekerPoolMosquitolabnameEnum { + return []FieldseekerPoolMosquitolabnameEnum{ + FieldseekerPoolMosquitolabnameEnumInternalLab, + FieldseekerPoolMosquitolabnameEnumStateLab, + } +} + +type FieldseekerPoolMosquitolabnameEnum string + +func (e FieldseekerPoolMosquitolabnameEnum) String() string { + return string(e) +} + +func (e FieldseekerPoolMosquitolabnameEnum) Valid() bool { + switch e { + case FieldseekerPoolMosquitolabnameEnumInternalLab, + FieldseekerPoolMosquitolabnameEnumStateLab: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPoolMosquitolabnameEnum) All() []FieldseekerPoolMosquitolabnameEnum { + return AllFieldseekerPoolMosquitolabnameEnum() +} + +func (e FieldseekerPoolMosquitolabnameEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPoolMosquitolabnameEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPoolMosquitolabnameEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPoolMosquitolabnameEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPoolMosquitolabnameEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPoolMosquitolabnameEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPoolMosquitolabnameEnum(x) + case []byte: + *e = FieldseekerPoolMosquitolabnameEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPoolMosquitolabnameEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPoolMosquitolabnameEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPoolNotinuitFEnum +const ( + FieldseekerPoolNotinuitFEnum1 FieldseekerPoolNotinuitFEnum = "1" + FieldseekerPoolNotinuitFEnum0 FieldseekerPoolNotinuitFEnum = "0" +) + +func AllFieldseekerPoolNotinuitFEnum() []FieldseekerPoolNotinuitFEnum { + return []FieldseekerPoolNotinuitFEnum{ + FieldseekerPoolNotinuitFEnum1, + FieldseekerPoolNotinuitFEnum0, + } +} + +type FieldseekerPoolNotinuitFEnum string + +func (e FieldseekerPoolNotinuitFEnum) String() string { + return string(e) +} + +func (e FieldseekerPoolNotinuitFEnum) Valid() bool { + switch e { + case FieldseekerPoolNotinuitFEnum1, + FieldseekerPoolNotinuitFEnum0: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPoolNotinuitFEnum) All() []FieldseekerPoolNotinuitFEnum { + return AllFieldseekerPoolNotinuitFEnum() +} + +func (e FieldseekerPoolNotinuitFEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPoolNotinuitFEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPoolNotinuitFEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPoolNotinuitFEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPoolNotinuitFEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPoolNotinuitFEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPoolNotinuitFEnum(x) + case []byte: + *e = FieldseekerPoolNotinuitFEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPoolNotinuitFEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPoolNotinuitFEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum +const ( + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumWNV FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum = "WNV" + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumSlev FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum = "SLEV" + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumWeev FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum = "WEEV" + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumDenv FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum = "DENV" + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumZikv FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum = "ZIKV" + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumChikv FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum = "CHIKV" + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumWnvU2fslev FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum = "WNV/SLEV" +) + +func AllFieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum() []FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum { + return []FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum{ + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumWNV, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumSlev, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumWeev, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumDenv, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumZikv, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumChikv, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumWnvU2fslev, + } +} + +type FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum string + +func (e FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum) String() string { + return string(e) +} + +func (e FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum) Valid() bool { + switch e { + case FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumWNV, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumSlev, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumWeev, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumDenv, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumZikv, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumChikv, + FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnumWnvU2fslev: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum) All() []FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum { + return AllFieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum() +} + +func (e FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum(x) + case []byte: + *e = FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum +const ( + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumWNV FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum = "WNV" + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumSlev FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum = "SLEV" + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumWeev FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum = "WEEV" + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumDenv FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum = "DENV" + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumZikv FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum = "ZIKV" + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumChikv FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum = "CHIKV" +) + +func AllFieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum() []FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum { + return []FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum{ + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumWNV, + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumSlev, + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumWeev, + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumDenv, + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumZikv, + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumChikv, + } +} + +type FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum string + +func (e FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum) String() string { + return string(e) +} + +func (e FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum) Valid() bool { + switch e { + case FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumWNV, + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumSlev, + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumWeev, + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumDenv, + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumZikv, + FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97EnumChikv: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum) All() []FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum { + return AllFieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum() +} + +func (e FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum(x) + case []byte: + *e = FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum +const ( + FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnumRTPCR FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum = "RT-PCR" +) + +func AllFieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum() []FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum { + return []FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum{ + FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnumRTPCR, + } +} + +type FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum string + +func (e FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum) String() string { + return string(e) +} + +func (e FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum) Valid() bool { + switch e { + case FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnumRTPCR: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum) All() []FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum { + return AllFieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum() +} + +func (e FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum(x) + case []byte: + *e = FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerProposedtreatmentareaLocationpriorityEnum +const ( + FieldseekerProposedtreatmentareaLocationpriorityEnumLow FieldseekerProposedtreatmentareaLocationpriorityEnum = "Low" + FieldseekerProposedtreatmentareaLocationpriorityEnumMedium FieldseekerProposedtreatmentareaLocationpriorityEnum = "Medium" + FieldseekerProposedtreatmentareaLocationpriorityEnumHigh FieldseekerProposedtreatmentareaLocationpriorityEnum = "High" + FieldseekerProposedtreatmentareaLocationpriorityEnumNone FieldseekerProposedtreatmentareaLocationpriorityEnum = "None" +) + +func AllFieldseekerProposedtreatmentareaLocationpriorityEnum() []FieldseekerProposedtreatmentareaLocationpriorityEnum { + return []FieldseekerProposedtreatmentareaLocationpriorityEnum{ + FieldseekerProposedtreatmentareaLocationpriorityEnumLow, + FieldseekerProposedtreatmentareaLocationpriorityEnumMedium, + FieldseekerProposedtreatmentareaLocationpriorityEnumHigh, + FieldseekerProposedtreatmentareaLocationpriorityEnumNone, + } +} + +type FieldseekerProposedtreatmentareaLocationpriorityEnum string + +func (e FieldseekerProposedtreatmentareaLocationpriorityEnum) String() string { + return string(e) +} + +func (e FieldseekerProposedtreatmentareaLocationpriorityEnum) Valid() bool { + switch e { + case FieldseekerProposedtreatmentareaLocationpriorityEnumLow, + FieldseekerProposedtreatmentareaLocationpriorityEnumMedium, + FieldseekerProposedtreatmentareaLocationpriorityEnumHigh, + FieldseekerProposedtreatmentareaLocationpriorityEnumNone: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerProposedtreatmentareaLocationpriorityEnum) All() []FieldseekerProposedtreatmentareaLocationpriorityEnum { + return AllFieldseekerProposedtreatmentareaLocationpriorityEnum() +} + +func (e FieldseekerProposedtreatmentareaLocationpriorityEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerProposedtreatmentareaLocationpriorityEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerProposedtreatmentareaLocationpriorityEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerProposedtreatmentareaLocationpriorityEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerProposedtreatmentareaLocationpriorityEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerProposedtreatmentareaLocationpriorityEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerProposedtreatmentareaLocationpriorityEnum(x) + case []byte: + *e = FieldseekerProposedtreatmentareaLocationpriorityEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerProposedtreatmentareaLocationpriorityEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerProposedtreatmentareaLocationpriorityEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum +const ( + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumArgo FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum = "Argo" + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumAtv FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum = "ATV" + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumBackpack FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum = "Backpack" + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumDrone FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum = "Drone" + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumManual FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum = "Manual" + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumTruck FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum = "Truck" + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumUlv FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum = "ULV" + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumEnhancedSurveillance FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum = "Enhanced_Surveillance" +) + +func AllFieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum() []FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum { + return []FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum{ + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumArgo, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumAtv, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumBackpack, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumDrone, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumManual, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumTruck, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumUlv, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumEnhancedSurveillance, + } +} + +type FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum string + +func (e FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum) String() string { + return string(e) +} + +func (e FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum) Valid() bool { + switch e { + case FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumArgo, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumAtv, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumBackpack, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumDrone, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumManual, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumTruck, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumUlv, + FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnumEnhancedSurveillance: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum) All() []FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum { + return AllFieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum() +} + +func (e FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum(x) + case []byte: + *e = FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerProposedtreatmentareaNotinuitFEnum +const ( + FieldseekerProposedtreatmentareaNotinuitFEnum1 FieldseekerProposedtreatmentareaNotinuitFEnum = "1" + FieldseekerProposedtreatmentareaNotinuitFEnum0 FieldseekerProposedtreatmentareaNotinuitFEnum = "0" +) + +func AllFieldseekerProposedtreatmentareaNotinuitFEnum() []FieldseekerProposedtreatmentareaNotinuitFEnum { + return []FieldseekerProposedtreatmentareaNotinuitFEnum{ + FieldseekerProposedtreatmentareaNotinuitFEnum1, + FieldseekerProposedtreatmentareaNotinuitFEnum0, + } +} + +type FieldseekerProposedtreatmentareaNotinuitFEnum string + +func (e FieldseekerProposedtreatmentareaNotinuitFEnum) String() string { + return string(e) +} + +func (e FieldseekerProposedtreatmentareaNotinuitFEnum) Valid() bool { + switch e { + case FieldseekerProposedtreatmentareaNotinuitFEnum1, + FieldseekerProposedtreatmentareaNotinuitFEnum0: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerProposedtreatmentareaNotinuitFEnum) All() []FieldseekerProposedtreatmentareaNotinuitFEnum { + return AllFieldseekerProposedtreatmentareaNotinuitFEnum() +} + +func (e FieldseekerProposedtreatmentareaNotinuitFEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerProposedtreatmentareaNotinuitFEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerProposedtreatmentareaNotinuitFEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerProposedtreatmentareaNotinuitFEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerProposedtreatmentareaNotinuitFEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerProposedtreatmentareaNotinuitFEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerProposedtreatmentareaNotinuitFEnum(x) + case []byte: + *e = FieldseekerProposedtreatmentareaNotinuitFEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerProposedtreatmentareaNotinuitFEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerProposedtreatmentareaNotinuitFEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionMosquitoactionEnum +const ( + FieldseekerQamosquitoinspectionMosquitoactionEnumTreatment FieldseekerQamosquitoinspectionMosquitoactionEnum = "Treatment" + FieldseekerQamosquitoinspectionMosquitoactionEnumCoveredContainer FieldseekerQamosquitoinspectionMosquitoactionEnum = "Covered container" + FieldseekerQamosquitoinspectionMosquitoactionEnumClearedDebris FieldseekerQamosquitoinspectionMosquitoactionEnum = "Cleared debris" + FieldseekerQamosquitoinspectionMosquitoactionEnumMaintenance FieldseekerQamosquitoinspectionMosquitoactionEnum = "Maintenance" +) + +func AllFieldseekerQamosquitoinspectionMosquitoactionEnum() []FieldseekerQamosquitoinspectionMosquitoactionEnum { + return []FieldseekerQamosquitoinspectionMosquitoactionEnum{ + FieldseekerQamosquitoinspectionMosquitoactionEnumTreatment, + FieldseekerQamosquitoinspectionMosquitoactionEnumCoveredContainer, + FieldseekerQamosquitoinspectionMosquitoactionEnumClearedDebris, + FieldseekerQamosquitoinspectionMosquitoactionEnumMaintenance, + } +} + +type FieldseekerQamosquitoinspectionMosquitoactionEnum string + +func (e FieldseekerQamosquitoinspectionMosquitoactionEnum) String() string { + return string(e) +} + +func (e FieldseekerQamosquitoinspectionMosquitoactionEnum) Valid() bool { + switch e { + case FieldseekerQamosquitoinspectionMosquitoactionEnumTreatment, + FieldseekerQamosquitoinspectionMosquitoactionEnumCoveredContainer, + FieldseekerQamosquitoinspectionMosquitoactionEnumClearedDebris, + FieldseekerQamosquitoinspectionMosquitoactionEnumMaintenance: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerQamosquitoinspectionMosquitoactionEnum) All() []FieldseekerQamosquitoinspectionMosquitoactionEnum { + return AllFieldseekerQamosquitoinspectionMosquitoactionEnum() +} + +func (e FieldseekerQamosquitoinspectionMosquitoactionEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionMosquitoactionEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerQamosquitoinspectionMosquitoactionEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionMosquitoactionEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerQamosquitoinspectionMosquitoactionEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerQamosquitoinspectionMosquitoactionEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerQamosquitoinspectionMosquitoactionEnum(x) + case []byte: + *e = FieldseekerQamosquitoinspectionMosquitoactionEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerQamosquitoinspectionMosquitoactionEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerQamosquitoinspectionMosquitoactionEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionNotinuitFEnum +const ( + FieldseekerQamosquitoinspectionNotinuitFEnum1 FieldseekerQamosquitoinspectionNotinuitFEnum = "1" + FieldseekerQamosquitoinspectionNotinuitFEnum0 FieldseekerQamosquitoinspectionNotinuitFEnum = "0" +) + +func AllFieldseekerQamosquitoinspectionNotinuitFEnum() []FieldseekerQamosquitoinspectionNotinuitFEnum { + return []FieldseekerQamosquitoinspectionNotinuitFEnum{ + FieldseekerQamosquitoinspectionNotinuitFEnum1, + FieldseekerQamosquitoinspectionNotinuitFEnum0, + } +} + +type FieldseekerQamosquitoinspectionNotinuitFEnum string + +func (e FieldseekerQamosquitoinspectionNotinuitFEnum) String() string { + return string(e) +} + +func (e FieldseekerQamosquitoinspectionNotinuitFEnum) Valid() bool { + switch e { + case FieldseekerQamosquitoinspectionNotinuitFEnum1, + FieldseekerQamosquitoinspectionNotinuitFEnum0: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerQamosquitoinspectionNotinuitFEnum) All() []FieldseekerQamosquitoinspectionNotinuitFEnum { + return AllFieldseekerQamosquitoinspectionNotinuitFEnum() +} + +func (e FieldseekerQamosquitoinspectionNotinuitFEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionNotinuitFEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerQamosquitoinspectionNotinuitFEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionNotinuitFEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerQamosquitoinspectionNotinuitFEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerQamosquitoinspectionNotinuitFEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerQamosquitoinspectionNotinuitFEnum(x) + case []byte: + *e = FieldseekerQamosquitoinspectionNotinuitFEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerQamosquitoinspectionNotinuitFEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerQamosquitoinspectionNotinuitFEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionQaaquaticorganismsEnum +const ( + FieldseekerQamosquitoinspectionQaaquaticorganismsEnumFish FieldseekerQamosquitoinspectionQaaquaticorganismsEnum = "fish" + FieldseekerQamosquitoinspectionQaaquaticorganismsEnumScuds FieldseekerQamosquitoinspectionQaaquaticorganismsEnum = "scuds" + FieldseekerQamosquitoinspectionQaaquaticorganismsEnumSnails FieldseekerQamosquitoinspectionQaaquaticorganismsEnum = "snails" +) + +func AllFieldseekerQamosquitoinspectionQaaquaticorganismsEnum() []FieldseekerQamosquitoinspectionQaaquaticorganismsEnum { + return []FieldseekerQamosquitoinspectionQaaquaticorganismsEnum{ + FieldseekerQamosquitoinspectionQaaquaticorganismsEnumFish, + FieldseekerQamosquitoinspectionQaaquaticorganismsEnumScuds, + FieldseekerQamosquitoinspectionQaaquaticorganismsEnumSnails, + } +} + +type FieldseekerQamosquitoinspectionQaaquaticorganismsEnum string + +func (e FieldseekerQamosquitoinspectionQaaquaticorganismsEnum) String() string { + return string(e) +} + +func (e FieldseekerQamosquitoinspectionQaaquaticorganismsEnum) Valid() bool { + switch e { + case FieldseekerQamosquitoinspectionQaaquaticorganismsEnumFish, + FieldseekerQamosquitoinspectionQaaquaticorganismsEnumScuds, + FieldseekerQamosquitoinspectionQaaquaticorganismsEnumSnails: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerQamosquitoinspectionQaaquaticorganismsEnum) All() []FieldseekerQamosquitoinspectionQaaquaticorganismsEnum { + return AllFieldseekerQamosquitoinspectionQaaquaticorganismsEnum() +} + +func (e FieldseekerQamosquitoinspectionQaaquaticorganismsEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQaaquaticorganismsEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerQamosquitoinspectionQaaquaticorganismsEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQaaquaticorganismsEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerQamosquitoinspectionQaaquaticorganismsEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQaaquaticorganismsEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerQamosquitoinspectionQaaquaticorganismsEnum(x) + case []byte: + *e = FieldseekerQamosquitoinspectionQaaquaticorganismsEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerQamosquitoinspectionQaaquaticorganismsEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerQamosquitoinspectionQaaquaticorganismsEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionQabreedingpotentialEnum +const ( + FieldseekerQamosquitoinspectionQabreedingpotentialEnumHigh FieldseekerQamosquitoinspectionQabreedingpotentialEnum = "High" + FieldseekerQamosquitoinspectionQabreedingpotentialEnumLow FieldseekerQamosquitoinspectionQabreedingpotentialEnum = "Low" + FieldseekerQamosquitoinspectionQabreedingpotentialEnumMedium FieldseekerQamosquitoinspectionQabreedingpotentialEnum = "Medium" + FieldseekerQamosquitoinspectionQabreedingpotentialEnumRare FieldseekerQamosquitoinspectionQabreedingpotentialEnum = "Rare" +) + +func AllFieldseekerQamosquitoinspectionQabreedingpotentialEnum() []FieldseekerQamosquitoinspectionQabreedingpotentialEnum { + return []FieldseekerQamosquitoinspectionQabreedingpotentialEnum{ + FieldseekerQamosquitoinspectionQabreedingpotentialEnumHigh, + FieldseekerQamosquitoinspectionQabreedingpotentialEnumLow, + FieldseekerQamosquitoinspectionQabreedingpotentialEnumMedium, + FieldseekerQamosquitoinspectionQabreedingpotentialEnumRare, + } +} + +type FieldseekerQamosquitoinspectionQabreedingpotentialEnum string + +func (e FieldseekerQamosquitoinspectionQabreedingpotentialEnum) String() string { + return string(e) +} + +func (e FieldseekerQamosquitoinspectionQabreedingpotentialEnum) Valid() bool { + switch e { + case FieldseekerQamosquitoinspectionQabreedingpotentialEnumHigh, + FieldseekerQamosquitoinspectionQabreedingpotentialEnumLow, + FieldseekerQamosquitoinspectionQabreedingpotentialEnumMedium, + FieldseekerQamosquitoinspectionQabreedingpotentialEnumRare: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerQamosquitoinspectionQabreedingpotentialEnum) All() []FieldseekerQamosquitoinspectionQabreedingpotentialEnum { + return AllFieldseekerQamosquitoinspectionQabreedingpotentialEnum() +} + +func (e FieldseekerQamosquitoinspectionQabreedingpotentialEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQabreedingpotentialEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerQamosquitoinspectionQabreedingpotentialEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQabreedingpotentialEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerQamosquitoinspectionQabreedingpotentialEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQabreedingpotentialEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerQamosquitoinspectionQabreedingpotentialEnum(x) + case []byte: + *e = FieldseekerQamosquitoinspectionQabreedingpotentialEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerQamosquitoinspectionQabreedingpotentialEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerQamosquitoinspectionQabreedingpotentialEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionQalarvaereasonEnum +const ( + FieldseekerQamosquitoinspectionQalarvaereasonEnumMissedArea FieldseekerQamosquitoinspectionQalarvaereasonEnum = "Missed Area" + FieldseekerQamosquitoinspectionQalarvaereasonEnumNewSite FieldseekerQamosquitoinspectionQalarvaereasonEnum = "New Site" + FieldseekerQamosquitoinspectionQalarvaereasonEnumNotVisited FieldseekerQamosquitoinspectionQalarvaereasonEnum = "Not Visited" + FieldseekerQamosquitoinspectionQalarvaereasonEnumRateLow FieldseekerQamosquitoinspectionQalarvaereasonEnum = "Rate Low" + FieldseekerQamosquitoinspectionQalarvaereasonEnumTreatedRecently FieldseekerQamosquitoinspectionQalarvaereasonEnum = "Treated Recently" + FieldseekerQamosquitoinspectionQalarvaereasonEnumUnknown FieldseekerQamosquitoinspectionQalarvaereasonEnum = "Unknown" + FieldseekerQamosquitoinspectionQalarvaereasonEnumWrongProduct FieldseekerQamosquitoinspectionQalarvaereasonEnum = "Wrong Product" +) + +func AllFieldseekerQamosquitoinspectionQalarvaereasonEnum() []FieldseekerQamosquitoinspectionQalarvaereasonEnum { + return []FieldseekerQamosquitoinspectionQalarvaereasonEnum{ + FieldseekerQamosquitoinspectionQalarvaereasonEnumMissedArea, + FieldseekerQamosquitoinspectionQalarvaereasonEnumNewSite, + FieldseekerQamosquitoinspectionQalarvaereasonEnumNotVisited, + FieldseekerQamosquitoinspectionQalarvaereasonEnumRateLow, + FieldseekerQamosquitoinspectionQalarvaereasonEnumTreatedRecently, + FieldseekerQamosquitoinspectionQalarvaereasonEnumUnknown, + FieldseekerQamosquitoinspectionQalarvaereasonEnumWrongProduct, + } +} + +type FieldseekerQamosquitoinspectionQalarvaereasonEnum string + +func (e FieldseekerQamosquitoinspectionQalarvaereasonEnum) String() string { + return string(e) +} + +func (e FieldseekerQamosquitoinspectionQalarvaereasonEnum) Valid() bool { + switch e { + case FieldseekerQamosquitoinspectionQalarvaereasonEnumMissedArea, + FieldseekerQamosquitoinspectionQalarvaereasonEnumNewSite, + FieldseekerQamosquitoinspectionQalarvaereasonEnumNotVisited, + FieldseekerQamosquitoinspectionQalarvaereasonEnumRateLow, + FieldseekerQamosquitoinspectionQalarvaereasonEnumTreatedRecently, + FieldseekerQamosquitoinspectionQalarvaereasonEnumUnknown, + FieldseekerQamosquitoinspectionQalarvaereasonEnumWrongProduct: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerQamosquitoinspectionQalarvaereasonEnum) All() []FieldseekerQamosquitoinspectionQalarvaereasonEnum { + return AllFieldseekerQamosquitoinspectionQalarvaereasonEnum() +} + +func (e FieldseekerQamosquitoinspectionQalarvaereasonEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQalarvaereasonEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerQamosquitoinspectionQalarvaereasonEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQalarvaereasonEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerQamosquitoinspectionQalarvaereasonEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQalarvaereasonEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerQamosquitoinspectionQalarvaereasonEnum(x) + case []byte: + *e = FieldseekerQamosquitoinspectionQalarvaereasonEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerQamosquitoinspectionQalarvaereasonEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerQamosquitoinspectionQalarvaereasonEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionQamosquitohabitatEnum +const ( + FieldseekerQamosquitoinspectionQamosquitohabitatEnumDepressions FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "Depressions" + FieldseekerQamosquitoinspectionQamosquitohabitatEnumDetritusPresent FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "Detritus present" + FieldseekerQamosquitoinspectionQamosquitohabitatEnumFast FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "Fast" + FieldseekerQamosquitoinspectionQamosquitohabitatEnumFewPredators FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "Few predators" + FieldseekerQamosquitoinspectionQamosquitohabitatEnumFluctuatingLevels FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "Fluctuating levels" + FieldseekerQamosquitoinspectionQamosquitohabitatEnumH20U3C6U22 FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "H20<6\"" + FieldseekerQamosquitoinspectionQamosquitohabitatEnumLowWavePotential FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "Low wave potential" + FieldseekerQamosquitoinspectionQamosquitohabitatEnumNoFish FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "No fish" + FieldseekerQamosquitoinspectionQamosquitohabitatEnumShallowEdges FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "Shallow edges" + FieldseekerQamosquitoinspectionQamosquitohabitatEnumStillWaterEdges FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "Still water edges" + FieldseekerQamosquitoinspectionQamosquitohabitatEnumStillWaterWhole FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "Still water whole" + FieldseekerQamosquitoinspectionQamosquitohabitatEnumVegU2eOnEdges FieldseekerQamosquitoinspectionQamosquitohabitatEnum = "Veg. on edges" +) + +func AllFieldseekerQamosquitoinspectionQamosquitohabitatEnum() []FieldseekerQamosquitoinspectionQamosquitohabitatEnum { + return []FieldseekerQamosquitoinspectionQamosquitohabitatEnum{ + FieldseekerQamosquitoinspectionQamosquitohabitatEnumDepressions, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumDetritusPresent, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumFast, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumFewPredators, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumFluctuatingLevels, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumH20U3C6U22, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumLowWavePotential, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumNoFish, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumShallowEdges, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumStillWaterEdges, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumStillWaterWhole, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumVegU2eOnEdges, + } +} + +type FieldseekerQamosquitoinspectionQamosquitohabitatEnum string + +func (e FieldseekerQamosquitoinspectionQamosquitohabitatEnum) String() string { + return string(e) +} + +func (e FieldseekerQamosquitoinspectionQamosquitohabitatEnum) Valid() bool { + switch e { + case FieldseekerQamosquitoinspectionQamosquitohabitatEnumDepressions, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumDetritusPresent, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumFast, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumFewPredators, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumFluctuatingLevels, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumH20U3C6U22, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumLowWavePotential, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumNoFish, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumShallowEdges, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumStillWaterEdges, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumStillWaterWhole, + FieldseekerQamosquitoinspectionQamosquitohabitatEnumVegU2eOnEdges: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerQamosquitoinspectionQamosquitohabitatEnum) All() []FieldseekerQamosquitoinspectionQamosquitohabitatEnum { + return AllFieldseekerQamosquitoinspectionQamosquitohabitatEnum() +} + +func (e FieldseekerQamosquitoinspectionQamosquitohabitatEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQamosquitohabitatEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerQamosquitoinspectionQamosquitohabitatEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQamosquitohabitatEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerQamosquitoinspectionQamosquitohabitatEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQamosquitohabitatEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerQamosquitoinspectionQamosquitohabitatEnum(x) + case []byte: + *e = FieldseekerQamosquitoinspectionQamosquitohabitatEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerQamosquitoinspectionQamosquitohabitatEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerQamosquitoinspectionQamosquitohabitatEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionQasitetypeEnum +const ( + FieldseekerQamosquitoinspectionQasitetypeEnumDetentionPond FieldseekerQamosquitoinspectionQasitetypeEnum = "Detention Pond" + FieldseekerQamosquitoinspectionQasitetypeEnumDitch FieldseekerQamosquitoinspectionQasitetypeEnum = "Ditch" + FieldseekerQamosquitoinspectionQasitetypeEnumLowArea FieldseekerQamosquitoinspectionQasitetypeEnum = "Low Area" + FieldseekerQamosquitoinspectionQasitetypeEnumMangroveEdge FieldseekerQamosquitoinspectionQasitetypeEnum = "Mangrove Edge" + FieldseekerQamosquitoinspectionQasitetypeEnumPond FieldseekerQamosquitoinspectionQasitetypeEnum = "Pond" + FieldseekerQamosquitoinspectionQasitetypeEnumPondEdge FieldseekerQamosquitoinspectionQasitetypeEnum = "Pond Edge" + FieldseekerQamosquitoinspectionQasitetypeEnumSwale FieldseekerQamosquitoinspectionQasitetypeEnum = "Swale" +) + +func AllFieldseekerQamosquitoinspectionQasitetypeEnum() []FieldseekerQamosquitoinspectionQasitetypeEnum { + return []FieldseekerQamosquitoinspectionQasitetypeEnum{ + FieldseekerQamosquitoinspectionQasitetypeEnumDetentionPond, + FieldseekerQamosquitoinspectionQasitetypeEnumDitch, + FieldseekerQamosquitoinspectionQasitetypeEnumLowArea, + FieldseekerQamosquitoinspectionQasitetypeEnumMangroveEdge, + FieldseekerQamosquitoinspectionQasitetypeEnumPond, + FieldseekerQamosquitoinspectionQasitetypeEnumPondEdge, + FieldseekerQamosquitoinspectionQasitetypeEnumSwale, + } +} + +type FieldseekerQamosquitoinspectionQasitetypeEnum string + +func (e FieldseekerQamosquitoinspectionQasitetypeEnum) String() string { + return string(e) +} + +func (e FieldseekerQamosquitoinspectionQasitetypeEnum) Valid() bool { + switch e { + case FieldseekerQamosquitoinspectionQasitetypeEnumDetentionPond, + FieldseekerQamosquitoinspectionQasitetypeEnumDitch, + FieldseekerQamosquitoinspectionQasitetypeEnumLowArea, + FieldseekerQamosquitoinspectionQasitetypeEnumMangroveEdge, + FieldseekerQamosquitoinspectionQasitetypeEnumPond, + FieldseekerQamosquitoinspectionQasitetypeEnumPondEdge, + FieldseekerQamosquitoinspectionQasitetypeEnumSwale: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerQamosquitoinspectionQasitetypeEnum) All() []FieldseekerQamosquitoinspectionQasitetypeEnum { + return AllFieldseekerQamosquitoinspectionQasitetypeEnum() +} + +func (e FieldseekerQamosquitoinspectionQasitetypeEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQasitetypeEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerQamosquitoinspectionQasitetypeEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQasitetypeEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerQamosquitoinspectionQasitetypeEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQasitetypeEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerQamosquitoinspectionQasitetypeEnum(x) + case []byte: + *e = FieldseekerQamosquitoinspectionQasitetypeEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerQamosquitoinspectionQasitetypeEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerQamosquitoinspectionQasitetypeEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionQasoilconditionEnum +const ( + FieldseekerQamosquitoinspectionQasoilconditionEnumCracked FieldseekerQamosquitoinspectionQasoilconditionEnum = "Cracked" + FieldseekerQamosquitoinspectionQasoilconditionEnumDry FieldseekerQamosquitoinspectionQasoilconditionEnum = "Dry" + FieldseekerQamosquitoinspectionQasoilconditionEnumInundated FieldseekerQamosquitoinspectionQasoilconditionEnum = "Inundated" + FieldseekerQamosquitoinspectionQasoilconditionEnumSaturated FieldseekerQamosquitoinspectionQasoilconditionEnum = "Saturated" + FieldseekerQamosquitoinspectionQasoilconditionEnumSurfaceMoist FieldseekerQamosquitoinspectionQasoilconditionEnum = "Surface Moist" +) + +func AllFieldseekerQamosquitoinspectionQasoilconditionEnum() []FieldseekerQamosquitoinspectionQasoilconditionEnum { + return []FieldseekerQamosquitoinspectionQasoilconditionEnum{ + FieldseekerQamosquitoinspectionQasoilconditionEnumCracked, + FieldseekerQamosquitoinspectionQasoilconditionEnumDry, + FieldseekerQamosquitoinspectionQasoilconditionEnumInundated, + FieldseekerQamosquitoinspectionQasoilconditionEnumSaturated, + FieldseekerQamosquitoinspectionQasoilconditionEnumSurfaceMoist, + } +} + +type FieldseekerQamosquitoinspectionQasoilconditionEnum string + +func (e FieldseekerQamosquitoinspectionQasoilconditionEnum) String() string { + return string(e) +} + +func (e FieldseekerQamosquitoinspectionQasoilconditionEnum) Valid() bool { + switch e { + case FieldseekerQamosquitoinspectionQasoilconditionEnumCracked, + FieldseekerQamosquitoinspectionQasoilconditionEnumDry, + FieldseekerQamosquitoinspectionQasoilconditionEnumInundated, + FieldseekerQamosquitoinspectionQasoilconditionEnumSaturated, + FieldseekerQamosquitoinspectionQasoilconditionEnumSurfaceMoist: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerQamosquitoinspectionQasoilconditionEnum) All() []FieldseekerQamosquitoinspectionQasoilconditionEnum { + return AllFieldseekerQamosquitoinspectionQasoilconditionEnum() +} + +func (e FieldseekerQamosquitoinspectionQasoilconditionEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQasoilconditionEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerQamosquitoinspectionQasoilconditionEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQasoilconditionEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerQamosquitoinspectionQasoilconditionEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQasoilconditionEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerQamosquitoinspectionQasoilconditionEnum(x) + case []byte: + *e = FieldseekerQamosquitoinspectionQasoilconditionEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerQamosquitoinspectionQasoilconditionEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerQamosquitoinspectionQasoilconditionEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionQasourcereductionEnum +const ( + FieldseekerQamosquitoinspectionQasourcereductionEnum1TractorU3CDay FieldseekerQamosquitoinspectionQasourcereductionEnum = "1 tractor < day" + FieldseekerQamosquitoinspectionQasourcereductionEnumAdjustFloodIrrigation FieldseekerQamosquitoinspectionQasourcereductionEnum = "adjust flood irrigation" + FieldseekerQamosquitoinspectionQasourcereductionEnumAdjustTurfIrrigation FieldseekerQamosquitoinspectionQasourcereductionEnum = "adjust turf irrigation" + FieldseekerQamosquitoinspectionQasourcereductionEnumClearOutflow FieldseekerQamosquitoinspectionQasourcereductionEnum = "clear outflow" + FieldseekerQamosquitoinspectionQasourcereductionEnumCutDitch FieldseekerQamosquitoinspectionQasourcereductionEnum = "cut ditch" + FieldseekerQamosquitoinspectionQasourcereductionEnumHandGrading FieldseekerQamosquitoinspectionQasourcereductionEnum = "hand grading" + FieldseekerQamosquitoinspectionQasourcereductionEnumLaserLeveling FieldseekerQamosquitoinspectionQasourcereductionEnum = "laser leveling" + FieldseekerQamosquitoinspectionQasourcereductionEnumMultipleLoadsSoil FieldseekerQamosquitoinspectionQasourcereductionEnum = "multiple loads soil" + FieldseekerQamosquitoinspectionQasourcereductionEnumNone FieldseekerQamosquitoinspectionQasourcereductionEnum = "none" +) + +func AllFieldseekerQamosquitoinspectionQasourcereductionEnum() []FieldseekerQamosquitoinspectionQasourcereductionEnum { + return []FieldseekerQamosquitoinspectionQasourcereductionEnum{ + FieldseekerQamosquitoinspectionQasourcereductionEnum1TractorU3CDay, + FieldseekerQamosquitoinspectionQasourcereductionEnumAdjustFloodIrrigation, + FieldseekerQamosquitoinspectionQasourcereductionEnumAdjustTurfIrrigation, + FieldseekerQamosquitoinspectionQasourcereductionEnumClearOutflow, + FieldseekerQamosquitoinspectionQasourcereductionEnumCutDitch, + FieldseekerQamosquitoinspectionQasourcereductionEnumHandGrading, + FieldseekerQamosquitoinspectionQasourcereductionEnumLaserLeveling, + FieldseekerQamosquitoinspectionQasourcereductionEnumMultipleLoadsSoil, + FieldseekerQamosquitoinspectionQasourcereductionEnumNone, + } +} + +type FieldseekerQamosquitoinspectionQasourcereductionEnum string + +func (e FieldseekerQamosquitoinspectionQasourcereductionEnum) String() string { + return string(e) +} + +func (e FieldseekerQamosquitoinspectionQasourcereductionEnum) Valid() bool { + switch e { + case FieldseekerQamosquitoinspectionQasourcereductionEnum1TractorU3CDay, + FieldseekerQamosquitoinspectionQasourcereductionEnumAdjustFloodIrrigation, + FieldseekerQamosquitoinspectionQasourcereductionEnumAdjustTurfIrrigation, + FieldseekerQamosquitoinspectionQasourcereductionEnumClearOutflow, + FieldseekerQamosquitoinspectionQasourcereductionEnumCutDitch, + FieldseekerQamosquitoinspectionQasourcereductionEnumHandGrading, + FieldseekerQamosquitoinspectionQasourcereductionEnumLaserLeveling, + FieldseekerQamosquitoinspectionQasourcereductionEnumMultipleLoadsSoil, + FieldseekerQamosquitoinspectionQasourcereductionEnumNone: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerQamosquitoinspectionQasourcereductionEnum) All() []FieldseekerQamosquitoinspectionQasourcereductionEnum { + return AllFieldseekerQamosquitoinspectionQasourcereductionEnum() +} + +func (e FieldseekerQamosquitoinspectionQasourcereductionEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQasourcereductionEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerQamosquitoinspectionQasourcereductionEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQasourcereductionEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerQamosquitoinspectionQasourcereductionEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQasourcereductionEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerQamosquitoinspectionQasourcereductionEnum(x) + case []byte: + *e = FieldseekerQamosquitoinspectionQasourcereductionEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerQamosquitoinspectionQasourcereductionEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerQamosquitoinspectionQasourcereductionEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionQavegetationEnum +const ( + FieldseekerQamosquitoinspectionQavegetationEnumAlgae FieldseekerQamosquitoinspectionQavegetationEnum = "Algae" + FieldseekerQamosquitoinspectionQavegetationEnumCattails FieldseekerQamosquitoinspectionQavegetationEnum = "Cattails" + FieldseekerQamosquitoinspectionQavegetationEnumDuckweed FieldseekerQamosquitoinspectionQavegetationEnum = "Duckweed" + FieldseekerQamosquitoinspectionQavegetationEnumGlasswort FieldseekerQamosquitoinspectionQavegetationEnum = "Glasswort" + FieldseekerQamosquitoinspectionQavegetationEnumGrassOnEdge FieldseekerQamosquitoinspectionQavegetationEnum = "Grass on edge" + FieldseekerQamosquitoinspectionQavegetationEnumMangrove FieldseekerQamosquitoinspectionQavegetationEnum = "Mangrove" + FieldseekerQamosquitoinspectionQavegetationEnumMosquitoFern FieldseekerQamosquitoinspectionQavegetationEnum = "Mosquito fern" + FieldseekerQamosquitoinspectionQavegetationEnumMuskgrass FieldseekerQamosquitoinspectionQavegetationEnum = "Muskgrass" + FieldseekerQamosquitoinspectionQavegetationEnumMyriophyllum FieldseekerQamosquitoinspectionQavegetationEnum = "Myriophyllum" + FieldseekerQamosquitoinspectionQavegetationEnumOther FieldseekerQamosquitoinspectionQavegetationEnum = "Other" + FieldseekerQamosquitoinspectionQavegetationEnumRottingVegetation FieldseekerQamosquitoinspectionQavegetationEnum = "Rotting vegetation" + FieldseekerQamosquitoinspectionQavegetationEnumSaltwort FieldseekerQamosquitoinspectionQavegetationEnum = "Saltwort" + FieldseekerQamosquitoinspectionQavegetationEnumSedges FieldseekerQamosquitoinspectionQavegetationEnum = "Sedges" +) + +func AllFieldseekerQamosquitoinspectionQavegetationEnum() []FieldseekerQamosquitoinspectionQavegetationEnum { + return []FieldseekerQamosquitoinspectionQavegetationEnum{ + FieldseekerQamosquitoinspectionQavegetationEnumAlgae, + FieldseekerQamosquitoinspectionQavegetationEnumCattails, + FieldseekerQamosquitoinspectionQavegetationEnumDuckweed, + FieldseekerQamosquitoinspectionQavegetationEnumGlasswort, + FieldseekerQamosquitoinspectionQavegetationEnumGrassOnEdge, + FieldseekerQamosquitoinspectionQavegetationEnumMangrove, + FieldseekerQamosquitoinspectionQavegetationEnumMosquitoFern, + FieldseekerQamosquitoinspectionQavegetationEnumMuskgrass, + FieldseekerQamosquitoinspectionQavegetationEnumMyriophyllum, + FieldseekerQamosquitoinspectionQavegetationEnumOther, + FieldseekerQamosquitoinspectionQavegetationEnumRottingVegetation, + FieldseekerQamosquitoinspectionQavegetationEnumSaltwort, + FieldseekerQamosquitoinspectionQavegetationEnumSedges, + } +} + +type FieldseekerQamosquitoinspectionQavegetationEnum string + +func (e FieldseekerQamosquitoinspectionQavegetationEnum) String() string { + return string(e) +} + +func (e FieldseekerQamosquitoinspectionQavegetationEnum) Valid() bool { + switch e { + case FieldseekerQamosquitoinspectionQavegetationEnumAlgae, + FieldseekerQamosquitoinspectionQavegetationEnumCattails, + FieldseekerQamosquitoinspectionQavegetationEnumDuckweed, + FieldseekerQamosquitoinspectionQavegetationEnumGlasswort, + FieldseekerQamosquitoinspectionQavegetationEnumGrassOnEdge, + FieldseekerQamosquitoinspectionQavegetationEnumMangrove, + FieldseekerQamosquitoinspectionQavegetationEnumMosquitoFern, + FieldseekerQamosquitoinspectionQavegetationEnumMuskgrass, + FieldseekerQamosquitoinspectionQavegetationEnumMyriophyllum, + FieldseekerQamosquitoinspectionQavegetationEnumOther, + FieldseekerQamosquitoinspectionQavegetationEnumRottingVegetation, + FieldseekerQamosquitoinspectionQavegetationEnumSaltwort, + FieldseekerQamosquitoinspectionQavegetationEnumSedges: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerQamosquitoinspectionQavegetationEnum) All() []FieldseekerQamosquitoinspectionQavegetationEnum { + return AllFieldseekerQamosquitoinspectionQavegetationEnum() +} + +func (e FieldseekerQamosquitoinspectionQavegetationEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQavegetationEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerQamosquitoinspectionQavegetationEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQavegetationEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerQamosquitoinspectionQavegetationEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQavegetationEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerQamosquitoinspectionQavegetationEnum(x) + case []byte: + *e = FieldseekerQamosquitoinspectionQavegetationEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerQamosquitoinspectionQavegetationEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerQamosquitoinspectionQavegetationEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionQawaterconditionsEnum +const ( + FieldseekerQamosquitoinspectionQawaterconditionsEnumU22rustU22Material FieldseekerQamosquitoinspectionQawaterconditionsEnum = "\"rust\" material" + FieldseekerQamosquitoinspectionQawaterconditionsEnumClear FieldseekerQamosquitoinspectionQawaterconditionsEnum = "Clear" + FieldseekerQamosquitoinspectionQawaterconditionsEnumCloudyU2ffines FieldseekerQamosquitoinspectionQawaterconditionsEnum = "Cloudy/fines" + FieldseekerQamosquitoinspectionQawaterconditionsEnumFloatingDebris FieldseekerQamosquitoinspectionQawaterconditionsEnum = "Floating debris" + FieldseekerQamosquitoinspectionQawaterconditionsEnumSubmergedU2fdecomU2eDebris FieldseekerQamosquitoinspectionQawaterconditionsEnum = "Submerged/decom. debris" +) + +func AllFieldseekerQamosquitoinspectionQawaterconditionsEnum() []FieldseekerQamosquitoinspectionQawaterconditionsEnum { + return []FieldseekerQamosquitoinspectionQawaterconditionsEnum{ + FieldseekerQamosquitoinspectionQawaterconditionsEnumU22rustU22Material, + FieldseekerQamosquitoinspectionQawaterconditionsEnumClear, + FieldseekerQamosquitoinspectionQawaterconditionsEnumCloudyU2ffines, + FieldseekerQamosquitoinspectionQawaterconditionsEnumFloatingDebris, + FieldseekerQamosquitoinspectionQawaterconditionsEnumSubmergedU2fdecomU2eDebris, + } +} + +type FieldseekerQamosquitoinspectionQawaterconditionsEnum string + +func (e FieldseekerQamosquitoinspectionQawaterconditionsEnum) String() string { + return string(e) +} + +func (e FieldseekerQamosquitoinspectionQawaterconditionsEnum) Valid() bool { + switch e { + case FieldseekerQamosquitoinspectionQawaterconditionsEnumU22rustU22Material, + FieldseekerQamosquitoinspectionQawaterconditionsEnumClear, + FieldseekerQamosquitoinspectionQawaterconditionsEnumCloudyU2ffines, + FieldseekerQamosquitoinspectionQawaterconditionsEnumFloatingDebris, + FieldseekerQamosquitoinspectionQawaterconditionsEnumSubmergedU2fdecomU2eDebris: + return true + default: + return false + } +} + +// useful when testing in other packages +func (e FieldseekerQamosquitoinspectionQawaterconditionsEnum) All() []FieldseekerQamosquitoinspectionQawaterconditionsEnum { + return AllFieldseekerQamosquitoinspectionQawaterconditionsEnum() +} + +func (e FieldseekerQamosquitoinspectionQawaterconditionsEnum) MarshalText() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQawaterconditionsEnum) UnmarshalText(text []byte) error { + return e.Scan(text) +} + +func (e FieldseekerQamosquitoinspectionQawaterconditionsEnum) MarshalBinary() ([]byte, error) { + return []byte(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQawaterconditionsEnum) UnmarshalBinary(data []byte) error { + return e.Scan(data) +} + +func (e FieldseekerQamosquitoinspectionQawaterconditionsEnum) Value() (driver.Value, error) { + return string(e), nil +} + +func (e *FieldseekerQamosquitoinspectionQawaterconditionsEnum) Scan(value any) error { + switch x := value.(type) { + case string: + *e = FieldseekerQamosquitoinspectionQawaterconditionsEnum(x) + case []byte: + *e = FieldseekerQamosquitoinspectionQawaterconditionsEnum(x) + case nil: + return fmt.Errorf("cannot nil into FieldseekerQamosquitoinspectionQawaterconditionsEnum") + default: + return fmt.Errorf("cannot scan type %T: %v", value, value) + } + + if !e.Valid() { + return fmt.Errorf("invalid FieldseekerQamosquitoinspectionQawaterconditionsEnum value: %s", *e) + } + + return nil +} + +// Enum values for FieldseekerQamosquitoinspectionQawaterdurationEnum +const ( + FieldseekerQamosquitoinspectionQawaterdurationEnumU7emonth FieldseekerQamosquitoinspectionQawaterdurationEnum = "~month" + FieldseekerQamosquitoinspectionQawaterdurationEnumU7eweek FieldseekerQamosquitoinspectionQawaterdurationEnum = "~week" + FieldseekerQamosquitoinspectionQawaterdurationEnumU3C1Week FieldseekerQamosquitoinspectionQawaterdurationEnum = "<1 week" + FieldseekerQamosquitoinspectionQawaterdurationEnumU3cday FieldseekerQamosquitoinspectionQawaterdurationEnum = " 0 { + OrganizationMods.AddExistingRodentlocations(m.R.Rodentlocations...).Apply(ctx, o) + } if len(m.R.FieldseekerSyncs) > 0 { OrganizationMods.AddExistingFieldseekerSyncs(m.R.FieldseekerSyncs...).Apply(ctx, o) } @@ -4146,6 +6034,326 @@ func (f *Factory) FromExistingUser(m *models.User) *UserTemplate { return o } +func (f *Factory) ClearBaseFieldseekerAerialspraylineMods() { + f.baseFieldseekerAerialspraylineMods = nil +} + +func (f *Factory) AddBaseFieldseekerAerialspraylineMod(mods ...FieldseekerAerialspraylineMod) { + f.baseFieldseekerAerialspraylineMods = append(f.baseFieldseekerAerialspraylineMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerAerialspraysessionMods() { + f.baseFieldseekerAerialspraysessionMods = nil +} + +func (f *Factory) AddBaseFieldseekerAerialspraysessionMod(mods ...FieldseekerAerialspraysessionMod) { + f.baseFieldseekerAerialspraysessionMods = append(f.baseFieldseekerAerialspraysessionMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerBarriersprayMods() { + f.baseFieldseekerBarriersprayMods = nil +} + +func (f *Factory) AddBaseFieldseekerBarriersprayMod(mods ...FieldseekerBarriersprayMod) { + f.baseFieldseekerBarriersprayMods = append(f.baseFieldseekerBarriersprayMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerBarriersprayrouteMods() { + f.baseFieldseekerBarriersprayrouteMods = nil +} + +func (f *Factory) AddBaseFieldseekerBarriersprayrouteMod(mods ...FieldseekerBarriersprayrouteMod) { + f.baseFieldseekerBarriersprayrouteMods = append(f.baseFieldseekerBarriersprayrouteMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerContainerrelateMods() { + f.baseFieldseekerContainerrelateMods = nil +} + +func (f *Factory) AddBaseFieldseekerContainerrelateMod(mods ...FieldseekerContainerrelateMod) { + f.baseFieldseekerContainerrelateMods = append(f.baseFieldseekerContainerrelateMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerFieldscoutinglogMods() { + f.baseFieldseekerFieldscoutinglogMods = nil +} + +func (f *Factory) AddBaseFieldseekerFieldscoutinglogMod(mods ...FieldseekerFieldscoutinglogMod) { + f.baseFieldseekerFieldscoutinglogMods = append(f.baseFieldseekerFieldscoutinglogMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerHabitatrelateMods() { + f.baseFieldseekerHabitatrelateMods = nil +} + +func (f *Factory) AddBaseFieldseekerHabitatrelateMod(mods ...FieldseekerHabitatrelateMod) { + f.baseFieldseekerHabitatrelateMods = append(f.baseFieldseekerHabitatrelateMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerInspectionsampleMods() { + f.baseFieldseekerInspectionsampleMods = nil +} + +func (f *Factory) AddBaseFieldseekerInspectionsampleMod(mods ...FieldseekerInspectionsampleMod) { + f.baseFieldseekerInspectionsampleMods = append(f.baseFieldseekerInspectionsampleMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerInspectionsampledetailMods() { + f.baseFieldseekerInspectionsampledetailMods = nil +} + +func (f *Factory) AddBaseFieldseekerInspectionsampledetailMod(mods ...FieldseekerInspectionsampledetailMod) { + f.baseFieldseekerInspectionsampledetailMods = append(f.baseFieldseekerInspectionsampledetailMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerLandingcountMods() { + f.baseFieldseekerLandingcountMods = nil +} + +func (f *Factory) AddBaseFieldseekerLandingcountMod(mods ...FieldseekerLandingcountMod) { + f.baseFieldseekerLandingcountMods = append(f.baseFieldseekerLandingcountMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerLandingcountlocationMods() { + f.baseFieldseekerLandingcountlocationMods = nil +} + +func (f *Factory) AddBaseFieldseekerLandingcountlocationMod(mods ...FieldseekerLandingcountlocationMod) { + f.baseFieldseekerLandingcountlocationMods = append(f.baseFieldseekerLandingcountlocationMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerLinelocationMods() { + f.baseFieldseekerLinelocationMods = nil +} + +func (f *Factory) AddBaseFieldseekerLinelocationMod(mods ...FieldseekerLinelocationMod) { + f.baseFieldseekerLinelocationMods = append(f.baseFieldseekerLinelocationMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerLocationtrackingMods() { + f.baseFieldseekerLocationtrackingMods = nil +} + +func (f *Factory) AddBaseFieldseekerLocationtrackingMod(mods ...FieldseekerLocationtrackingMod) { + f.baseFieldseekerLocationtrackingMods = append(f.baseFieldseekerLocationtrackingMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerMosquitoinspectionMods() { + f.baseFieldseekerMosquitoinspectionMods = nil +} + +func (f *Factory) AddBaseFieldseekerMosquitoinspectionMod(mods ...FieldseekerMosquitoinspectionMod) { + f.baseFieldseekerMosquitoinspectionMods = append(f.baseFieldseekerMosquitoinspectionMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerPointlocationMods() { + f.baseFieldseekerPointlocationMods = nil +} + +func (f *Factory) AddBaseFieldseekerPointlocationMod(mods ...FieldseekerPointlocationMod) { + f.baseFieldseekerPointlocationMods = append(f.baseFieldseekerPointlocationMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerPolygonlocationMods() { + f.baseFieldseekerPolygonlocationMods = nil +} + +func (f *Factory) AddBaseFieldseekerPolygonlocationMod(mods ...FieldseekerPolygonlocationMod) { + f.baseFieldseekerPolygonlocationMods = append(f.baseFieldseekerPolygonlocationMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerPoolMods() { + f.baseFieldseekerPoolMods = nil +} + +func (f *Factory) AddBaseFieldseekerPoolMod(mods ...FieldseekerPoolMod) { + f.baseFieldseekerPoolMods = append(f.baseFieldseekerPoolMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerPoolbufferMods() { + f.baseFieldseekerPoolbufferMods = nil +} + +func (f *Factory) AddBaseFieldseekerPoolbufferMod(mods ...FieldseekerPoolbufferMod) { + f.baseFieldseekerPoolbufferMods = append(f.baseFieldseekerPoolbufferMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerPooldetailMods() { + f.baseFieldseekerPooldetailMods = nil +} + +func (f *Factory) AddBaseFieldseekerPooldetailMod(mods ...FieldseekerPooldetailMod) { + f.baseFieldseekerPooldetailMods = append(f.baseFieldseekerPooldetailMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerProposedtreatmentareaMods() { + f.baseFieldseekerProposedtreatmentareaMods = nil +} + +func (f *Factory) AddBaseFieldseekerProposedtreatmentareaMod(mods ...FieldseekerProposedtreatmentareaMod) { + f.baseFieldseekerProposedtreatmentareaMods = append(f.baseFieldseekerProposedtreatmentareaMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerQalarvcountMods() { + f.baseFieldseekerQalarvcountMods = nil +} + +func (f *Factory) AddBaseFieldseekerQalarvcountMod(mods ...FieldseekerQalarvcountMod) { + f.baseFieldseekerQalarvcountMods = append(f.baseFieldseekerQalarvcountMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerQamosquitoinspectionMods() { + f.baseFieldseekerQamosquitoinspectionMods = nil +} + +func (f *Factory) AddBaseFieldseekerQamosquitoinspectionMod(mods ...FieldseekerQamosquitoinspectionMod) { + f.baseFieldseekerQamosquitoinspectionMods = append(f.baseFieldseekerQamosquitoinspectionMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerQaproductobservationMods() { + f.baseFieldseekerQaproductobservationMods = nil +} + +func (f *Factory) AddBaseFieldseekerQaproductobservationMod(mods ...FieldseekerQaproductobservationMod) { + f.baseFieldseekerQaproductobservationMods = append(f.baseFieldseekerQaproductobservationMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerRestrictedareaMods() { + f.baseFieldseekerRestrictedareaMods = nil +} + +func (f *Factory) AddBaseFieldseekerRestrictedareaMod(mods ...FieldseekerRestrictedareaMod) { + f.baseFieldseekerRestrictedareaMods = append(f.baseFieldseekerRestrictedareaMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerRodentinspectionMods() { + f.baseFieldseekerRodentinspectionMods = nil +} + +func (f *Factory) AddBaseFieldseekerRodentinspectionMod(mods ...FieldseekerRodentinspectionMod) { + f.baseFieldseekerRodentinspectionMods = append(f.baseFieldseekerRodentinspectionMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerRodentlocationMods() { + f.baseFieldseekerRodentlocationMods = nil +} + +func (f *Factory) AddBaseFieldseekerRodentlocationMod(mods ...FieldseekerRodentlocationMod) { + f.baseFieldseekerRodentlocationMods = append(f.baseFieldseekerRodentlocationMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerSamplecollectionMods() { + f.baseFieldseekerSamplecollectionMods = nil +} + +func (f *Factory) AddBaseFieldseekerSamplecollectionMod(mods ...FieldseekerSamplecollectionMod) { + f.baseFieldseekerSamplecollectionMods = append(f.baseFieldseekerSamplecollectionMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerSamplelocationMods() { + f.baseFieldseekerSamplelocationMods = nil +} + +func (f *Factory) AddBaseFieldseekerSamplelocationMod(mods ...FieldseekerSamplelocationMod) { + f.baseFieldseekerSamplelocationMods = append(f.baseFieldseekerSamplelocationMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerServicerequestMods() { + f.baseFieldseekerServicerequestMods = nil +} + +func (f *Factory) AddBaseFieldseekerServicerequestMod(mods ...FieldseekerServicerequestMod) { + f.baseFieldseekerServicerequestMods = append(f.baseFieldseekerServicerequestMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerSpeciesabundanceMods() { + f.baseFieldseekerSpeciesabundanceMods = nil +} + +func (f *Factory) AddBaseFieldseekerSpeciesabundanceMod(mods ...FieldseekerSpeciesabundanceMod) { + f.baseFieldseekerSpeciesabundanceMods = append(f.baseFieldseekerSpeciesabundanceMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerStormdrainMods() { + f.baseFieldseekerStormdrainMods = nil +} + +func (f *Factory) AddBaseFieldseekerStormdrainMod(mods ...FieldseekerStormdrainMod) { + f.baseFieldseekerStormdrainMods = append(f.baseFieldseekerStormdrainMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerTimecardMods() { + f.baseFieldseekerTimecardMods = nil +} + +func (f *Factory) AddBaseFieldseekerTimecardMod(mods ...FieldseekerTimecardMod) { + f.baseFieldseekerTimecardMods = append(f.baseFieldseekerTimecardMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerTracklogMods() { + f.baseFieldseekerTracklogMods = nil +} + +func (f *Factory) AddBaseFieldseekerTracklogMod(mods ...FieldseekerTracklogMod) { + f.baseFieldseekerTracklogMods = append(f.baseFieldseekerTracklogMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerTrapdatumMods() { + f.baseFieldseekerTrapdatumMods = nil +} + +func (f *Factory) AddBaseFieldseekerTrapdatumMod(mods ...FieldseekerTrapdatumMod) { + f.baseFieldseekerTrapdatumMods = append(f.baseFieldseekerTrapdatumMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerTraplocationMods() { + f.baseFieldseekerTraplocationMods = nil +} + +func (f *Factory) AddBaseFieldseekerTraplocationMod(mods ...FieldseekerTraplocationMod) { + f.baseFieldseekerTraplocationMods = append(f.baseFieldseekerTraplocationMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerTreatmentMods() { + f.baseFieldseekerTreatmentMods = nil +} + +func (f *Factory) AddBaseFieldseekerTreatmentMod(mods ...FieldseekerTreatmentMod) { + f.baseFieldseekerTreatmentMods = append(f.baseFieldseekerTreatmentMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerTreatmentareaMods() { + f.baseFieldseekerTreatmentareaMods = nil +} + +func (f *Factory) AddBaseFieldseekerTreatmentareaMod(mods ...FieldseekerTreatmentareaMod) { + f.baseFieldseekerTreatmentareaMods = append(f.baseFieldseekerTreatmentareaMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerUlvsprayrouteMods() { + f.baseFieldseekerUlvsprayrouteMods = nil +} + +func (f *Factory) AddBaseFieldseekerUlvsprayrouteMod(mods ...FieldseekerUlvsprayrouteMod) { + f.baseFieldseekerUlvsprayrouteMods = append(f.baseFieldseekerUlvsprayrouteMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerZoneMods() { + f.baseFieldseekerZoneMods = nil +} + +func (f *Factory) AddBaseFieldseekerZoneMod(mods ...FieldseekerZoneMod) { + f.baseFieldseekerZoneMods = append(f.baseFieldseekerZoneMods, mods...) +} + +func (f *Factory) ClearBaseFieldseekerZones2Mods() { + f.baseFieldseekerZones2Mods = nil +} + +func (f *Factory) AddBaseFieldseekerZones2Mod(mods ...FieldseekerZones2Mod) { + f.baseFieldseekerZones2Mods = append(f.baseFieldseekerZones2Mods, mods...) +} + func (f *Factory) ClearBaseFieldseekerSyncMods() { f.baseFieldseekerSyncMods = nil } diff --git a/db/factory/bobfactory_main.bob_test.go b/db/factory/bobfactory_main.bob_test.go index e03e4739..54d3ae28 100644 --- a/db/factory/bobfactory_main.bob_test.go +++ b/db/factory/bobfactory_main.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory @@ -8,6 +8,654 @@ import ( "testing" ) +func TestCreateFieldseekerContainerrelate(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerContainerrelateWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerContainerrelate: %v", err) + } +} + +func TestCreateFieldseekerFieldscoutinglog(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerFieldscoutinglogWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerFieldscoutinglog: %v", err) + } +} + +func TestCreateFieldseekerHabitatrelate(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerHabitatrelateWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerHabitatrelate: %v", err) + } +} + +func TestCreateFieldseekerInspectionsample(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerInspectionsampleWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerInspectionsample: %v", err) + } +} + +func TestCreateFieldseekerInspectionsampledetail(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerInspectionsampledetailWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerInspectionsampledetail: %v", err) + } +} + +func TestCreateFieldseekerLinelocation(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerLinelocationWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerLinelocation: %v", err) + } +} + +func TestCreateFieldseekerLocationtracking(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerLocationtrackingWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerLocationtracking: %v", err) + } +} + +func TestCreateFieldseekerMosquitoinspection(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerMosquitoinspectionWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerMosquitoinspection: %v", err) + } +} + +func TestCreateFieldseekerPointlocation(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerPointlocationWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerPointlocation: %v", err) + } +} + +func TestCreateFieldseekerPolygonlocation(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerPolygonlocationWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerPolygonlocation: %v", err) + } +} + +func TestCreateFieldseekerPool(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerPoolWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerPool: %v", err) + } +} + +func TestCreateFieldseekerPooldetail(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerPooldetailWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerPooldetail: %v", err) + } +} + +func TestCreateFieldseekerProposedtreatmentarea(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerProposedtreatmentareaWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerProposedtreatmentarea: %v", err) + } +} + +func TestCreateFieldseekerQamosquitoinspection(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerQamosquitoinspectionWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerQamosquitoinspection: %v", err) + } +} + +func TestCreateFieldseekerRodentlocation(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerRodentlocationWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerRodentlocation: %v", err) + } +} + +func TestCreateFieldseekerSamplecollection(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerSamplecollectionWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerSamplecollection: %v", err) + } +} + +func TestCreateFieldseekerSamplelocation(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerSamplelocationWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerSamplelocation: %v", err) + } +} + +func TestCreateFieldseekerServicerequest(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerServicerequestWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerServicerequest: %v", err) + } +} + +func TestCreateFieldseekerSpeciesabundance(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerSpeciesabundanceWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerSpeciesabundance: %v", err) + } +} + +func TestCreateFieldseekerStormdrain(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerStormdrainWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerStormdrain: %v", err) + } +} + +func TestCreateFieldseekerTimecard(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerTimecardWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerTimecard: %v", err) + } +} + +func TestCreateFieldseekerTrapdatum(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerTrapdatumWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerTrapdatum: %v", err) + } +} + +func TestCreateFieldseekerTraplocation(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerTraplocationWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerTraplocation: %v", err) + } +} + +func TestCreateFieldseekerTreatment(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerTreatmentWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerTreatment: %v", err) + } +} + +func TestCreateFieldseekerTreatmentarea(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerTreatmentareaWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerTreatmentarea: %v", err) + } +} + +func TestCreateFieldseekerZone(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerZoneWithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerZone: %v", err) + } +} + +func TestCreateFieldseekerZones2(t *testing.T) { + if testDB == nil { + t.Skip("skipping test, no DSN provided") + } + + ctx, cancel := context.WithCancel(t.Context()) + t.Cleanup(cancel) + + tx, err := testDB.Begin(ctx) + if err != nil { + t.Fatalf("Error starting transaction: %v", err) + } + + defer func() { + if err := tx.Rollback(ctx); err != nil { + t.Fatalf("Error rolling back transaction: %v", err) + } + }() + + if _, err := New().NewFieldseekerZones2WithContext(ctx).Create(ctx, tx); err != nil { + t.Fatalf("Error creating FieldseekerZones2: %v", err) + } +} + func TestCreateFieldseekerSync(t *testing.T) { if testDB == nil { t.Skip("skipping test, no DSN provided") diff --git a/db/factory/bobfactory_random.bob.go b/db/factory/bobfactory_random.bob.go index c7539cef..214553a0 100644 --- a/db/factory/bobfactory_random.bob.go +++ b/db/factory/bobfactory_random.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory @@ -10,6 +10,7 @@ import ( "time" enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/gofrs/uuid/v5" "github.com/jaswdr/faker/v2" "github.com/lib/pq" ) @@ -42,6 +43,1206 @@ func random_enums_Arcgislicensetype(f *faker.Faker, limits ...string) enums.Arcg return all[f.IntBetween(0, len(all)-1)] } +func random_enums_FieldseekerContainerrelateMosquitocontainertypeEnum(f *faker.Faker, limits ...string) enums.FieldseekerContainerrelateMosquitocontainertypeEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerContainerrelateMosquitocontainertypeEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum(f *faker.Faker, limits ...string) enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284(f *faker.Faker, limits ...string) enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerInspectionsampleNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerInspectionsampleNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerInspectionsampleNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerInspectionsampledetailMosquitoadultactivityEnum(f *faker.Faker, limits ...string) enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerInspectionsampledetailMosquitodominantstageEnum(f *faker.Faker, limits ...string) enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerInspectionsampledetailMosquitofieldspeciesEnum(f *faker.Faker, limits ...string) enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418(f *faker.Faker, limits ...string) enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80(f *faker.Faker, limits ...string) enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16(f *faker.Faker, limits ...string) enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerLinelocationLocationpriorityEnum(f *faker.Faker, limits ...string) enums.FieldseekerLinelocationLocationpriorityEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerLinelocationLocationpriorityEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerLinelocationLocationsymbologyEnum(f *faker.Faker, limits ...string) enums.FieldseekerLinelocationLocationsymbologyEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerLinelocationLocationsymbologyEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerLinelocationNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerLinelocationNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerLinelocationNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerMosquitoinspectionMosquitoactivityEnum(f *faker.Faker, limits ...string) enums.FieldseekerMosquitoinspectionMosquitoactivityEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerMosquitoinspectionMosquitoactivityEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerMosquitoinspectionMosquitoadultactivityEnum(f *faker.Faker, limits ...string) enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerMosquitoinspectionMosquitobreedingEnum(f *faker.Faker, limits ...string) enums.FieldseekerMosquitoinspectionMosquitobreedingEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerMosquitoinspectionMosquitobreedingEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerMosquitoinspectionMosquitofieldspeciesEnum(f *faker.Faker, limits ...string) enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4(f *faker.Faker, limits ...string) enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B(f *faker.Faker, limits ...string) enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2(f *faker.Faker, limits ...string) enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540(f *faker.Faker, limits ...string) enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerMosquitoinspectionNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerMosquitoinspectionNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerMosquitoinspectionNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerMosquitoinspectionNotinuiwinddirectionEnum(f *faker.Faker, limits ...string) enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPointlocationLocationpriorityEnum(f *faker.Faker, limits ...string) enums.FieldseekerPointlocationLocationpriorityEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPointlocationLocationpriorityEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPointlocationLocationsymbologyEnum(f *faker.Faker, limits ...string) enums.FieldseekerPointlocationLocationsymbologyEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPointlocationLocationsymbologyEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPointlocationNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerPointlocationNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPointlocationNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B(f *faker.Faker, limits ...string) enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489(f *faker.Faker, limits ...string) enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e(f *faker.Faker, limits ...string) enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86(f *faker.Faker, limits ...string) enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899(f *faker.Faker, limits ...string) enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPolygonlocationLocationpriorityEnum(f *faker.Faker, limits ...string) enums.FieldseekerPolygonlocationLocationpriorityEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPolygonlocationLocationpriorityEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPolygonlocationLocationsymbologyEnum(f *faker.Faker, limits ...string) enums.FieldseekerPolygonlocationLocationsymbologyEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPolygonlocationLocationsymbologyEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPolygonlocationNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerPolygonlocationNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPolygonlocationNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65(f *faker.Faker, limits ...string) enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13(f *faker.Faker, limits ...string) enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9(f *faker.Faker, limits ...string) enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPoolMosquitolabnameEnum(f *faker.Faker, limits ...string) enums.FieldseekerPoolMosquitolabnameEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPoolMosquitolabnameEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPoolNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerPoolNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPoolNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum(f *faker.Faker, limits ...string) enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum(f *faker.Faker, limits ...string) enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum(f *faker.Faker, limits ...string) enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerProposedtreatmentareaLocationpriorityEnum(f *faker.Faker, limits ...string) enums.FieldseekerProposedtreatmentareaLocationpriorityEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerProposedtreatmentareaLocationpriorityEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum(f *faker.Faker, limits ...string) enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerProposedtreatmentareaNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerProposedtreatmentareaNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerProposedtreatmentareaNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionMosquitoactionEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionMosquitoactionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionMosquitoactionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQaaquaticorganismsEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQabreedingpotentialEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQalarvaereasonEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQamosquitohabitatEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQasitetypeEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQasitetypeEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQasitetypeEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQasoilconditionEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQasoilconditionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQasoilconditionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQasourcereductionEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQasourcereductionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQasourcereductionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQavegetationEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQavegetationEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQavegetationEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQawaterconditionsEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQawaterdurationEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQawaterdurationEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQawaterdurationEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQawatermovementEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQawatermovementEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQawatermovementEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerQamosquitoinspectionQawatersourceEnum(f *faker.Faker, limits ...string) enums.FieldseekerQamosquitoinspectionQawatersourceEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerQamosquitoinspectionQawatersourceEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerRodentlocationLocationpriority1Enum(f *faker.Faker, limits ...string) enums.FieldseekerRodentlocationLocationpriority1Enum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerRodentlocationLocationpriority1Enum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerRodentlocationLocationusetype1Enum(f *faker.Faker, limits ...string) enums.FieldseekerRodentlocationLocationusetype1Enum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerRodentlocationLocationusetype1Enum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerRodentlocationNotinuitF1Enum(f *faker.Faker, limits ...string) enums.FieldseekerRodentlocationNotinuitF1Enum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerRodentlocationNotinuitF1Enum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerRodentlocationRodentlocationSymbologyEnum(f *faker.Faker, limits ...string) enums.FieldseekerRodentlocationRodentlocationSymbologyEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerRodentlocationRodentlocationSymbologyEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerRodentlocationRodentlocationhabitatEnum(f *faker.Faker, limits ...string) enums.FieldseekerRodentlocationRodentlocationhabitatEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerRodentlocationRodentlocationhabitatEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplecollectionMosquitoactivityEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplecollectionMosquitoactivityEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplecollectionMosquitoactivityEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplecollectionMosquitodiseaseEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplecollectionMosquitodiseaseEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplecollectionMosquitodiseaseEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplecollectionMosquitolabnameEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplecollectionMosquitolabnameEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplecollectionMosquitolabnameEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplecollectionMosquitosampleconditionEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplecollectionMosquitosampleconditionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplecollectionMosquitosampleconditionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplecollectionMosquitosamplespeciesEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplecollectionMosquitosampletypeEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplecollectionMosquitosampletypeEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplecollectionMosquitosampletypeEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplecollectionMosquitositeconditionEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplecollectionMosquitositeconditionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplecollectionMosquitositeconditionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplecollectionMosquitotestmethodEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplecollectionMosquitotestmethodEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplecollectionMosquitotestmethodEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplecollectionNotinuisexEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplecollectionNotinuisexEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplecollectionNotinuisexEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplecollectionNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplecollectionNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplecollectionNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplecollectionNotinuiwinddirectionEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplelocationLocationhabitattypeEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplelocationLocationhabitattypeEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplelocationLocationhabitattypeEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplelocationLocationpriorityEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplelocationLocationpriorityEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplelocationLocationpriorityEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplelocationNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplelocationNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplelocationNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSamplelocationSamplelocationusetypeEnum(f *faker.Faker, limits ...string) enums.FieldseekerSamplelocationSamplelocationusetypeEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSamplelocationSamplelocationusetypeEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestcontactpreferencesEnum(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestissuesEnum(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestissuesEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestissuesEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestnextactionEnum(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestnextactionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestnextactionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestpriorityEnum(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestpriorityEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestpriorityEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestregionEnum(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestregionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestregionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestrejectedreasonEnum(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestrejectedreasonEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestrejectedreasonEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequestsourceEnum(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequestsourceEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequestsourceEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequeststatusEnum(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequeststatusEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequeststatusEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerServicerequestServicerequesttargetEnum(f *faker.Faker, limits ...string) enums.FieldseekerServicerequestServicerequesttargetEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerServicerequestServicerequesttargetEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerSpeciesabundanceNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerSpeciesabundanceNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerSpeciesabundanceNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerStormdrainStormdrainsymbologyEnum(f *faker.Faker, limits ...string) enums.FieldseekerStormdrainStormdrainsymbologyEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerStormdrainStormdrainsymbologyEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu(f *faker.Faker, limits ...string) enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTimecardTimecardequipmenttypeEnum(f *faker.Faker, limits ...string) enums.FieldseekerTimecardTimecardequipmenttypeEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTimecardTimecardequipmenttypeEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTrapdataMosquitositeconditionEnum(f *faker.Faker, limits ...string) enums.FieldseekerTrapdataMosquitositeconditionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTrapdataMosquitositeconditionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTrapdataMosquitotrapconditionEnum(f *faker.Faker, limits ...string) enums.FieldseekerTrapdataMosquitotrapconditionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTrapdataMosquitotrapconditionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTrapdataMosquitotraptypeEnum(f *faker.Faker, limits ...string) enums.FieldseekerTrapdataMosquitotraptypeEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTrapdataMosquitotraptypeEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTrapdataNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerTrapdataNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTrapdataNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTrapdataNotinuitrapactivitytypeEnum(f *faker.Faker, limits ...string) enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu(f *faker.Faker, limits ...string) enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166(f *faker.Faker, limits ...string) enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTraplocationNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerTraplocationNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTraplocationNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0(f *faker.Faker, limits ...string) enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e(f *faker.Faker, limits ...string) enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B(f *faker.Faker, limits ...string) enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2(f *faker.Faker, limits ...string) enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTreatmentMosquitoactivityEnum(f *faker.Faker, limits ...string) enums.FieldseekerTreatmentMosquitoactivityEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTreatmentMosquitoactivityEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTreatmentMosquitoproductareaunitEnum(f *faker.Faker, limits ...string) enums.FieldseekerTreatmentMosquitoproductareaunitEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTreatmentMosquitoproductareaunitEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTreatmentMosquitoproductmeasureunitEnum(f *faker.Faker, limits ...string) enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTreatmentNotinuitFEnum(f *faker.Faker, limits ...string) enums.FieldseekerTreatmentNotinuitFEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTreatmentNotinuitFEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTreatmentNotinuiwinddirectionEnum(f *faker.Faker, limits ...string) enums.FieldseekerTreatmentNotinuiwinddirectionEnum { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTreatmentNotinuiwinddirectionEnum + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f(f *faker.Faker, limits ...string) enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1(f *faker.Faker, limits ...string) enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1 { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1 + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu(f *faker.Faker, limits ...string) enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E(f *faker.Faker, limits ...string) enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + +func random_enums_FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E(f *faker.Faker, limits ...string) enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E { + if f == nil { + f = &defaultFaker + } + + var e enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E + all := e.All() + return all[f.IntBetween(0, len(all)-1)] +} + func random_enums_H3aggregationtype(f *faker.Faker, limits ...string) enums.H3aggregationtype { if f == nil { f = &defaultFaker @@ -187,3 +1388,11 @@ func random_time_Time(f *faker.Faker, limits ...string) time.Time { max := time.Now().Add(year) return f.Time().TimeBetween(min, max) } + +func random_uuid_UUID(f *faker.Faker, limits ...string) uuid.UUID { + if f == nil { + f = &defaultFaker + } + + return uuid.Must(uuid.NewV4()) +} diff --git a/db/factory/bobfactory_random.bob_test.go b/db/factory/bobfactory_random.bob_test.go index d9fb4846..4d555f0e 100644 --- a/db/factory/bobfactory_random.bob_test.go +++ b/db/factory/bobfactory_random.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory @@ -112,3 +112,14 @@ func TestRandom_time_Time(t *testing.T) { t.Fatalf("random_time_Time() returned the same value twice: %v", val1) } } + +func TestRandom_uuid_UUID(t *testing.T) { + t.Parallel() + + val1 := random_uuid_UUID(nil) + val2 := random_uuid_UUID(nil) + + if val1 == val2 { + t.Fatalf("random_uuid_UUID() returned the same value twice: %v", val1) + } +} diff --git a/db/factory/fieldseeker.aerialsprayline.bob.go b/db/factory/fieldseeker.aerialsprayline.bob.go new file mode 100644 index 00000000..591d312e --- /dev/null +++ b/db/factory/fieldseeker.aerialsprayline.bob.go @@ -0,0 +1,90 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerAerialspraylineMod interface { + Apply(context.Context, *FieldseekerAerialspraylineTemplate) +} + +type FieldseekerAerialspraylineModFunc func(context.Context, *FieldseekerAerialspraylineTemplate) + +func (f FieldseekerAerialspraylineModFunc) Apply(ctx context.Context, n *FieldseekerAerialspraylineTemplate) { + f(ctx, n) +} + +type FieldseekerAerialspraylineModSlice []FieldseekerAerialspraylineMod + +func (mods FieldseekerAerialspraylineModSlice) Apply(ctx context.Context, n *FieldseekerAerialspraylineTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerAerialspraylineTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerAerialspraylineTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerAerialspraylineTemplate +func (o *FieldseekerAerialspraylineTemplate) Apply(ctx context.Context, mods ...FieldseekerAerialspraylineMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerAerialsprayline +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerAerialspraylineTemplate) setModelRels(o *models.FieldseekerAerialsprayline) {} + +// Build returns an *models.FieldseekerAerialsprayline +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerAerialspraylineTemplate.Create +func (o FieldseekerAerialspraylineTemplate) Build() *models.FieldseekerAerialsprayline { + m := &models.FieldseekerAerialsprayline{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerAerialspraylineSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerAerialspraylineTemplate.CreateMany +func (o FieldseekerAerialspraylineTemplate) BuildMany(number int) models.FieldseekerAerialspraylineSlice { + m := make(models.FieldseekerAerialspraylineSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerAerialsprayline has methods that act as mods for the FieldseekerAerialspraylineTemplate +var FieldseekerAerialspraylineMods fieldseekerAerialspraylineMods + +type fieldseekerAerialspraylineMods struct{} + +func (m fieldseekerAerialspraylineMods) RandomizeAllColumns(f *faker.Faker) FieldseekerAerialspraylineMod { + return FieldseekerAerialspraylineModSlice{} +} + +func (m fieldseekerAerialspraylineMods) WithParentsCascading() FieldseekerAerialspraylineMod { + return FieldseekerAerialspraylineModFunc(func(ctx context.Context, o *FieldseekerAerialspraylineTemplate) { + if isDone, _ := fieldseekerAerialspraylineWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerAerialspraylineWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.aerialspraysession.bob.go b/db/factory/fieldseeker.aerialspraysession.bob.go new file mode 100644 index 00000000..609838f6 --- /dev/null +++ b/db/factory/fieldseeker.aerialspraysession.bob.go @@ -0,0 +1,91 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerAerialspraysessionMod interface { + Apply(context.Context, *FieldseekerAerialspraysessionTemplate) +} + +type FieldseekerAerialspraysessionModFunc func(context.Context, *FieldseekerAerialspraysessionTemplate) + +func (f FieldseekerAerialspraysessionModFunc) Apply(ctx context.Context, n *FieldseekerAerialspraysessionTemplate) { + f(ctx, n) +} + +type FieldseekerAerialspraysessionModSlice []FieldseekerAerialspraysessionMod + +func (mods FieldseekerAerialspraysessionModSlice) Apply(ctx context.Context, n *FieldseekerAerialspraysessionTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerAerialspraysessionTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerAerialspraysessionTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerAerialspraysessionTemplate +func (o *FieldseekerAerialspraysessionTemplate) Apply(ctx context.Context, mods ...FieldseekerAerialspraysessionMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerAerialspraysession +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerAerialspraysessionTemplate) setModelRels(o *models.FieldseekerAerialspraysession) { +} + +// Build returns an *models.FieldseekerAerialspraysession +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerAerialspraysessionTemplate.Create +func (o FieldseekerAerialspraysessionTemplate) Build() *models.FieldseekerAerialspraysession { + m := &models.FieldseekerAerialspraysession{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerAerialspraysessionSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerAerialspraysessionTemplate.CreateMany +func (o FieldseekerAerialspraysessionTemplate) BuildMany(number int) models.FieldseekerAerialspraysessionSlice { + m := make(models.FieldseekerAerialspraysessionSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerAerialspraysession has methods that act as mods for the FieldseekerAerialspraysessionTemplate +var FieldseekerAerialspraysessionMods fieldseekerAerialspraysessionMods + +type fieldseekerAerialspraysessionMods struct{} + +func (m fieldseekerAerialspraysessionMods) RandomizeAllColumns(f *faker.Faker) FieldseekerAerialspraysessionMod { + return FieldseekerAerialspraysessionModSlice{} +} + +func (m fieldseekerAerialspraysessionMods) WithParentsCascading() FieldseekerAerialspraysessionMod { + return FieldseekerAerialspraysessionModFunc(func(ctx context.Context, o *FieldseekerAerialspraysessionTemplate) { + if isDone, _ := fieldseekerAerialspraysessionWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerAerialspraysessionWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.barrierspray.bob.go b/db/factory/fieldseeker.barrierspray.bob.go new file mode 100644 index 00000000..2d595a8e --- /dev/null +++ b/db/factory/fieldseeker.barrierspray.bob.go @@ -0,0 +1,90 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerBarriersprayMod interface { + Apply(context.Context, *FieldseekerBarriersprayTemplate) +} + +type FieldseekerBarriersprayModFunc func(context.Context, *FieldseekerBarriersprayTemplate) + +func (f FieldseekerBarriersprayModFunc) Apply(ctx context.Context, n *FieldseekerBarriersprayTemplate) { + f(ctx, n) +} + +type FieldseekerBarriersprayModSlice []FieldseekerBarriersprayMod + +func (mods FieldseekerBarriersprayModSlice) Apply(ctx context.Context, n *FieldseekerBarriersprayTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerBarriersprayTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerBarriersprayTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerBarriersprayTemplate +func (o *FieldseekerBarriersprayTemplate) Apply(ctx context.Context, mods ...FieldseekerBarriersprayMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerBarrierspray +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerBarriersprayTemplate) setModelRels(o *models.FieldseekerBarrierspray) {} + +// Build returns an *models.FieldseekerBarrierspray +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerBarriersprayTemplate.Create +func (o FieldseekerBarriersprayTemplate) Build() *models.FieldseekerBarrierspray { + m := &models.FieldseekerBarrierspray{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerBarrierspraySlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerBarriersprayTemplate.CreateMany +func (o FieldseekerBarriersprayTemplate) BuildMany(number int) models.FieldseekerBarrierspraySlice { + m := make(models.FieldseekerBarrierspraySlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerBarrierspray has methods that act as mods for the FieldseekerBarriersprayTemplate +var FieldseekerBarriersprayMods fieldseekerBarriersprayMods + +type fieldseekerBarriersprayMods struct{} + +func (m fieldseekerBarriersprayMods) RandomizeAllColumns(f *faker.Faker) FieldseekerBarriersprayMod { + return FieldseekerBarriersprayModSlice{} +} + +func (m fieldseekerBarriersprayMods) WithParentsCascading() FieldseekerBarriersprayMod { + return FieldseekerBarriersprayModFunc(func(ctx context.Context, o *FieldseekerBarriersprayTemplate) { + if isDone, _ := fieldseekerBarriersprayWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerBarriersprayWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.barriersprayroute.bob.go b/db/factory/fieldseeker.barriersprayroute.bob.go new file mode 100644 index 00000000..183199c3 --- /dev/null +++ b/db/factory/fieldseeker.barriersprayroute.bob.go @@ -0,0 +1,90 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerBarriersprayrouteMod interface { + Apply(context.Context, *FieldseekerBarriersprayrouteTemplate) +} + +type FieldseekerBarriersprayrouteModFunc func(context.Context, *FieldseekerBarriersprayrouteTemplate) + +func (f FieldseekerBarriersprayrouteModFunc) Apply(ctx context.Context, n *FieldseekerBarriersprayrouteTemplate) { + f(ctx, n) +} + +type FieldseekerBarriersprayrouteModSlice []FieldseekerBarriersprayrouteMod + +func (mods FieldseekerBarriersprayrouteModSlice) Apply(ctx context.Context, n *FieldseekerBarriersprayrouteTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerBarriersprayrouteTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerBarriersprayrouteTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerBarriersprayrouteTemplate +func (o *FieldseekerBarriersprayrouteTemplate) Apply(ctx context.Context, mods ...FieldseekerBarriersprayrouteMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerBarriersprayroute +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerBarriersprayrouteTemplate) setModelRels(o *models.FieldseekerBarriersprayroute) {} + +// Build returns an *models.FieldseekerBarriersprayroute +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerBarriersprayrouteTemplate.Create +func (o FieldseekerBarriersprayrouteTemplate) Build() *models.FieldseekerBarriersprayroute { + m := &models.FieldseekerBarriersprayroute{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerBarriersprayrouteSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerBarriersprayrouteTemplate.CreateMany +func (o FieldseekerBarriersprayrouteTemplate) BuildMany(number int) models.FieldseekerBarriersprayrouteSlice { + m := make(models.FieldseekerBarriersprayrouteSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerBarriersprayroute has methods that act as mods for the FieldseekerBarriersprayrouteTemplate +var FieldseekerBarriersprayrouteMods fieldseekerBarriersprayrouteMods + +type fieldseekerBarriersprayrouteMods struct{} + +func (m fieldseekerBarriersprayrouteMods) RandomizeAllColumns(f *faker.Faker) FieldseekerBarriersprayrouteMod { + return FieldseekerBarriersprayrouteModSlice{} +} + +func (m fieldseekerBarriersprayrouteMods) WithParentsCascading() FieldseekerBarriersprayrouteMod { + return FieldseekerBarriersprayrouteModFunc(func(ctx context.Context, o *FieldseekerBarriersprayrouteTemplate) { + if isDone, _ := fieldseekerBarriersprayrouteWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerBarriersprayrouteWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.containerrelate.bob.go b/db/factory/fieldseeker.containerrelate.bob.go new file mode 100644 index 00000000..f32d9186 --- /dev/null +++ b/db/factory/fieldseeker.containerrelate.bob.go @@ -0,0 +1,1062 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerContainerrelateMod interface { + Apply(context.Context, *FieldseekerContainerrelateTemplate) +} + +type FieldseekerContainerrelateModFunc func(context.Context, *FieldseekerContainerrelateTemplate) + +func (f FieldseekerContainerrelateModFunc) Apply(ctx context.Context, n *FieldseekerContainerrelateTemplate) { + f(ctx, n) +} + +type FieldseekerContainerrelateModSlice []FieldseekerContainerrelateMod + +func (mods FieldseekerContainerrelateModSlice) Apply(ctx context.Context, n *FieldseekerContainerrelateTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerContainerrelateTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerContainerrelateTemplate struct { + Objectid func() int64 + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Inspsampleid func() null.Val[uuid.UUID] + Mosquitoinspid func() null.Val[uuid.UUID] + Treatmentid func() null.Val[uuid.UUID] + Containertype func() null.Val[enums.FieldseekerContainerrelateMosquitocontainertypeEnum] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerContainerrelateTemplate +func (o *FieldseekerContainerrelateTemplate) Apply(ctx context.Context, mods ...FieldseekerContainerrelateMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerContainerrelate +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerContainerrelateTemplate) setModelRels(o *models.FieldseekerContainerrelate) {} + +// BuildSetter returns an *models.FieldseekerContainerrelateSetter +// this does nothing with the relationship templates +func (o FieldseekerContainerrelateTemplate) BuildSetter() *models.FieldseekerContainerrelateSetter { + m := &models.FieldseekerContainerrelateSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Inspsampleid != nil { + val := o.Inspsampleid() + m.Inspsampleid = omitnull.FromNull(val) + } + if o.Mosquitoinspid != nil { + val := o.Mosquitoinspid() + m.Mosquitoinspid = omitnull.FromNull(val) + } + if o.Treatmentid != nil { + val := o.Treatmentid() + m.Treatmentid = omitnull.FromNull(val) + } + if o.Containertype != nil { + val := o.Containertype() + m.Containertype = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerContainerrelateSetter +// this does nothing with the relationship templates +func (o FieldseekerContainerrelateTemplate) BuildManySetter(number int) []*models.FieldseekerContainerrelateSetter { + m := make([]*models.FieldseekerContainerrelateSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerContainerrelate +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerContainerrelateTemplate.Create +func (o FieldseekerContainerrelateTemplate) Build() *models.FieldseekerContainerrelate { + m := &models.FieldseekerContainerrelate{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Inspsampleid != nil { + m.Inspsampleid = o.Inspsampleid() + } + if o.Mosquitoinspid != nil { + m.Mosquitoinspid = o.Mosquitoinspid() + } + if o.Treatmentid != nil { + m.Treatmentid = o.Treatmentid() + } + if o.Containertype != nil { + m.Containertype = o.Containertype() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerContainerrelateSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerContainerrelateTemplate.CreateMany +func (o FieldseekerContainerrelateTemplate) BuildMany(number int) models.FieldseekerContainerrelateSlice { + m := make(models.FieldseekerContainerrelateSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerContainerrelate(m *models.FieldseekerContainerrelateSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerContainerrelate +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerContainerrelateTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerContainerrelate) error { + var err error + + return err +} + +// Create builds a fieldseekerContainerrelate and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerContainerrelateTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerContainerrelate, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerContainerrelate(opt) + + m, err := models.FieldseekerContainerrelates.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 fieldseekerContainerrelate and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerContainerrelateTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerContainerrelate { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerContainerrelate 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 *FieldseekerContainerrelateTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerContainerrelate { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerContainerrelates and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerContainerrelateTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerContainerrelateSlice, error) { + var err error + m := make(models.FieldseekerContainerrelateSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerContainerrelates and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerContainerrelateTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerContainerrelateSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerContainerrelates 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 FieldseekerContainerrelateTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerContainerrelateSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerContainerrelate has methods that act as mods for the FieldseekerContainerrelateTemplate +var FieldseekerContainerrelateMods fieldseekerContainerrelateMods + +type fieldseekerContainerrelateMods struct{} + +func (m fieldseekerContainerrelateMods) RandomizeAllColumns(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModSlice{ + FieldseekerContainerrelateMods.RandomObjectid(f), + FieldseekerContainerrelateMods.RandomGlobalid(f), + FieldseekerContainerrelateMods.RandomCreatedUser(f), + FieldseekerContainerrelateMods.RandomCreatedDate(f), + FieldseekerContainerrelateMods.RandomLastEditedUser(f), + FieldseekerContainerrelateMods.RandomLastEditedDate(f), + FieldseekerContainerrelateMods.RandomInspsampleid(f), + FieldseekerContainerrelateMods.RandomMosquitoinspid(f), + FieldseekerContainerrelateMods.RandomTreatmentid(f), + FieldseekerContainerrelateMods.RandomContainertype(f), + FieldseekerContainerrelateMods.RandomCreationdate(f), + FieldseekerContainerrelateMods.RandomCreator(f), + FieldseekerContainerrelateMods.RandomEditdate(f), + FieldseekerContainerrelateMods.RandomEditor(f), + } +} + +// Set the model columns to this value +func (m fieldseekerContainerrelateMods) Objectid(val int64) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) ObjectidFunc(f func() int64) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetObjectid() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerContainerrelateMods) RandomObjectid(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerContainerrelateMods) Globalid(val null.Val[uuid.UUID]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetGlobalid() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Globalid = 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 fieldseekerContainerrelateMods) RandomGlobalid(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Globalid = 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 fieldseekerContainerrelateMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Globalid = 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 fieldseekerContainerrelateMods) CreatedUser(val null.Val[string]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetCreatedUser() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.CreatedUser = 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 fieldseekerContainerrelateMods) RandomCreatedUser(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerContainerrelateMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerContainerrelateMods) CreatedDate(val null.Val[time.Time]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetCreatedDate() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.CreatedDate = 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 fieldseekerContainerrelateMods) RandomCreatedDate(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerContainerrelateMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerContainerrelateMods) LastEditedUser(val null.Val[string]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetLastEditedUser() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.LastEditedUser = 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 fieldseekerContainerrelateMods) RandomLastEditedUser(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerContainerrelateMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerContainerrelateMods) LastEditedDate(val null.Val[time.Time]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetLastEditedDate() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.LastEditedDate = 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 fieldseekerContainerrelateMods) RandomLastEditedDate(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerContainerrelateMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerContainerrelateMods) Inspsampleid(val null.Val[uuid.UUID]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Inspsampleid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) InspsampleidFunc(f func() null.Val[uuid.UUID]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Inspsampleid = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetInspsampleid() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Inspsampleid = 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 fieldseekerContainerrelateMods) RandomInspsampleid(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Inspsampleid = 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 fieldseekerContainerrelateMods) RandomInspsampleidNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Inspsampleid = 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 fieldseekerContainerrelateMods) Mosquitoinspid(val null.Val[uuid.UUID]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Mosquitoinspid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) MosquitoinspidFunc(f func() null.Val[uuid.UUID]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Mosquitoinspid = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetMosquitoinspid() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Mosquitoinspid = 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 fieldseekerContainerrelateMods) RandomMosquitoinspid(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Mosquitoinspid = 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 fieldseekerContainerrelateMods) RandomMosquitoinspidNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Mosquitoinspid = 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 fieldseekerContainerrelateMods) Treatmentid(val null.Val[uuid.UUID]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Treatmentid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) TreatmentidFunc(f func() null.Val[uuid.UUID]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Treatmentid = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetTreatmentid() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Treatmentid = 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 fieldseekerContainerrelateMods) RandomTreatmentid(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Treatmentid = 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 fieldseekerContainerrelateMods) RandomTreatmentidNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Treatmentid = 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 fieldseekerContainerrelateMods) Containertype(val null.Val[enums.FieldseekerContainerrelateMosquitocontainertypeEnum]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Containertype = func() null.Val[enums.FieldseekerContainerrelateMosquitocontainertypeEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) ContainertypeFunc(f func() null.Val[enums.FieldseekerContainerrelateMosquitocontainertypeEnum]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Containertype = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetContainertype() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Containertype = 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 fieldseekerContainerrelateMods) RandomContainertype(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Containertype = func() null.Val[enums.FieldseekerContainerrelateMosquitocontainertypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerContainerrelateMosquitocontainertypeEnum(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 fieldseekerContainerrelateMods) RandomContainertypeNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Containertype = func() null.Val[enums.FieldseekerContainerrelateMosquitocontainertypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerContainerrelateMosquitocontainertypeEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerContainerrelateMods) Creationdate(val null.Val[time.Time]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetCreationdate() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Creationdate = 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 fieldseekerContainerrelateMods) RandomCreationdate(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerContainerrelateMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerContainerrelateMods) Creator(val null.Val[string]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) CreatorFunc(f func() null.Val[string]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetCreator() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Creator = 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 fieldseekerContainerrelateMods) RandomCreator(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerContainerrelateMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerContainerrelateMods) Editdate(val null.Val[time.Time]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetEditdate() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Editdate = 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 fieldseekerContainerrelateMods) RandomEditdate(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerContainerrelateMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerContainerrelateMods) Editor(val null.Val[string]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerContainerrelateMods) EditorFunc(f func() null.Val[string]) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerContainerrelateMods) UnsetEditor() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Editor = 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 fieldseekerContainerrelateMods) RandomEditor(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerContainerrelateMods) RandomEditorNotNull(f *faker.Faker) FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(_ context.Context, o *FieldseekerContainerrelateTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +func (m fieldseekerContainerrelateMods) WithParentsCascading() FieldseekerContainerrelateMod { + return FieldseekerContainerrelateModFunc(func(ctx context.Context, o *FieldseekerContainerrelateTemplate) { + if isDone, _ := fieldseekerContainerrelateWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerContainerrelateWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.fieldscoutinglog.bob.go b/db/factory/fieldseeker.fieldscoutinglog.bob.go new file mode 100644 index 00000000..05be827d --- /dev/null +++ b/db/factory/fieldseeker.fieldscoutinglog.bob.go @@ -0,0 +1,876 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerFieldscoutinglogMod interface { + Apply(context.Context, *FieldseekerFieldscoutinglogTemplate) +} + +type FieldseekerFieldscoutinglogModFunc func(context.Context, *FieldseekerFieldscoutinglogTemplate) + +func (f FieldseekerFieldscoutinglogModFunc) Apply(ctx context.Context, n *FieldseekerFieldscoutinglogTemplate) { + f(ctx, n) +} + +type FieldseekerFieldscoutinglogModSlice []FieldseekerFieldscoutinglogMod + +func (mods FieldseekerFieldscoutinglogModSlice) Apply(ctx context.Context, n *FieldseekerFieldscoutinglogTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerFieldscoutinglogTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerFieldscoutinglogTemplate struct { + Objectid func() int64 + Status func() null.Val[enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerFieldscoutinglogTemplate +func (o *FieldseekerFieldscoutinglogTemplate) Apply(ctx context.Context, mods ...FieldseekerFieldscoutinglogMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerFieldscoutinglog +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerFieldscoutinglogTemplate) setModelRels(o *models.FieldseekerFieldscoutinglog) {} + +// BuildSetter returns an *models.FieldseekerFieldscoutinglogSetter +// this does nothing with the relationship templates +func (o FieldseekerFieldscoutinglogTemplate) BuildSetter() *models.FieldseekerFieldscoutinglogSetter { + m := &models.FieldseekerFieldscoutinglogSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Status != nil { + val := o.Status() + m.Status = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerFieldscoutinglogSetter +// this does nothing with the relationship templates +func (o FieldseekerFieldscoutinglogTemplate) BuildManySetter(number int) []*models.FieldseekerFieldscoutinglogSetter { + m := make([]*models.FieldseekerFieldscoutinglogSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerFieldscoutinglog +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerFieldscoutinglogTemplate.Create +func (o FieldseekerFieldscoutinglogTemplate) Build() *models.FieldseekerFieldscoutinglog { + m := &models.FieldseekerFieldscoutinglog{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Status != nil { + m.Status = o.Status() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerFieldscoutinglogSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerFieldscoutinglogTemplate.CreateMany +func (o FieldseekerFieldscoutinglogTemplate) BuildMany(number int) models.FieldseekerFieldscoutinglogSlice { + m := make(models.FieldseekerFieldscoutinglogSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerFieldscoutinglog(m *models.FieldseekerFieldscoutinglogSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerFieldscoutinglog +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerFieldscoutinglogTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerFieldscoutinglog) error { + var err error + + return err +} + +// Create builds a fieldseekerFieldscoutinglog and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerFieldscoutinglogTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerFieldscoutinglog, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerFieldscoutinglog(opt) + + m, err := models.FieldseekerFieldscoutinglogs.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 fieldseekerFieldscoutinglog and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerFieldscoutinglogTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerFieldscoutinglog { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerFieldscoutinglog 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 *FieldseekerFieldscoutinglogTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerFieldscoutinglog { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerFieldscoutinglogs and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerFieldscoutinglogTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerFieldscoutinglogSlice, error) { + var err error + m := make(models.FieldseekerFieldscoutinglogSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerFieldscoutinglogs and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerFieldscoutinglogTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerFieldscoutinglogSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerFieldscoutinglogs 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 FieldseekerFieldscoutinglogTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerFieldscoutinglogSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerFieldscoutinglog has methods that act as mods for the FieldseekerFieldscoutinglogTemplate +var FieldseekerFieldscoutinglogMods fieldseekerFieldscoutinglogMods + +type fieldseekerFieldscoutinglogMods struct{} + +func (m fieldseekerFieldscoutinglogMods) RandomizeAllColumns(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModSlice{ + FieldseekerFieldscoutinglogMods.RandomObjectid(f), + FieldseekerFieldscoutinglogMods.RandomStatus(f), + FieldseekerFieldscoutinglogMods.RandomGlobalid(f), + FieldseekerFieldscoutinglogMods.RandomCreatedUser(f), + FieldseekerFieldscoutinglogMods.RandomCreatedDate(f), + FieldseekerFieldscoutinglogMods.RandomLastEditedUser(f), + FieldseekerFieldscoutinglogMods.RandomLastEditedDate(f), + FieldseekerFieldscoutinglogMods.RandomCreationdate(f), + FieldseekerFieldscoutinglogMods.RandomCreator(f), + FieldseekerFieldscoutinglogMods.RandomEditdate(f), + FieldseekerFieldscoutinglogMods.RandomEditor(f), + } +} + +// Set the model columns to this value +func (m fieldseekerFieldscoutinglogMods) Objectid(val int64) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerFieldscoutinglogMods) ObjectidFunc(f func() int64) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerFieldscoutinglogMods) UnsetObjectid() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerFieldscoutinglogMods) RandomObjectid(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerFieldscoutinglogMods) Status(val null.Val[enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Status = func() null.Val[enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerFieldscoutinglogMods) StatusFunc(f func() null.Val[enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Status = f + }) +} + +// Clear any values for the column +func (m fieldseekerFieldscoutinglogMods) UnsetStatus() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Status = 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 fieldseekerFieldscoutinglogMods) RandomStatus(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Status = func() null.Val[enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum(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 fieldseekerFieldscoutinglogMods) RandomStatusNotNull(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Status = func() null.Val[enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerFieldscoutinglogMods) Globalid(val null.Val[uuid.UUID]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerFieldscoutinglogMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerFieldscoutinglogMods) UnsetGlobalid() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Globalid = 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 fieldseekerFieldscoutinglogMods) RandomGlobalid(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Globalid = 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 fieldseekerFieldscoutinglogMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Globalid = 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 fieldseekerFieldscoutinglogMods) CreatedUser(val null.Val[string]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerFieldscoutinglogMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerFieldscoutinglogMods) UnsetCreatedUser() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.CreatedUser = 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 fieldseekerFieldscoutinglogMods) RandomCreatedUser(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerFieldscoutinglogMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerFieldscoutinglogMods) CreatedDate(val null.Val[time.Time]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerFieldscoutinglogMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerFieldscoutinglogMods) UnsetCreatedDate() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.CreatedDate = 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 fieldseekerFieldscoutinglogMods) RandomCreatedDate(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerFieldscoutinglogMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerFieldscoutinglogMods) LastEditedUser(val null.Val[string]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerFieldscoutinglogMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerFieldscoutinglogMods) UnsetLastEditedUser() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.LastEditedUser = 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 fieldseekerFieldscoutinglogMods) RandomLastEditedUser(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerFieldscoutinglogMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerFieldscoutinglogMods) LastEditedDate(val null.Val[time.Time]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerFieldscoutinglogMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerFieldscoutinglogMods) UnsetLastEditedDate() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.LastEditedDate = 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 fieldseekerFieldscoutinglogMods) RandomLastEditedDate(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerFieldscoutinglogMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerFieldscoutinglogMods) Creationdate(val null.Val[time.Time]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerFieldscoutinglogMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerFieldscoutinglogMods) UnsetCreationdate() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Creationdate = 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 fieldseekerFieldscoutinglogMods) RandomCreationdate(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerFieldscoutinglogMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerFieldscoutinglogMods) Creator(val null.Val[string]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerFieldscoutinglogMods) CreatorFunc(f func() null.Val[string]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerFieldscoutinglogMods) UnsetCreator() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Creator = 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 fieldseekerFieldscoutinglogMods) RandomCreator(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerFieldscoutinglogMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerFieldscoutinglogMods) Editdate(val null.Val[time.Time]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerFieldscoutinglogMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerFieldscoutinglogMods) UnsetEditdate() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Editdate = 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 fieldseekerFieldscoutinglogMods) RandomEditdate(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerFieldscoutinglogMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerFieldscoutinglogMods) Editor(val null.Val[string]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerFieldscoutinglogMods) EditorFunc(f func() null.Val[string]) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerFieldscoutinglogMods) UnsetEditor() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Editor = 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 fieldseekerFieldscoutinglogMods) RandomEditor(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerFieldscoutinglogMods) RandomEditorNotNull(f *faker.Faker) FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(_ context.Context, o *FieldseekerFieldscoutinglogTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +func (m fieldseekerFieldscoutinglogMods) WithParentsCascading() FieldseekerFieldscoutinglogMod { + return FieldseekerFieldscoutinglogModFunc(func(ctx context.Context, o *FieldseekerFieldscoutinglogTemplate) { + if isDone, _ := fieldseekerFieldscoutinglogWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerFieldscoutinglogWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.habitatrelate.bob.go b/db/factory/fieldseeker.habitatrelate.bob.go new file mode 100644 index 00000000..781d7ecd --- /dev/null +++ b/db/factory/fieldseeker.habitatrelate.bob.go @@ -0,0 +1,940 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerHabitatrelateMod interface { + Apply(context.Context, *FieldseekerHabitatrelateTemplate) +} + +type FieldseekerHabitatrelateModFunc func(context.Context, *FieldseekerHabitatrelateTemplate) + +func (f FieldseekerHabitatrelateModFunc) Apply(ctx context.Context, n *FieldseekerHabitatrelateTemplate) { + f(ctx, n) +} + +type FieldseekerHabitatrelateModSlice []FieldseekerHabitatrelateMod + +func (mods FieldseekerHabitatrelateModSlice) Apply(ctx context.Context, n *FieldseekerHabitatrelateTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerHabitatrelateTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerHabitatrelateTemplate struct { + Objectid func() int64 + ForeignID func() null.Val[uuid.UUID] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Habitattype func() null.Val[enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerHabitatrelateTemplate +func (o *FieldseekerHabitatrelateTemplate) Apply(ctx context.Context, mods ...FieldseekerHabitatrelateMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerHabitatrelate +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerHabitatrelateTemplate) setModelRels(o *models.FieldseekerHabitatrelate) {} + +// BuildSetter returns an *models.FieldseekerHabitatrelateSetter +// this does nothing with the relationship templates +func (o FieldseekerHabitatrelateTemplate) BuildSetter() *models.FieldseekerHabitatrelateSetter { + m := &models.FieldseekerHabitatrelateSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.ForeignID != nil { + val := o.ForeignID() + m.ForeignID = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Habitattype != nil { + val := o.Habitattype() + m.Habitattype = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerHabitatrelateSetter +// this does nothing with the relationship templates +func (o FieldseekerHabitatrelateTemplate) BuildManySetter(number int) []*models.FieldseekerHabitatrelateSetter { + m := make([]*models.FieldseekerHabitatrelateSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerHabitatrelate +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerHabitatrelateTemplate.Create +func (o FieldseekerHabitatrelateTemplate) Build() *models.FieldseekerHabitatrelate { + m := &models.FieldseekerHabitatrelate{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.ForeignID != nil { + m.ForeignID = o.ForeignID() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Habitattype != nil { + m.Habitattype = o.Habitattype() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerHabitatrelateSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerHabitatrelateTemplate.CreateMany +func (o FieldseekerHabitatrelateTemplate) BuildMany(number int) models.FieldseekerHabitatrelateSlice { + m := make(models.FieldseekerHabitatrelateSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerHabitatrelate(m *models.FieldseekerHabitatrelateSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerHabitatrelate +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerHabitatrelateTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerHabitatrelate) error { + var err error + + return err +} + +// Create builds a fieldseekerHabitatrelate and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerHabitatrelateTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerHabitatrelate, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerHabitatrelate(opt) + + m, err := models.FieldseekerHabitatrelates.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 fieldseekerHabitatrelate and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerHabitatrelateTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerHabitatrelate { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerHabitatrelate 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 *FieldseekerHabitatrelateTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerHabitatrelate { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerHabitatrelates and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerHabitatrelateTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerHabitatrelateSlice, error) { + var err error + m := make(models.FieldseekerHabitatrelateSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerHabitatrelates and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerHabitatrelateTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerHabitatrelateSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerHabitatrelates 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 FieldseekerHabitatrelateTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerHabitatrelateSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerHabitatrelate has methods that act as mods for the FieldseekerHabitatrelateTemplate +var FieldseekerHabitatrelateMods fieldseekerHabitatrelateMods + +type fieldseekerHabitatrelateMods struct{} + +func (m fieldseekerHabitatrelateMods) RandomizeAllColumns(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModSlice{ + FieldseekerHabitatrelateMods.RandomObjectid(f), + FieldseekerHabitatrelateMods.RandomForeignID(f), + FieldseekerHabitatrelateMods.RandomGlobalid(f), + FieldseekerHabitatrelateMods.RandomCreatedUser(f), + FieldseekerHabitatrelateMods.RandomCreatedDate(f), + FieldseekerHabitatrelateMods.RandomLastEditedUser(f), + FieldseekerHabitatrelateMods.RandomLastEditedDate(f), + FieldseekerHabitatrelateMods.RandomHabitattype(f), + FieldseekerHabitatrelateMods.RandomCreationdate(f), + FieldseekerHabitatrelateMods.RandomCreator(f), + FieldseekerHabitatrelateMods.RandomEditdate(f), + FieldseekerHabitatrelateMods.RandomEditor(f), + } +} + +// Set the model columns to this value +func (m fieldseekerHabitatrelateMods) Objectid(val int64) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) ObjectidFunc(f func() int64) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetObjectid() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerHabitatrelateMods) RandomObjectid(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerHabitatrelateMods) ForeignID(val null.Val[uuid.UUID]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.ForeignID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) ForeignIDFunc(f func() null.Val[uuid.UUID]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.ForeignID = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetForeignID() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.ForeignID = 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 fieldseekerHabitatrelateMods) RandomForeignID(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.ForeignID = 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 fieldseekerHabitatrelateMods) RandomForeignIDNotNull(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.ForeignID = 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 fieldseekerHabitatrelateMods) Globalid(val null.Val[uuid.UUID]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetGlobalid() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Globalid = 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 fieldseekerHabitatrelateMods) RandomGlobalid(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Globalid = 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 fieldseekerHabitatrelateMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Globalid = 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 fieldseekerHabitatrelateMods) CreatedUser(val null.Val[string]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetCreatedUser() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.CreatedUser = 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 fieldseekerHabitatrelateMods) RandomCreatedUser(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerHabitatrelateMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerHabitatrelateMods) CreatedDate(val null.Val[time.Time]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetCreatedDate() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.CreatedDate = 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 fieldseekerHabitatrelateMods) RandomCreatedDate(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerHabitatrelateMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerHabitatrelateMods) LastEditedUser(val null.Val[string]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetLastEditedUser() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.LastEditedUser = 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 fieldseekerHabitatrelateMods) RandomLastEditedUser(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerHabitatrelateMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerHabitatrelateMods) LastEditedDate(val null.Val[time.Time]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetLastEditedDate() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.LastEditedDate = 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 fieldseekerHabitatrelateMods) RandomLastEditedDate(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerHabitatrelateMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerHabitatrelateMods) Habitattype(val null.Val[enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Habitattype = func() null.Val[enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) HabitattypeFunc(f func() null.Val[enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Habitattype = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetHabitattype() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Habitattype = 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 fieldseekerHabitatrelateMods) RandomHabitattype(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Habitattype = func() null.Val[enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284(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 fieldseekerHabitatrelateMods) RandomHabitattypeNotNull(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Habitattype = func() null.Val[enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerHabitatrelateMods) Creationdate(val null.Val[time.Time]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetCreationdate() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Creationdate = 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 fieldseekerHabitatrelateMods) RandomCreationdate(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerHabitatrelateMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerHabitatrelateMods) Creator(val null.Val[string]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) CreatorFunc(f func() null.Val[string]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetCreator() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Creator = 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 fieldseekerHabitatrelateMods) RandomCreator(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerHabitatrelateMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerHabitatrelateMods) Editdate(val null.Val[time.Time]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetEditdate() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Editdate = 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 fieldseekerHabitatrelateMods) RandomEditdate(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerHabitatrelateMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerHabitatrelateMods) Editor(val null.Val[string]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerHabitatrelateMods) EditorFunc(f func() null.Val[string]) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerHabitatrelateMods) UnsetEditor() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Editor = 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 fieldseekerHabitatrelateMods) RandomEditor(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerHabitatrelateMods) RandomEditorNotNull(f *faker.Faker) FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(_ context.Context, o *FieldseekerHabitatrelateTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +func (m fieldseekerHabitatrelateMods) WithParentsCascading() FieldseekerHabitatrelateMod { + return FieldseekerHabitatrelateModFunc(func(ctx context.Context, o *FieldseekerHabitatrelateTemplate) { + if isDone, _ := fieldseekerHabitatrelateWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerHabitatrelateWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.inspectionsample.bob.go b/db/factory/fieldseeker.inspectionsample.bob.go new file mode 100644 index 00000000..7f384371 --- /dev/null +++ b/db/factory/fieldseeker.inspectionsample.bob.go @@ -0,0 +1,1062 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerInspectionsampleMod interface { + Apply(context.Context, *FieldseekerInspectionsampleTemplate) +} + +type FieldseekerInspectionsampleModFunc func(context.Context, *FieldseekerInspectionsampleTemplate) + +func (f FieldseekerInspectionsampleModFunc) Apply(ctx context.Context, n *FieldseekerInspectionsampleTemplate) { + f(ctx, n) +} + +type FieldseekerInspectionsampleModSlice []FieldseekerInspectionsampleMod + +func (mods FieldseekerInspectionsampleModSlice) Apply(ctx context.Context, n *FieldseekerInspectionsampleTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerInspectionsampleTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerInspectionsampleTemplate struct { + Objectid func() int64 + InspID func() null.Val[uuid.UUID] + Sampleid func() null.Val[string] + Processed func() null.Val[enums.FieldseekerInspectionsampleNotinuitFEnum] + Idbytech func() null.Val[string] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerInspectionsampleTemplate +func (o *FieldseekerInspectionsampleTemplate) Apply(ctx context.Context, mods ...FieldseekerInspectionsampleMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerInspectionsample +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerInspectionsampleTemplate) setModelRels(o *models.FieldseekerInspectionsample) {} + +// BuildSetter returns an *models.FieldseekerInspectionsampleSetter +// this does nothing with the relationship templates +func (o FieldseekerInspectionsampleTemplate) BuildSetter() *models.FieldseekerInspectionsampleSetter { + m := &models.FieldseekerInspectionsampleSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.InspID != nil { + val := o.InspID() + m.InspID = omitnull.FromNull(val) + } + if o.Sampleid != nil { + val := o.Sampleid() + m.Sampleid = omitnull.FromNull(val) + } + if o.Processed != nil { + val := o.Processed() + m.Processed = omitnull.FromNull(val) + } + if o.Idbytech != nil { + val := o.Idbytech() + m.Idbytech = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerInspectionsampleSetter +// this does nothing with the relationship templates +func (o FieldseekerInspectionsampleTemplate) BuildManySetter(number int) []*models.FieldseekerInspectionsampleSetter { + m := make([]*models.FieldseekerInspectionsampleSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerInspectionsample +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerInspectionsampleTemplate.Create +func (o FieldseekerInspectionsampleTemplate) Build() *models.FieldseekerInspectionsample { + m := &models.FieldseekerInspectionsample{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.InspID != nil { + m.InspID = o.InspID() + } + if o.Sampleid != nil { + m.Sampleid = o.Sampleid() + } + if o.Processed != nil { + m.Processed = o.Processed() + } + if o.Idbytech != nil { + m.Idbytech = o.Idbytech() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerInspectionsampleSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerInspectionsampleTemplate.CreateMany +func (o FieldseekerInspectionsampleTemplate) BuildMany(number int) models.FieldseekerInspectionsampleSlice { + m := make(models.FieldseekerInspectionsampleSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerInspectionsample(m *models.FieldseekerInspectionsampleSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerInspectionsample +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerInspectionsampleTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerInspectionsample) error { + var err error + + return err +} + +// Create builds a fieldseekerInspectionsample and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerInspectionsampleTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerInspectionsample, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerInspectionsample(opt) + + m, err := models.FieldseekerInspectionsamples.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 fieldseekerInspectionsample and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerInspectionsampleTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerInspectionsample { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerInspectionsample 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 *FieldseekerInspectionsampleTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerInspectionsample { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerInspectionsamples and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerInspectionsampleTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerInspectionsampleSlice, error) { + var err error + m := make(models.FieldseekerInspectionsampleSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerInspectionsamples and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerInspectionsampleTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerInspectionsampleSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerInspectionsamples 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 FieldseekerInspectionsampleTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerInspectionsampleSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerInspectionsample has methods that act as mods for the FieldseekerInspectionsampleTemplate +var FieldseekerInspectionsampleMods fieldseekerInspectionsampleMods + +type fieldseekerInspectionsampleMods struct{} + +func (m fieldseekerInspectionsampleMods) RandomizeAllColumns(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModSlice{ + FieldseekerInspectionsampleMods.RandomObjectid(f), + FieldseekerInspectionsampleMods.RandomInspID(f), + FieldseekerInspectionsampleMods.RandomSampleid(f), + FieldseekerInspectionsampleMods.RandomProcessed(f), + FieldseekerInspectionsampleMods.RandomIdbytech(f), + FieldseekerInspectionsampleMods.RandomGlobalid(f), + FieldseekerInspectionsampleMods.RandomCreatedUser(f), + FieldseekerInspectionsampleMods.RandomCreatedDate(f), + FieldseekerInspectionsampleMods.RandomLastEditedUser(f), + FieldseekerInspectionsampleMods.RandomLastEditedDate(f), + FieldseekerInspectionsampleMods.RandomCreationdate(f), + FieldseekerInspectionsampleMods.RandomCreator(f), + FieldseekerInspectionsampleMods.RandomEditdate(f), + FieldseekerInspectionsampleMods.RandomEditor(f), + } +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) Objectid(val int64) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) ObjectidFunc(f func() int64) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetObjectid() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerInspectionsampleMods) RandomObjectid(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) InspID(val null.Val[uuid.UUID]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.InspID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) InspIDFunc(f func() null.Val[uuid.UUID]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.InspID = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetInspID() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.InspID = 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 fieldseekerInspectionsampleMods) RandomInspID(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.InspID = 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 fieldseekerInspectionsampleMods) RandomInspIDNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.InspID = 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 fieldseekerInspectionsampleMods) Sampleid(val null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Sampleid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) SampleidFunc(f func() null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Sampleid = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetSampleid() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Sampleid = 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 fieldseekerInspectionsampleMods) RandomSampleid(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Sampleid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerInspectionsampleMods) RandomSampleidNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Sampleid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) Processed(val null.Val[enums.FieldseekerInspectionsampleNotinuitFEnum]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Processed = func() null.Val[enums.FieldseekerInspectionsampleNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) ProcessedFunc(f func() null.Val[enums.FieldseekerInspectionsampleNotinuitFEnum]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Processed = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetProcessed() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Processed = 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 fieldseekerInspectionsampleMods) RandomProcessed(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Processed = func() null.Val[enums.FieldseekerInspectionsampleNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerInspectionsampleNotinuitFEnum(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 fieldseekerInspectionsampleMods) RandomProcessedNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Processed = func() null.Val[enums.FieldseekerInspectionsampleNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerInspectionsampleNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) Idbytech(val null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Idbytech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) IdbytechFunc(f func() null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Idbytech = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetIdbytech() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Idbytech = 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 fieldseekerInspectionsampleMods) RandomIdbytech(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Idbytech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerInspectionsampleMods) RandomIdbytechNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Idbytech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) Globalid(val null.Val[uuid.UUID]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetGlobalid() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Globalid = 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 fieldseekerInspectionsampleMods) RandomGlobalid(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Globalid = 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 fieldseekerInspectionsampleMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Globalid = 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 fieldseekerInspectionsampleMods) CreatedUser(val null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetCreatedUser() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.CreatedUser = 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 fieldseekerInspectionsampleMods) RandomCreatedUser(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerInspectionsampleMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) CreatedDate(val null.Val[time.Time]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetCreatedDate() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.CreatedDate = 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 fieldseekerInspectionsampleMods) RandomCreatedDate(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerInspectionsampleMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) LastEditedUser(val null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetLastEditedUser() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.LastEditedUser = 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 fieldseekerInspectionsampleMods) RandomLastEditedUser(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerInspectionsampleMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) LastEditedDate(val null.Val[time.Time]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetLastEditedDate() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.LastEditedDate = 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 fieldseekerInspectionsampleMods) RandomLastEditedDate(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerInspectionsampleMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) Creationdate(val null.Val[time.Time]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetCreationdate() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Creationdate = 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 fieldseekerInspectionsampleMods) RandomCreationdate(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerInspectionsampleMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) Creator(val null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) CreatorFunc(f func() null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetCreator() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Creator = 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 fieldseekerInspectionsampleMods) RandomCreator(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerInspectionsampleMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) Editdate(val null.Val[time.Time]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetEditdate() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Editdate = 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 fieldseekerInspectionsampleMods) RandomEditdate(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerInspectionsampleMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampleMods) Editor(val null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampleMods) EditorFunc(f func() null.Val[string]) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampleMods) UnsetEditor() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Editor = 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 fieldseekerInspectionsampleMods) RandomEditor(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerInspectionsampleMods) RandomEditorNotNull(f *faker.Faker) FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(_ context.Context, o *FieldseekerInspectionsampleTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +func (m fieldseekerInspectionsampleMods) WithParentsCascading() FieldseekerInspectionsampleMod { + return FieldseekerInspectionsampleModFunc(func(ctx context.Context, o *FieldseekerInspectionsampleTemplate) { + if isDone, _ := fieldseekerInspectionsampleWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerInspectionsampleWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.inspectionsampledetail.bob.go b/db/factory/fieldseeker.inspectionsampledetail.bob.go new file mode 100644 index 00000000..57948659 --- /dev/null +++ b/db/factory/fieldseeker.inspectionsampledetail.bob.go @@ -0,0 +1,1745 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerInspectionsampledetailMod interface { + Apply(context.Context, *FieldseekerInspectionsampledetailTemplate) +} + +type FieldseekerInspectionsampledetailModFunc func(context.Context, *FieldseekerInspectionsampledetailTemplate) + +func (f FieldseekerInspectionsampledetailModFunc) Apply(ctx context.Context, n *FieldseekerInspectionsampledetailTemplate) { + f(ctx, n) +} + +type FieldseekerInspectionsampledetailModSlice []FieldseekerInspectionsampledetailMod + +func (mods FieldseekerInspectionsampledetailModSlice) Apply(ctx context.Context, n *FieldseekerInspectionsampledetailTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerInspectionsampledetailTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerInspectionsampledetailTemplate struct { + Objectid func() int64 + InspsampleID func() null.Val[uuid.UUID] + Fieldspecies func() null.Val[enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum] + Flarvcount func() null.Val[int16] + Fpupcount func() null.Val[int16] + Feggcount func() null.Val[int16] + Flstages func() null.Val[string] + Fdomstage func() null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] + Fadultact func() null.Val[enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum] + Labspecies func() null.Val[string] + Llarvcount func() null.Val[int16] + Lpupcount func() null.Val[int16] + Leggcount func() null.Val[int16] + Ldomstage func() null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] + Comments func() null.Val[string] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Processed func() null.Val[int16] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerInspectionsampledetailTemplate +func (o *FieldseekerInspectionsampledetailTemplate) Apply(ctx context.Context, mods ...FieldseekerInspectionsampledetailMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerInspectionsampledetail +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerInspectionsampledetailTemplate) setModelRels(o *models.FieldseekerInspectionsampledetail) { +} + +// BuildSetter returns an *models.FieldseekerInspectionsampledetailSetter +// this does nothing with the relationship templates +func (o FieldseekerInspectionsampledetailTemplate) BuildSetter() *models.FieldseekerInspectionsampledetailSetter { + m := &models.FieldseekerInspectionsampledetailSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.InspsampleID != nil { + val := o.InspsampleID() + m.InspsampleID = omitnull.FromNull(val) + } + if o.Fieldspecies != nil { + val := o.Fieldspecies() + m.Fieldspecies = omitnull.FromNull(val) + } + if o.Flarvcount != nil { + val := o.Flarvcount() + m.Flarvcount = omitnull.FromNull(val) + } + if o.Fpupcount != nil { + val := o.Fpupcount() + m.Fpupcount = omitnull.FromNull(val) + } + if o.Feggcount != nil { + val := o.Feggcount() + m.Feggcount = omitnull.FromNull(val) + } + if o.Flstages != nil { + val := o.Flstages() + m.Flstages = omitnull.FromNull(val) + } + if o.Fdomstage != nil { + val := o.Fdomstage() + m.Fdomstage = omitnull.FromNull(val) + } + if o.Fadultact != nil { + val := o.Fadultact() + m.Fadultact = omitnull.FromNull(val) + } + if o.Labspecies != nil { + val := o.Labspecies() + m.Labspecies = omitnull.FromNull(val) + } + if o.Llarvcount != nil { + val := o.Llarvcount() + m.Llarvcount = omitnull.FromNull(val) + } + if o.Lpupcount != nil { + val := o.Lpupcount() + m.Lpupcount = omitnull.FromNull(val) + } + if o.Leggcount != nil { + val := o.Leggcount() + m.Leggcount = omitnull.FromNull(val) + } + if o.Ldomstage != nil { + val := o.Ldomstage() + m.Ldomstage = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Processed != nil { + val := o.Processed() + m.Processed = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerInspectionsampledetailSetter +// this does nothing with the relationship templates +func (o FieldseekerInspectionsampledetailTemplate) BuildManySetter(number int) []*models.FieldseekerInspectionsampledetailSetter { + m := make([]*models.FieldseekerInspectionsampledetailSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerInspectionsampledetail +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerInspectionsampledetailTemplate.Create +func (o FieldseekerInspectionsampledetailTemplate) Build() *models.FieldseekerInspectionsampledetail { + m := &models.FieldseekerInspectionsampledetail{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.InspsampleID != nil { + m.InspsampleID = o.InspsampleID() + } + if o.Fieldspecies != nil { + m.Fieldspecies = o.Fieldspecies() + } + if o.Flarvcount != nil { + m.Flarvcount = o.Flarvcount() + } + if o.Fpupcount != nil { + m.Fpupcount = o.Fpupcount() + } + if o.Feggcount != nil { + m.Feggcount = o.Feggcount() + } + if o.Flstages != nil { + m.Flstages = o.Flstages() + } + if o.Fdomstage != nil { + m.Fdomstage = o.Fdomstage() + } + if o.Fadultact != nil { + m.Fadultact = o.Fadultact() + } + if o.Labspecies != nil { + m.Labspecies = o.Labspecies() + } + if o.Llarvcount != nil { + m.Llarvcount = o.Llarvcount() + } + if o.Lpupcount != nil { + m.Lpupcount = o.Lpupcount() + } + if o.Leggcount != nil { + m.Leggcount = o.Leggcount() + } + if o.Ldomstage != nil { + m.Ldomstage = o.Ldomstage() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Processed != nil { + m.Processed = o.Processed() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerInspectionsampledetailSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerInspectionsampledetailTemplate.CreateMany +func (o FieldseekerInspectionsampledetailTemplate) BuildMany(number int) models.FieldseekerInspectionsampledetailSlice { + m := make(models.FieldseekerInspectionsampledetailSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerInspectionsampledetail(m *models.FieldseekerInspectionsampledetailSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerInspectionsampledetail +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerInspectionsampledetailTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerInspectionsampledetail) error { + var err error + + return err +} + +// Create builds a fieldseekerInspectionsampledetail and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerInspectionsampledetailTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerInspectionsampledetail, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerInspectionsampledetail(opt) + + m, err := models.FieldseekerInspectionsampledetails.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 fieldseekerInspectionsampledetail and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerInspectionsampledetailTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerInspectionsampledetail { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerInspectionsampledetail 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 *FieldseekerInspectionsampledetailTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerInspectionsampledetail { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerInspectionsampledetails and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerInspectionsampledetailTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerInspectionsampledetailSlice, error) { + var err error + m := make(models.FieldseekerInspectionsampledetailSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerInspectionsampledetails and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerInspectionsampledetailTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerInspectionsampledetailSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerInspectionsampledetails 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 FieldseekerInspectionsampledetailTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerInspectionsampledetailSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerInspectionsampledetail has methods that act as mods for the FieldseekerInspectionsampledetailTemplate +var FieldseekerInspectionsampledetailMods fieldseekerInspectionsampledetailMods + +type fieldseekerInspectionsampledetailMods struct{} + +func (m fieldseekerInspectionsampledetailMods) RandomizeAllColumns(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModSlice{ + FieldseekerInspectionsampledetailMods.RandomObjectid(f), + FieldseekerInspectionsampledetailMods.RandomInspsampleID(f), + FieldseekerInspectionsampledetailMods.RandomFieldspecies(f), + FieldseekerInspectionsampledetailMods.RandomFlarvcount(f), + FieldseekerInspectionsampledetailMods.RandomFpupcount(f), + FieldseekerInspectionsampledetailMods.RandomFeggcount(f), + FieldseekerInspectionsampledetailMods.RandomFlstages(f), + FieldseekerInspectionsampledetailMods.RandomFdomstage(f), + FieldseekerInspectionsampledetailMods.RandomFadultact(f), + FieldseekerInspectionsampledetailMods.RandomLabspecies(f), + FieldseekerInspectionsampledetailMods.RandomLlarvcount(f), + FieldseekerInspectionsampledetailMods.RandomLpupcount(f), + FieldseekerInspectionsampledetailMods.RandomLeggcount(f), + FieldseekerInspectionsampledetailMods.RandomLdomstage(f), + FieldseekerInspectionsampledetailMods.RandomComments(f), + FieldseekerInspectionsampledetailMods.RandomGlobalid(f), + FieldseekerInspectionsampledetailMods.RandomCreatedUser(f), + FieldseekerInspectionsampledetailMods.RandomCreatedDate(f), + FieldseekerInspectionsampledetailMods.RandomLastEditedUser(f), + FieldseekerInspectionsampledetailMods.RandomLastEditedDate(f), + FieldseekerInspectionsampledetailMods.RandomProcessed(f), + FieldseekerInspectionsampledetailMods.RandomCreationdate(f), + FieldseekerInspectionsampledetailMods.RandomCreator(f), + FieldseekerInspectionsampledetailMods.RandomEditdate(f), + FieldseekerInspectionsampledetailMods.RandomEditor(f), + } +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Objectid(val int64) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) ObjectidFunc(f func() int64) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetObjectid() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerInspectionsampledetailMods) RandomObjectid(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) InspsampleID(val null.Val[uuid.UUID]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.InspsampleID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) InspsampleIDFunc(f func() null.Val[uuid.UUID]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.InspsampleID = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetInspsampleID() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.InspsampleID = 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 fieldseekerInspectionsampledetailMods) RandomInspsampleID(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.InspsampleID = 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 fieldseekerInspectionsampledetailMods) RandomInspsampleIDNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.InspsampleID = 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 fieldseekerInspectionsampledetailMods) Fieldspecies(val null.Val[enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fieldspecies = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) FieldspeciesFunc(f func() null.Val[enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fieldspecies = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetFieldspecies() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fieldspecies = 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 fieldseekerInspectionsampledetailMods) RandomFieldspecies(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fieldspecies = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerInspectionsampledetailMosquitofieldspeciesEnum(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 fieldseekerInspectionsampledetailMods) RandomFieldspeciesNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fieldspecies = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerInspectionsampledetailMosquitofieldspeciesEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Flarvcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Flarvcount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) FlarvcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Flarvcount = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetFlarvcount() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Flarvcount = 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 fieldseekerInspectionsampledetailMods) RandomFlarvcount(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Flarvcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerInspectionsampledetailMods) RandomFlarvcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Flarvcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Fpupcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fpupcount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) FpupcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fpupcount = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetFpupcount() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fpupcount = 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 fieldseekerInspectionsampledetailMods) RandomFpupcount(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fpupcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerInspectionsampledetailMods) RandomFpupcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fpupcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Feggcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Feggcount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) FeggcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Feggcount = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetFeggcount() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Feggcount = 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 fieldseekerInspectionsampledetailMods) RandomFeggcount(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Feggcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerInspectionsampledetailMods) RandomFeggcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Feggcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Flstages(val null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Flstages = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) FlstagesFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Flstages = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetFlstages() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Flstages = 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 fieldseekerInspectionsampledetailMods) RandomFlstages(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Flstages = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerInspectionsampledetailMods) RandomFlstagesNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Flstages = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Fdomstage(val null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fdomstage = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) FdomstageFunc(f func() null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fdomstage = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetFdomstage() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fdomstage = 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 fieldseekerInspectionsampledetailMods) RandomFdomstage(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fdomstage = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerInspectionsampledetailMosquitodominantstageEnum(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 fieldseekerInspectionsampledetailMods) RandomFdomstageNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fdomstage = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerInspectionsampledetailMosquitodominantstageEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Fadultact(val null.Val[enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fadultact = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) FadultactFunc(f func() null.Val[enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fadultact = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetFadultact() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fadultact = 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 fieldseekerInspectionsampledetailMods) RandomFadultact(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fadultact = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerInspectionsampledetailMosquitoadultactivityEnum(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 fieldseekerInspectionsampledetailMods) RandomFadultactNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Fadultact = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerInspectionsampledetailMosquitoadultactivityEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Labspecies(val null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Labspecies = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) LabspeciesFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Labspecies = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetLabspecies() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Labspecies = 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 fieldseekerInspectionsampledetailMods) RandomLabspecies(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Labspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerInspectionsampledetailMods) RandomLabspeciesNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Labspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Llarvcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Llarvcount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) LlarvcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Llarvcount = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetLlarvcount() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Llarvcount = 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 fieldseekerInspectionsampledetailMods) RandomLlarvcount(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Llarvcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerInspectionsampledetailMods) RandomLlarvcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Llarvcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Lpupcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Lpupcount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) LpupcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Lpupcount = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetLpupcount() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Lpupcount = 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 fieldseekerInspectionsampledetailMods) RandomLpupcount(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Lpupcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerInspectionsampledetailMods) RandomLpupcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Lpupcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Leggcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Leggcount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) LeggcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Leggcount = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetLeggcount() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Leggcount = 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 fieldseekerInspectionsampledetailMods) RandomLeggcount(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Leggcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerInspectionsampledetailMods) RandomLeggcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Leggcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Ldomstage(val null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Ldomstage = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) LdomstageFunc(f func() null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Ldomstage = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetLdomstage() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Ldomstage = 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 fieldseekerInspectionsampledetailMods) RandomLdomstage(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Ldomstage = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerInspectionsampledetailMosquitodominantstageEnum(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 fieldseekerInspectionsampledetailMods) RandomLdomstageNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Ldomstage = func() null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerInspectionsampledetailMosquitodominantstageEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Comments(val null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) CommentsFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetComments() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Comments = 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 fieldseekerInspectionsampledetailMods) RandomComments(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerInspectionsampledetailMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Globalid(val null.Val[uuid.UUID]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetGlobalid() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Globalid = 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 fieldseekerInspectionsampledetailMods) RandomGlobalid(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Globalid = 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 fieldseekerInspectionsampledetailMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Globalid = 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 fieldseekerInspectionsampledetailMods) CreatedUser(val null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetCreatedUser() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.CreatedUser = 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 fieldseekerInspectionsampledetailMods) RandomCreatedUser(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerInspectionsampledetailMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) CreatedDate(val null.Val[time.Time]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetCreatedDate() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.CreatedDate = 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 fieldseekerInspectionsampledetailMods) RandomCreatedDate(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerInspectionsampledetailMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) LastEditedUser(val null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetLastEditedUser() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.LastEditedUser = 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 fieldseekerInspectionsampledetailMods) RandomLastEditedUser(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerInspectionsampledetailMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) LastEditedDate(val null.Val[time.Time]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetLastEditedDate() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.LastEditedDate = 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 fieldseekerInspectionsampledetailMods) RandomLastEditedDate(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerInspectionsampledetailMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Processed(val null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Processed = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) ProcessedFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Processed = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetProcessed() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Processed = 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 fieldseekerInspectionsampledetailMods) RandomProcessed(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Processed = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerInspectionsampledetailMods) RandomProcessedNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Processed = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Creationdate(val null.Val[time.Time]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetCreationdate() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Creationdate = 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 fieldseekerInspectionsampledetailMods) RandomCreationdate(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerInspectionsampledetailMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Creator(val null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) CreatorFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetCreator() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Creator = 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 fieldseekerInspectionsampledetailMods) RandomCreator(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerInspectionsampledetailMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Editdate(val null.Val[time.Time]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetEditdate() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Editdate = 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 fieldseekerInspectionsampledetailMods) RandomEditdate(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerInspectionsampledetailMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerInspectionsampledetailMods) Editor(val null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerInspectionsampledetailMods) EditorFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerInspectionsampledetailMods) UnsetEditor() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Editor = 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 fieldseekerInspectionsampledetailMods) RandomEditor(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerInspectionsampledetailMods) RandomEditorNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +func (m fieldseekerInspectionsampledetailMods) WithParentsCascading() FieldseekerInspectionsampledetailMod { + return FieldseekerInspectionsampledetailModFunc(func(ctx context.Context, o *FieldseekerInspectionsampledetailTemplate) { + if isDone, _ := fieldseekerInspectionsampledetailWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerInspectionsampledetailWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.landingcount.bob.go b/db/factory/fieldseeker.landingcount.bob.go new file mode 100644 index 00000000..cbf8b09f --- /dev/null +++ b/db/factory/fieldseeker.landingcount.bob.go @@ -0,0 +1,90 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerLandingcountMod interface { + Apply(context.Context, *FieldseekerLandingcountTemplate) +} + +type FieldseekerLandingcountModFunc func(context.Context, *FieldseekerLandingcountTemplate) + +func (f FieldseekerLandingcountModFunc) Apply(ctx context.Context, n *FieldseekerLandingcountTemplate) { + f(ctx, n) +} + +type FieldseekerLandingcountModSlice []FieldseekerLandingcountMod + +func (mods FieldseekerLandingcountModSlice) Apply(ctx context.Context, n *FieldseekerLandingcountTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerLandingcountTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerLandingcountTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerLandingcountTemplate +func (o *FieldseekerLandingcountTemplate) Apply(ctx context.Context, mods ...FieldseekerLandingcountMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerLandingcount +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerLandingcountTemplate) setModelRels(o *models.FieldseekerLandingcount) {} + +// Build returns an *models.FieldseekerLandingcount +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerLandingcountTemplate.Create +func (o FieldseekerLandingcountTemplate) Build() *models.FieldseekerLandingcount { + m := &models.FieldseekerLandingcount{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerLandingcountSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerLandingcountTemplate.CreateMany +func (o FieldseekerLandingcountTemplate) BuildMany(number int) models.FieldseekerLandingcountSlice { + m := make(models.FieldseekerLandingcountSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerLandingcount has methods that act as mods for the FieldseekerLandingcountTemplate +var FieldseekerLandingcountMods fieldseekerLandingcountMods + +type fieldseekerLandingcountMods struct{} + +func (m fieldseekerLandingcountMods) RandomizeAllColumns(f *faker.Faker) FieldseekerLandingcountMod { + return FieldseekerLandingcountModSlice{} +} + +func (m fieldseekerLandingcountMods) WithParentsCascading() FieldseekerLandingcountMod { + return FieldseekerLandingcountModFunc(func(ctx context.Context, o *FieldseekerLandingcountTemplate) { + if isDone, _ := fieldseekerLandingcountWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerLandingcountWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.landingcountlocation.bob.go b/db/factory/fieldseeker.landingcountlocation.bob.go new file mode 100644 index 00000000..e69f3146 --- /dev/null +++ b/db/factory/fieldseeker.landingcountlocation.bob.go @@ -0,0 +1,91 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerLandingcountlocationMod interface { + Apply(context.Context, *FieldseekerLandingcountlocationTemplate) +} + +type FieldseekerLandingcountlocationModFunc func(context.Context, *FieldseekerLandingcountlocationTemplate) + +func (f FieldseekerLandingcountlocationModFunc) Apply(ctx context.Context, n *FieldseekerLandingcountlocationTemplate) { + f(ctx, n) +} + +type FieldseekerLandingcountlocationModSlice []FieldseekerLandingcountlocationMod + +func (mods FieldseekerLandingcountlocationModSlice) Apply(ctx context.Context, n *FieldseekerLandingcountlocationTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerLandingcountlocationTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerLandingcountlocationTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerLandingcountlocationTemplate +func (o *FieldseekerLandingcountlocationTemplate) Apply(ctx context.Context, mods ...FieldseekerLandingcountlocationMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerLandingcountlocation +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerLandingcountlocationTemplate) setModelRels(o *models.FieldseekerLandingcountlocation) { +} + +// Build returns an *models.FieldseekerLandingcountlocation +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerLandingcountlocationTemplate.Create +func (o FieldseekerLandingcountlocationTemplate) Build() *models.FieldseekerLandingcountlocation { + m := &models.FieldseekerLandingcountlocation{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerLandingcountlocationSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerLandingcountlocationTemplate.CreateMany +func (o FieldseekerLandingcountlocationTemplate) BuildMany(number int) models.FieldseekerLandingcountlocationSlice { + m := make(models.FieldseekerLandingcountlocationSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerLandingcountlocation has methods that act as mods for the FieldseekerLandingcountlocationTemplate +var FieldseekerLandingcountlocationMods fieldseekerLandingcountlocationMods + +type fieldseekerLandingcountlocationMods struct{} + +func (m fieldseekerLandingcountlocationMods) RandomizeAllColumns(f *faker.Faker) FieldseekerLandingcountlocationMod { + return FieldseekerLandingcountlocationModSlice{} +} + +func (m fieldseekerLandingcountlocationMods) WithParentsCascading() FieldseekerLandingcountlocationMod { + return FieldseekerLandingcountlocationModFunc(func(ctx context.Context, o *FieldseekerLandingcountlocationTemplate) { + if isDone, _ := fieldseekerLandingcountlocationWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerLandingcountlocationWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.linelocation.bob.go b/db/factory/fieldseeker.linelocation.bob.go new file mode 100644 index 00000000..fd2fd5f0 --- /dev/null +++ b/db/factory/fieldseeker.linelocation.bob.go @@ -0,0 +1,3174 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerLinelocationMod interface { + Apply(context.Context, *FieldseekerLinelocationTemplate) +} + +type FieldseekerLinelocationModFunc func(context.Context, *FieldseekerLinelocationTemplate) + +func (f FieldseekerLinelocationModFunc) Apply(ctx context.Context, n *FieldseekerLinelocationTemplate) { + f(ctx, n) +} + +type FieldseekerLinelocationModSlice []FieldseekerLinelocationMod + +func (mods FieldseekerLinelocationModSlice) Apply(ctx context.Context, n *FieldseekerLinelocationTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerLinelocationTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerLinelocationTemplate struct { + Objectid func() int64 + Name func() null.Val[string] + Zone func() null.Val[string] + Habitat func() null.Val[enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418] + Priority func() null.Val[enums.FieldseekerLinelocationLocationpriorityEnum] + Usetype func() null.Val[enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80] + Active func() null.Val[enums.FieldseekerLinelocationNotinuitFEnum] + Description func() null.Val[string] + Accessdesc func() null.Val[string] + Comments func() null.Val[string] + Symbology func() null.Val[enums.FieldseekerLinelocationLocationsymbologyEnum] + Externalid func() null.Val[string] + Acres func() null.Val[float64] + Nextactiondatescheduled func() null.Val[time.Time] + Larvinspectinterval func() null.Val[int16] + LengthFT func() null.Val[float64] + WidthFT func() null.Val[float64] + Zone2 func() null.Val[string] + Locationnumber func() null.Val[int32] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Lastinspectdate func() null.Val[time.Time] + Lastinspectbreeding func() null.Val[string] + Lastinspectavglarvae func() null.Val[float64] + Lastinspectavgpupae func() null.Val[float64] + Lastinspectlstages func() null.Val[string] + Lastinspectactiontaken func() null.Val[string] + Lastinspectfieldspecies func() null.Val[string] + Lasttreatdate func() null.Val[time.Time] + Lasttreatproduct func() null.Val[string] + Lasttreatqty func() null.Val[float64] + Lasttreatqtyunit func() null.Val[string] + Hectares func() null.Val[float64] + Lastinspectactivity func() null.Val[string] + Lasttreatactivity func() null.Val[string] + LengthMeters func() null.Val[float64] + WidthMeters func() null.Val[float64] + Lastinspectconditions func() null.Val[string] + Waterorigin func() null.Val[enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Jurisdiction func() null.Val[string] + ShapeLength func() null.Val[float64] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerLinelocationTemplate +func (o *FieldseekerLinelocationTemplate) Apply(ctx context.Context, mods ...FieldseekerLinelocationMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerLinelocation +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerLinelocationTemplate) setModelRels(o *models.FieldseekerLinelocation) {} + +// BuildSetter returns an *models.FieldseekerLinelocationSetter +// this does nothing with the relationship templates +func (o FieldseekerLinelocationTemplate) BuildSetter() *models.FieldseekerLinelocationSetter { + m := &models.FieldseekerLinelocationSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Name != nil { + val := o.Name() + m.Name = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Habitat != nil { + val := o.Habitat() + m.Habitat = omitnull.FromNull(val) + } + if o.Priority != nil { + val := o.Priority() + m.Priority = omitnull.FromNull(val) + } + if o.Usetype != nil { + val := o.Usetype() + m.Usetype = omitnull.FromNull(val) + } + if o.Active != nil { + val := o.Active() + m.Active = omitnull.FromNull(val) + } + if o.Description != nil { + val := o.Description() + m.Description = omitnull.FromNull(val) + } + if o.Accessdesc != nil { + val := o.Accessdesc() + m.Accessdesc = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Symbology != nil { + val := o.Symbology() + m.Symbology = omitnull.FromNull(val) + } + if o.Externalid != nil { + val := o.Externalid() + m.Externalid = omitnull.FromNull(val) + } + if o.Acres != nil { + val := o.Acres() + m.Acres = omitnull.FromNull(val) + } + if o.Nextactiondatescheduled != nil { + val := o.Nextactiondatescheduled() + m.Nextactiondatescheduled = omitnull.FromNull(val) + } + if o.Larvinspectinterval != nil { + val := o.Larvinspectinterval() + m.Larvinspectinterval = omitnull.FromNull(val) + } + if o.LengthFT != nil { + val := o.LengthFT() + m.LengthFT = omitnull.FromNull(val) + } + if o.WidthFT != nil { + val := o.WidthFT() + m.WidthFT = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Locationnumber != nil { + val := o.Locationnumber() + m.Locationnumber = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Lastinspectdate != nil { + val := o.Lastinspectdate() + m.Lastinspectdate = omitnull.FromNull(val) + } + if o.Lastinspectbreeding != nil { + val := o.Lastinspectbreeding() + m.Lastinspectbreeding = omitnull.FromNull(val) + } + if o.Lastinspectavglarvae != nil { + val := o.Lastinspectavglarvae() + m.Lastinspectavglarvae = omitnull.FromNull(val) + } + if o.Lastinspectavgpupae != nil { + val := o.Lastinspectavgpupae() + m.Lastinspectavgpupae = omitnull.FromNull(val) + } + if o.Lastinspectlstages != nil { + val := o.Lastinspectlstages() + m.Lastinspectlstages = omitnull.FromNull(val) + } + if o.Lastinspectactiontaken != nil { + val := o.Lastinspectactiontaken() + m.Lastinspectactiontaken = omitnull.FromNull(val) + } + if o.Lastinspectfieldspecies != nil { + val := o.Lastinspectfieldspecies() + m.Lastinspectfieldspecies = omitnull.FromNull(val) + } + if o.Lasttreatdate != nil { + val := o.Lasttreatdate() + m.Lasttreatdate = omitnull.FromNull(val) + } + if o.Lasttreatproduct != nil { + val := o.Lasttreatproduct() + m.Lasttreatproduct = omitnull.FromNull(val) + } + if o.Lasttreatqty != nil { + val := o.Lasttreatqty() + m.Lasttreatqty = omitnull.FromNull(val) + } + if o.Lasttreatqtyunit != nil { + val := o.Lasttreatqtyunit() + m.Lasttreatqtyunit = omitnull.FromNull(val) + } + if o.Hectares != nil { + val := o.Hectares() + m.Hectares = omitnull.FromNull(val) + } + if o.Lastinspectactivity != nil { + val := o.Lastinspectactivity() + m.Lastinspectactivity = omitnull.FromNull(val) + } + if o.Lasttreatactivity != nil { + val := o.Lasttreatactivity() + m.Lasttreatactivity = omitnull.FromNull(val) + } + if o.LengthMeters != nil { + val := o.LengthMeters() + m.LengthMeters = omitnull.FromNull(val) + } + if o.WidthMeters != nil { + val := o.WidthMeters() + m.WidthMeters = omitnull.FromNull(val) + } + if o.Lastinspectconditions != nil { + val := o.Lastinspectconditions() + m.Lastinspectconditions = omitnull.FromNull(val) + } + if o.Waterorigin != nil { + val := o.Waterorigin() + m.Waterorigin = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Jurisdiction != nil { + val := o.Jurisdiction() + m.Jurisdiction = omitnull.FromNull(val) + } + if o.ShapeLength != nil { + val := o.ShapeLength() + m.ShapeLength = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerLinelocationSetter +// this does nothing with the relationship templates +func (o FieldseekerLinelocationTemplate) BuildManySetter(number int) []*models.FieldseekerLinelocationSetter { + m := make([]*models.FieldseekerLinelocationSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerLinelocation +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerLinelocationTemplate.Create +func (o FieldseekerLinelocationTemplate) Build() *models.FieldseekerLinelocation { + m := &models.FieldseekerLinelocation{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Name != nil { + m.Name = o.Name() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Habitat != nil { + m.Habitat = o.Habitat() + } + if o.Priority != nil { + m.Priority = o.Priority() + } + if o.Usetype != nil { + m.Usetype = o.Usetype() + } + if o.Active != nil { + m.Active = o.Active() + } + if o.Description != nil { + m.Description = o.Description() + } + if o.Accessdesc != nil { + m.Accessdesc = o.Accessdesc() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Symbology != nil { + m.Symbology = o.Symbology() + } + if o.Externalid != nil { + m.Externalid = o.Externalid() + } + if o.Acres != nil { + m.Acres = o.Acres() + } + if o.Nextactiondatescheduled != nil { + m.Nextactiondatescheduled = o.Nextactiondatescheduled() + } + if o.Larvinspectinterval != nil { + m.Larvinspectinterval = o.Larvinspectinterval() + } + if o.LengthFT != nil { + m.LengthFT = o.LengthFT() + } + if o.WidthFT != nil { + m.WidthFT = o.WidthFT() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Locationnumber != nil { + m.Locationnumber = o.Locationnumber() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Lastinspectdate != nil { + m.Lastinspectdate = o.Lastinspectdate() + } + if o.Lastinspectbreeding != nil { + m.Lastinspectbreeding = o.Lastinspectbreeding() + } + if o.Lastinspectavglarvae != nil { + m.Lastinspectavglarvae = o.Lastinspectavglarvae() + } + if o.Lastinspectavgpupae != nil { + m.Lastinspectavgpupae = o.Lastinspectavgpupae() + } + if o.Lastinspectlstages != nil { + m.Lastinspectlstages = o.Lastinspectlstages() + } + if o.Lastinspectactiontaken != nil { + m.Lastinspectactiontaken = o.Lastinspectactiontaken() + } + if o.Lastinspectfieldspecies != nil { + m.Lastinspectfieldspecies = o.Lastinspectfieldspecies() + } + if o.Lasttreatdate != nil { + m.Lasttreatdate = o.Lasttreatdate() + } + if o.Lasttreatproduct != nil { + m.Lasttreatproduct = o.Lasttreatproduct() + } + if o.Lasttreatqty != nil { + m.Lasttreatqty = o.Lasttreatqty() + } + if o.Lasttreatqtyunit != nil { + m.Lasttreatqtyunit = o.Lasttreatqtyunit() + } + if o.Hectares != nil { + m.Hectares = o.Hectares() + } + if o.Lastinspectactivity != nil { + m.Lastinspectactivity = o.Lastinspectactivity() + } + if o.Lasttreatactivity != nil { + m.Lasttreatactivity = o.Lasttreatactivity() + } + if o.LengthMeters != nil { + m.LengthMeters = o.LengthMeters() + } + if o.WidthMeters != nil { + m.WidthMeters = o.WidthMeters() + } + if o.Lastinspectconditions != nil { + m.Lastinspectconditions = o.Lastinspectconditions() + } + if o.Waterorigin != nil { + m.Waterorigin = o.Waterorigin() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Jurisdiction != nil { + m.Jurisdiction = o.Jurisdiction() + } + if o.ShapeLength != nil { + m.ShapeLength = o.ShapeLength() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerLinelocationSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerLinelocationTemplate.CreateMany +func (o FieldseekerLinelocationTemplate) BuildMany(number int) models.FieldseekerLinelocationSlice { + m := make(models.FieldseekerLinelocationSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerLinelocation(m *models.FieldseekerLinelocationSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerLinelocation +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerLinelocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerLinelocation) error { + var err error + + return err +} + +// Create builds a fieldseekerLinelocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerLinelocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerLinelocation, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerLinelocation(opt) + + m, err := models.FieldseekerLinelocations.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 fieldseekerLinelocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerLinelocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerLinelocation { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerLinelocation 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 *FieldseekerLinelocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerLinelocation { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerLinelocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerLinelocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerLinelocationSlice, error) { + var err error + m := make(models.FieldseekerLinelocationSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerLinelocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerLinelocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerLinelocationSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerLinelocations 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 FieldseekerLinelocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerLinelocationSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerLinelocation has methods that act as mods for the FieldseekerLinelocationTemplate +var FieldseekerLinelocationMods fieldseekerLinelocationMods + +type fieldseekerLinelocationMods struct{} + +func (m fieldseekerLinelocationMods) RandomizeAllColumns(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModSlice{ + FieldseekerLinelocationMods.RandomObjectid(f), + FieldseekerLinelocationMods.RandomName(f), + FieldseekerLinelocationMods.RandomZone(f), + FieldseekerLinelocationMods.RandomHabitat(f), + FieldseekerLinelocationMods.RandomPriority(f), + FieldseekerLinelocationMods.RandomUsetype(f), + FieldseekerLinelocationMods.RandomActive(f), + FieldseekerLinelocationMods.RandomDescription(f), + FieldseekerLinelocationMods.RandomAccessdesc(f), + FieldseekerLinelocationMods.RandomComments(f), + FieldseekerLinelocationMods.RandomSymbology(f), + FieldseekerLinelocationMods.RandomExternalid(f), + FieldseekerLinelocationMods.RandomAcres(f), + FieldseekerLinelocationMods.RandomNextactiondatescheduled(f), + FieldseekerLinelocationMods.RandomLarvinspectinterval(f), + FieldseekerLinelocationMods.RandomLengthFT(f), + FieldseekerLinelocationMods.RandomWidthFT(f), + FieldseekerLinelocationMods.RandomZone2(f), + FieldseekerLinelocationMods.RandomLocationnumber(f), + FieldseekerLinelocationMods.RandomGlobalid(f), + FieldseekerLinelocationMods.RandomCreatedUser(f), + FieldseekerLinelocationMods.RandomCreatedDate(f), + FieldseekerLinelocationMods.RandomLastEditedUser(f), + FieldseekerLinelocationMods.RandomLastEditedDate(f), + FieldseekerLinelocationMods.RandomLastinspectdate(f), + FieldseekerLinelocationMods.RandomLastinspectbreeding(f), + FieldseekerLinelocationMods.RandomLastinspectavglarvae(f), + FieldseekerLinelocationMods.RandomLastinspectavgpupae(f), + FieldseekerLinelocationMods.RandomLastinspectlstages(f), + FieldseekerLinelocationMods.RandomLastinspectactiontaken(f), + FieldseekerLinelocationMods.RandomLastinspectfieldspecies(f), + FieldseekerLinelocationMods.RandomLasttreatdate(f), + FieldseekerLinelocationMods.RandomLasttreatproduct(f), + FieldseekerLinelocationMods.RandomLasttreatqty(f), + FieldseekerLinelocationMods.RandomLasttreatqtyunit(f), + FieldseekerLinelocationMods.RandomHectares(f), + FieldseekerLinelocationMods.RandomLastinspectactivity(f), + FieldseekerLinelocationMods.RandomLasttreatactivity(f), + FieldseekerLinelocationMods.RandomLengthMeters(f), + FieldseekerLinelocationMods.RandomWidthMeters(f), + FieldseekerLinelocationMods.RandomLastinspectconditions(f), + FieldseekerLinelocationMods.RandomWaterorigin(f), + FieldseekerLinelocationMods.RandomCreationdate(f), + FieldseekerLinelocationMods.RandomCreator(f), + FieldseekerLinelocationMods.RandomEditdate(f), + FieldseekerLinelocationMods.RandomEditor(f), + FieldseekerLinelocationMods.RandomJurisdiction(f), + FieldseekerLinelocationMods.RandomShapeLength(f), + } +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Objectid(val int64) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) ObjectidFunc(f func() int64) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetObjectid() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerLinelocationMods) RandomObjectid(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Name(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Name = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) NameFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Name = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetName() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Name = 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 fieldseekerLinelocationMods) RandomName(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerLinelocationMods) RandomNameNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Zone(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) ZoneFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetZone() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Zone = 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 fieldseekerLinelocationMods) RandomZone(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerLinelocationMods) RandomZoneNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Habitat(val null.Val[enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) HabitatFunc(f func() null.Val[enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Habitat = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetHabitat() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Habitat = 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 fieldseekerLinelocationMods) RandomHabitat(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418(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 fieldseekerLinelocationMods) RandomHabitatNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Priority(val null.Val[enums.FieldseekerLinelocationLocationpriorityEnum]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerLinelocationLocationpriorityEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) PriorityFunc(f func() null.Val[enums.FieldseekerLinelocationLocationpriorityEnum]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Priority = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetPriority() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Priority = 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 fieldseekerLinelocationMods) RandomPriority(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerLinelocationLocationpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationLocationpriorityEnum(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 fieldseekerLinelocationMods) RandomPriorityNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerLinelocationLocationpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationLocationpriorityEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Usetype(val null.Val[enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) UsetypeFunc(f func() null.Val[enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Usetype = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetUsetype() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Usetype = 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 fieldseekerLinelocationMods) RandomUsetype(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80(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 fieldseekerLinelocationMods) RandomUsetypeNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Active(val null.Val[enums.FieldseekerLinelocationNotinuitFEnum]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerLinelocationNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) ActiveFunc(f func() null.Val[enums.FieldseekerLinelocationNotinuitFEnum]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Active = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetActive() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Active = 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 fieldseekerLinelocationMods) RandomActive(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerLinelocationNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationNotinuitFEnum(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 fieldseekerLinelocationMods) RandomActiveNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerLinelocationNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Description(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Description = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) DescriptionFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Description = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetDescription() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Description = 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 fieldseekerLinelocationMods) RandomDescription(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerLinelocationMods) RandomDescriptionNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Accessdesc(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Accessdesc = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) AccessdescFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Accessdesc = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetAccessdesc() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Accessdesc = 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 fieldseekerLinelocationMods) RandomAccessdesc(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Accessdesc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerLinelocationMods) RandomAccessdescNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Accessdesc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Comments(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) CommentsFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetComments() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Comments = 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 fieldseekerLinelocationMods) RandomComments(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerLinelocationMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Symbology(val null.Val[enums.FieldseekerLinelocationLocationsymbologyEnum]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerLinelocationLocationsymbologyEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) SymbologyFunc(f func() null.Val[enums.FieldseekerLinelocationLocationsymbologyEnum]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Symbology = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetSymbology() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Symbology = 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 fieldseekerLinelocationMods) RandomSymbology(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerLinelocationLocationsymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationLocationsymbologyEnum(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 fieldseekerLinelocationMods) RandomSymbologyNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerLinelocationLocationsymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationLocationsymbologyEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Externalid(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Externalid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) ExternalidFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Externalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetExternalid() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Externalid = 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 fieldseekerLinelocationMods) RandomExternalid(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerLinelocationMods) RandomExternalidNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Acres(val null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Acres = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) AcresFunc(f func() null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Acres = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetAcres() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Acres = 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 fieldseekerLinelocationMods) RandomAcres(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Acres = 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 fieldseekerLinelocationMods) RandomAcresNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Acres = 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 fieldseekerLinelocationMods) Nextactiondatescheduled(val null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) NextactiondatescheduledFunc(f func() null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Nextactiondatescheduled = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetNextactiondatescheduled() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Nextactiondatescheduled = 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 fieldseekerLinelocationMods) RandomNextactiondatescheduled(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerLinelocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Larvinspectinterval(val null.Val[int16]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Larvinspectinterval = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LarvinspectintervalFunc(f func() null.Val[int16]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Larvinspectinterval = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLarvinspectinterval() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Larvinspectinterval = 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 fieldseekerLinelocationMods) RandomLarvinspectinterval(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Larvinspectinterval = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerLinelocationMods) RandomLarvinspectintervalNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Larvinspectinterval = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) LengthFT(val null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LengthFT = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LengthFTFunc(f func() null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LengthFT = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLengthFT() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LengthFT = 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 fieldseekerLinelocationMods) RandomLengthFT(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LengthFT = 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 fieldseekerLinelocationMods) RandomLengthFTNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LengthFT = 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 fieldseekerLinelocationMods) WidthFT(val null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.WidthFT = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) WidthFTFunc(f func() null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.WidthFT = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetWidthFT() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.WidthFT = 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 fieldseekerLinelocationMods) RandomWidthFT(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.WidthFT = 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 fieldseekerLinelocationMods) RandomWidthFTNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.WidthFT = 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 fieldseekerLinelocationMods) Zone2(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) Zone2Func(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetZone2() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Zone2 = 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 fieldseekerLinelocationMods) RandomZone2(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerLinelocationMods) RandomZone2NotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Locationnumber(val null.Val[int32]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Locationnumber = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LocationnumberFunc(f func() null.Val[int32]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Locationnumber = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLocationnumber() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Locationnumber = 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 fieldseekerLinelocationMods) RandomLocationnumber(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Locationnumber = 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 fieldseekerLinelocationMods) RandomLocationnumberNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Locationnumber = 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 fieldseekerLinelocationMods) Globalid(val null.Val[uuid.UUID]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetGlobalid() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Globalid = 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 fieldseekerLinelocationMods) RandomGlobalid(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Globalid = 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 fieldseekerLinelocationMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Globalid = 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 fieldseekerLinelocationMods) CreatedUser(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetCreatedUser() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.CreatedUser = 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 fieldseekerLinelocationMods) RandomCreatedUser(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerLinelocationMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) CreatedDate(val null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetCreatedDate() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.CreatedDate = 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 fieldseekerLinelocationMods) RandomCreatedDate(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerLinelocationMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) LastEditedUser(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLastEditedUser() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LastEditedUser = 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 fieldseekerLinelocationMods) RandomLastEditedUser(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerLinelocationMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) LastEditedDate(val null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLastEditedDate() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LastEditedDate = 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 fieldseekerLinelocationMods) RandomLastEditedDate(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerLinelocationMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Lastinspectdate(val null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LastinspectdateFunc(f func() null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLastinspectdate() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectdate = 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 fieldseekerLinelocationMods) RandomLastinspectdate(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerLinelocationMods) RandomLastinspectdateNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Lastinspectbreeding(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectbreeding = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LastinspectbreedingFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectbreeding = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLastinspectbreeding() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectbreeding = 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 fieldseekerLinelocationMods) RandomLastinspectbreeding(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectbreeding = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerLinelocationMods) RandomLastinspectbreedingNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectbreeding = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Lastinspectavglarvae(val null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectavglarvae = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LastinspectavglarvaeFunc(f func() null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectavglarvae = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLastinspectavglarvae() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectavglarvae = 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 fieldseekerLinelocationMods) RandomLastinspectavglarvae(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectavglarvae = 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 fieldseekerLinelocationMods) RandomLastinspectavglarvaeNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectavglarvae = 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 fieldseekerLinelocationMods) Lastinspectavgpupae(val null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectavgpupae = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LastinspectavgpupaeFunc(f func() null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectavgpupae = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLastinspectavgpupae() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectavgpupae = 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 fieldseekerLinelocationMods) RandomLastinspectavgpupae(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectavgpupae = 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 fieldseekerLinelocationMods) RandomLastinspectavgpupaeNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectavgpupae = 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 fieldseekerLinelocationMods) Lastinspectlstages(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectlstages = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LastinspectlstagesFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectlstages = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLastinspectlstages() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectlstages = 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 fieldseekerLinelocationMods) RandomLastinspectlstages(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectlstages = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerLinelocationMods) RandomLastinspectlstagesNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectlstages = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Lastinspectactiontaken(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectactiontaken = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LastinspectactiontakenFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectactiontaken = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLastinspectactiontaken() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectactiontaken = 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 fieldseekerLinelocationMods) RandomLastinspectactiontaken(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectactiontaken = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerLinelocationMods) RandomLastinspectactiontakenNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectactiontaken = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Lastinspectfieldspecies(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectfieldspecies = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LastinspectfieldspeciesFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectfieldspecies = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLastinspectfieldspecies() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectfieldspecies = 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 fieldseekerLinelocationMods) RandomLastinspectfieldspecies(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectfieldspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerLinelocationMods) RandomLastinspectfieldspeciesNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectfieldspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Lasttreatdate(val null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LasttreatdateFunc(f func() null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLasttreatdate() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatdate = 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 fieldseekerLinelocationMods) RandomLasttreatdate(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerLinelocationMods) RandomLasttreatdateNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Lasttreatproduct(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatproduct = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LasttreatproductFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatproduct = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLasttreatproduct() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatproduct = 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 fieldseekerLinelocationMods) RandomLasttreatproduct(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatproduct = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerLinelocationMods) RandomLasttreatproductNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatproduct = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Lasttreatqty(val null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatqty = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LasttreatqtyFunc(f func() null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatqty = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLasttreatqty() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatqty = 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 fieldseekerLinelocationMods) RandomLasttreatqty(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatqty = 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 fieldseekerLinelocationMods) RandomLasttreatqtyNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatqty = 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 fieldseekerLinelocationMods) Lasttreatqtyunit(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LasttreatqtyunitFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatqtyunit = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLasttreatqtyunit() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatqtyunit = 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 fieldseekerLinelocationMods) RandomLasttreatqtyunit(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "10") + 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 fieldseekerLinelocationMods) RandomLasttreatqtyunitNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "10") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Hectares(val null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Hectares = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) HectaresFunc(f func() null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Hectares = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetHectares() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Hectares = 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 fieldseekerLinelocationMods) RandomHectares(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Hectares = 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 fieldseekerLinelocationMods) RandomHectaresNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Hectares = 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 fieldseekerLinelocationMods) Lastinspectactivity(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectactivity = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LastinspectactivityFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectactivity = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLastinspectactivity() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectactivity = 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 fieldseekerLinelocationMods) RandomLastinspectactivity(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerLinelocationMods) RandomLastinspectactivityNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Lasttreatactivity(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatactivity = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LasttreatactivityFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatactivity = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLasttreatactivity() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatactivity = 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 fieldseekerLinelocationMods) RandomLasttreatactivity(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerLinelocationMods) RandomLasttreatactivityNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lasttreatactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) LengthMeters(val null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LengthMeters = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LengthMetersFunc(f func() null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LengthMeters = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLengthMeters() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LengthMeters = 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 fieldseekerLinelocationMods) RandomLengthMeters(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LengthMeters = 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 fieldseekerLinelocationMods) RandomLengthMetersNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.LengthMeters = 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 fieldseekerLinelocationMods) WidthMeters(val null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.WidthMeters = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) WidthMetersFunc(f func() null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.WidthMeters = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetWidthMeters() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.WidthMeters = 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 fieldseekerLinelocationMods) RandomWidthMeters(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.WidthMeters = 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 fieldseekerLinelocationMods) RandomWidthMetersNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.WidthMeters = 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 fieldseekerLinelocationMods) Lastinspectconditions(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) LastinspectconditionsFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectconditions = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetLastinspectconditions() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectconditions = 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 fieldseekerLinelocationMods) RandomLastinspectconditions(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerLinelocationMods) RandomLastinspectconditionsNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Waterorigin(val null.Val[enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Waterorigin = func() null.Val[enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) WateroriginFunc(f func() null.Val[enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Waterorigin = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetWaterorigin() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Waterorigin = 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 fieldseekerLinelocationMods) RandomWaterorigin(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Waterorigin = func() null.Val[enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16(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 fieldseekerLinelocationMods) RandomWateroriginNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Waterorigin = func() null.Val[enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Creationdate(val null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetCreationdate() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Creationdate = 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 fieldseekerLinelocationMods) RandomCreationdate(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerLinelocationMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Creator(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) CreatorFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetCreator() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Creator = 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 fieldseekerLinelocationMods) RandomCreator(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerLinelocationMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Editdate(val null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetEditdate() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Editdate = 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 fieldseekerLinelocationMods) RandomEditdate(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerLinelocationMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Editor(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) EditorFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetEditor() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Editor = 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 fieldseekerLinelocationMods) RandomEditor(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerLinelocationMods) RandomEditorNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) Jurisdiction(val null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Jurisdiction = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) JurisdictionFunc(f func() null.Val[string]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Jurisdiction = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetJurisdiction() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Jurisdiction = 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 fieldseekerLinelocationMods) RandomJurisdiction(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerLinelocationMods) RandomJurisdictionNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLinelocationMods) ShapeLength(val null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.ShapeLength = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLinelocationMods) ShapeLengthFunc(f func() null.Val[float64]) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.ShapeLength = f + }) +} + +// Clear any values for the column +func (m fieldseekerLinelocationMods) UnsetShapeLength() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.ShapeLength = 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 fieldseekerLinelocationMods) RandomShapeLength(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.ShapeLength = 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 fieldseekerLinelocationMods) RandomShapeLengthNotNull(f *faker.Faker) FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(_ context.Context, o *FieldseekerLinelocationTemplate) { + o.ShapeLength = func() null.Val[float64] { + if f == nil { + f = &defaultFaker + } + + val := random_float64(f) + return null.From(val) + } + }) +} + +func (m fieldseekerLinelocationMods) WithParentsCascading() FieldseekerLinelocationMod { + return FieldseekerLinelocationModFunc(func(ctx context.Context, o *FieldseekerLinelocationTemplate) { + if isDone, _ := fieldseekerLinelocationWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerLinelocationWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.locationtracking.bob.go b/db/factory/fieldseeker.locationtracking.bob.go new file mode 100644 index 00000000..d2879d76 --- /dev/null +++ b/db/factory/fieldseeker.locationtracking.bob.go @@ -0,0 +1,937 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerLocationtrackingMod interface { + Apply(context.Context, *FieldseekerLocationtrackingTemplate) +} + +type FieldseekerLocationtrackingModFunc func(context.Context, *FieldseekerLocationtrackingTemplate) + +func (f FieldseekerLocationtrackingModFunc) Apply(ctx context.Context, n *FieldseekerLocationtrackingTemplate) { + f(ctx, n) +} + +type FieldseekerLocationtrackingModSlice []FieldseekerLocationtrackingMod + +func (mods FieldseekerLocationtrackingModSlice) Apply(ctx context.Context, n *FieldseekerLocationtrackingTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerLocationtrackingTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerLocationtrackingTemplate struct { + Objectid func() int64 + Accuracy func() null.Val[float64] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Globalid func() null.Val[uuid.UUID] + Fieldtech func() null.Val[string] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerLocationtrackingTemplate +func (o *FieldseekerLocationtrackingTemplate) Apply(ctx context.Context, mods ...FieldseekerLocationtrackingMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerLocationtracking +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerLocationtrackingTemplate) setModelRels(o *models.FieldseekerLocationtracking) {} + +// BuildSetter returns an *models.FieldseekerLocationtrackingSetter +// this does nothing with the relationship templates +func (o FieldseekerLocationtrackingTemplate) BuildSetter() *models.FieldseekerLocationtrackingSetter { + m := &models.FieldseekerLocationtrackingSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Accuracy != nil { + val := o.Accuracy() + m.Accuracy = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.Fieldtech != nil { + val := o.Fieldtech() + m.Fieldtech = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerLocationtrackingSetter +// this does nothing with the relationship templates +func (o FieldseekerLocationtrackingTemplate) BuildManySetter(number int) []*models.FieldseekerLocationtrackingSetter { + m := make([]*models.FieldseekerLocationtrackingSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerLocationtracking +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerLocationtrackingTemplate.Create +func (o FieldseekerLocationtrackingTemplate) Build() *models.FieldseekerLocationtracking { + m := &models.FieldseekerLocationtracking{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Accuracy != nil { + m.Accuracy = o.Accuracy() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.Fieldtech != nil { + m.Fieldtech = o.Fieldtech() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerLocationtrackingSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerLocationtrackingTemplate.CreateMany +func (o FieldseekerLocationtrackingTemplate) BuildMany(number int) models.FieldseekerLocationtrackingSlice { + m := make(models.FieldseekerLocationtrackingSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerLocationtracking(m *models.FieldseekerLocationtrackingSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerLocationtracking +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerLocationtrackingTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerLocationtracking) error { + var err error + + return err +} + +// Create builds a fieldseekerLocationtracking and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerLocationtrackingTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerLocationtracking, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerLocationtracking(opt) + + m, err := models.FieldseekerLocationtrackings.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 fieldseekerLocationtracking and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerLocationtrackingTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerLocationtracking { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerLocationtracking 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 *FieldseekerLocationtrackingTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerLocationtracking { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerLocationtrackings and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerLocationtrackingTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerLocationtrackingSlice, error) { + var err error + m := make(models.FieldseekerLocationtrackingSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerLocationtrackings and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerLocationtrackingTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerLocationtrackingSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerLocationtrackings 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 FieldseekerLocationtrackingTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerLocationtrackingSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerLocationtracking has methods that act as mods for the FieldseekerLocationtrackingTemplate +var FieldseekerLocationtrackingMods fieldseekerLocationtrackingMods + +type fieldseekerLocationtrackingMods struct{} + +func (m fieldseekerLocationtrackingMods) RandomizeAllColumns(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModSlice{ + FieldseekerLocationtrackingMods.RandomObjectid(f), + FieldseekerLocationtrackingMods.RandomAccuracy(f), + FieldseekerLocationtrackingMods.RandomCreatedUser(f), + FieldseekerLocationtrackingMods.RandomCreatedDate(f), + FieldseekerLocationtrackingMods.RandomLastEditedUser(f), + FieldseekerLocationtrackingMods.RandomLastEditedDate(f), + FieldseekerLocationtrackingMods.RandomGlobalid(f), + FieldseekerLocationtrackingMods.RandomFieldtech(f), + FieldseekerLocationtrackingMods.RandomCreationdate(f), + FieldseekerLocationtrackingMods.RandomCreator(f), + FieldseekerLocationtrackingMods.RandomEditdate(f), + FieldseekerLocationtrackingMods.RandomEditor(f), + } +} + +// Set the model columns to this value +func (m fieldseekerLocationtrackingMods) Objectid(val int64) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) ObjectidFunc(f func() int64) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetObjectid() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerLocationtrackingMods) RandomObjectid(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLocationtrackingMods) Accuracy(val null.Val[float64]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Accuracy = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) AccuracyFunc(f func() null.Val[float64]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Accuracy = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetAccuracy() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Accuracy = 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 fieldseekerLocationtrackingMods) RandomAccuracy(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Accuracy = 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 fieldseekerLocationtrackingMods) RandomAccuracyNotNull(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Accuracy = 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 fieldseekerLocationtrackingMods) CreatedUser(val null.Val[string]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetCreatedUser() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.CreatedUser = 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 fieldseekerLocationtrackingMods) RandomCreatedUser(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerLocationtrackingMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLocationtrackingMods) CreatedDate(val null.Val[time.Time]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetCreatedDate() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.CreatedDate = 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 fieldseekerLocationtrackingMods) RandomCreatedDate(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerLocationtrackingMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLocationtrackingMods) LastEditedUser(val null.Val[string]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetLastEditedUser() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.LastEditedUser = 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 fieldseekerLocationtrackingMods) RandomLastEditedUser(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerLocationtrackingMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLocationtrackingMods) LastEditedDate(val null.Val[time.Time]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetLastEditedDate() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.LastEditedDate = 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 fieldseekerLocationtrackingMods) RandomLastEditedDate(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerLocationtrackingMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLocationtrackingMods) Globalid(val null.Val[uuid.UUID]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetGlobalid() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Globalid = 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 fieldseekerLocationtrackingMods) RandomGlobalid(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Globalid = 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 fieldseekerLocationtrackingMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Globalid = 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 fieldseekerLocationtrackingMods) Fieldtech(val null.Val[string]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Fieldtech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) FieldtechFunc(f func() null.Val[string]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Fieldtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetFieldtech() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Fieldtech = 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 fieldseekerLocationtrackingMods) RandomFieldtech(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerLocationtrackingMods) RandomFieldtechNotNull(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLocationtrackingMods) Creationdate(val null.Val[time.Time]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetCreationdate() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Creationdate = 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 fieldseekerLocationtrackingMods) RandomCreationdate(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerLocationtrackingMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLocationtrackingMods) Creator(val null.Val[string]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) CreatorFunc(f func() null.Val[string]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetCreator() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Creator = 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 fieldseekerLocationtrackingMods) RandomCreator(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerLocationtrackingMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLocationtrackingMods) Editdate(val null.Val[time.Time]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetEditdate() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Editdate = 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 fieldseekerLocationtrackingMods) RandomEditdate(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerLocationtrackingMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerLocationtrackingMods) Editor(val null.Val[string]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerLocationtrackingMods) EditorFunc(f func() null.Val[string]) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerLocationtrackingMods) UnsetEditor() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Editor = 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 fieldseekerLocationtrackingMods) RandomEditor(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerLocationtrackingMods) RandomEditorNotNull(f *faker.Faker) FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(_ context.Context, o *FieldseekerLocationtrackingTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +func (m fieldseekerLocationtrackingMods) WithParentsCascading() FieldseekerLocationtrackingMod { + return FieldseekerLocationtrackingModFunc(func(ctx context.Context, o *FieldseekerLocationtrackingTemplate) { + if isDone, _ := fieldseekerLocationtrackingWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerLocationtrackingWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.mosquitoinspection.bob.go b/db/factory/fieldseeker.mosquitoinspection.bob.go new file mode 100644 index 00000000..bd3d4514 --- /dev/null +++ b/db/factory/fieldseeker.mosquitoinspection.bob.go @@ -0,0 +1,3737 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerMosquitoinspectionMod interface { + Apply(context.Context, *FieldseekerMosquitoinspectionTemplate) +} + +type FieldseekerMosquitoinspectionModFunc func(context.Context, *FieldseekerMosquitoinspectionTemplate) + +func (f FieldseekerMosquitoinspectionModFunc) Apply(ctx context.Context, n *FieldseekerMosquitoinspectionTemplate) { + f(ctx, n) +} + +type FieldseekerMosquitoinspectionModSlice []FieldseekerMosquitoinspectionMod + +func (mods FieldseekerMosquitoinspectionModSlice) Apply(ctx context.Context, n *FieldseekerMosquitoinspectionTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerMosquitoinspectionTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerMosquitoinspectionTemplate struct { + Objectid func() int64 + Numdips func() null.Val[int16] + Activity func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoactivityEnum] + Breeding func() null.Val[enums.FieldseekerMosquitoinspectionMosquitobreedingEnum] + Totlarvae func() null.Val[int16] + Totpupae func() null.Val[int16] + Eggs func() null.Val[int16] + Posdips func() null.Val[int16] + Adultact func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum] + Lstages func() null.Val[string] + Domstage func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2] + Actiontaken func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4] + Comments func() null.Val[string] + Avetemp func() null.Val[float64] + Windspeed func() null.Val[float64] + Raingauge func() null.Val[float64] + Startdatetime func() null.Val[time.Time] + Enddatetime func() null.Val[time.Time] + Winddir func() null.Val[enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum] + Avglarvae func() null.Val[float64] + Avgpupae func() null.Val[float64] + Reviewed func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] + Reviewedby func() null.Val[string] + Revieweddate func() null.Val[time.Time] + Locationname func() null.Val[string] + Zone func() null.Val[string] + Recordstatus func() null.Val[int16] + Zone2 func() null.Val[string] + Personalcontact func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] + Tirecount func() null.Val[int16] + Cbcount func() null.Val[int16] + Containercount func() null.Val[int16] + Fieldspecies func() null.Val[enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Linelocid func() null.Val[uuid.UUID] + Pointlocid func() null.Val[uuid.UUID] + Polygonlocid func() null.Val[uuid.UUID] + Srid func() null.Val[uuid.UUID] + Fieldtech func() null.Val[string] + Larvaepresent func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] + Pupaepresent func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] + Sdid func() null.Val[uuid.UUID] + Sitecond func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540] + Positivecontainercount func() null.Val[int16] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Jurisdiction func() null.Val[string] + Visualmonitoring func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] + Vmcomments func() null.Val[string] + Adminaction func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B] + Ptaid func() null.Val[uuid.UUID] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerMosquitoinspectionTemplate +func (o *FieldseekerMosquitoinspectionTemplate) Apply(ctx context.Context, mods ...FieldseekerMosquitoinspectionMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerMosquitoinspection +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerMosquitoinspectionTemplate) setModelRels(o *models.FieldseekerMosquitoinspection) { +} + +// BuildSetter returns an *models.FieldseekerMosquitoinspectionSetter +// this does nothing with the relationship templates +func (o FieldseekerMosquitoinspectionTemplate) BuildSetter() *models.FieldseekerMosquitoinspectionSetter { + m := &models.FieldseekerMosquitoinspectionSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Numdips != nil { + val := o.Numdips() + m.Numdips = omitnull.FromNull(val) + } + if o.Activity != nil { + val := o.Activity() + m.Activity = omitnull.FromNull(val) + } + if o.Breeding != nil { + val := o.Breeding() + m.Breeding = omitnull.FromNull(val) + } + if o.Totlarvae != nil { + val := o.Totlarvae() + m.Totlarvae = omitnull.FromNull(val) + } + if o.Totpupae != nil { + val := o.Totpupae() + m.Totpupae = omitnull.FromNull(val) + } + if o.Eggs != nil { + val := o.Eggs() + m.Eggs = omitnull.FromNull(val) + } + if o.Posdips != nil { + val := o.Posdips() + m.Posdips = omitnull.FromNull(val) + } + if o.Adultact != nil { + val := o.Adultact() + m.Adultact = omitnull.FromNull(val) + } + if o.Lstages != nil { + val := o.Lstages() + m.Lstages = omitnull.FromNull(val) + } + if o.Domstage != nil { + val := o.Domstage() + m.Domstage = omitnull.FromNull(val) + } + if o.Actiontaken != nil { + val := o.Actiontaken() + m.Actiontaken = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Avetemp != nil { + val := o.Avetemp() + m.Avetemp = omitnull.FromNull(val) + } + if o.Windspeed != nil { + val := o.Windspeed() + m.Windspeed = omitnull.FromNull(val) + } + if o.Raingauge != nil { + val := o.Raingauge() + m.Raingauge = omitnull.FromNull(val) + } + if o.Startdatetime != nil { + val := o.Startdatetime() + m.Startdatetime = omitnull.FromNull(val) + } + if o.Enddatetime != nil { + val := o.Enddatetime() + m.Enddatetime = omitnull.FromNull(val) + } + if o.Winddir != nil { + val := o.Winddir() + m.Winddir = omitnull.FromNull(val) + } + if o.Avglarvae != nil { + val := o.Avglarvae() + m.Avglarvae = omitnull.FromNull(val) + } + if o.Avgpupae != nil { + val := o.Avgpupae() + m.Avgpupae = omitnull.FromNull(val) + } + if o.Reviewed != nil { + val := o.Reviewed() + m.Reviewed = omitnull.FromNull(val) + } + if o.Reviewedby != nil { + val := o.Reviewedby() + m.Reviewedby = omitnull.FromNull(val) + } + if o.Revieweddate != nil { + val := o.Revieweddate() + m.Revieweddate = omitnull.FromNull(val) + } + if o.Locationname != nil { + val := o.Locationname() + m.Locationname = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Recordstatus != nil { + val := o.Recordstatus() + m.Recordstatus = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Personalcontact != nil { + val := o.Personalcontact() + m.Personalcontact = omitnull.FromNull(val) + } + if o.Tirecount != nil { + val := o.Tirecount() + m.Tirecount = omitnull.FromNull(val) + } + if o.Cbcount != nil { + val := o.Cbcount() + m.Cbcount = omitnull.FromNull(val) + } + if o.Containercount != nil { + val := o.Containercount() + m.Containercount = omitnull.FromNull(val) + } + if o.Fieldspecies != nil { + val := o.Fieldspecies() + m.Fieldspecies = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Linelocid != nil { + val := o.Linelocid() + m.Linelocid = omitnull.FromNull(val) + } + if o.Pointlocid != nil { + val := o.Pointlocid() + m.Pointlocid = omitnull.FromNull(val) + } + if o.Polygonlocid != nil { + val := o.Polygonlocid() + m.Polygonlocid = omitnull.FromNull(val) + } + if o.Srid != nil { + val := o.Srid() + m.Srid = omitnull.FromNull(val) + } + if o.Fieldtech != nil { + val := o.Fieldtech() + m.Fieldtech = omitnull.FromNull(val) + } + if o.Larvaepresent != nil { + val := o.Larvaepresent() + m.Larvaepresent = omitnull.FromNull(val) + } + if o.Pupaepresent != nil { + val := o.Pupaepresent() + m.Pupaepresent = omitnull.FromNull(val) + } + if o.Sdid != nil { + val := o.Sdid() + m.Sdid = omitnull.FromNull(val) + } + if o.Sitecond != nil { + val := o.Sitecond() + m.Sitecond = omitnull.FromNull(val) + } + if o.Positivecontainercount != nil { + val := o.Positivecontainercount() + m.Positivecontainercount = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Jurisdiction != nil { + val := o.Jurisdiction() + m.Jurisdiction = omitnull.FromNull(val) + } + if o.Visualmonitoring != nil { + val := o.Visualmonitoring() + m.Visualmonitoring = omitnull.FromNull(val) + } + if o.Vmcomments != nil { + val := o.Vmcomments() + m.Vmcomments = omitnull.FromNull(val) + } + if o.Adminaction != nil { + val := o.Adminaction() + m.Adminaction = omitnull.FromNull(val) + } + if o.Ptaid != nil { + val := o.Ptaid() + m.Ptaid = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerMosquitoinspectionSetter +// this does nothing with the relationship templates +func (o FieldseekerMosquitoinspectionTemplate) BuildManySetter(number int) []*models.FieldseekerMosquitoinspectionSetter { + m := make([]*models.FieldseekerMosquitoinspectionSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerMosquitoinspection +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerMosquitoinspectionTemplate.Create +func (o FieldseekerMosquitoinspectionTemplate) Build() *models.FieldseekerMosquitoinspection { + m := &models.FieldseekerMosquitoinspection{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Numdips != nil { + m.Numdips = o.Numdips() + } + if o.Activity != nil { + m.Activity = o.Activity() + } + if o.Breeding != nil { + m.Breeding = o.Breeding() + } + if o.Totlarvae != nil { + m.Totlarvae = o.Totlarvae() + } + if o.Totpupae != nil { + m.Totpupae = o.Totpupae() + } + if o.Eggs != nil { + m.Eggs = o.Eggs() + } + if o.Posdips != nil { + m.Posdips = o.Posdips() + } + if o.Adultact != nil { + m.Adultact = o.Adultact() + } + if o.Lstages != nil { + m.Lstages = o.Lstages() + } + if o.Domstage != nil { + m.Domstage = o.Domstage() + } + if o.Actiontaken != nil { + m.Actiontaken = o.Actiontaken() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Avetemp != nil { + m.Avetemp = o.Avetemp() + } + if o.Windspeed != nil { + m.Windspeed = o.Windspeed() + } + if o.Raingauge != nil { + m.Raingauge = o.Raingauge() + } + if o.Startdatetime != nil { + m.Startdatetime = o.Startdatetime() + } + if o.Enddatetime != nil { + m.Enddatetime = o.Enddatetime() + } + if o.Winddir != nil { + m.Winddir = o.Winddir() + } + if o.Avglarvae != nil { + m.Avglarvae = o.Avglarvae() + } + if o.Avgpupae != nil { + m.Avgpupae = o.Avgpupae() + } + if o.Reviewed != nil { + m.Reviewed = o.Reviewed() + } + if o.Reviewedby != nil { + m.Reviewedby = o.Reviewedby() + } + if o.Revieweddate != nil { + m.Revieweddate = o.Revieweddate() + } + if o.Locationname != nil { + m.Locationname = o.Locationname() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Recordstatus != nil { + m.Recordstatus = o.Recordstatus() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Personalcontact != nil { + m.Personalcontact = o.Personalcontact() + } + if o.Tirecount != nil { + m.Tirecount = o.Tirecount() + } + if o.Cbcount != nil { + m.Cbcount = o.Cbcount() + } + if o.Containercount != nil { + m.Containercount = o.Containercount() + } + if o.Fieldspecies != nil { + m.Fieldspecies = o.Fieldspecies() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Linelocid != nil { + m.Linelocid = o.Linelocid() + } + if o.Pointlocid != nil { + m.Pointlocid = o.Pointlocid() + } + if o.Polygonlocid != nil { + m.Polygonlocid = o.Polygonlocid() + } + if o.Srid != nil { + m.Srid = o.Srid() + } + if o.Fieldtech != nil { + m.Fieldtech = o.Fieldtech() + } + if o.Larvaepresent != nil { + m.Larvaepresent = o.Larvaepresent() + } + if o.Pupaepresent != nil { + m.Pupaepresent = o.Pupaepresent() + } + if o.Sdid != nil { + m.Sdid = o.Sdid() + } + if o.Sitecond != nil { + m.Sitecond = o.Sitecond() + } + if o.Positivecontainercount != nil { + m.Positivecontainercount = o.Positivecontainercount() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Jurisdiction != nil { + m.Jurisdiction = o.Jurisdiction() + } + if o.Visualmonitoring != nil { + m.Visualmonitoring = o.Visualmonitoring() + } + if o.Vmcomments != nil { + m.Vmcomments = o.Vmcomments() + } + if o.Adminaction != nil { + m.Adminaction = o.Adminaction() + } + if o.Ptaid != nil { + m.Ptaid = o.Ptaid() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerMosquitoinspectionSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerMosquitoinspectionTemplate.CreateMany +func (o FieldseekerMosquitoinspectionTemplate) BuildMany(number int) models.FieldseekerMosquitoinspectionSlice { + m := make(models.FieldseekerMosquitoinspectionSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerMosquitoinspection(m *models.FieldseekerMosquitoinspectionSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerMosquitoinspection +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerMosquitoinspectionTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerMosquitoinspection) error { + var err error + + return err +} + +// Create builds a fieldseekerMosquitoinspection and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerMosquitoinspectionTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerMosquitoinspection, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerMosquitoinspection(opt) + + m, err := models.FieldseekerMosquitoinspections.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 fieldseekerMosquitoinspection and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerMosquitoinspectionTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerMosquitoinspection { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerMosquitoinspection 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 *FieldseekerMosquitoinspectionTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerMosquitoinspection { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerMosquitoinspections and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerMosquitoinspectionTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerMosquitoinspectionSlice, error) { + var err error + m := make(models.FieldseekerMosquitoinspectionSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerMosquitoinspections and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerMosquitoinspectionTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerMosquitoinspectionSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerMosquitoinspections 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 FieldseekerMosquitoinspectionTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerMosquitoinspectionSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerMosquitoinspection has methods that act as mods for the FieldseekerMosquitoinspectionTemplate +var FieldseekerMosquitoinspectionMods fieldseekerMosquitoinspectionMods + +type fieldseekerMosquitoinspectionMods struct{} + +func (m fieldseekerMosquitoinspectionMods) RandomizeAllColumns(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModSlice{ + FieldseekerMosquitoinspectionMods.RandomObjectid(f), + FieldseekerMosquitoinspectionMods.RandomNumdips(f), + FieldseekerMosquitoinspectionMods.RandomActivity(f), + FieldseekerMosquitoinspectionMods.RandomBreeding(f), + FieldseekerMosquitoinspectionMods.RandomTotlarvae(f), + FieldseekerMosquitoinspectionMods.RandomTotpupae(f), + FieldseekerMosquitoinspectionMods.RandomEggs(f), + FieldseekerMosquitoinspectionMods.RandomPosdips(f), + FieldseekerMosquitoinspectionMods.RandomAdultact(f), + FieldseekerMosquitoinspectionMods.RandomLstages(f), + FieldseekerMosquitoinspectionMods.RandomDomstage(f), + FieldseekerMosquitoinspectionMods.RandomActiontaken(f), + FieldseekerMosquitoinspectionMods.RandomComments(f), + FieldseekerMosquitoinspectionMods.RandomAvetemp(f), + FieldseekerMosquitoinspectionMods.RandomWindspeed(f), + FieldseekerMosquitoinspectionMods.RandomRaingauge(f), + FieldseekerMosquitoinspectionMods.RandomStartdatetime(f), + FieldseekerMosquitoinspectionMods.RandomEnddatetime(f), + FieldseekerMosquitoinspectionMods.RandomWinddir(f), + FieldseekerMosquitoinspectionMods.RandomAvglarvae(f), + FieldseekerMosquitoinspectionMods.RandomAvgpupae(f), + FieldseekerMosquitoinspectionMods.RandomReviewed(f), + FieldseekerMosquitoinspectionMods.RandomReviewedby(f), + FieldseekerMosquitoinspectionMods.RandomRevieweddate(f), + FieldseekerMosquitoinspectionMods.RandomLocationname(f), + FieldseekerMosquitoinspectionMods.RandomZone(f), + FieldseekerMosquitoinspectionMods.RandomRecordstatus(f), + FieldseekerMosquitoinspectionMods.RandomZone2(f), + FieldseekerMosquitoinspectionMods.RandomPersonalcontact(f), + FieldseekerMosquitoinspectionMods.RandomTirecount(f), + FieldseekerMosquitoinspectionMods.RandomCbcount(f), + FieldseekerMosquitoinspectionMods.RandomContainercount(f), + FieldseekerMosquitoinspectionMods.RandomFieldspecies(f), + FieldseekerMosquitoinspectionMods.RandomGlobalid(f), + FieldseekerMosquitoinspectionMods.RandomCreatedUser(f), + FieldseekerMosquitoinspectionMods.RandomCreatedDate(f), + FieldseekerMosquitoinspectionMods.RandomLastEditedUser(f), + FieldseekerMosquitoinspectionMods.RandomLastEditedDate(f), + FieldseekerMosquitoinspectionMods.RandomLinelocid(f), + FieldseekerMosquitoinspectionMods.RandomPointlocid(f), + FieldseekerMosquitoinspectionMods.RandomPolygonlocid(f), + FieldseekerMosquitoinspectionMods.RandomSrid(f), + FieldseekerMosquitoinspectionMods.RandomFieldtech(f), + FieldseekerMosquitoinspectionMods.RandomLarvaepresent(f), + FieldseekerMosquitoinspectionMods.RandomPupaepresent(f), + FieldseekerMosquitoinspectionMods.RandomSdid(f), + FieldseekerMosquitoinspectionMods.RandomSitecond(f), + FieldseekerMosquitoinspectionMods.RandomPositivecontainercount(f), + FieldseekerMosquitoinspectionMods.RandomCreationdate(f), + FieldseekerMosquitoinspectionMods.RandomCreator(f), + FieldseekerMosquitoinspectionMods.RandomEditdate(f), + FieldseekerMosquitoinspectionMods.RandomEditor(f), + FieldseekerMosquitoinspectionMods.RandomJurisdiction(f), + FieldseekerMosquitoinspectionMods.RandomVisualmonitoring(f), + FieldseekerMosquitoinspectionMods.RandomVmcomments(f), + FieldseekerMosquitoinspectionMods.RandomAdminaction(f), + FieldseekerMosquitoinspectionMods.RandomPtaid(f), + } +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Objectid(val int64) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) ObjectidFunc(f func() int64) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetObjectid() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerMosquitoinspectionMods) RandomObjectid(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Numdips(val null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Numdips = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) NumdipsFunc(f func() null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Numdips = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetNumdips() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Numdips = 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 fieldseekerMosquitoinspectionMods) RandomNumdips(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Numdips = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerMosquitoinspectionMods) RandomNumdipsNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Numdips = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Activity(val null.Val[enums.FieldseekerMosquitoinspectionMosquitoactivityEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Activity = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoactivityEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) ActivityFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoactivityEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Activity = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetActivity() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Activity = 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 fieldseekerMosquitoinspectionMods) RandomActivity(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Activity = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoactivityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoactivityEnum(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 fieldseekerMosquitoinspectionMods) RandomActivityNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Activity = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoactivityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoactivityEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Breeding(val null.Val[enums.FieldseekerMosquitoinspectionMosquitobreedingEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Breeding = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitobreedingEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) BreedingFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionMosquitobreedingEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Breeding = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetBreeding() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Breeding = 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 fieldseekerMosquitoinspectionMods) RandomBreeding(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Breeding = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitobreedingEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitobreedingEnum(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 fieldseekerMosquitoinspectionMods) RandomBreedingNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Breeding = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitobreedingEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitobreedingEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Totlarvae(val null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Totlarvae = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) TotlarvaeFunc(f func() null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Totlarvae = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetTotlarvae() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Totlarvae = 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 fieldseekerMosquitoinspectionMods) RandomTotlarvae(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Totlarvae = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerMosquitoinspectionMods) RandomTotlarvaeNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Totlarvae = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Totpupae(val null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Totpupae = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) TotpupaeFunc(f func() null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Totpupae = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetTotpupae() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Totpupae = 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 fieldseekerMosquitoinspectionMods) RandomTotpupae(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Totpupae = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerMosquitoinspectionMods) RandomTotpupaeNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Totpupae = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Eggs(val null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Eggs = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) EggsFunc(f func() null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Eggs = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetEggs() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Eggs = 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 fieldseekerMosquitoinspectionMods) RandomEggs(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Eggs = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerMosquitoinspectionMods) RandomEggsNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Eggs = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Posdips(val null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Posdips = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) PosdipsFunc(f func() null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Posdips = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetPosdips() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Posdips = 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 fieldseekerMosquitoinspectionMods) RandomPosdips(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Posdips = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerMosquitoinspectionMods) RandomPosdipsNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Posdips = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Adultact(val null.Val[enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Adultact = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) AdultactFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Adultact = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetAdultact() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Adultact = 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 fieldseekerMosquitoinspectionMods) RandomAdultact(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Adultact = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoadultactivityEnum(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 fieldseekerMosquitoinspectionMods) RandomAdultactNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Adultact = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoadultactivityEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Lstages(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Lstages = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) LstagesFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Lstages = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetLstages() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Lstages = 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 fieldseekerMosquitoinspectionMods) RandomLstages(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Lstages = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerMosquitoinspectionMods) RandomLstagesNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Lstages = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Domstage(val null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Domstage = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) DomstageFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Domstage = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetDomstage() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Domstage = 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 fieldseekerMosquitoinspectionMods) RandomDomstage(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Domstage = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2(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 fieldseekerMosquitoinspectionMods) RandomDomstageNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Domstage = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Actiontaken(val null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Actiontaken = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) ActiontakenFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Actiontaken = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetActiontaken() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Actiontaken = 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 fieldseekerMosquitoinspectionMods) RandomActiontaken(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Actiontaken = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4(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 fieldseekerMosquitoinspectionMods) RandomActiontakenNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Actiontaken = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Comments(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) CommentsFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetComments() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Comments = 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 fieldseekerMosquitoinspectionMods) RandomComments(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerMosquitoinspectionMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Avetemp(val null.Val[float64]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avetemp = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) AvetempFunc(f func() null.Val[float64]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avetemp = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetAvetemp() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avetemp = 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 fieldseekerMosquitoinspectionMods) RandomAvetemp(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avetemp = 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 fieldseekerMosquitoinspectionMods) RandomAvetempNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avetemp = 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 fieldseekerMosquitoinspectionMods) Windspeed(val null.Val[float64]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Windspeed = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) WindspeedFunc(f func() null.Val[float64]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Windspeed = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetWindspeed() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Windspeed = 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 fieldseekerMosquitoinspectionMods) RandomWindspeed(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Windspeed = 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 fieldseekerMosquitoinspectionMods) RandomWindspeedNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Windspeed = 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 fieldseekerMosquitoinspectionMods) Raingauge(val null.Val[float64]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Raingauge = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) RaingaugeFunc(f func() null.Val[float64]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Raingauge = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetRaingauge() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Raingauge = 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 fieldseekerMosquitoinspectionMods) RandomRaingauge(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Raingauge = 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 fieldseekerMosquitoinspectionMods) RandomRaingaugeNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Raingauge = 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 fieldseekerMosquitoinspectionMods) Startdatetime(val null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Startdatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) StartdatetimeFunc(f func() null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Startdatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetStartdatetime() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Startdatetime = 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 fieldseekerMosquitoinspectionMods) RandomStartdatetime(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerMosquitoinspectionMods) RandomStartdatetimeNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Enddatetime(val null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Enddatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) EnddatetimeFunc(f func() null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Enddatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetEnddatetime() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Enddatetime = 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 fieldseekerMosquitoinspectionMods) RandomEnddatetime(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerMosquitoinspectionMods) RandomEnddatetimeNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Winddir(val null.Val[enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) WinddirFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Winddir = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetWinddir() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Winddir = 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 fieldseekerMosquitoinspectionMods) RandomWinddir(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuiwinddirectionEnum(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 fieldseekerMosquitoinspectionMods) RandomWinddirNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuiwinddirectionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Avglarvae(val null.Val[float64]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avglarvae = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) AvglarvaeFunc(f func() null.Val[float64]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avglarvae = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetAvglarvae() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avglarvae = 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 fieldseekerMosquitoinspectionMods) RandomAvglarvae(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avglarvae = 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 fieldseekerMosquitoinspectionMods) RandomAvglarvaeNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avglarvae = 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 fieldseekerMosquitoinspectionMods) Avgpupae(val null.Val[float64]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avgpupae = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) AvgpupaeFunc(f func() null.Val[float64]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avgpupae = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetAvgpupae() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avgpupae = 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 fieldseekerMosquitoinspectionMods) RandomAvgpupae(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avgpupae = 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 fieldseekerMosquitoinspectionMods) RandomAvgpupaeNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Avgpupae = 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 fieldseekerMosquitoinspectionMods) Reviewed(val null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) ReviewedFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Reviewed = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetReviewed() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Reviewed = 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 fieldseekerMosquitoinspectionMods) RandomReviewed(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuitFEnum(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 fieldseekerMosquitoinspectionMods) RandomReviewedNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Reviewedby(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Reviewedby = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) ReviewedbyFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Reviewedby = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetReviewedby() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Reviewedby = 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 fieldseekerMosquitoinspectionMods) RandomReviewedby(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerMosquitoinspectionMods) RandomReviewedbyNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Revieweddate(val null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Revieweddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) RevieweddateFunc(f func() null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Revieweddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetRevieweddate() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Revieweddate = 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 fieldseekerMosquitoinspectionMods) RandomRevieweddate(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerMosquitoinspectionMods) RandomRevieweddateNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Locationname(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Locationname = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) LocationnameFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Locationname = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetLocationname() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Locationname = 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 fieldseekerMosquitoinspectionMods) RandomLocationname(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerMosquitoinspectionMods) RandomLocationnameNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Zone(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) ZoneFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetZone() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Zone = 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 fieldseekerMosquitoinspectionMods) RandomZone(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerMosquitoinspectionMods) RandomZoneNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Recordstatus(val null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Recordstatus = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) RecordstatusFunc(f func() null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Recordstatus = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetRecordstatus() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Recordstatus = 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 fieldseekerMosquitoinspectionMods) RandomRecordstatus(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerMosquitoinspectionMods) RandomRecordstatusNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Zone2(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) Zone2Func(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetZone2() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Zone2 = 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 fieldseekerMosquitoinspectionMods) RandomZone2(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerMosquitoinspectionMods) RandomZone2NotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Personalcontact(val null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Personalcontact = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) PersonalcontactFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Personalcontact = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetPersonalcontact() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Personalcontact = 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 fieldseekerMosquitoinspectionMods) RandomPersonalcontact(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Personalcontact = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuitFEnum(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 fieldseekerMosquitoinspectionMods) RandomPersonalcontactNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Personalcontact = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Tirecount(val null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Tirecount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) TirecountFunc(f func() null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Tirecount = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetTirecount() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Tirecount = 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 fieldseekerMosquitoinspectionMods) RandomTirecount(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Tirecount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerMosquitoinspectionMods) RandomTirecountNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Tirecount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Cbcount(val null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Cbcount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) CbcountFunc(f func() null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Cbcount = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetCbcount() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Cbcount = 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 fieldseekerMosquitoinspectionMods) RandomCbcount(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Cbcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerMosquitoinspectionMods) RandomCbcountNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Cbcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Containercount(val null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Containercount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) ContainercountFunc(f func() null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Containercount = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetContainercount() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Containercount = 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 fieldseekerMosquitoinspectionMods) RandomContainercount(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Containercount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerMosquitoinspectionMods) RandomContainercountNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Containercount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Fieldspecies(val null.Val[enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Fieldspecies = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) FieldspeciesFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Fieldspecies = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetFieldspecies() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Fieldspecies = 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 fieldseekerMosquitoinspectionMods) RandomFieldspecies(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Fieldspecies = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitofieldspeciesEnum(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 fieldseekerMosquitoinspectionMods) RandomFieldspeciesNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Fieldspecies = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitofieldspeciesEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Globalid(val null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetGlobalid() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Globalid = 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 fieldseekerMosquitoinspectionMods) RandomGlobalid(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Globalid = 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 fieldseekerMosquitoinspectionMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Globalid = 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 fieldseekerMosquitoinspectionMods) CreatedUser(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetCreatedUser() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.CreatedUser = 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 fieldseekerMosquitoinspectionMods) RandomCreatedUser(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerMosquitoinspectionMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) CreatedDate(val null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetCreatedDate() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.CreatedDate = 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 fieldseekerMosquitoinspectionMods) RandomCreatedDate(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerMosquitoinspectionMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) LastEditedUser(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetLastEditedUser() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.LastEditedUser = 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 fieldseekerMosquitoinspectionMods) RandomLastEditedUser(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerMosquitoinspectionMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) LastEditedDate(val null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetLastEditedDate() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.LastEditedDate = 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 fieldseekerMosquitoinspectionMods) RandomLastEditedDate(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerMosquitoinspectionMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Linelocid(val null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Linelocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) LinelocidFunc(f func() null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Linelocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetLinelocid() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Linelocid = 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 fieldseekerMosquitoinspectionMods) RandomLinelocid(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Linelocid = 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 fieldseekerMosquitoinspectionMods) RandomLinelocidNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Linelocid = 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 fieldseekerMosquitoinspectionMods) Pointlocid(val null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Pointlocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) PointlocidFunc(f func() null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Pointlocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetPointlocid() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Pointlocid = 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 fieldseekerMosquitoinspectionMods) RandomPointlocid(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Pointlocid = 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 fieldseekerMosquitoinspectionMods) RandomPointlocidNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Pointlocid = 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 fieldseekerMosquitoinspectionMods) Polygonlocid(val null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Polygonlocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) PolygonlocidFunc(f func() null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Polygonlocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetPolygonlocid() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Polygonlocid = 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 fieldseekerMosquitoinspectionMods) RandomPolygonlocid(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Polygonlocid = 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 fieldseekerMosquitoinspectionMods) RandomPolygonlocidNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Polygonlocid = 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 fieldseekerMosquitoinspectionMods) Srid(val null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Srid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) SridFunc(f func() null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Srid = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetSrid() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Srid = 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 fieldseekerMosquitoinspectionMods) RandomSrid(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Srid = 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 fieldseekerMosquitoinspectionMods) RandomSridNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Srid = 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 fieldseekerMosquitoinspectionMods) Fieldtech(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Fieldtech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) FieldtechFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Fieldtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetFieldtech() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Fieldtech = 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 fieldseekerMosquitoinspectionMods) RandomFieldtech(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerMosquitoinspectionMods) RandomFieldtechNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Larvaepresent(val null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Larvaepresent = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) LarvaepresentFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Larvaepresent = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetLarvaepresent() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Larvaepresent = 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 fieldseekerMosquitoinspectionMods) RandomLarvaepresent(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Larvaepresent = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuitFEnum(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 fieldseekerMosquitoinspectionMods) RandomLarvaepresentNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Larvaepresent = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Pupaepresent(val null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Pupaepresent = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) PupaepresentFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Pupaepresent = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetPupaepresent() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Pupaepresent = 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 fieldseekerMosquitoinspectionMods) RandomPupaepresent(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Pupaepresent = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuitFEnum(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 fieldseekerMosquitoinspectionMods) RandomPupaepresentNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Pupaepresent = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Sdid(val null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Sdid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) SdidFunc(f func() null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Sdid = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetSdid() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Sdid = 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 fieldseekerMosquitoinspectionMods) RandomSdid(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Sdid = 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 fieldseekerMosquitoinspectionMods) RandomSdidNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Sdid = 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 fieldseekerMosquitoinspectionMods) Sitecond(val null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) SitecondFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Sitecond = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetSitecond() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Sitecond = 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 fieldseekerMosquitoinspectionMods) RandomSitecond(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540(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 fieldseekerMosquitoinspectionMods) RandomSitecondNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Positivecontainercount(val null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Positivecontainercount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) PositivecontainercountFunc(f func() null.Val[int16]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Positivecontainercount = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetPositivecontainercount() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Positivecontainercount = 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 fieldseekerMosquitoinspectionMods) RandomPositivecontainercount(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Positivecontainercount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerMosquitoinspectionMods) RandomPositivecontainercountNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Positivecontainercount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Creationdate(val null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetCreationdate() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Creationdate = 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 fieldseekerMosquitoinspectionMods) RandomCreationdate(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerMosquitoinspectionMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Creator(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) CreatorFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetCreator() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Creator = 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 fieldseekerMosquitoinspectionMods) RandomCreator(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerMosquitoinspectionMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Editdate(val null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetEditdate() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Editdate = 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 fieldseekerMosquitoinspectionMods) RandomEditdate(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerMosquitoinspectionMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Editor(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) EditorFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetEditor() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Editor = 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 fieldseekerMosquitoinspectionMods) RandomEditor(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerMosquitoinspectionMods) RandomEditorNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Jurisdiction(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Jurisdiction = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) JurisdictionFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Jurisdiction = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetJurisdiction() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Jurisdiction = 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 fieldseekerMosquitoinspectionMods) RandomJurisdiction(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerMosquitoinspectionMods) RandomJurisdictionNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Visualmonitoring(val null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Visualmonitoring = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) VisualmonitoringFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Visualmonitoring = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetVisualmonitoring() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Visualmonitoring = 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 fieldseekerMosquitoinspectionMods) RandomVisualmonitoring(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Visualmonitoring = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuitFEnum(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 fieldseekerMosquitoinspectionMods) RandomVisualmonitoringNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Visualmonitoring = func() null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Vmcomments(val null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Vmcomments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) VmcommentsFunc(f func() null.Val[string]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Vmcomments = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetVmcomments() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Vmcomments = 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 fieldseekerMosquitoinspectionMods) RandomVmcomments(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Vmcomments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerMosquitoinspectionMods) RandomVmcommentsNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Vmcomments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Adminaction(val null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Adminaction = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) AdminactionFunc(f func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Adminaction = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetAdminaction() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Adminaction = 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 fieldseekerMosquitoinspectionMods) RandomAdminaction(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Adminaction = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B(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 fieldseekerMosquitoinspectionMods) RandomAdminactionNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Adminaction = func() null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerMosquitoinspectionMods) Ptaid(val null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Ptaid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerMosquitoinspectionMods) PtaidFunc(f func() null.Val[uuid.UUID]) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Ptaid = f + }) +} + +// Clear any values for the column +func (m fieldseekerMosquitoinspectionMods) UnsetPtaid() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Ptaid = 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 fieldseekerMosquitoinspectionMods) RandomPtaid(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Ptaid = 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 fieldseekerMosquitoinspectionMods) RandomPtaidNotNull(f *faker.Faker) FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerMosquitoinspectionTemplate) { + o.Ptaid = func() null.Val[uuid.UUID] { + if f == nil { + f = &defaultFaker + } + + val := random_uuid_UUID(f) + return null.From(val) + } + }) +} + +func (m fieldseekerMosquitoinspectionMods) WithParentsCascading() FieldseekerMosquitoinspectionMod { + return FieldseekerMosquitoinspectionModFunc(func(ctx context.Context, o *FieldseekerMosquitoinspectionTemplate) { + if isDone, _ := fieldseekerMosquitoinspectionWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerMosquitoinspectionWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.pointlocation.bob.go b/db/factory/fieldseeker.pointlocation.bob.go new file mode 100644 index 00000000..66a07611 --- /dev/null +++ b/db/factory/fieldseeker.pointlocation.bob.go @@ -0,0 +1,2930 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerPointlocationMod interface { + Apply(context.Context, *FieldseekerPointlocationTemplate) +} + +type FieldseekerPointlocationModFunc func(context.Context, *FieldseekerPointlocationTemplate) + +func (f FieldseekerPointlocationModFunc) Apply(ctx context.Context, n *FieldseekerPointlocationTemplate) { + f(ctx, n) +} + +type FieldseekerPointlocationModSlice []FieldseekerPointlocationMod + +func (mods FieldseekerPointlocationModSlice) Apply(ctx context.Context, n *FieldseekerPointlocationTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerPointlocationTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerPointlocationTemplate struct { + Objectid func() int64 + Name func() null.Val[string] + Zone func() null.Val[string] + Habitat func() null.Val[enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e] + Priority func() null.Val[enums.FieldseekerPointlocationLocationpriorityEnum] + Usetype func() null.Val[enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86] + Active func() null.Val[enums.FieldseekerPointlocationNotinuitFEnum] + Description func() null.Val[string] + Accessdesc func() null.Val[string] + Comments func() null.Val[string] + Symbology func() null.Val[enums.FieldseekerPointlocationLocationsymbologyEnum] + Externalid func() null.Val[string] + Nextactiondatescheduled func() null.Val[time.Time] + Larvinspectinterval func() null.Val[int16] + Zone2 func() null.Val[string] + Locationnumber func() null.Val[int32] + Globalid func() null.Val[uuid.UUID] + Stype func() null.Val[string] + Lastinspectdate func() null.Val[time.Time] + Lastinspectbreeding func() null.Val[string] + Lastinspectavglarvae func() null.Val[float64] + Lastinspectavgpupae func() null.Val[float64] + Lastinspectlstages func() null.Val[string] + Lastinspectactiontaken func() null.Val[string] + Lastinspectfieldspecies func() null.Val[string] + Lasttreatdate func() null.Val[time.Time] + Lasttreatproduct func() null.Val[string] + Lasttreatqty func() null.Val[float64] + Lasttreatqtyunit func() null.Val[string] + Lastinspectactivity func() null.Val[string] + Lasttreatactivity func() null.Val[string] + Lastinspectconditions func() null.Val[string] + Waterorigin func() null.Val[enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899] + X func() null.Val[float64] + Y func() null.Val[float64] + Assignedtech func() null.Val[enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Jurisdiction func() null.Val[string] + DeactivateReason func() null.Val[enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489] + Scalarpriority func() null.Val[int32] + Sourcestatus func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerPointlocationTemplate +func (o *FieldseekerPointlocationTemplate) Apply(ctx context.Context, mods ...FieldseekerPointlocationMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerPointlocation +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerPointlocationTemplate) setModelRels(o *models.FieldseekerPointlocation) {} + +// BuildSetter returns an *models.FieldseekerPointlocationSetter +// this does nothing with the relationship templates +func (o FieldseekerPointlocationTemplate) BuildSetter() *models.FieldseekerPointlocationSetter { + m := &models.FieldseekerPointlocationSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Name != nil { + val := o.Name() + m.Name = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Habitat != nil { + val := o.Habitat() + m.Habitat = omitnull.FromNull(val) + } + if o.Priority != nil { + val := o.Priority() + m.Priority = omitnull.FromNull(val) + } + if o.Usetype != nil { + val := o.Usetype() + m.Usetype = omitnull.FromNull(val) + } + if o.Active != nil { + val := o.Active() + m.Active = omitnull.FromNull(val) + } + if o.Description != nil { + val := o.Description() + m.Description = omitnull.FromNull(val) + } + if o.Accessdesc != nil { + val := o.Accessdesc() + m.Accessdesc = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Symbology != nil { + val := o.Symbology() + m.Symbology = omitnull.FromNull(val) + } + if o.Externalid != nil { + val := o.Externalid() + m.Externalid = omitnull.FromNull(val) + } + if o.Nextactiondatescheduled != nil { + val := o.Nextactiondatescheduled() + m.Nextactiondatescheduled = omitnull.FromNull(val) + } + if o.Larvinspectinterval != nil { + val := o.Larvinspectinterval() + m.Larvinspectinterval = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Locationnumber != nil { + val := o.Locationnumber() + m.Locationnumber = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.Stype != nil { + val := o.Stype() + m.Stype = omitnull.FromNull(val) + } + if o.Lastinspectdate != nil { + val := o.Lastinspectdate() + m.Lastinspectdate = omitnull.FromNull(val) + } + if o.Lastinspectbreeding != nil { + val := o.Lastinspectbreeding() + m.Lastinspectbreeding = omitnull.FromNull(val) + } + if o.Lastinspectavglarvae != nil { + val := o.Lastinspectavglarvae() + m.Lastinspectavglarvae = omitnull.FromNull(val) + } + if o.Lastinspectavgpupae != nil { + val := o.Lastinspectavgpupae() + m.Lastinspectavgpupae = omitnull.FromNull(val) + } + if o.Lastinspectlstages != nil { + val := o.Lastinspectlstages() + m.Lastinspectlstages = omitnull.FromNull(val) + } + if o.Lastinspectactiontaken != nil { + val := o.Lastinspectactiontaken() + m.Lastinspectactiontaken = omitnull.FromNull(val) + } + if o.Lastinspectfieldspecies != nil { + val := o.Lastinspectfieldspecies() + m.Lastinspectfieldspecies = omitnull.FromNull(val) + } + if o.Lasttreatdate != nil { + val := o.Lasttreatdate() + m.Lasttreatdate = omitnull.FromNull(val) + } + if o.Lasttreatproduct != nil { + val := o.Lasttreatproduct() + m.Lasttreatproduct = omitnull.FromNull(val) + } + if o.Lasttreatqty != nil { + val := o.Lasttreatqty() + m.Lasttreatqty = omitnull.FromNull(val) + } + if o.Lasttreatqtyunit != nil { + val := o.Lasttreatqtyunit() + m.Lasttreatqtyunit = omitnull.FromNull(val) + } + if o.Lastinspectactivity != nil { + val := o.Lastinspectactivity() + m.Lastinspectactivity = omitnull.FromNull(val) + } + if o.Lasttreatactivity != nil { + val := o.Lasttreatactivity() + m.Lasttreatactivity = omitnull.FromNull(val) + } + if o.Lastinspectconditions != nil { + val := o.Lastinspectconditions() + m.Lastinspectconditions = omitnull.FromNull(val) + } + if o.Waterorigin != nil { + val := o.Waterorigin() + m.Waterorigin = omitnull.FromNull(val) + } + if o.X != nil { + val := o.X() + m.X = omitnull.FromNull(val) + } + if o.Y != nil { + val := o.Y() + m.Y = omitnull.FromNull(val) + } + if o.Assignedtech != nil { + val := o.Assignedtech() + m.Assignedtech = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Jurisdiction != nil { + val := o.Jurisdiction() + m.Jurisdiction = omitnull.FromNull(val) + } + if o.DeactivateReason != nil { + val := o.DeactivateReason() + m.DeactivateReason = omitnull.FromNull(val) + } + if o.Scalarpriority != nil { + val := o.Scalarpriority() + m.Scalarpriority = omitnull.FromNull(val) + } + if o.Sourcestatus != nil { + val := o.Sourcestatus() + m.Sourcestatus = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerPointlocationSetter +// this does nothing with the relationship templates +func (o FieldseekerPointlocationTemplate) BuildManySetter(number int) []*models.FieldseekerPointlocationSetter { + m := make([]*models.FieldseekerPointlocationSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerPointlocation +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerPointlocationTemplate.Create +func (o FieldseekerPointlocationTemplate) Build() *models.FieldseekerPointlocation { + m := &models.FieldseekerPointlocation{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Name != nil { + m.Name = o.Name() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Habitat != nil { + m.Habitat = o.Habitat() + } + if o.Priority != nil { + m.Priority = o.Priority() + } + if o.Usetype != nil { + m.Usetype = o.Usetype() + } + if o.Active != nil { + m.Active = o.Active() + } + if o.Description != nil { + m.Description = o.Description() + } + if o.Accessdesc != nil { + m.Accessdesc = o.Accessdesc() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Symbology != nil { + m.Symbology = o.Symbology() + } + if o.Externalid != nil { + m.Externalid = o.Externalid() + } + if o.Nextactiondatescheduled != nil { + m.Nextactiondatescheduled = o.Nextactiondatescheduled() + } + if o.Larvinspectinterval != nil { + m.Larvinspectinterval = o.Larvinspectinterval() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Locationnumber != nil { + m.Locationnumber = o.Locationnumber() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.Stype != nil { + m.Stype = o.Stype() + } + if o.Lastinspectdate != nil { + m.Lastinspectdate = o.Lastinspectdate() + } + if o.Lastinspectbreeding != nil { + m.Lastinspectbreeding = o.Lastinspectbreeding() + } + if o.Lastinspectavglarvae != nil { + m.Lastinspectavglarvae = o.Lastinspectavglarvae() + } + if o.Lastinspectavgpupae != nil { + m.Lastinspectavgpupae = o.Lastinspectavgpupae() + } + if o.Lastinspectlstages != nil { + m.Lastinspectlstages = o.Lastinspectlstages() + } + if o.Lastinspectactiontaken != nil { + m.Lastinspectactiontaken = o.Lastinspectactiontaken() + } + if o.Lastinspectfieldspecies != nil { + m.Lastinspectfieldspecies = o.Lastinspectfieldspecies() + } + if o.Lasttreatdate != nil { + m.Lasttreatdate = o.Lasttreatdate() + } + if o.Lasttreatproduct != nil { + m.Lasttreatproduct = o.Lasttreatproduct() + } + if o.Lasttreatqty != nil { + m.Lasttreatqty = o.Lasttreatqty() + } + if o.Lasttreatqtyunit != nil { + m.Lasttreatqtyunit = o.Lasttreatqtyunit() + } + if o.Lastinspectactivity != nil { + m.Lastinspectactivity = o.Lastinspectactivity() + } + if o.Lasttreatactivity != nil { + m.Lasttreatactivity = o.Lasttreatactivity() + } + if o.Lastinspectconditions != nil { + m.Lastinspectconditions = o.Lastinspectconditions() + } + if o.Waterorigin != nil { + m.Waterorigin = o.Waterorigin() + } + if o.X != nil { + m.X = o.X() + } + if o.Y != nil { + m.Y = o.Y() + } + if o.Assignedtech != nil { + m.Assignedtech = o.Assignedtech() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Jurisdiction != nil { + m.Jurisdiction = o.Jurisdiction() + } + if o.DeactivateReason != nil { + m.DeactivateReason = o.DeactivateReason() + } + if o.Scalarpriority != nil { + m.Scalarpriority = o.Scalarpriority() + } + if o.Sourcestatus != nil { + m.Sourcestatus = o.Sourcestatus() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerPointlocationSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerPointlocationTemplate.CreateMany +func (o FieldseekerPointlocationTemplate) BuildMany(number int) models.FieldseekerPointlocationSlice { + m := make(models.FieldseekerPointlocationSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerPointlocation(m *models.FieldseekerPointlocationSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerPointlocation +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerPointlocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerPointlocation) error { + var err error + + return err +} + +// Create builds a fieldseekerPointlocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerPointlocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerPointlocation, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerPointlocation(opt) + + m, err := models.FieldseekerPointlocations.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 fieldseekerPointlocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerPointlocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerPointlocation { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerPointlocation 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 *FieldseekerPointlocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerPointlocation { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerPointlocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerPointlocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerPointlocationSlice, error) { + var err error + m := make(models.FieldseekerPointlocationSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerPointlocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerPointlocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerPointlocationSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerPointlocations 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 FieldseekerPointlocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerPointlocationSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerPointlocation has methods that act as mods for the FieldseekerPointlocationTemplate +var FieldseekerPointlocationMods fieldseekerPointlocationMods + +type fieldseekerPointlocationMods struct{} + +func (m fieldseekerPointlocationMods) RandomizeAllColumns(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModSlice{ + FieldseekerPointlocationMods.RandomObjectid(f), + FieldseekerPointlocationMods.RandomName(f), + FieldseekerPointlocationMods.RandomZone(f), + FieldseekerPointlocationMods.RandomHabitat(f), + FieldseekerPointlocationMods.RandomPriority(f), + FieldseekerPointlocationMods.RandomUsetype(f), + FieldseekerPointlocationMods.RandomActive(f), + FieldseekerPointlocationMods.RandomDescription(f), + FieldseekerPointlocationMods.RandomAccessdesc(f), + FieldseekerPointlocationMods.RandomComments(f), + FieldseekerPointlocationMods.RandomSymbology(f), + FieldseekerPointlocationMods.RandomExternalid(f), + FieldseekerPointlocationMods.RandomNextactiondatescheduled(f), + FieldseekerPointlocationMods.RandomLarvinspectinterval(f), + FieldseekerPointlocationMods.RandomZone2(f), + FieldseekerPointlocationMods.RandomLocationnumber(f), + FieldseekerPointlocationMods.RandomGlobalid(f), + FieldseekerPointlocationMods.RandomStype(f), + FieldseekerPointlocationMods.RandomLastinspectdate(f), + FieldseekerPointlocationMods.RandomLastinspectbreeding(f), + FieldseekerPointlocationMods.RandomLastinspectavglarvae(f), + FieldseekerPointlocationMods.RandomLastinspectavgpupae(f), + FieldseekerPointlocationMods.RandomLastinspectlstages(f), + FieldseekerPointlocationMods.RandomLastinspectactiontaken(f), + FieldseekerPointlocationMods.RandomLastinspectfieldspecies(f), + FieldseekerPointlocationMods.RandomLasttreatdate(f), + FieldseekerPointlocationMods.RandomLasttreatproduct(f), + FieldseekerPointlocationMods.RandomLasttreatqty(f), + FieldseekerPointlocationMods.RandomLasttreatqtyunit(f), + FieldseekerPointlocationMods.RandomLastinspectactivity(f), + FieldseekerPointlocationMods.RandomLasttreatactivity(f), + FieldseekerPointlocationMods.RandomLastinspectconditions(f), + FieldseekerPointlocationMods.RandomWaterorigin(f), + FieldseekerPointlocationMods.RandomX(f), + FieldseekerPointlocationMods.RandomY(f), + FieldseekerPointlocationMods.RandomAssignedtech(f), + FieldseekerPointlocationMods.RandomCreationdate(f), + FieldseekerPointlocationMods.RandomCreator(f), + FieldseekerPointlocationMods.RandomEditdate(f), + FieldseekerPointlocationMods.RandomEditor(f), + FieldseekerPointlocationMods.RandomJurisdiction(f), + FieldseekerPointlocationMods.RandomDeactivateReason(f), + FieldseekerPointlocationMods.RandomScalarpriority(f), + FieldseekerPointlocationMods.RandomSourcestatus(f), + } +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Objectid(val int64) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) ObjectidFunc(f func() int64) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetObjectid() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerPointlocationMods) RandomObjectid(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Name(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Name = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) NameFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Name = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetName() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Name = 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 fieldseekerPointlocationMods) RandomName(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPointlocationMods) RandomNameNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Zone(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) ZoneFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetZone() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Zone = 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 fieldseekerPointlocationMods) RandomZone(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPointlocationMods) RandomZoneNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Habitat(val null.Val[enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) HabitatFunc(f func() null.Val[enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Habitat = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetHabitat() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Habitat = 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 fieldseekerPointlocationMods) RandomHabitat(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e(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 fieldseekerPointlocationMods) RandomHabitatNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Priority(val null.Val[enums.FieldseekerPointlocationLocationpriorityEnum]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerPointlocationLocationpriorityEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) PriorityFunc(f func() null.Val[enums.FieldseekerPointlocationLocationpriorityEnum]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Priority = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetPriority() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Priority = 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 fieldseekerPointlocationMods) RandomPriority(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerPointlocationLocationpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationLocationpriorityEnum(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 fieldseekerPointlocationMods) RandomPriorityNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerPointlocationLocationpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationLocationpriorityEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Usetype(val null.Val[enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) UsetypeFunc(f func() null.Val[enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Usetype = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetUsetype() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Usetype = 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 fieldseekerPointlocationMods) RandomUsetype(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86(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 fieldseekerPointlocationMods) RandomUsetypeNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Active(val null.Val[enums.FieldseekerPointlocationNotinuitFEnum]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerPointlocationNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) ActiveFunc(f func() null.Val[enums.FieldseekerPointlocationNotinuitFEnum]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Active = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetActive() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Active = 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 fieldseekerPointlocationMods) RandomActive(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerPointlocationNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationNotinuitFEnum(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 fieldseekerPointlocationMods) RandomActiveNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerPointlocationNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Description(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Description = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) DescriptionFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Description = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetDescription() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Description = 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 fieldseekerPointlocationMods) RandomDescription(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerPointlocationMods) RandomDescriptionNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Accessdesc(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Accessdesc = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) AccessdescFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Accessdesc = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetAccessdesc() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Accessdesc = 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 fieldseekerPointlocationMods) RandomAccessdesc(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Accessdesc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerPointlocationMods) RandomAccessdescNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Accessdesc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Comments(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) CommentsFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetComments() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Comments = 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 fieldseekerPointlocationMods) RandomComments(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerPointlocationMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Symbology(val null.Val[enums.FieldseekerPointlocationLocationsymbologyEnum]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerPointlocationLocationsymbologyEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) SymbologyFunc(f func() null.Val[enums.FieldseekerPointlocationLocationsymbologyEnum]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Symbology = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetSymbology() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Symbology = 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 fieldseekerPointlocationMods) RandomSymbology(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerPointlocationLocationsymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationLocationsymbologyEnum(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 fieldseekerPointlocationMods) RandomSymbologyNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerPointlocationLocationsymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationLocationsymbologyEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Externalid(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Externalid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) ExternalidFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Externalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetExternalid() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Externalid = 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 fieldseekerPointlocationMods) RandomExternalid(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerPointlocationMods) RandomExternalidNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Nextactiondatescheduled(val null.Val[time.Time]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) NextactiondatescheduledFunc(f func() null.Val[time.Time]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Nextactiondatescheduled = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetNextactiondatescheduled() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Nextactiondatescheduled = 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 fieldseekerPointlocationMods) RandomNextactiondatescheduled(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPointlocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Larvinspectinterval(val null.Val[int16]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Larvinspectinterval = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LarvinspectintervalFunc(f func() null.Val[int16]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Larvinspectinterval = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLarvinspectinterval() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Larvinspectinterval = 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 fieldseekerPointlocationMods) RandomLarvinspectinterval(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Larvinspectinterval = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerPointlocationMods) RandomLarvinspectintervalNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Larvinspectinterval = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Zone2(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) Zone2Func(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetZone2() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Zone2 = 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 fieldseekerPointlocationMods) RandomZone2(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPointlocationMods) RandomZone2NotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Locationnumber(val null.Val[int32]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Locationnumber = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LocationnumberFunc(f func() null.Val[int32]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Locationnumber = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLocationnumber() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Locationnumber = 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 fieldseekerPointlocationMods) RandomLocationnumber(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Locationnumber = 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 fieldseekerPointlocationMods) RandomLocationnumberNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Locationnumber = 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 fieldseekerPointlocationMods) Globalid(val null.Val[uuid.UUID]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetGlobalid() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Globalid = 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 fieldseekerPointlocationMods) RandomGlobalid(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Globalid = 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 fieldseekerPointlocationMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Globalid = 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 fieldseekerPointlocationMods) Stype(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Stype = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) StypeFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Stype = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetStype() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Stype = 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 fieldseekerPointlocationMods) RandomStype(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Stype = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "3") + 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 fieldseekerPointlocationMods) RandomStypeNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Stype = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "3") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Lastinspectdate(val null.Val[time.Time]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LastinspectdateFunc(f func() null.Val[time.Time]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLastinspectdate() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectdate = 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 fieldseekerPointlocationMods) RandomLastinspectdate(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPointlocationMods) RandomLastinspectdateNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Lastinspectbreeding(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectbreeding = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LastinspectbreedingFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectbreeding = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLastinspectbreeding() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectbreeding = 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 fieldseekerPointlocationMods) RandomLastinspectbreeding(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectbreeding = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPointlocationMods) RandomLastinspectbreedingNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectbreeding = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Lastinspectavglarvae(val null.Val[float64]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectavglarvae = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LastinspectavglarvaeFunc(f func() null.Val[float64]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectavglarvae = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLastinspectavglarvae() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectavglarvae = 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 fieldseekerPointlocationMods) RandomLastinspectavglarvae(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectavglarvae = 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 fieldseekerPointlocationMods) RandomLastinspectavglarvaeNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectavglarvae = 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 fieldseekerPointlocationMods) Lastinspectavgpupae(val null.Val[float64]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectavgpupae = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LastinspectavgpupaeFunc(f func() null.Val[float64]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectavgpupae = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLastinspectavgpupae() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectavgpupae = 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 fieldseekerPointlocationMods) RandomLastinspectavgpupae(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectavgpupae = 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 fieldseekerPointlocationMods) RandomLastinspectavgpupaeNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectavgpupae = 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 fieldseekerPointlocationMods) Lastinspectlstages(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectlstages = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LastinspectlstagesFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectlstages = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLastinspectlstages() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectlstages = 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 fieldseekerPointlocationMods) RandomLastinspectlstages(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectlstages = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPointlocationMods) RandomLastinspectlstagesNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectlstages = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Lastinspectactiontaken(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectactiontaken = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LastinspectactiontakenFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectactiontaken = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLastinspectactiontaken() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectactiontaken = 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 fieldseekerPointlocationMods) RandomLastinspectactiontaken(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectactiontaken = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerPointlocationMods) RandomLastinspectactiontakenNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectactiontaken = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Lastinspectfieldspecies(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectfieldspecies = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LastinspectfieldspeciesFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectfieldspecies = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLastinspectfieldspecies() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectfieldspecies = 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 fieldseekerPointlocationMods) RandomLastinspectfieldspecies(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectfieldspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPointlocationMods) RandomLastinspectfieldspeciesNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectfieldspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Lasttreatdate(val null.Val[time.Time]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LasttreatdateFunc(f func() null.Val[time.Time]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLasttreatdate() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatdate = 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 fieldseekerPointlocationMods) RandomLasttreatdate(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPointlocationMods) RandomLasttreatdateNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Lasttreatproduct(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatproduct = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LasttreatproductFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatproduct = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLasttreatproduct() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatproduct = 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 fieldseekerPointlocationMods) RandomLasttreatproduct(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatproduct = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPointlocationMods) RandomLasttreatproductNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatproduct = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Lasttreatqty(val null.Val[float64]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatqty = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LasttreatqtyFunc(f func() null.Val[float64]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatqty = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLasttreatqty() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatqty = 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 fieldseekerPointlocationMods) RandomLasttreatqty(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatqty = 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 fieldseekerPointlocationMods) RandomLasttreatqtyNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatqty = 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 fieldseekerPointlocationMods) Lasttreatqtyunit(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LasttreatqtyunitFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatqtyunit = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLasttreatqtyunit() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatqtyunit = 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 fieldseekerPointlocationMods) RandomLasttreatqtyunit(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "10") + 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 fieldseekerPointlocationMods) RandomLasttreatqtyunitNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "10") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Lastinspectactivity(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectactivity = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LastinspectactivityFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectactivity = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLastinspectactivity() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectactivity = 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 fieldseekerPointlocationMods) RandomLastinspectactivity(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPointlocationMods) RandomLastinspectactivityNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Lasttreatactivity(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatactivity = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LasttreatactivityFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatactivity = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLasttreatactivity() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatactivity = 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 fieldseekerPointlocationMods) RandomLasttreatactivity(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPointlocationMods) RandomLasttreatactivityNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lasttreatactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Lastinspectconditions(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) LastinspectconditionsFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectconditions = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetLastinspectconditions() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectconditions = 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 fieldseekerPointlocationMods) RandomLastinspectconditions(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerPointlocationMods) RandomLastinspectconditionsNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Waterorigin(val null.Val[enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Waterorigin = func() null.Val[enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) WateroriginFunc(f func() null.Val[enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Waterorigin = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetWaterorigin() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Waterorigin = 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 fieldseekerPointlocationMods) RandomWaterorigin(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Waterorigin = func() null.Val[enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899(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 fieldseekerPointlocationMods) RandomWateroriginNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Waterorigin = func() null.Val[enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) X(val null.Val[float64]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.X = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) XFunc(f func() null.Val[float64]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.X = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetX() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.X = 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 fieldseekerPointlocationMods) RandomX(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.X = 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 fieldseekerPointlocationMods) RandomXNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.X = 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 fieldseekerPointlocationMods) Y(val null.Val[float64]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Y = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) YFunc(f func() null.Val[float64]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Y = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetY() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Y = 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 fieldseekerPointlocationMods) RandomY(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Y = 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 fieldseekerPointlocationMods) RandomYNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Y = 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 fieldseekerPointlocationMods) Assignedtech(val null.Val[enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Assignedtech = func() null.Val[enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) AssignedtechFunc(f func() null.Val[enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Assignedtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetAssignedtech() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Assignedtech = 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 fieldseekerPointlocationMods) RandomAssignedtech(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Assignedtech = func() null.Val[enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B(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 fieldseekerPointlocationMods) RandomAssignedtechNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Assignedtech = func() null.Val[enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Creationdate(val null.Val[time.Time]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetCreationdate() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Creationdate = 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 fieldseekerPointlocationMods) RandomCreationdate(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPointlocationMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Creator(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) CreatorFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetCreator() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Creator = 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 fieldseekerPointlocationMods) RandomCreator(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerPointlocationMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Editdate(val null.Val[time.Time]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetEditdate() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Editdate = 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 fieldseekerPointlocationMods) RandomEditdate(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPointlocationMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Editor(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) EditorFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetEditor() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Editor = 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 fieldseekerPointlocationMods) RandomEditor(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerPointlocationMods) RandomEditorNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Jurisdiction(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Jurisdiction = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) JurisdictionFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Jurisdiction = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetJurisdiction() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Jurisdiction = 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 fieldseekerPointlocationMods) RandomJurisdiction(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPointlocationMods) RandomJurisdictionNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) DeactivateReason(val null.Val[enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.DeactivateReason = func() null.Val[enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) DeactivateReasonFunc(f func() null.Val[enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.DeactivateReason = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetDeactivateReason() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.DeactivateReason = 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 fieldseekerPointlocationMods) RandomDeactivateReason(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.DeactivateReason = func() null.Val[enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489(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 fieldseekerPointlocationMods) RandomDeactivateReasonNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.DeactivateReason = func() null.Val[enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPointlocationMods) Scalarpriority(val null.Val[int32]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Scalarpriority = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) ScalarpriorityFunc(f func() null.Val[int32]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Scalarpriority = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetScalarpriority() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Scalarpriority = 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 fieldseekerPointlocationMods) RandomScalarpriority(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Scalarpriority = 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 fieldseekerPointlocationMods) RandomScalarpriorityNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Scalarpriority = 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 fieldseekerPointlocationMods) Sourcestatus(val null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Sourcestatus = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPointlocationMods) SourcestatusFunc(f func() null.Val[string]) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Sourcestatus = f + }) +} + +// Clear any values for the column +func (m fieldseekerPointlocationMods) UnsetSourcestatus() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Sourcestatus = 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 fieldseekerPointlocationMods) RandomSourcestatus(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Sourcestatus = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerPointlocationMods) RandomSourcestatusNotNull(f *faker.Faker) FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(_ context.Context, o *FieldseekerPointlocationTemplate) { + o.Sourcestatus = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +func (m fieldseekerPointlocationMods) WithParentsCascading() FieldseekerPointlocationMod { + return FieldseekerPointlocationModFunc(func(ctx context.Context, o *FieldseekerPointlocationTemplate) { + if isDone, _ := fieldseekerPointlocationWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerPointlocationWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.polygonlocation.bob.go b/db/factory/fieldseeker.polygonlocation.bob.go new file mode 100644 index 00000000..50a49150 --- /dev/null +++ b/db/factory/fieldseeker.polygonlocation.bob.go @@ -0,0 +1,2804 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerPolygonlocationMod interface { + Apply(context.Context, *FieldseekerPolygonlocationTemplate) +} + +type FieldseekerPolygonlocationModFunc func(context.Context, *FieldseekerPolygonlocationTemplate) + +func (f FieldseekerPolygonlocationModFunc) Apply(ctx context.Context, n *FieldseekerPolygonlocationTemplate) { + f(ctx, n) +} + +type FieldseekerPolygonlocationModSlice []FieldseekerPolygonlocationMod + +func (mods FieldseekerPolygonlocationModSlice) Apply(ctx context.Context, n *FieldseekerPolygonlocationTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerPolygonlocationTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerPolygonlocationTemplate struct { + Objectid func() int64 + Name func() null.Val[string] + Zone func() null.Val[string] + Habitat func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65] + Priority func() null.Val[enums.FieldseekerPolygonlocationLocationpriorityEnum] + Usetype func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13] + Active func() null.Val[enums.FieldseekerPolygonlocationNotinuitFEnum] + Description func() null.Val[string] + Accessdesc func() null.Val[string] + Comments func() null.Val[string] + Symbology func() null.Val[enums.FieldseekerPolygonlocationLocationsymbologyEnum] + Externalid func() null.Val[string] + Acres func() null.Val[float64] + Nextactiondatescheduled func() null.Val[time.Time] + Larvinspectinterval func() null.Val[int16] + Zone2 func() null.Val[string] + Locationnumber func() null.Val[int32] + Globalid func() null.Val[uuid.UUID] + Lastinspectdate func() null.Val[time.Time] + Lastinspectbreeding func() null.Val[string] + Lastinspectavglarvae func() null.Val[float64] + Lastinspectavgpupae func() null.Val[float64] + Lastinspectlstages func() null.Val[string] + Lastinspectactiontaken func() null.Val[string] + Lastinspectfieldspecies func() null.Val[string] + Lasttreatdate func() null.Val[time.Time] + Lasttreatproduct func() null.Val[string] + Lasttreatqty func() null.Val[float64] + Lasttreatqtyunit func() null.Val[string] + Hectares func() null.Val[float64] + Lastinspectactivity func() null.Val[string] + Lasttreatactivity func() null.Val[string] + Lastinspectconditions func() null.Val[string] + Waterorigin func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9] + Filter func() null.Val[string] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Jurisdiction func() null.Val[string] + ShapeArea func() null.Val[float64] + ShapeLength func() null.Val[float64] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerPolygonlocationTemplate +func (o *FieldseekerPolygonlocationTemplate) Apply(ctx context.Context, mods ...FieldseekerPolygonlocationMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerPolygonlocation +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerPolygonlocationTemplate) setModelRels(o *models.FieldseekerPolygonlocation) {} + +// BuildSetter returns an *models.FieldseekerPolygonlocationSetter +// this does nothing with the relationship templates +func (o FieldseekerPolygonlocationTemplate) BuildSetter() *models.FieldseekerPolygonlocationSetter { + m := &models.FieldseekerPolygonlocationSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Name != nil { + val := o.Name() + m.Name = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Habitat != nil { + val := o.Habitat() + m.Habitat = omitnull.FromNull(val) + } + if o.Priority != nil { + val := o.Priority() + m.Priority = omitnull.FromNull(val) + } + if o.Usetype != nil { + val := o.Usetype() + m.Usetype = omitnull.FromNull(val) + } + if o.Active != nil { + val := o.Active() + m.Active = omitnull.FromNull(val) + } + if o.Description != nil { + val := o.Description() + m.Description = omitnull.FromNull(val) + } + if o.Accessdesc != nil { + val := o.Accessdesc() + m.Accessdesc = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Symbology != nil { + val := o.Symbology() + m.Symbology = omitnull.FromNull(val) + } + if o.Externalid != nil { + val := o.Externalid() + m.Externalid = omitnull.FromNull(val) + } + if o.Acres != nil { + val := o.Acres() + m.Acres = omitnull.FromNull(val) + } + if o.Nextactiondatescheduled != nil { + val := o.Nextactiondatescheduled() + m.Nextactiondatescheduled = omitnull.FromNull(val) + } + if o.Larvinspectinterval != nil { + val := o.Larvinspectinterval() + m.Larvinspectinterval = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Locationnumber != nil { + val := o.Locationnumber() + m.Locationnumber = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.Lastinspectdate != nil { + val := o.Lastinspectdate() + m.Lastinspectdate = omitnull.FromNull(val) + } + if o.Lastinspectbreeding != nil { + val := o.Lastinspectbreeding() + m.Lastinspectbreeding = omitnull.FromNull(val) + } + if o.Lastinspectavglarvae != nil { + val := o.Lastinspectavglarvae() + m.Lastinspectavglarvae = omitnull.FromNull(val) + } + if o.Lastinspectavgpupae != nil { + val := o.Lastinspectavgpupae() + m.Lastinspectavgpupae = omitnull.FromNull(val) + } + if o.Lastinspectlstages != nil { + val := o.Lastinspectlstages() + m.Lastinspectlstages = omitnull.FromNull(val) + } + if o.Lastinspectactiontaken != nil { + val := o.Lastinspectactiontaken() + m.Lastinspectactiontaken = omitnull.FromNull(val) + } + if o.Lastinspectfieldspecies != nil { + val := o.Lastinspectfieldspecies() + m.Lastinspectfieldspecies = omitnull.FromNull(val) + } + if o.Lasttreatdate != nil { + val := o.Lasttreatdate() + m.Lasttreatdate = omitnull.FromNull(val) + } + if o.Lasttreatproduct != nil { + val := o.Lasttreatproduct() + m.Lasttreatproduct = omitnull.FromNull(val) + } + if o.Lasttreatqty != nil { + val := o.Lasttreatqty() + m.Lasttreatqty = omitnull.FromNull(val) + } + if o.Lasttreatqtyunit != nil { + val := o.Lasttreatqtyunit() + m.Lasttreatqtyunit = omitnull.FromNull(val) + } + if o.Hectares != nil { + val := o.Hectares() + m.Hectares = omitnull.FromNull(val) + } + if o.Lastinspectactivity != nil { + val := o.Lastinspectactivity() + m.Lastinspectactivity = omitnull.FromNull(val) + } + if o.Lasttreatactivity != nil { + val := o.Lasttreatactivity() + m.Lasttreatactivity = omitnull.FromNull(val) + } + if o.Lastinspectconditions != nil { + val := o.Lastinspectconditions() + m.Lastinspectconditions = omitnull.FromNull(val) + } + if o.Waterorigin != nil { + val := o.Waterorigin() + m.Waterorigin = omitnull.FromNull(val) + } + if o.Filter != nil { + val := o.Filter() + m.Filter = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Jurisdiction != nil { + val := o.Jurisdiction() + m.Jurisdiction = omitnull.FromNull(val) + } + if o.ShapeArea != nil { + val := o.ShapeArea() + m.ShapeArea = omitnull.FromNull(val) + } + if o.ShapeLength != nil { + val := o.ShapeLength() + m.ShapeLength = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerPolygonlocationSetter +// this does nothing with the relationship templates +func (o FieldseekerPolygonlocationTemplate) BuildManySetter(number int) []*models.FieldseekerPolygonlocationSetter { + m := make([]*models.FieldseekerPolygonlocationSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerPolygonlocation +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerPolygonlocationTemplate.Create +func (o FieldseekerPolygonlocationTemplate) Build() *models.FieldseekerPolygonlocation { + m := &models.FieldseekerPolygonlocation{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Name != nil { + m.Name = o.Name() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Habitat != nil { + m.Habitat = o.Habitat() + } + if o.Priority != nil { + m.Priority = o.Priority() + } + if o.Usetype != nil { + m.Usetype = o.Usetype() + } + if o.Active != nil { + m.Active = o.Active() + } + if o.Description != nil { + m.Description = o.Description() + } + if o.Accessdesc != nil { + m.Accessdesc = o.Accessdesc() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Symbology != nil { + m.Symbology = o.Symbology() + } + if o.Externalid != nil { + m.Externalid = o.Externalid() + } + if o.Acres != nil { + m.Acres = o.Acres() + } + if o.Nextactiondatescheduled != nil { + m.Nextactiondatescheduled = o.Nextactiondatescheduled() + } + if o.Larvinspectinterval != nil { + m.Larvinspectinterval = o.Larvinspectinterval() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Locationnumber != nil { + m.Locationnumber = o.Locationnumber() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.Lastinspectdate != nil { + m.Lastinspectdate = o.Lastinspectdate() + } + if o.Lastinspectbreeding != nil { + m.Lastinspectbreeding = o.Lastinspectbreeding() + } + if o.Lastinspectavglarvae != nil { + m.Lastinspectavglarvae = o.Lastinspectavglarvae() + } + if o.Lastinspectavgpupae != nil { + m.Lastinspectavgpupae = o.Lastinspectavgpupae() + } + if o.Lastinspectlstages != nil { + m.Lastinspectlstages = o.Lastinspectlstages() + } + if o.Lastinspectactiontaken != nil { + m.Lastinspectactiontaken = o.Lastinspectactiontaken() + } + if o.Lastinspectfieldspecies != nil { + m.Lastinspectfieldspecies = o.Lastinspectfieldspecies() + } + if o.Lasttreatdate != nil { + m.Lasttreatdate = o.Lasttreatdate() + } + if o.Lasttreatproduct != nil { + m.Lasttreatproduct = o.Lasttreatproduct() + } + if o.Lasttreatqty != nil { + m.Lasttreatqty = o.Lasttreatqty() + } + if o.Lasttreatqtyunit != nil { + m.Lasttreatqtyunit = o.Lasttreatqtyunit() + } + if o.Hectares != nil { + m.Hectares = o.Hectares() + } + if o.Lastinspectactivity != nil { + m.Lastinspectactivity = o.Lastinspectactivity() + } + if o.Lasttreatactivity != nil { + m.Lasttreatactivity = o.Lasttreatactivity() + } + if o.Lastinspectconditions != nil { + m.Lastinspectconditions = o.Lastinspectconditions() + } + if o.Waterorigin != nil { + m.Waterorigin = o.Waterorigin() + } + if o.Filter != nil { + m.Filter = o.Filter() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Jurisdiction != nil { + m.Jurisdiction = o.Jurisdiction() + } + if o.ShapeArea != nil { + m.ShapeArea = o.ShapeArea() + } + if o.ShapeLength != nil { + m.ShapeLength = o.ShapeLength() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerPolygonlocationSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerPolygonlocationTemplate.CreateMany +func (o FieldseekerPolygonlocationTemplate) BuildMany(number int) models.FieldseekerPolygonlocationSlice { + m := make(models.FieldseekerPolygonlocationSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerPolygonlocation(m *models.FieldseekerPolygonlocationSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerPolygonlocation +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerPolygonlocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerPolygonlocation) error { + var err error + + return err +} + +// Create builds a fieldseekerPolygonlocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerPolygonlocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerPolygonlocation, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerPolygonlocation(opt) + + m, err := models.FieldseekerPolygonlocations.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 fieldseekerPolygonlocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerPolygonlocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerPolygonlocation { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerPolygonlocation 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 *FieldseekerPolygonlocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerPolygonlocation { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerPolygonlocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerPolygonlocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerPolygonlocationSlice, error) { + var err error + m := make(models.FieldseekerPolygonlocationSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerPolygonlocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerPolygonlocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerPolygonlocationSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerPolygonlocations 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 FieldseekerPolygonlocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerPolygonlocationSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerPolygonlocation has methods that act as mods for the FieldseekerPolygonlocationTemplate +var FieldseekerPolygonlocationMods fieldseekerPolygonlocationMods + +type fieldseekerPolygonlocationMods struct{} + +func (m fieldseekerPolygonlocationMods) RandomizeAllColumns(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModSlice{ + FieldseekerPolygonlocationMods.RandomObjectid(f), + FieldseekerPolygonlocationMods.RandomName(f), + FieldseekerPolygonlocationMods.RandomZone(f), + FieldseekerPolygonlocationMods.RandomHabitat(f), + FieldseekerPolygonlocationMods.RandomPriority(f), + FieldseekerPolygonlocationMods.RandomUsetype(f), + FieldseekerPolygonlocationMods.RandomActive(f), + FieldseekerPolygonlocationMods.RandomDescription(f), + FieldseekerPolygonlocationMods.RandomAccessdesc(f), + FieldseekerPolygonlocationMods.RandomComments(f), + FieldseekerPolygonlocationMods.RandomSymbology(f), + FieldseekerPolygonlocationMods.RandomExternalid(f), + FieldseekerPolygonlocationMods.RandomAcres(f), + FieldseekerPolygonlocationMods.RandomNextactiondatescheduled(f), + FieldseekerPolygonlocationMods.RandomLarvinspectinterval(f), + FieldseekerPolygonlocationMods.RandomZone2(f), + FieldseekerPolygonlocationMods.RandomLocationnumber(f), + FieldseekerPolygonlocationMods.RandomGlobalid(f), + FieldseekerPolygonlocationMods.RandomLastinspectdate(f), + FieldseekerPolygonlocationMods.RandomLastinspectbreeding(f), + FieldseekerPolygonlocationMods.RandomLastinspectavglarvae(f), + FieldseekerPolygonlocationMods.RandomLastinspectavgpupae(f), + FieldseekerPolygonlocationMods.RandomLastinspectlstages(f), + FieldseekerPolygonlocationMods.RandomLastinspectactiontaken(f), + FieldseekerPolygonlocationMods.RandomLastinspectfieldspecies(f), + FieldseekerPolygonlocationMods.RandomLasttreatdate(f), + FieldseekerPolygonlocationMods.RandomLasttreatproduct(f), + FieldseekerPolygonlocationMods.RandomLasttreatqty(f), + FieldseekerPolygonlocationMods.RandomLasttreatqtyunit(f), + FieldseekerPolygonlocationMods.RandomHectares(f), + FieldseekerPolygonlocationMods.RandomLastinspectactivity(f), + FieldseekerPolygonlocationMods.RandomLasttreatactivity(f), + FieldseekerPolygonlocationMods.RandomLastinspectconditions(f), + FieldseekerPolygonlocationMods.RandomWaterorigin(f), + FieldseekerPolygonlocationMods.RandomFilter(f), + FieldseekerPolygonlocationMods.RandomCreationdate(f), + FieldseekerPolygonlocationMods.RandomCreator(f), + FieldseekerPolygonlocationMods.RandomEditdate(f), + FieldseekerPolygonlocationMods.RandomEditor(f), + FieldseekerPolygonlocationMods.RandomJurisdiction(f), + FieldseekerPolygonlocationMods.RandomShapeArea(f), + FieldseekerPolygonlocationMods.RandomShapeLength(f), + } +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Objectid(val int64) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) ObjectidFunc(f func() int64) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetObjectid() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerPolygonlocationMods) RandomObjectid(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Name(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Name = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) NameFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Name = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetName() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Name = 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 fieldseekerPolygonlocationMods) RandomName(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPolygonlocationMods) RandomNameNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Zone(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) ZoneFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetZone() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Zone = 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 fieldseekerPolygonlocationMods) RandomZone(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPolygonlocationMods) RandomZoneNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Habitat(val null.Val[enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) HabitatFunc(f func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Habitat = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetHabitat() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Habitat = 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 fieldseekerPolygonlocationMods) RandomHabitat(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65(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 fieldseekerPolygonlocationMods) RandomHabitatNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Priority(val null.Val[enums.FieldseekerPolygonlocationLocationpriorityEnum]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerPolygonlocationLocationpriorityEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) PriorityFunc(f func() null.Val[enums.FieldseekerPolygonlocationLocationpriorityEnum]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Priority = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetPriority() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Priority = 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 fieldseekerPolygonlocationMods) RandomPriority(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerPolygonlocationLocationpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationLocationpriorityEnum(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 fieldseekerPolygonlocationMods) RandomPriorityNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerPolygonlocationLocationpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationLocationpriorityEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Usetype(val null.Val[enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) UsetypeFunc(f func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Usetype = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetUsetype() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Usetype = 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 fieldseekerPolygonlocationMods) RandomUsetype(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13(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 fieldseekerPolygonlocationMods) RandomUsetypeNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Active(val null.Val[enums.FieldseekerPolygonlocationNotinuitFEnum]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerPolygonlocationNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) ActiveFunc(f func() null.Val[enums.FieldseekerPolygonlocationNotinuitFEnum]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Active = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetActive() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Active = 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 fieldseekerPolygonlocationMods) RandomActive(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerPolygonlocationNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationNotinuitFEnum(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 fieldseekerPolygonlocationMods) RandomActiveNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerPolygonlocationNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Description(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Description = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) DescriptionFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Description = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetDescription() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Description = 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 fieldseekerPolygonlocationMods) RandomDescription(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerPolygonlocationMods) RandomDescriptionNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Accessdesc(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Accessdesc = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) AccessdescFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Accessdesc = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetAccessdesc() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Accessdesc = 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 fieldseekerPolygonlocationMods) RandomAccessdesc(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Accessdesc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerPolygonlocationMods) RandomAccessdescNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Accessdesc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Comments(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) CommentsFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetComments() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Comments = 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 fieldseekerPolygonlocationMods) RandomComments(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerPolygonlocationMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Symbology(val null.Val[enums.FieldseekerPolygonlocationLocationsymbologyEnum]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerPolygonlocationLocationsymbologyEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) SymbologyFunc(f func() null.Val[enums.FieldseekerPolygonlocationLocationsymbologyEnum]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Symbology = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetSymbology() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Symbology = 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 fieldseekerPolygonlocationMods) RandomSymbology(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerPolygonlocationLocationsymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationLocationsymbologyEnum(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 fieldseekerPolygonlocationMods) RandomSymbologyNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerPolygonlocationLocationsymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationLocationsymbologyEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Externalid(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Externalid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) ExternalidFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Externalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetExternalid() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Externalid = 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 fieldseekerPolygonlocationMods) RandomExternalid(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerPolygonlocationMods) RandomExternalidNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Acres(val null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Acres = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) AcresFunc(f func() null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Acres = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetAcres() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Acres = 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 fieldseekerPolygonlocationMods) RandomAcres(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Acres = 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 fieldseekerPolygonlocationMods) RandomAcresNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Acres = 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 fieldseekerPolygonlocationMods) Nextactiondatescheduled(val null.Val[time.Time]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) NextactiondatescheduledFunc(f func() null.Val[time.Time]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Nextactiondatescheduled = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetNextactiondatescheduled() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Nextactiondatescheduled = 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 fieldseekerPolygonlocationMods) RandomNextactiondatescheduled(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPolygonlocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Larvinspectinterval(val null.Val[int16]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Larvinspectinterval = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LarvinspectintervalFunc(f func() null.Val[int16]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Larvinspectinterval = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLarvinspectinterval() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Larvinspectinterval = 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 fieldseekerPolygonlocationMods) RandomLarvinspectinterval(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Larvinspectinterval = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerPolygonlocationMods) RandomLarvinspectintervalNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Larvinspectinterval = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Zone2(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) Zone2Func(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetZone2() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Zone2 = 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 fieldseekerPolygonlocationMods) RandomZone2(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPolygonlocationMods) RandomZone2NotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Locationnumber(val null.Val[int32]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Locationnumber = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LocationnumberFunc(f func() null.Val[int32]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Locationnumber = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLocationnumber() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Locationnumber = 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 fieldseekerPolygonlocationMods) RandomLocationnumber(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Locationnumber = 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 fieldseekerPolygonlocationMods) RandomLocationnumberNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Locationnumber = 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 fieldseekerPolygonlocationMods) Globalid(val null.Val[uuid.UUID]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetGlobalid() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Globalid = 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 fieldseekerPolygonlocationMods) RandomGlobalid(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Globalid = 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 fieldseekerPolygonlocationMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Globalid = 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 fieldseekerPolygonlocationMods) Lastinspectdate(val null.Val[time.Time]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LastinspectdateFunc(f func() null.Val[time.Time]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLastinspectdate() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectdate = 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 fieldseekerPolygonlocationMods) RandomLastinspectdate(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPolygonlocationMods) RandomLastinspectdateNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Lastinspectbreeding(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectbreeding = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LastinspectbreedingFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectbreeding = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLastinspectbreeding() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectbreeding = 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 fieldseekerPolygonlocationMods) RandomLastinspectbreeding(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectbreeding = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPolygonlocationMods) RandomLastinspectbreedingNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectbreeding = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Lastinspectavglarvae(val null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectavglarvae = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LastinspectavglarvaeFunc(f func() null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectavglarvae = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLastinspectavglarvae() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectavglarvae = 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 fieldseekerPolygonlocationMods) RandomLastinspectavglarvae(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectavglarvae = 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 fieldseekerPolygonlocationMods) RandomLastinspectavglarvaeNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectavglarvae = 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 fieldseekerPolygonlocationMods) Lastinspectavgpupae(val null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectavgpupae = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LastinspectavgpupaeFunc(f func() null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectavgpupae = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLastinspectavgpupae() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectavgpupae = 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 fieldseekerPolygonlocationMods) RandomLastinspectavgpupae(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectavgpupae = 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 fieldseekerPolygonlocationMods) RandomLastinspectavgpupaeNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectavgpupae = 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 fieldseekerPolygonlocationMods) Lastinspectlstages(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectlstages = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LastinspectlstagesFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectlstages = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLastinspectlstages() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectlstages = 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 fieldseekerPolygonlocationMods) RandomLastinspectlstages(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectlstages = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPolygonlocationMods) RandomLastinspectlstagesNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectlstages = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Lastinspectactiontaken(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectactiontaken = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LastinspectactiontakenFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectactiontaken = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLastinspectactiontaken() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectactiontaken = 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 fieldseekerPolygonlocationMods) RandomLastinspectactiontaken(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectactiontaken = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerPolygonlocationMods) RandomLastinspectactiontakenNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectactiontaken = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Lastinspectfieldspecies(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectfieldspecies = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LastinspectfieldspeciesFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectfieldspecies = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLastinspectfieldspecies() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectfieldspecies = 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 fieldseekerPolygonlocationMods) RandomLastinspectfieldspecies(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectfieldspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPolygonlocationMods) RandomLastinspectfieldspeciesNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectfieldspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Lasttreatdate(val null.Val[time.Time]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LasttreatdateFunc(f func() null.Val[time.Time]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLasttreatdate() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatdate = 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 fieldseekerPolygonlocationMods) RandomLasttreatdate(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPolygonlocationMods) RandomLasttreatdateNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Lasttreatproduct(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatproduct = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LasttreatproductFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatproduct = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLasttreatproduct() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatproduct = 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 fieldseekerPolygonlocationMods) RandomLasttreatproduct(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatproduct = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPolygonlocationMods) RandomLasttreatproductNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatproduct = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Lasttreatqty(val null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatqty = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LasttreatqtyFunc(f func() null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatqty = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLasttreatqty() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatqty = 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 fieldseekerPolygonlocationMods) RandomLasttreatqty(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatqty = 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 fieldseekerPolygonlocationMods) RandomLasttreatqtyNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatqty = 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 fieldseekerPolygonlocationMods) Lasttreatqtyunit(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LasttreatqtyunitFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatqtyunit = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLasttreatqtyunit() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatqtyunit = 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 fieldseekerPolygonlocationMods) RandomLasttreatqtyunit(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "10") + 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 fieldseekerPolygonlocationMods) RandomLasttreatqtyunitNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "10") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Hectares(val null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Hectares = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) HectaresFunc(f func() null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Hectares = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetHectares() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Hectares = 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 fieldseekerPolygonlocationMods) RandomHectares(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Hectares = 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 fieldseekerPolygonlocationMods) RandomHectaresNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Hectares = 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 fieldseekerPolygonlocationMods) Lastinspectactivity(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectactivity = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LastinspectactivityFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectactivity = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLastinspectactivity() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectactivity = 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 fieldseekerPolygonlocationMods) RandomLastinspectactivity(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPolygonlocationMods) RandomLastinspectactivityNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Lasttreatactivity(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatactivity = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LasttreatactivityFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatactivity = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLasttreatactivity() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatactivity = 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 fieldseekerPolygonlocationMods) RandomLasttreatactivity(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPolygonlocationMods) RandomLasttreatactivityNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lasttreatactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Lastinspectconditions(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) LastinspectconditionsFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectconditions = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetLastinspectconditions() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectconditions = 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 fieldseekerPolygonlocationMods) RandomLastinspectconditions(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerPolygonlocationMods) RandomLastinspectconditionsNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Waterorigin(val null.Val[enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Waterorigin = func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) WateroriginFunc(f func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Waterorigin = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetWaterorigin() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Waterorigin = 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 fieldseekerPolygonlocationMods) RandomWaterorigin(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Waterorigin = func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9(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 fieldseekerPolygonlocationMods) RandomWateroriginNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Waterorigin = func() null.Val[enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Filter(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Filter = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) FilterFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Filter = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetFilter() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Filter = 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 fieldseekerPolygonlocationMods) RandomFilter(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Filter = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerPolygonlocationMods) RandomFilterNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Filter = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Creationdate(val null.Val[time.Time]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetCreationdate() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Creationdate = 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 fieldseekerPolygonlocationMods) RandomCreationdate(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPolygonlocationMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Creator(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) CreatorFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetCreator() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Creator = 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 fieldseekerPolygonlocationMods) RandomCreator(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerPolygonlocationMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Editdate(val null.Val[time.Time]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetEditdate() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Editdate = 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 fieldseekerPolygonlocationMods) RandomEditdate(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPolygonlocationMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Editor(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) EditorFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetEditor() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Editor = 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 fieldseekerPolygonlocationMods) RandomEditor(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerPolygonlocationMods) RandomEditorNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) Jurisdiction(val null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Jurisdiction = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) JurisdictionFunc(f func() null.Val[string]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Jurisdiction = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetJurisdiction() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Jurisdiction = 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 fieldseekerPolygonlocationMods) RandomJurisdiction(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPolygonlocationMods) RandomJurisdictionNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPolygonlocationMods) ShapeArea(val null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.ShapeArea = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) ShapeAreaFunc(f func() null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.ShapeArea = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetShapeArea() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.ShapeArea = 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 fieldseekerPolygonlocationMods) RandomShapeArea(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.ShapeArea = 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 fieldseekerPolygonlocationMods) RandomShapeAreaNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.ShapeArea = 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 fieldseekerPolygonlocationMods) ShapeLength(val null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.ShapeLength = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPolygonlocationMods) ShapeLengthFunc(f func() null.Val[float64]) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.ShapeLength = f + }) +} + +// Clear any values for the column +func (m fieldseekerPolygonlocationMods) UnsetShapeLength() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.ShapeLength = 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 fieldseekerPolygonlocationMods) RandomShapeLength(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.ShapeLength = 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 fieldseekerPolygonlocationMods) RandomShapeLengthNotNull(f *faker.Faker) FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(_ context.Context, o *FieldseekerPolygonlocationTemplate) { + o.ShapeLength = func() null.Val[float64] { + if f == nil { + f = &defaultFaker + } + + val := random_float64(f) + return null.From(val) + } + }) +} + +func (m fieldseekerPolygonlocationMods) WithParentsCascading() FieldseekerPolygonlocationMod { + return FieldseekerPolygonlocationModFunc(func(ctx context.Context, o *FieldseekerPolygonlocationTemplate) { + if isDone, _ := fieldseekerPolygonlocationWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerPolygonlocationWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.pool.bob.go b/db/factory/fieldseeker.pool.bob.go new file mode 100644 index 00000000..377b06f8 --- /dev/null +++ b/db/factory/fieldseeker.pool.bob.go @@ -0,0 +1,1932 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerPoolMod interface { + Apply(context.Context, *FieldseekerPoolTemplate) +} + +type FieldseekerPoolModFunc func(context.Context, *FieldseekerPoolTemplate) + +func (f FieldseekerPoolModFunc) Apply(ctx context.Context, n *FieldseekerPoolTemplate) { + f(ctx, n) +} + +type FieldseekerPoolModSlice []FieldseekerPoolMod + +func (mods FieldseekerPoolModSlice) Apply(ctx context.Context, n *FieldseekerPoolTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerPoolTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerPoolTemplate struct { + Objectid func() int64 + TrapdataID func() null.Val[uuid.UUID] + Datesent func() null.Val[time.Time] + Survtech func() null.Val[string] + Datetested func() null.Val[time.Time] + Testtech func() null.Val[string] + Comments func() null.Val[string] + Sampleid func() null.Val[string] + Processed func() null.Val[enums.FieldseekerPoolNotinuitFEnum] + LabID func() null.Val[uuid.UUID] + Testmethod func() null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum] + Diseasetested func() null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum] + Diseasepos func() null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Lab func() null.Val[enums.FieldseekerPoolMosquitolabnameEnum] + Poolyear func() null.Val[int16] + Gatewaysync func() null.Val[int16] + Vectorsurvcollectionid func() null.Val[string] + Vectorsurvpoolid func() null.Val[string] + Vectorsurvtrapdataid func() null.Val[string] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerPoolTemplate +func (o *FieldseekerPoolTemplate) Apply(ctx context.Context, mods ...FieldseekerPoolMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerPool +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerPoolTemplate) setModelRels(o *models.FieldseekerPool) {} + +// BuildSetter returns an *models.FieldseekerPoolSetter +// this does nothing with the relationship templates +func (o FieldseekerPoolTemplate) BuildSetter() *models.FieldseekerPoolSetter { + m := &models.FieldseekerPoolSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.TrapdataID != nil { + val := o.TrapdataID() + m.TrapdataID = omitnull.FromNull(val) + } + if o.Datesent != nil { + val := o.Datesent() + m.Datesent = omitnull.FromNull(val) + } + if o.Survtech != nil { + val := o.Survtech() + m.Survtech = omitnull.FromNull(val) + } + if o.Datetested != nil { + val := o.Datetested() + m.Datetested = omitnull.FromNull(val) + } + if o.Testtech != nil { + val := o.Testtech() + m.Testtech = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Sampleid != nil { + val := o.Sampleid() + m.Sampleid = omitnull.FromNull(val) + } + if o.Processed != nil { + val := o.Processed() + m.Processed = omitnull.FromNull(val) + } + if o.LabID != nil { + val := o.LabID() + m.LabID = omitnull.FromNull(val) + } + if o.Testmethod != nil { + val := o.Testmethod() + m.Testmethod = omitnull.FromNull(val) + } + if o.Diseasetested != nil { + val := o.Diseasetested() + m.Diseasetested = omitnull.FromNull(val) + } + if o.Diseasepos != nil { + val := o.Diseasepos() + m.Diseasepos = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Lab != nil { + val := o.Lab() + m.Lab = omitnull.FromNull(val) + } + if o.Poolyear != nil { + val := o.Poolyear() + m.Poolyear = omitnull.FromNull(val) + } + if o.Gatewaysync != nil { + val := o.Gatewaysync() + m.Gatewaysync = omitnull.FromNull(val) + } + if o.Vectorsurvcollectionid != nil { + val := o.Vectorsurvcollectionid() + m.Vectorsurvcollectionid = omitnull.FromNull(val) + } + if o.Vectorsurvpoolid != nil { + val := o.Vectorsurvpoolid() + m.Vectorsurvpoolid = omitnull.FromNull(val) + } + if o.Vectorsurvtrapdataid != nil { + val := o.Vectorsurvtrapdataid() + m.Vectorsurvtrapdataid = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerPoolSetter +// this does nothing with the relationship templates +func (o FieldseekerPoolTemplate) BuildManySetter(number int) []*models.FieldseekerPoolSetter { + m := make([]*models.FieldseekerPoolSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerPool +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerPoolTemplate.Create +func (o FieldseekerPoolTemplate) Build() *models.FieldseekerPool { + m := &models.FieldseekerPool{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.TrapdataID != nil { + m.TrapdataID = o.TrapdataID() + } + if o.Datesent != nil { + m.Datesent = o.Datesent() + } + if o.Survtech != nil { + m.Survtech = o.Survtech() + } + if o.Datetested != nil { + m.Datetested = o.Datetested() + } + if o.Testtech != nil { + m.Testtech = o.Testtech() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Sampleid != nil { + m.Sampleid = o.Sampleid() + } + if o.Processed != nil { + m.Processed = o.Processed() + } + if o.LabID != nil { + m.LabID = o.LabID() + } + if o.Testmethod != nil { + m.Testmethod = o.Testmethod() + } + if o.Diseasetested != nil { + m.Diseasetested = o.Diseasetested() + } + if o.Diseasepos != nil { + m.Diseasepos = o.Diseasepos() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Lab != nil { + m.Lab = o.Lab() + } + if o.Poolyear != nil { + m.Poolyear = o.Poolyear() + } + if o.Gatewaysync != nil { + m.Gatewaysync = o.Gatewaysync() + } + if o.Vectorsurvcollectionid != nil { + m.Vectorsurvcollectionid = o.Vectorsurvcollectionid() + } + if o.Vectorsurvpoolid != nil { + m.Vectorsurvpoolid = o.Vectorsurvpoolid() + } + if o.Vectorsurvtrapdataid != nil { + m.Vectorsurvtrapdataid = o.Vectorsurvtrapdataid() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerPoolSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerPoolTemplate.CreateMany +func (o FieldseekerPoolTemplate) BuildMany(number int) models.FieldseekerPoolSlice { + m := make(models.FieldseekerPoolSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerPool(m *models.FieldseekerPoolSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerPool +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerPoolTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerPool) error { + var err error + + return err +} + +// Create builds a fieldseekerPool and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerPoolTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerPool, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerPool(opt) + + m, err := models.FieldseekerPools.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 fieldseekerPool and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerPoolTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerPool { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerPool 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 *FieldseekerPoolTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerPool { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerPools and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerPoolTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerPoolSlice, error) { + var err error + m := make(models.FieldseekerPoolSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerPools and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerPoolTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerPoolSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerPools 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 FieldseekerPoolTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerPoolSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerPool has methods that act as mods for the FieldseekerPoolTemplate +var FieldseekerPoolMods fieldseekerPoolMods + +type fieldseekerPoolMods struct{} + +func (m fieldseekerPoolMods) RandomizeAllColumns(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModSlice{ + FieldseekerPoolMods.RandomObjectid(f), + FieldseekerPoolMods.RandomTrapdataID(f), + FieldseekerPoolMods.RandomDatesent(f), + FieldseekerPoolMods.RandomSurvtech(f), + FieldseekerPoolMods.RandomDatetested(f), + FieldseekerPoolMods.RandomTesttech(f), + FieldseekerPoolMods.RandomComments(f), + FieldseekerPoolMods.RandomSampleid(f), + FieldseekerPoolMods.RandomProcessed(f), + FieldseekerPoolMods.RandomLabID(f), + FieldseekerPoolMods.RandomTestmethod(f), + FieldseekerPoolMods.RandomDiseasetested(f), + FieldseekerPoolMods.RandomDiseasepos(f), + FieldseekerPoolMods.RandomGlobalid(f), + FieldseekerPoolMods.RandomCreatedUser(f), + FieldseekerPoolMods.RandomCreatedDate(f), + FieldseekerPoolMods.RandomLastEditedUser(f), + FieldseekerPoolMods.RandomLastEditedDate(f), + FieldseekerPoolMods.RandomLab(f), + FieldseekerPoolMods.RandomPoolyear(f), + FieldseekerPoolMods.RandomGatewaysync(f), + FieldseekerPoolMods.RandomVectorsurvcollectionid(f), + FieldseekerPoolMods.RandomVectorsurvpoolid(f), + FieldseekerPoolMods.RandomVectorsurvtrapdataid(f), + FieldseekerPoolMods.RandomCreationdate(f), + FieldseekerPoolMods.RandomCreator(f), + FieldseekerPoolMods.RandomEditdate(f), + FieldseekerPoolMods.RandomEditor(f), + } +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Objectid(val int64) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) ObjectidFunc(f func() int64) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetObjectid() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerPoolMods) RandomObjectid(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) TrapdataID(val null.Val[uuid.UUID]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.TrapdataID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) TrapdataIDFunc(f func() null.Val[uuid.UUID]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.TrapdataID = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetTrapdataID() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.TrapdataID = 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 fieldseekerPoolMods) RandomTrapdataID(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.TrapdataID = 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 fieldseekerPoolMods) RandomTrapdataIDNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.TrapdataID = 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 fieldseekerPoolMods) Datesent(val null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Datesent = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) DatesentFunc(f func() null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Datesent = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetDatesent() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Datesent = 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 fieldseekerPoolMods) RandomDatesent(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Datesent = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPoolMods) RandomDatesentNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Datesent = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Survtech(val null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Survtech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) SurvtechFunc(f func() null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Survtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetSurvtech() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Survtech = 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 fieldseekerPoolMods) RandomSurvtech(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Survtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPoolMods) RandomSurvtechNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Survtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Datetested(val null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Datetested = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) DatetestedFunc(f func() null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Datetested = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetDatetested() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Datetested = 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 fieldseekerPoolMods) RandomDatetested(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Datetested = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPoolMods) RandomDatetestedNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Datetested = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Testtech(val null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Testtech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) TesttechFunc(f func() null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Testtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetTesttech() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Testtech = 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 fieldseekerPoolMods) RandomTesttech(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Testtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerPoolMods) RandomTesttechNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Testtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Comments(val null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) CommentsFunc(f func() null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetComments() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Comments = 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 fieldseekerPoolMods) RandomComments(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerPoolMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Sampleid(val null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Sampleid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) SampleidFunc(f func() null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Sampleid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetSampleid() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Sampleid = 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 fieldseekerPoolMods) RandomSampleid(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Sampleid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerPoolMods) RandomSampleidNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Sampleid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Processed(val null.Val[enums.FieldseekerPoolNotinuitFEnum]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Processed = func() null.Val[enums.FieldseekerPoolNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) ProcessedFunc(f func() null.Val[enums.FieldseekerPoolNotinuitFEnum]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Processed = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetProcessed() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Processed = 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 fieldseekerPoolMods) RandomProcessed(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Processed = func() null.Val[enums.FieldseekerPoolNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPoolNotinuitFEnum(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 fieldseekerPoolMods) RandomProcessedNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Processed = func() null.Val[enums.FieldseekerPoolNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPoolNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) LabID(val null.Val[uuid.UUID]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LabID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) LabIDFunc(f func() null.Val[uuid.UUID]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LabID = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetLabID() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LabID = 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 fieldseekerPoolMods) RandomLabID(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LabID = 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 fieldseekerPoolMods) RandomLabIDNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LabID = 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 fieldseekerPoolMods) Testmethod(val null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Testmethod = func() null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) TestmethodFunc(f func() null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Testmethod = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetTestmethod() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Testmethod = 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 fieldseekerPoolMods) RandomTestmethod(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Testmethod = func() null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum(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 fieldseekerPoolMods) RandomTestmethodNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Testmethod = func() null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Diseasetested(val null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Diseasetested = func() null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) DiseasetestedFunc(f func() null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Diseasetested = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetDiseasetested() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Diseasetested = 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 fieldseekerPoolMods) RandomDiseasetested(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Diseasetested = func() null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum(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 fieldseekerPoolMods) RandomDiseasetestedNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Diseasetested = func() null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Diseasepos(val null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Diseasepos = func() null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) DiseaseposFunc(f func() null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Diseasepos = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetDiseasepos() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Diseasepos = 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 fieldseekerPoolMods) RandomDiseasepos(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Diseasepos = func() null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum(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 fieldseekerPoolMods) RandomDiseaseposNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Diseasepos = func() null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Globalid(val null.Val[uuid.UUID]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetGlobalid() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Globalid = 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 fieldseekerPoolMods) RandomGlobalid(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Globalid = 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 fieldseekerPoolMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Globalid = 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 fieldseekerPoolMods) CreatedUser(val null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetCreatedUser() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.CreatedUser = 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 fieldseekerPoolMods) RandomCreatedUser(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerPoolMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) CreatedDate(val null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetCreatedDate() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.CreatedDate = 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 fieldseekerPoolMods) RandomCreatedDate(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPoolMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) LastEditedUser(val null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetLastEditedUser() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LastEditedUser = 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 fieldseekerPoolMods) RandomLastEditedUser(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerPoolMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) LastEditedDate(val null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetLastEditedDate() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LastEditedDate = 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 fieldseekerPoolMods) RandomLastEditedDate(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPoolMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Lab(val null.Val[enums.FieldseekerPoolMosquitolabnameEnum]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Lab = func() null.Val[enums.FieldseekerPoolMosquitolabnameEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) LabFunc(f func() null.Val[enums.FieldseekerPoolMosquitolabnameEnum]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Lab = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetLab() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Lab = 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 fieldseekerPoolMods) RandomLab(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Lab = func() null.Val[enums.FieldseekerPoolMosquitolabnameEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPoolMosquitolabnameEnum(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 fieldseekerPoolMods) RandomLabNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Lab = func() null.Val[enums.FieldseekerPoolMosquitolabnameEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerPoolMosquitolabnameEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Poolyear(val null.Val[int16]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Poolyear = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) PoolyearFunc(f func() null.Val[int16]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Poolyear = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetPoolyear() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Poolyear = 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 fieldseekerPoolMods) RandomPoolyear(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Poolyear = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerPoolMods) RandomPoolyearNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Poolyear = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Gatewaysync(val null.Val[int16]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Gatewaysync = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) GatewaysyncFunc(f func() null.Val[int16]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Gatewaysync = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetGatewaysync() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Gatewaysync = 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 fieldseekerPoolMods) RandomGatewaysync(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Gatewaysync = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerPoolMods) RandomGatewaysyncNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Gatewaysync = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Vectorsurvcollectionid(val null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvcollectionid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) VectorsurvcollectionidFunc(f func() null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvcollectionid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetVectorsurvcollectionid() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvcollectionid = 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 fieldseekerPoolMods) RandomVectorsurvcollectionid(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvcollectionid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerPoolMods) RandomVectorsurvcollectionidNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvcollectionid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Vectorsurvpoolid(val null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvpoolid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) VectorsurvpoolidFunc(f func() null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvpoolid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetVectorsurvpoolid() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvpoolid = 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 fieldseekerPoolMods) RandomVectorsurvpoolid(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvpoolid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerPoolMods) RandomVectorsurvpoolidNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvpoolid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Vectorsurvtrapdataid(val null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvtrapdataid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) VectorsurvtrapdataidFunc(f func() null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvtrapdataid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetVectorsurvtrapdataid() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvtrapdataid = 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 fieldseekerPoolMods) RandomVectorsurvtrapdataid(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvtrapdataid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerPoolMods) RandomVectorsurvtrapdataidNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Vectorsurvtrapdataid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Creationdate(val null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetCreationdate() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Creationdate = 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 fieldseekerPoolMods) RandomCreationdate(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPoolMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Creator(val null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) CreatorFunc(f func() null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetCreator() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Creator = 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 fieldseekerPoolMods) RandomCreator(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerPoolMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Editdate(val null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetEditdate() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Editdate = 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 fieldseekerPoolMods) RandomEditdate(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPoolMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPoolMods) Editor(val null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPoolMods) EditorFunc(f func() null.Val[string]) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerPoolMods) UnsetEditor() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Editor = 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 fieldseekerPoolMods) RandomEditor(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerPoolMods) RandomEditorNotNull(f *faker.Faker) FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +func (m fieldseekerPoolMods) WithParentsCascading() FieldseekerPoolMod { + return FieldseekerPoolModFunc(func(ctx context.Context, o *FieldseekerPoolTemplate) { + if isDone, _ := fieldseekerPoolWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerPoolWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.poolbuffer.bob.go b/db/factory/fieldseeker.poolbuffer.bob.go new file mode 100644 index 00000000..67703794 --- /dev/null +++ b/db/factory/fieldseeker.poolbuffer.bob.go @@ -0,0 +1,90 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerPoolbufferMod interface { + Apply(context.Context, *FieldseekerPoolbufferTemplate) +} + +type FieldseekerPoolbufferModFunc func(context.Context, *FieldseekerPoolbufferTemplate) + +func (f FieldseekerPoolbufferModFunc) Apply(ctx context.Context, n *FieldseekerPoolbufferTemplate) { + f(ctx, n) +} + +type FieldseekerPoolbufferModSlice []FieldseekerPoolbufferMod + +func (mods FieldseekerPoolbufferModSlice) Apply(ctx context.Context, n *FieldseekerPoolbufferTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerPoolbufferTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerPoolbufferTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerPoolbufferTemplate +func (o *FieldseekerPoolbufferTemplate) Apply(ctx context.Context, mods ...FieldseekerPoolbufferMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerPoolbuffer +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerPoolbufferTemplate) setModelRels(o *models.FieldseekerPoolbuffer) {} + +// Build returns an *models.FieldseekerPoolbuffer +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerPoolbufferTemplate.Create +func (o FieldseekerPoolbufferTemplate) Build() *models.FieldseekerPoolbuffer { + m := &models.FieldseekerPoolbuffer{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerPoolbufferSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerPoolbufferTemplate.CreateMany +func (o FieldseekerPoolbufferTemplate) BuildMany(number int) models.FieldseekerPoolbufferSlice { + m := make(models.FieldseekerPoolbufferSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerPoolbuffer has methods that act as mods for the FieldseekerPoolbufferTemplate +var FieldseekerPoolbufferMods fieldseekerPoolbufferMods + +type fieldseekerPoolbufferMods struct{} + +func (m fieldseekerPoolbufferMods) RandomizeAllColumns(f *faker.Faker) FieldseekerPoolbufferMod { + return FieldseekerPoolbufferModSlice{} +} + +func (m fieldseekerPoolbufferMods) WithParentsCascading() FieldseekerPoolbufferMod { + return FieldseekerPoolbufferModFunc(func(ctx context.Context, o *FieldseekerPoolbufferTemplate) { + if isDone, _ := fieldseekerPoolbufferWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerPoolbufferWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.pooldetail.bob.go b/db/factory/fieldseeker.pooldetail.bob.go new file mode 100644 index 00000000..419fc884 --- /dev/null +++ b/db/factory/fieldseeker.pooldetail.bob.go @@ -0,0 +1,1061 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerPooldetailMod interface { + Apply(context.Context, *FieldseekerPooldetailTemplate) +} + +type FieldseekerPooldetailModFunc func(context.Context, *FieldseekerPooldetailTemplate) + +func (f FieldseekerPooldetailModFunc) Apply(ctx context.Context, n *FieldseekerPooldetailTemplate) { + f(ctx, n) +} + +type FieldseekerPooldetailModSlice []FieldseekerPooldetailMod + +func (mods FieldseekerPooldetailModSlice) Apply(ctx context.Context, n *FieldseekerPooldetailTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerPooldetailTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerPooldetailTemplate struct { + Objectid func() int64 + TrapdataID func() null.Val[uuid.UUID] + PoolID func() null.Val[uuid.UUID] + Species func() null.Val[string] + Females func() null.Val[int16] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerPooldetailTemplate +func (o *FieldseekerPooldetailTemplate) Apply(ctx context.Context, mods ...FieldseekerPooldetailMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerPooldetail +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerPooldetailTemplate) setModelRels(o *models.FieldseekerPooldetail) {} + +// BuildSetter returns an *models.FieldseekerPooldetailSetter +// this does nothing with the relationship templates +func (o FieldseekerPooldetailTemplate) BuildSetter() *models.FieldseekerPooldetailSetter { + m := &models.FieldseekerPooldetailSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.TrapdataID != nil { + val := o.TrapdataID() + m.TrapdataID = omitnull.FromNull(val) + } + if o.PoolID != nil { + val := o.PoolID() + m.PoolID = omitnull.FromNull(val) + } + if o.Species != nil { + val := o.Species() + m.Species = omitnull.FromNull(val) + } + if o.Females != nil { + val := o.Females() + m.Females = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerPooldetailSetter +// this does nothing with the relationship templates +func (o FieldseekerPooldetailTemplate) BuildManySetter(number int) []*models.FieldseekerPooldetailSetter { + m := make([]*models.FieldseekerPooldetailSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerPooldetail +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerPooldetailTemplate.Create +func (o FieldseekerPooldetailTemplate) Build() *models.FieldseekerPooldetail { + m := &models.FieldseekerPooldetail{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.TrapdataID != nil { + m.TrapdataID = o.TrapdataID() + } + if o.PoolID != nil { + m.PoolID = o.PoolID() + } + if o.Species != nil { + m.Species = o.Species() + } + if o.Females != nil { + m.Females = o.Females() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerPooldetailSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerPooldetailTemplate.CreateMany +func (o FieldseekerPooldetailTemplate) BuildMany(number int) models.FieldseekerPooldetailSlice { + m := make(models.FieldseekerPooldetailSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerPooldetail(m *models.FieldseekerPooldetailSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerPooldetail +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerPooldetailTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerPooldetail) error { + var err error + + return err +} + +// Create builds a fieldseekerPooldetail and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerPooldetailTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerPooldetail, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerPooldetail(opt) + + m, err := models.FieldseekerPooldetails.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 fieldseekerPooldetail and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerPooldetailTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerPooldetail { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerPooldetail 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 *FieldseekerPooldetailTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerPooldetail { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerPooldetails and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerPooldetailTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerPooldetailSlice, error) { + var err error + m := make(models.FieldseekerPooldetailSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerPooldetails and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerPooldetailTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerPooldetailSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerPooldetails 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 FieldseekerPooldetailTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerPooldetailSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerPooldetail has methods that act as mods for the FieldseekerPooldetailTemplate +var FieldseekerPooldetailMods fieldseekerPooldetailMods + +type fieldseekerPooldetailMods struct{} + +func (m fieldseekerPooldetailMods) RandomizeAllColumns(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModSlice{ + FieldseekerPooldetailMods.RandomObjectid(f), + FieldseekerPooldetailMods.RandomTrapdataID(f), + FieldseekerPooldetailMods.RandomPoolID(f), + FieldseekerPooldetailMods.RandomSpecies(f), + FieldseekerPooldetailMods.RandomFemales(f), + FieldseekerPooldetailMods.RandomGlobalid(f), + FieldseekerPooldetailMods.RandomCreatedUser(f), + FieldseekerPooldetailMods.RandomCreatedDate(f), + FieldseekerPooldetailMods.RandomLastEditedUser(f), + FieldseekerPooldetailMods.RandomLastEditedDate(f), + FieldseekerPooldetailMods.RandomCreationdate(f), + FieldseekerPooldetailMods.RandomCreator(f), + FieldseekerPooldetailMods.RandomEditdate(f), + FieldseekerPooldetailMods.RandomEditor(f), + } +} + +// Set the model columns to this value +func (m fieldseekerPooldetailMods) Objectid(val int64) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) ObjectidFunc(f func() int64) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetObjectid() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerPooldetailMods) RandomObjectid(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPooldetailMods) TrapdataID(val null.Val[uuid.UUID]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.TrapdataID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) TrapdataIDFunc(f func() null.Val[uuid.UUID]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.TrapdataID = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetTrapdataID() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.TrapdataID = 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 fieldseekerPooldetailMods) RandomTrapdataID(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.TrapdataID = 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 fieldseekerPooldetailMods) RandomTrapdataIDNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.TrapdataID = 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 fieldseekerPooldetailMods) PoolID(val null.Val[uuid.UUID]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.PoolID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) PoolIDFunc(f func() null.Val[uuid.UUID]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.PoolID = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetPoolID() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.PoolID = 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 fieldseekerPooldetailMods) RandomPoolID(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.PoolID = 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 fieldseekerPooldetailMods) RandomPoolIDNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.PoolID = 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 fieldseekerPooldetailMods) Species(val null.Val[string]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Species = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) SpeciesFunc(f func() null.Val[string]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Species = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetSpecies() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Species = 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 fieldseekerPooldetailMods) RandomSpecies(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Species = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerPooldetailMods) RandomSpeciesNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Species = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPooldetailMods) Females(val null.Val[int16]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Females = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) FemalesFunc(f func() null.Val[int16]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Females = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetFemales() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Females = 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 fieldseekerPooldetailMods) RandomFemales(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Females = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerPooldetailMods) RandomFemalesNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Females = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPooldetailMods) Globalid(val null.Val[uuid.UUID]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetGlobalid() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Globalid = 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 fieldseekerPooldetailMods) RandomGlobalid(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Globalid = 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 fieldseekerPooldetailMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Globalid = 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 fieldseekerPooldetailMods) CreatedUser(val null.Val[string]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetCreatedUser() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.CreatedUser = 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 fieldseekerPooldetailMods) RandomCreatedUser(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerPooldetailMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPooldetailMods) CreatedDate(val null.Val[time.Time]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetCreatedDate() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.CreatedDate = 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 fieldseekerPooldetailMods) RandomCreatedDate(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPooldetailMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPooldetailMods) LastEditedUser(val null.Val[string]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetLastEditedUser() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.LastEditedUser = 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 fieldseekerPooldetailMods) RandomLastEditedUser(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerPooldetailMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPooldetailMods) LastEditedDate(val null.Val[time.Time]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetLastEditedDate() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.LastEditedDate = 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 fieldseekerPooldetailMods) RandomLastEditedDate(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPooldetailMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPooldetailMods) Creationdate(val null.Val[time.Time]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetCreationdate() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Creationdate = 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 fieldseekerPooldetailMods) RandomCreationdate(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPooldetailMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPooldetailMods) Creator(val null.Val[string]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) CreatorFunc(f func() null.Val[string]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetCreator() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Creator = 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 fieldseekerPooldetailMods) RandomCreator(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerPooldetailMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPooldetailMods) Editdate(val null.Val[time.Time]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetEditdate() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Editdate = 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 fieldseekerPooldetailMods) RandomEditdate(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerPooldetailMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerPooldetailMods) Editor(val null.Val[string]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerPooldetailMods) EditorFunc(f func() null.Val[string]) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerPooldetailMods) UnsetEditor() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Editor = 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 fieldseekerPooldetailMods) RandomEditor(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerPooldetailMods) RandomEditorNotNull(f *faker.Faker) FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(_ context.Context, o *FieldseekerPooldetailTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +func (m fieldseekerPooldetailMods) WithParentsCascading() FieldseekerPooldetailMod { + return FieldseekerPooldetailModFunc(func(ctx context.Context, o *FieldseekerPooldetailTemplate) { + if isDone, _ := fieldseekerPooldetailWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerPooldetailWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.proposedtreatmentarea.bob.go b/db/factory/fieldseeker.proposedtreatmentarea.bob.go new file mode 100644 index 00000000..56df2be5 --- /dev/null +++ b/db/factory/fieldseeker.proposedtreatmentarea.bob.go @@ -0,0 +1,2241 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerProposedtreatmentareaMod interface { + Apply(context.Context, *FieldseekerProposedtreatmentareaTemplate) +} + +type FieldseekerProposedtreatmentareaModFunc func(context.Context, *FieldseekerProposedtreatmentareaTemplate) + +func (f FieldseekerProposedtreatmentareaModFunc) Apply(ctx context.Context, n *FieldseekerProposedtreatmentareaTemplate) { + f(ctx, n) +} + +type FieldseekerProposedtreatmentareaModSlice []FieldseekerProposedtreatmentareaMod + +func (mods FieldseekerProposedtreatmentareaModSlice) Apply(ctx context.Context, n *FieldseekerProposedtreatmentareaTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerProposedtreatmentareaTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerProposedtreatmentareaTemplate struct { + Objectid func() int64 + Method func() null.Val[enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum] + Comments func() null.Val[string] + Zone func() null.Val[string] + Reviewed func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] + Reviewedby func() null.Val[string] + Revieweddate func() null.Val[time.Time] + Zone2 func() null.Val[string] + Completeddate func() null.Val[time.Time] + Completedby func() null.Val[string] + Completed func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] + Issprayroute func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] + Name func() null.Val[string] + Acres func() null.Val[float64] + Globalid func() null.Val[uuid.UUID] + Exported func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] + Targetproduct func() null.Val[string] + Targetapprate func() null.Val[float64] + Hectares func() null.Val[float64] + Lasttreatactivity func() null.Val[string] + Lasttreatdate func() null.Val[time.Time] + Lasttreatproduct func() null.Val[string] + Lasttreatqty func() null.Val[float64] + Lasttreatqtyunit func() null.Val[string] + Priority func() null.Val[enums.FieldseekerProposedtreatmentareaLocationpriorityEnum] + Duedate func() null.Val[time.Time] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Targetspecies func() null.Val[string] + ShapeArea func() null.Val[float64] + ShapeLength func() null.Val[float64] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerProposedtreatmentareaTemplate +func (o *FieldseekerProposedtreatmentareaTemplate) Apply(ctx context.Context, mods ...FieldseekerProposedtreatmentareaMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerProposedtreatmentarea +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerProposedtreatmentareaTemplate) setModelRels(o *models.FieldseekerProposedtreatmentarea) { +} + +// BuildSetter returns an *models.FieldseekerProposedtreatmentareaSetter +// this does nothing with the relationship templates +func (o FieldseekerProposedtreatmentareaTemplate) BuildSetter() *models.FieldseekerProposedtreatmentareaSetter { + m := &models.FieldseekerProposedtreatmentareaSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Method != nil { + val := o.Method() + m.Method = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Reviewed != nil { + val := o.Reviewed() + m.Reviewed = omitnull.FromNull(val) + } + if o.Reviewedby != nil { + val := o.Reviewedby() + m.Reviewedby = omitnull.FromNull(val) + } + if o.Revieweddate != nil { + val := o.Revieweddate() + m.Revieweddate = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Completeddate != nil { + val := o.Completeddate() + m.Completeddate = omitnull.FromNull(val) + } + if o.Completedby != nil { + val := o.Completedby() + m.Completedby = omitnull.FromNull(val) + } + if o.Completed != nil { + val := o.Completed() + m.Completed = omitnull.FromNull(val) + } + if o.Issprayroute != nil { + val := o.Issprayroute() + m.Issprayroute = omitnull.FromNull(val) + } + if o.Name != nil { + val := o.Name() + m.Name = omitnull.FromNull(val) + } + if o.Acres != nil { + val := o.Acres() + m.Acres = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.Exported != nil { + val := o.Exported() + m.Exported = omitnull.FromNull(val) + } + if o.Targetproduct != nil { + val := o.Targetproduct() + m.Targetproduct = omitnull.FromNull(val) + } + if o.Targetapprate != nil { + val := o.Targetapprate() + m.Targetapprate = omitnull.FromNull(val) + } + if o.Hectares != nil { + val := o.Hectares() + m.Hectares = omitnull.FromNull(val) + } + if o.Lasttreatactivity != nil { + val := o.Lasttreatactivity() + m.Lasttreatactivity = omitnull.FromNull(val) + } + if o.Lasttreatdate != nil { + val := o.Lasttreatdate() + m.Lasttreatdate = omitnull.FromNull(val) + } + if o.Lasttreatproduct != nil { + val := o.Lasttreatproduct() + m.Lasttreatproduct = omitnull.FromNull(val) + } + if o.Lasttreatqty != nil { + val := o.Lasttreatqty() + m.Lasttreatqty = omitnull.FromNull(val) + } + if o.Lasttreatqtyunit != nil { + val := o.Lasttreatqtyunit() + m.Lasttreatqtyunit = omitnull.FromNull(val) + } + if o.Priority != nil { + val := o.Priority() + m.Priority = omitnull.FromNull(val) + } + if o.Duedate != nil { + val := o.Duedate() + m.Duedate = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Targetspecies != nil { + val := o.Targetspecies() + m.Targetspecies = omitnull.FromNull(val) + } + if o.ShapeArea != nil { + val := o.ShapeArea() + m.ShapeArea = omitnull.FromNull(val) + } + if o.ShapeLength != nil { + val := o.ShapeLength() + m.ShapeLength = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerProposedtreatmentareaSetter +// this does nothing with the relationship templates +func (o FieldseekerProposedtreatmentareaTemplate) BuildManySetter(number int) []*models.FieldseekerProposedtreatmentareaSetter { + m := make([]*models.FieldseekerProposedtreatmentareaSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerProposedtreatmentarea +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerProposedtreatmentareaTemplate.Create +func (o FieldseekerProposedtreatmentareaTemplate) Build() *models.FieldseekerProposedtreatmentarea { + m := &models.FieldseekerProposedtreatmentarea{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Method != nil { + m.Method = o.Method() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Reviewed != nil { + m.Reviewed = o.Reviewed() + } + if o.Reviewedby != nil { + m.Reviewedby = o.Reviewedby() + } + if o.Revieweddate != nil { + m.Revieweddate = o.Revieweddate() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Completeddate != nil { + m.Completeddate = o.Completeddate() + } + if o.Completedby != nil { + m.Completedby = o.Completedby() + } + if o.Completed != nil { + m.Completed = o.Completed() + } + if o.Issprayroute != nil { + m.Issprayroute = o.Issprayroute() + } + if o.Name != nil { + m.Name = o.Name() + } + if o.Acres != nil { + m.Acres = o.Acres() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.Exported != nil { + m.Exported = o.Exported() + } + if o.Targetproduct != nil { + m.Targetproduct = o.Targetproduct() + } + if o.Targetapprate != nil { + m.Targetapprate = o.Targetapprate() + } + if o.Hectares != nil { + m.Hectares = o.Hectares() + } + if o.Lasttreatactivity != nil { + m.Lasttreatactivity = o.Lasttreatactivity() + } + if o.Lasttreatdate != nil { + m.Lasttreatdate = o.Lasttreatdate() + } + if o.Lasttreatproduct != nil { + m.Lasttreatproduct = o.Lasttreatproduct() + } + if o.Lasttreatqty != nil { + m.Lasttreatqty = o.Lasttreatqty() + } + if o.Lasttreatqtyunit != nil { + m.Lasttreatqtyunit = o.Lasttreatqtyunit() + } + if o.Priority != nil { + m.Priority = o.Priority() + } + if o.Duedate != nil { + m.Duedate = o.Duedate() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Targetspecies != nil { + m.Targetspecies = o.Targetspecies() + } + if o.ShapeArea != nil { + m.ShapeArea = o.ShapeArea() + } + if o.ShapeLength != nil { + m.ShapeLength = o.ShapeLength() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerProposedtreatmentareaSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerProposedtreatmentareaTemplate.CreateMany +func (o FieldseekerProposedtreatmentareaTemplate) BuildMany(number int) models.FieldseekerProposedtreatmentareaSlice { + m := make(models.FieldseekerProposedtreatmentareaSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerProposedtreatmentarea(m *models.FieldseekerProposedtreatmentareaSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerProposedtreatmentarea +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerProposedtreatmentareaTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerProposedtreatmentarea) error { + var err error + + return err +} + +// Create builds a fieldseekerProposedtreatmentarea and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerProposedtreatmentareaTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerProposedtreatmentarea, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerProposedtreatmentarea(opt) + + m, err := models.FieldseekerProposedtreatmentareas.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 fieldseekerProposedtreatmentarea and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerProposedtreatmentareaTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerProposedtreatmentarea { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerProposedtreatmentarea 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 *FieldseekerProposedtreatmentareaTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerProposedtreatmentarea { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerProposedtreatmentareas and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerProposedtreatmentareaTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerProposedtreatmentareaSlice, error) { + var err error + m := make(models.FieldseekerProposedtreatmentareaSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerProposedtreatmentareas and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerProposedtreatmentareaTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerProposedtreatmentareaSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerProposedtreatmentareas 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 FieldseekerProposedtreatmentareaTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerProposedtreatmentareaSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerProposedtreatmentarea has methods that act as mods for the FieldseekerProposedtreatmentareaTemplate +var FieldseekerProposedtreatmentareaMods fieldseekerProposedtreatmentareaMods + +type fieldseekerProposedtreatmentareaMods struct{} + +func (m fieldseekerProposedtreatmentareaMods) RandomizeAllColumns(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModSlice{ + FieldseekerProposedtreatmentareaMods.RandomObjectid(f), + FieldseekerProposedtreatmentareaMods.RandomMethod(f), + FieldseekerProposedtreatmentareaMods.RandomComments(f), + FieldseekerProposedtreatmentareaMods.RandomZone(f), + FieldseekerProposedtreatmentareaMods.RandomReviewed(f), + FieldseekerProposedtreatmentareaMods.RandomReviewedby(f), + FieldseekerProposedtreatmentareaMods.RandomRevieweddate(f), + FieldseekerProposedtreatmentareaMods.RandomZone2(f), + FieldseekerProposedtreatmentareaMods.RandomCompleteddate(f), + FieldseekerProposedtreatmentareaMods.RandomCompletedby(f), + FieldseekerProposedtreatmentareaMods.RandomCompleted(f), + FieldseekerProposedtreatmentareaMods.RandomIssprayroute(f), + FieldseekerProposedtreatmentareaMods.RandomName(f), + FieldseekerProposedtreatmentareaMods.RandomAcres(f), + FieldseekerProposedtreatmentareaMods.RandomGlobalid(f), + FieldseekerProposedtreatmentareaMods.RandomExported(f), + FieldseekerProposedtreatmentareaMods.RandomTargetproduct(f), + FieldseekerProposedtreatmentareaMods.RandomTargetapprate(f), + FieldseekerProposedtreatmentareaMods.RandomHectares(f), + FieldseekerProposedtreatmentareaMods.RandomLasttreatactivity(f), + FieldseekerProposedtreatmentareaMods.RandomLasttreatdate(f), + FieldseekerProposedtreatmentareaMods.RandomLasttreatproduct(f), + FieldseekerProposedtreatmentareaMods.RandomLasttreatqty(f), + FieldseekerProposedtreatmentareaMods.RandomLasttreatqtyunit(f), + FieldseekerProposedtreatmentareaMods.RandomPriority(f), + FieldseekerProposedtreatmentareaMods.RandomDuedate(f), + FieldseekerProposedtreatmentareaMods.RandomCreationdate(f), + FieldseekerProposedtreatmentareaMods.RandomCreator(f), + FieldseekerProposedtreatmentareaMods.RandomEditdate(f), + FieldseekerProposedtreatmentareaMods.RandomEditor(f), + FieldseekerProposedtreatmentareaMods.RandomTargetspecies(f), + FieldseekerProposedtreatmentareaMods.RandomShapeArea(f), + FieldseekerProposedtreatmentareaMods.RandomShapeLength(f), + } +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Objectid(val int64) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) ObjectidFunc(f func() int64) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetObjectid() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerProposedtreatmentareaMods) RandomObjectid(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Method(val null.Val[enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Method = func() null.Val[enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) MethodFunc(f func() null.Val[enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Method = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetMethod() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Method = 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 fieldseekerProposedtreatmentareaMods) RandomMethod(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Method = func() null.Val[enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum(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 fieldseekerProposedtreatmentareaMods) RandomMethodNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Method = func() null.Val[enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Comments(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) CommentsFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetComments() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Comments = 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 fieldseekerProposedtreatmentareaMods) RandomComments(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerProposedtreatmentareaMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Zone(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) ZoneFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetZone() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Zone = 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 fieldseekerProposedtreatmentareaMods) RandomZone(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerProposedtreatmentareaMods) RandomZoneNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Reviewed(val null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) ReviewedFunc(f func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Reviewed = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetReviewed() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Reviewed = 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 fieldseekerProposedtreatmentareaMods) RandomReviewed(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaNotinuitFEnum(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 fieldseekerProposedtreatmentareaMods) RandomReviewedNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Reviewedby(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Reviewedby = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) ReviewedbyFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Reviewedby = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetReviewedby() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Reviewedby = 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 fieldseekerProposedtreatmentareaMods) RandomReviewedby(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerProposedtreatmentareaMods) RandomReviewedbyNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Revieweddate(val null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Revieweddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) RevieweddateFunc(f func() null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Revieweddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetRevieweddate() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Revieweddate = 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 fieldseekerProposedtreatmentareaMods) RandomRevieweddate(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerProposedtreatmentareaMods) RandomRevieweddateNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Zone2(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) Zone2Func(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetZone2() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Zone2 = 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 fieldseekerProposedtreatmentareaMods) RandomZone2(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerProposedtreatmentareaMods) RandomZone2NotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Completeddate(val null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completeddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) CompleteddateFunc(f func() null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completeddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetCompleteddate() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completeddate = 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 fieldseekerProposedtreatmentareaMods) RandomCompleteddate(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completeddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerProposedtreatmentareaMods) RandomCompleteddateNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completeddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Completedby(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completedby = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) CompletedbyFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completedby = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetCompletedby() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completedby = 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 fieldseekerProposedtreatmentareaMods) RandomCompletedby(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerProposedtreatmentareaMods) RandomCompletedbyNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Completed(val null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completed = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) CompletedFunc(f func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completed = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetCompleted() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completed = 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 fieldseekerProposedtreatmentareaMods) RandomCompleted(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completed = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaNotinuitFEnum(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 fieldseekerProposedtreatmentareaMods) RandomCompletedNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Completed = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Issprayroute(val null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Issprayroute = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) IssprayrouteFunc(f func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Issprayroute = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetIssprayroute() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Issprayroute = 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 fieldseekerProposedtreatmentareaMods) RandomIssprayroute(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Issprayroute = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaNotinuitFEnum(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 fieldseekerProposedtreatmentareaMods) RandomIssprayrouteNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Issprayroute = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Name(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Name = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) NameFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Name = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetName() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Name = 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 fieldseekerProposedtreatmentareaMods) RandomName(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerProposedtreatmentareaMods) RandomNameNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Acres(val null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Acres = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) AcresFunc(f func() null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Acres = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetAcres() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Acres = 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 fieldseekerProposedtreatmentareaMods) RandomAcres(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Acres = 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 fieldseekerProposedtreatmentareaMods) RandomAcresNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Acres = 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 fieldseekerProposedtreatmentareaMods) Globalid(val null.Val[uuid.UUID]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetGlobalid() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Globalid = 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 fieldseekerProposedtreatmentareaMods) RandomGlobalid(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Globalid = 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 fieldseekerProposedtreatmentareaMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Globalid = 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 fieldseekerProposedtreatmentareaMods) Exported(val null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Exported = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) ExportedFunc(f func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Exported = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetExported() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Exported = 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 fieldseekerProposedtreatmentareaMods) RandomExported(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Exported = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaNotinuitFEnum(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 fieldseekerProposedtreatmentareaMods) RandomExportedNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Exported = func() null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Targetproduct(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetproduct = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) TargetproductFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetproduct = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetTargetproduct() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetproduct = 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 fieldseekerProposedtreatmentareaMods) RandomTargetproduct(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetproduct = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerProposedtreatmentareaMods) RandomTargetproductNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetproduct = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Targetapprate(val null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetapprate = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) TargetapprateFunc(f func() null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetapprate = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetTargetapprate() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetapprate = 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 fieldseekerProposedtreatmentareaMods) RandomTargetapprate(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetapprate = 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 fieldseekerProposedtreatmentareaMods) RandomTargetapprateNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetapprate = 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 fieldseekerProposedtreatmentareaMods) Hectares(val null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Hectares = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) HectaresFunc(f func() null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Hectares = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetHectares() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Hectares = 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 fieldseekerProposedtreatmentareaMods) RandomHectares(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Hectares = 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 fieldseekerProposedtreatmentareaMods) RandomHectaresNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Hectares = 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 fieldseekerProposedtreatmentareaMods) Lasttreatactivity(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatactivity = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) LasttreatactivityFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatactivity = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetLasttreatactivity() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatactivity = 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 fieldseekerProposedtreatmentareaMods) RandomLasttreatactivity(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerProposedtreatmentareaMods) RandomLasttreatactivityNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatactivity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Lasttreatdate(val null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) LasttreatdateFunc(f func() null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetLasttreatdate() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatdate = 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 fieldseekerProposedtreatmentareaMods) RandomLasttreatdate(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerProposedtreatmentareaMods) RandomLasttreatdateNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Lasttreatproduct(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatproduct = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) LasttreatproductFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatproduct = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetLasttreatproduct() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatproduct = 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 fieldseekerProposedtreatmentareaMods) RandomLasttreatproduct(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatproduct = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerProposedtreatmentareaMods) RandomLasttreatproductNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatproduct = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Lasttreatqty(val null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatqty = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) LasttreatqtyFunc(f func() null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatqty = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetLasttreatqty() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatqty = 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 fieldseekerProposedtreatmentareaMods) RandomLasttreatqty(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatqty = 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 fieldseekerProposedtreatmentareaMods) RandomLasttreatqtyNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatqty = 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 fieldseekerProposedtreatmentareaMods) Lasttreatqtyunit(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) LasttreatqtyunitFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatqtyunit = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetLasttreatqtyunit() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatqtyunit = 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 fieldseekerProposedtreatmentareaMods) RandomLasttreatqtyunit(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "10") + 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 fieldseekerProposedtreatmentareaMods) RandomLasttreatqtyunitNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Lasttreatqtyunit = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "10") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Priority(val null.Val[enums.FieldseekerProposedtreatmentareaLocationpriorityEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Priority = func() null.Val[enums.FieldseekerProposedtreatmentareaLocationpriorityEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) PriorityFunc(f func() null.Val[enums.FieldseekerProposedtreatmentareaLocationpriorityEnum]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Priority = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetPriority() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Priority = 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 fieldseekerProposedtreatmentareaMods) RandomPriority(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Priority = func() null.Val[enums.FieldseekerProposedtreatmentareaLocationpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaLocationpriorityEnum(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 fieldseekerProposedtreatmentareaMods) RandomPriorityNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Priority = func() null.Val[enums.FieldseekerProposedtreatmentareaLocationpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerProposedtreatmentareaLocationpriorityEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Duedate(val null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Duedate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) DuedateFunc(f func() null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Duedate = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetDuedate() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Duedate = 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 fieldseekerProposedtreatmentareaMods) RandomDuedate(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Duedate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerProposedtreatmentareaMods) RandomDuedateNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Duedate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Creationdate(val null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetCreationdate() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Creationdate = 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 fieldseekerProposedtreatmentareaMods) RandomCreationdate(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerProposedtreatmentareaMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Creator(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) CreatorFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetCreator() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Creator = 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 fieldseekerProposedtreatmentareaMods) RandomCreator(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerProposedtreatmentareaMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Editdate(val null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetEditdate() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Editdate = 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 fieldseekerProposedtreatmentareaMods) RandomEditdate(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerProposedtreatmentareaMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Editor(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) EditorFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetEditor() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Editor = 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 fieldseekerProposedtreatmentareaMods) RandomEditor(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerProposedtreatmentareaMods) RandomEditorNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) Targetspecies(val null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetspecies = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) TargetspeciesFunc(f func() null.Val[string]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetspecies = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetTargetspecies() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetspecies = 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 fieldseekerProposedtreatmentareaMods) RandomTargetspecies(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerProposedtreatmentareaMods) RandomTargetspeciesNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.Targetspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerProposedtreatmentareaMods) ShapeArea(val null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.ShapeArea = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) ShapeAreaFunc(f func() null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.ShapeArea = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetShapeArea() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.ShapeArea = 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 fieldseekerProposedtreatmentareaMods) RandomShapeArea(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.ShapeArea = 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 fieldseekerProposedtreatmentareaMods) RandomShapeAreaNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.ShapeArea = 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 fieldseekerProposedtreatmentareaMods) ShapeLength(val null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.ShapeLength = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerProposedtreatmentareaMods) ShapeLengthFunc(f func() null.Val[float64]) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.ShapeLength = f + }) +} + +// Clear any values for the column +func (m fieldseekerProposedtreatmentareaMods) UnsetShapeLength() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.ShapeLength = 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 fieldseekerProposedtreatmentareaMods) RandomShapeLength(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.ShapeLength = 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 fieldseekerProposedtreatmentareaMods) RandomShapeLengthNotNull(f *faker.Faker) FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(_ context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + o.ShapeLength = func() null.Val[float64] { + if f == nil { + f = &defaultFaker + } + + val := random_float64(f) + return null.From(val) + } + }) +} + +func (m fieldseekerProposedtreatmentareaMods) WithParentsCascading() FieldseekerProposedtreatmentareaMod { + return FieldseekerProposedtreatmentareaModFunc(func(ctx context.Context, o *FieldseekerProposedtreatmentareaTemplate) { + if isDone, _ := fieldseekerProposedtreatmentareaWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerProposedtreatmentareaWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.qalarvcount.bob.go b/db/factory/fieldseeker.qalarvcount.bob.go new file mode 100644 index 00000000..56b02861 --- /dev/null +++ b/db/factory/fieldseeker.qalarvcount.bob.go @@ -0,0 +1,90 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerQalarvcountMod interface { + Apply(context.Context, *FieldseekerQalarvcountTemplate) +} + +type FieldseekerQalarvcountModFunc func(context.Context, *FieldseekerQalarvcountTemplate) + +func (f FieldseekerQalarvcountModFunc) Apply(ctx context.Context, n *FieldseekerQalarvcountTemplate) { + f(ctx, n) +} + +type FieldseekerQalarvcountModSlice []FieldseekerQalarvcountMod + +func (mods FieldseekerQalarvcountModSlice) Apply(ctx context.Context, n *FieldseekerQalarvcountTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerQalarvcountTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerQalarvcountTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerQalarvcountTemplate +func (o *FieldseekerQalarvcountTemplate) Apply(ctx context.Context, mods ...FieldseekerQalarvcountMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerQalarvcount +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerQalarvcountTemplate) setModelRels(o *models.FieldseekerQalarvcount) {} + +// Build returns an *models.FieldseekerQalarvcount +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerQalarvcountTemplate.Create +func (o FieldseekerQalarvcountTemplate) Build() *models.FieldseekerQalarvcount { + m := &models.FieldseekerQalarvcount{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerQalarvcountSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerQalarvcountTemplate.CreateMany +func (o FieldseekerQalarvcountTemplate) BuildMany(number int) models.FieldseekerQalarvcountSlice { + m := make(models.FieldseekerQalarvcountSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerQalarvcount has methods that act as mods for the FieldseekerQalarvcountTemplate +var FieldseekerQalarvcountMods fieldseekerQalarvcountMods + +type fieldseekerQalarvcountMods struct{} + +func (m fieldseekerQalarvcountMods) RandomizeAllColumns(f *faker.Faker) FieldseekerQalarvcountMod { + return FieldseekerQalarvcountModSlice{} +} + +func (m fieldseekerQalarvcountMods) WithParentsCascading() FieldseekerQalarvcountMod { + return FieldseekerQalarvcountModFunc(func(ctx context.Context, o *FieldseekerQalarvcountTemplate) { + if isDone, _ := fieldseekerQalarvcountWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerQalarvcountWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.qamosquitoinspection.bob.go b/db/factory/fieldseeker.qamosquitoinspection.bob.go new file mode 100644 index 00000000..87d7b7e2 --- /dev/null +++ b/db/factory/fieldseeker.qamosquitoinspection.bob.go @@ -0,0 +1,4039 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerQamosquitoinspectionMod interface { + Apply(context.Context, *FieldseekerQamosquitoinspectionTemplate) +} + +type FieldseekerQamosquitoinspectionModFunc func(context.Context, *FieldseekerQamosquitoinspectionTemplate) + +func (f FieldseekerQamosquitoinspectionModFunc) Apply(ctx context.Context, n *FieldseekerQamosquitoinspectionTemplate) { + f(ctx, n) +} + +type FieldseekerQamosquitoinspectionModSlice []FieldseekerQamosquitoinspectionMod + +func (mods FieldseekerQamosquitoinspectionModSlice) Apply(ctx context.Context, n *FieldseekerQamosquitoinspectionTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerQamosquitoinspectionTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerQamosquitoinspectionTemplate struct { + Objectid func() int64 + Posdips func() null.Val[int16] + Actiontaken func() null.Val[enums.FieldseekerQamosquitoinspectionMosquitoactionEnum] + Comments func() null.Val[string] + Avetemp func() null.Val[float64] + Windspeed func() null.Val[float64] + Raingauge func() null.Val[float64] + Globalid func() null.Val[uuid.UUID] + Startdatetime func() null.Val[time.Time] + Enddatetime func() null.Val[time.Time] + Winddir func() null.Val[string] + Reviewed func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Reviewedby func() null.Val[string] + Revieweddate func() null.Val[time.Time] + Locationname func() null.Val[string] + Zone func() null.Val[string] + Recordstatus func() null.Val[int16] + Zone2 func() null.Val[string] + LR func() null.Val[int16] + Negdips func() null.Val[int16] + Totalacres func() null.Val[float64] + Acresbreeding func() null.Val[float64] + Fish func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Sitetype func() null.Val[enums.FieldseekerQamosquitoinspectionQasitetypeEnum] + Breedingpotential func() null.Val[enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum] + Movingwater func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Nowaterever func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Mosquitohabitat func() null.Val[enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum] + Habvalue1 func() null.Val[int16] + Habvalue1percent func() null.Val[int16] + Habvalue2 func() null.Val[int16] + Habvalue2percent func() null.Val[int16] + Potential func() null.Val[int16] + Larvaepresent func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Larvaeinsidetreatedarea func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Larvaeoutsidetreatedarea func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Larvaereason func() null.Val[enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum] + Aquaticorganisms func() null.Val[enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum] + Vegetation func() null.Val[enums.FieldseekerQamosquitoinspectionQavegetationEnum] + Sourcereduction func() null.Val[enums.FieldseekerQamosquitoinspectionQasourcereductionEnum] + Waterpresent func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Watermovement1 func() null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] + Watermovement1percent func() null.Val[int16] + Watermovement2 func() null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] + Watermovement2percent func() null.Val[int16] + Soilconditions func() null.Val[enums.FieldseekerQamosquitoinspectionQasoilconditionEnum] + Waterduration func() null.Val[enums.FieldseekerQamosquitoinspectionQawaterdurationEnum] + Watersource func() null.Val[enums.FieldseekerQamosquitoinspectionQawatersourceEnum] + Waterconditions func() null.Val[enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum] + Adultactivity func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Linelocid func() null.Val[uuid.UUID] + Pointlocid func() null.Val[uuid.UUID] + Polygonlocid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Fieldtech func() null.Val[string] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerQamosquitoinspectionTemplate +func (o *FieldseekerQamosquitoinspectionTemplate) Apply(ctx context.Context, mods ...FieldseekerQamosquitoinspectionMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerQamosquitoinspection +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerQamosquitoinspectionTemplate) setModelRels(o *models.FieldseekerQamosquitoinspection) { +} + +// BuildSetter returns an *models.FieldseekerQamosquitoinspectionSetter +// this does nothing with the relationship templates +func (o FieldseekerQamosquitoinspectionTemplate) BuildSetter() *models.FieldseekerQamosquitoinspectionSetter { + m := &models.FieldseekerQamosquitoinspectionSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Posdips != nil { + val := o.Posdips() + m.Posdips = omitnull.FromNull(val) + } + if o.Actiontaken != nil { + val := o.Actiontaken() + m.Actiontaken = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Avetemp != nil { + val := o.Avetemp() + m.Avetemp = omitnull.FromNull(val) + } + if o.Windspeed != nil { + val := o.Windspeed() + m.Windspeed = omitnull.FromNull(val) + } + if o.Raingauge != nil { + val := o.Raingauge() + m.Raingauge = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.Startdatetime != nil { + val := o.Startdatetime() + m.Startdatetime = omitnull.FromNull(val) + } + if o.Enddatetime != nil { + val := o.Enddatetime() + m.Enddatetime = omitnull.FromNull(val) + } + if o.Winddir != nil { + val := o.Winddir() + m.Winddir = omitnull.FromNull(val) + } + if o.Reviewed != nil { + val := o.Reviewed() + m.Reviewed = omitnull.FromNull(val) + } + if o.Reviewedby != nil { + val := o.Reviewedby() + m.Reviewedby = omitnull.FromNull(val) + } + if o.Revieweddate != nil { + val := o.Revieweddate() + m.Revieweddate = omitnull.FromNull(val) + } + if o.Locationname != nil { + val := o.Locationname() + m.Locationname = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Recordstatus != nil { + val := o.Recordstatus() + m.Recordstatus = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.LR != nil { + val := o.LR() + m.LR = omitnull.FromNull(val) + } + if o.Negdips != nil { + val := o.Negdips() + m.Negdips = omitnull.FromNull(val) + } + if o.Totalacres != nil { + val := o.Totalacres() + m.Totalacres = omitnull.FromNull(val) + } + if o.Acresbreeding != nil { + val := o.Acresbreeding() + m.Acresbreeding = omitnull.FromNull(val) + } + if o.Fish != nil { + val := o.Fish() + m.Fish = omitnull.FromNull(val) + } + if o.Sitetype != nil { + val := o.Sitetype() + m.Sitetype = omitnull.FromNull(val) + } + if o.Breedingpotential != nil { + val := o.Breedingpotential() + m.Breedingpotential = omitnull.FromNull(val) + } + if o.Movingwater != nil { + val := o.Movingwater() + m.Movingwater = omitnull.FromNull(val) + } + if o.Nowaterever != nil { + val := o.Nowaterever() + m.Nowaterever = omitnull.FromNull(val) + } + if o.Mosquitohabitat != nil { + val := o.Mosquitohabitat() + m.Mosquitohabitat = omitnull.FromNull(val) + } + if o.Habvalue1 != nil { + val := o.Habvalue1() + m.Habvalue1 = omitnull.FromNull(val) + } + if o.Habvalue1percent != nil { + val := o.Habvalue1percent() + m.Habvalue1percent = omitnull.FromNull(val) + } + if o.Habvalue2 != nil { + val := o.Habvalue2() + m.Habvalue2 = omitnull.FromNull(val) + } + if o.Habvalue2percent != nil { + val := o.Habvalue2percent() + m.Habvalue2percent = omitnull.FromNull(val) + } + if o.Potential != nil { + val := o.Potential() + m.Potential = omitnull.FromNull(val) + } + if o.Larvaepresent != nil { + val := o.Larvaepresent() + m.Larvaepresent = omitnull.FromNull(val) + } + if o.Larvaeinsidetreatedarea != nil { + val := o.Larvaeinsidetreatedarea() + m.Larvaeinsidetreatedarea = omitnull.FromNull(val) + } + if o.Larvaeoutsidetreatedarea != nil { + val := o.Larvaeoutsidetreatedarea() + m.Larvaeoutsidetreatedarea = omitnull.FromNull(val) + } + if o.Larvaereason != nil { + val := o.Larvaereason() + m.Larvaereason = omitnull.FromNull(val) + } + if o.Aquaticorganisms != nil { + val := o.Aquaticorganisms() + m.Aquaticorganisms = omitnull.FromNull(val) + } + if o.Vegetation != nil { + val := o.Vegetation() + m.Vegetation = omitnull.FromNull(val) + } + if o.Sourcereduction != nil { + val := o.Sourcereduction() + m.Sourcereduction = omitnull.FromNull(val) + } + if o.Waterpresent != nil { + val := o.Waterpresent() + m.Waterpresent = omitnull.FromNull(val) + } + if o.Watermovement1 != nil { + val := o.Watermovement1() + m.Watermovement1 = omitnull.FromNull(val) + } + if o.Watermovement1percent != nil { + val := o.Watermovement1percent() + m.Watermovement1percent = omitnull.FromNull(val) + } + if o.Watermovement2 != nil { + val := o.Watermovement2() + m.Watermovement2 = omitnull.FromNull(val) + } + if o.Watermovement2percent != nil { + val := o.Watermovement2percent() + m.Watermovement2percent = omitnull.FromNull(val) + } + if o.Soilconditions != nil { + val := o.Soilconditions() + m.Soilconditions = omitnull.FromNull(val) + } + if o.Waterduration != nil { + val := o.Waterduration() + m.Waterduration = omitnull.FromNull(val) + } + if o.Watersource != nil { + val := o.Watersource() + m.Watersource = omitnull.FromNull(val) + } + if o.Waterconditions != nil { + val := o.Waterconditions() + m.Waterconditions = omitnull.FromNull(val) + } + if o.Adultactivity != nil { + val := o.Adultactivity() + m.Adultactivity = omitnull.FromNull(val) + } + if o.Linelocid != nil { + val := o.Linelocid() + m.Linelocid = omitnull.FromNull(val) + } + if o.Pointlocid != nil { + val := o.Pointlocid() + m.Pointlocid = omitnull.FromNull(val) + } + if o.Polygonlocid != nil { + val := o.Polygonlocid() + m.Polygonlocid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Fieldtech != nil { + val := o.Fieldtech() + m.Fieldtech = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerQamosquitoinspectionSetter +// this does nothing with the relationship templates +func (o FieldseekerQamosquitoinspectionTemplate) BuildManySetter(number int) []*models.FieldseekerQamosquitoinspectionSetter { + m := make([]*models.FieldseekerQamosquitoinspectionSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerQamosquitoinspection +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerQamosquitoinspectionTemplate.Create +func (o FieldseekerQamosquitoinspectionTemplate) Build() *models.FieldseekerQamosquitoinspection { + m := &models.FieldseekerQamosquitoinspection{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Posdips != nil { + m.Posdips = o.Posdips() + } + if o.Actiontaken != nil { + m.Actiontaken = o.Actiontaken() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Avetemp != nil { + m.Avetemp = o.Avetemp() + } + if o.Windspeed != nil { + m.Windspeed = o.Windspeed() + } + if o.Raingauge != nil { + m.Raingauge = o.Raingauge() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.Startdatetime != nil { + m.Startdatetime = o.Startdatetime() + } + if o.Enddatetime != nil { + m.Enddatetime = o.Enddatetime() + } + if o.Winddir != nil { + m.Winddir = o.Winddir() + } + if o.Reviewed != nil { + m.Reviewed = o.Reviewed() + } + if o.Reviewedby != nil { + m.Reviewedby = o.Reviewedby() + } + if o.Revieweddate != nil { + m.Revieweddate = o.Revieweddate() + } + if o.Locationname != nil { + m.Locationname = o.Locationname() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Recordstatus != nil { + m.Recordstatus = o.Recordstatus() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.LR != nil { + m.LR = o.LR() + } + if o.Negdips != nil { + m.Negdips = o.Negdips() + } + if o.Totalacres != nil { + m.Totalacres = o.Totalacres() + } + if o.Acresbreeding != nil { + m.Acresbreeding = o.Acresbreeding() + } + if o.Fish != nil { + m.Fish = o.Fish() + } + if o.Sitetype != nil { + m.Sitetype = o.Sitetype() + } + if o.Breedingpotential != nil { + m.Breedingpotential = o.Breedingpotential() + } + if o.Movingwater != nil { + m.Movingwater = o.Movingwater() + } + if o.Nowaterever != nil { + m.Nowaterever = o.Nowaterever() + } + if o.Mosquitohabitat != nil { + m.Mosquitohabitat = o.Mosquitohabitat() + } + if o.Habvalue1 != nil { + m.Habvalue1 = o.Habvalue1() + } + if o.Habvalue1percent != nil { + m.Habvalue1percent = o.Habvalue1percent() + } + if o.Habvalue2 != nil { + m.Habvalue2 = o.Habvalue2() + } + if o.Habvalue2percent != nil { + m.Habvalue2percent = o.Habvalue2percent() + } + if o.Potential != nil { + m.Potential = o.Potential() + } + if o.Larvaepresent != nil { + m.Larvaepresent = o.Larvaepresent() + } + if o.Larvaeinsidetreatedarea != nil { + m.Larvaeinsidetreatedarea = o.Larvaeinsidetreatedarea() + } + if o.Larvaeoutsidetreatedarea != nil { + m.Larvaeoutsidetreatedarea = o.Larvaeoutsidetreatedarea() + } + if o.Larvaereason != nil { + m.Larvaereason = o.Larvaereason() + } + if o.Aquaticorganisms != nil { + m.Aquaticorganisms = o.Aquaticorganisms() + } + if o.Vegetation != nil { + m.Vegetation = o.Vegetation() + } + if o.Sourcereduction != nil { + m.Sourcereduction = o.Sourcereduction() + } + if o.Waterpresent != nil { + m.Waterpresent = o.Waterpresent() + } + if o.Watermovement1 != nil { + m.Watermovement1 = o.Watermovement1() + } + if o.Watermovement1percent != nil { + m.Watermovement1percent = o.Watermovement1percent() + } + if o.Watermovement2 != nil { + m.Watermovement2 = o.Watermovement2() + } + if o.Watermovement2percent != nil { + m.Watermovement2percent = o.Watermovement2percent() + } + if o.Soilconditions != nil { + m.Soilconditions = o.Soilconditions() + } + if o.Waterduration != nil { + m.Waterduration = o.Waterduration() + } + if o.Watersource != nil { + m.Watersource = o.Watersource() + } + if o.Waterconditions != nil { + m.Waterconditions = o.Waterconditions() + } + if o.Adultactivity != nil { + m.Adultactivity = o.Adultactivity() + } + if o.Linelocid != nil { + m.Linelocid = o.Linelocid() + } + if o.Pointlocid != nil { + m.Pointlocid = o.Pointlocid() + } + if o.Polygonlocid != nil { + m.Polygonlocid = o.Polygonlocid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Fieldtech != nil { + m.Fieldtech = o.Fieldtech() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerQamosquitoinspectionSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerQamosquitoinspectionTemplate.CreateMany +func (o FieldseekerQamosquitoinspectionTemplate) BuildMany(number int) models.FieldseekerQamosquitoinspectionSlice { + m := make(models.FieldseekerQamosquitoinspectionSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerQamosquitoinspection(m *models.FieldseekerQamosquitoinspectionSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerQamosquitoinspection +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerQamosquitoinspectionTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerQamosquitoinspection) error { + var err error + + return err +} + +// Create builds a fieldseekerQamosquitoinspection and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerQamosquitoinspectionTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerQamosquitoinspection, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerQamosquitoinspection(opt) + + m, err := models.FieldseekerQamosquitoinspections.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 fieldseekerQamosquitoinspection and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerQamosquitoinspectionTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerQamosquitoinspection { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerQamosquitoinspection 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 *FieldseekerQamosquitoinspectionTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerQamosquitoinspection { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerQamosquitoinspections and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerQamosquitoinspectionTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerQamosquitoinspectionSlice, error) { + var err error + m := make(models.FieldseekerQamosquitoinspectionSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerQamosquitoinspections and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerQamosquitoinspectionTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerQamosquitoinspectionSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerQamosquitoinspections 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 FieldseekerQamosquitoinspectionTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerQamosquitoinspectionSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerQamosquitoinspection has methods that act as mods for the FieldseekerQamosquitoinspectionTemplate +var FieldseekerQamosquitoinspectionMods fieldseekerQamosquitoinspectionMods + +type fieldseekerQamosquitoinspectionMods struct{} + +func (m fieldseekerQamosquitoinspectionMods) RandomizeAllColumns(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModSlice{ + FieldseekerQamosquitoinspectionMods.RandomObjectid(f), + FieldseekerQamosquitoinspectionMods.RandomPosdips(f), + FieldseekerQamosquitoinspectionMods.RandomActiontaken(f), + FieldseekerQamosquitoinspectionMods.RandomComments(f), + FieldseekerQamosquitoinspectionMods.RandomAvetemp(f), + FieldseekerQamosquitoinspectionMods.RandomWindspeed(f), + FieldseekerQamosquitoinspectionMods.RandomRaingauge(f), + FieldseekerQamosquitoinspectionMods.RandomGlobalid(f), + FieldseekerQamosquitoinspectionMods.RandomStartdatetime(f), + FieldseekerQamosquitoinspectionMods.RandomEnddatetime(f), + FieldseekerQamosquitoinspectionMods.RandomWinddir(f), + FieldseekerQamosquitoinspectionMods.RandomReviewed(f), + FieldseekerQamosquitoinspectionMods.RandomReviewedby(f), + FieldseekerQamosquitoinspectionMods.RandomRevieweddate(f), + FieldseekerQamosquitoinspectionMods.RandomLocationname(f), + FieldseekerQamosquitoinspectionMods.RandomZone(f), + FieldseekerQamosquitoinspectionMods.RandomRecordstatus(f), + FieldseekerQamosquitoinspectionMods.RandomZone2(f), + FieldseekerQamosquitoinspectionMods.RandomLR(f), + FieldseekerQamosquitoinspectionMods.RandomNegdips(f), + FieldseekerQamosquitoinspectionMods.RandomTotalacres(f), + FieldseekerQamosquitoinspectionMods.RandomAcresbreeding(f), + FieldseekerQamosquitoinspectionMods.RandomFish(f), + FieldseekerQamosquitoinspectionMods.RandomSitetype(f), + FieldseekerQamosquitoinspectionMods.RandomBreedingpotential(f), + FieldseekerQamosquitoinspectionMods.RandomMovingwater(f), + FieldseekerQamosquitoinspectionMods.RandomNowaterever(f), + FieldseekerQamosquitoinspectionMods.RandomMosquitohabitat(f), + FieldseekerQamosquitoinspectionMods.RandomHabvalue1(f), + FieldseekerQamosquitoinspectionMods.RandomHabvalue1percent(f), + FieldseekerQamosquitoinspectionMods.RandomHabvalue2(f), + FieldseekerQamosquitoinspectionMods.RandomHabvalue2percent(f), + FieldseekerQamosquitoinspectionMods.RandomPotential(f), + FieldseekerQamosquitoinspectionMods.RandomLarvaepresent(f), + FieldseekerQamosquitoinspectionMods.RandomLarvaeinsidetreatedarea(f), + FieldseekerQamosquitoinspectionMods.RandomLarvaeoutsidetreatedarea(f), + FieldseekerQamosquitoinspectionMods.RandomLarvaereason(f), + FieldseekerQamosquitoinspectionMods.RandomAquaticorganisms(f), + FieldseekerQamosquitoinspectionMods.RandomVegetation(f), + FieldseekerQamosquitoinspectionMods.RandomSourcereduction(f), + FieldseekerQamosquitoinspectionMods.RandomWaterpresent(f), + FieldseekerQamosquitoinspectionMods.RandomWatermovement1(f), + FieldseekerQamosquitoinspectionMods.RandomWatermovement1percent(f), + FieldseekerQamosquitoinspectionMods.RandomWatermovement2(f), + FieldseekerQamosquitoinspectionMods.RandomWatermovement2percent(f), + FieldseekerQamosquitoinspectionMods.RandomSoilconditions(f), + FieldseekerQamosquitoinspectionMods.RandomWaterduration(f), + FieldseekerQamosquitoinspectionMods.RandomWatersource(f), + FieldseekerQamosquitoinspectionMods.RandomWaterconditions(f), + FieldseekerQamosquitoinspectionMods.RandomAdultactivity(f), + FieldseekerQamosquitoinspectionMods.RandomLinelocid(f), + FieldseekerQamosquitoinspectionMods.RandomPointlocid(f), + FieldseekerQamosquitoinspectionMods.RandomPolygonlocid(f), + FieldseekerQamosquitoinspectionMods.RandomCreatedUser(f), + FieldseekerQamosquitoinspectionMods.RandomCreatedDate(f), + FieldseekerQamosquitoinspectionMods.RandomLastEditedUser(f), + FieldseekerQamosquitoinspectionMods.RandomLastEditedDate(f), + FieldseekerQamosquitoinspectionMods.RandomFieldtech(f), + FieldseekerQamosquitoinspectionMods.RandomCreationdate(f), + FieldseekerQamosquitoinspectionMods.RandomCreator(f), + FieldseekerQamosquitoinspectionMods.RandomEditdate(f), + FieldseekerQamosquitoinspectionMods.RandomEditor(f), + } +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Objectid(val int64) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) ObjectidFunc(f func() int64) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetObjectid() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerQamosquitoinspectionMods) RandomObjectid(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Posdips(val null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Posdips = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) PosdipsFunc(f func() null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Posdips = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetPosdips() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Posdips = 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 fieldseekerQamosquitoinspectionMods) RandomPosdips(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Posdips = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerQamosquitoinspectionMods) RandomPosdipsNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Posdips = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Actiontaken(val null.Val[enums.FieldseekerQamosquitoinspectionMosquitoactionEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Actiontaken = func() null.Val[enums.FieldseekerQamosquitoinspectionMosquitoactionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) ActiontakenFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionMosquitoactionEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Actiontaken = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetActiontaken() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Actiontaken = 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 fieldseekerQamosquitoinspectionMods) RandomActiontaken(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Actiontaken = func() null.Val[enums.FieldseekerQamosquitoinspectionMosquitoactionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionMosquitoactionEnum(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 fieldseekerQamosquitoinspectionMods) RandomActiontakenNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Actiontaken = func() null.Val[enums.FieldseekerQamosquitoinspectionMosquitoactionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionMosquitoactionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Comments(val null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) CommentsFunc(f func() null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetComments() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Comments = 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 fieldseekerQamosquitoinspectionMods) RandomComments(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerQamosquitoinspectionMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Avetemp(val null.Val[float64]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Avetemp = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) AvetempFunc(f func() null.Val[float64]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Avetemp = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetAvetemp() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Avetemp = 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 fieldseekerQamosquitoinspectionMods) RandomAvetemp(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Avetemp = 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 fieldseekerQamosquitoinspectionMods) RandomAvetempNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Avetemp = 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 fieldseekerQamosquitoinspectionMods) Windspeed(val null.Val[float64]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Windspeed = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) WindspeedFunc(f func() null.Val[float64]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Windspeed = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetWindspeed() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Windspeed = 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 fieldseekerQamosquitoinspectionMods) RandomWindspeed(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Windspeed = 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 fieldseekerQamosquitoinspectionMods) RandomWindspeedNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Windspeed = 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 fieldseekerQamosquitoinspectionMods) Raingauge(val null.Val[float64]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Raingauge = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) RaingaugeFunc(f func() null.Val[float64]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Raingauge = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetRaingauge() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Raingauge = 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 fieldseekerQamosquitoinspectionMods) RandomRaingauge(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Raingauge = 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 fieldseekerQamosquitoinspectionMods) RandomRaingaugeNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Raingauge = 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 fieldseekerQamosquitoinspectionMods) Globalid(val null.Val[uuid.UUID]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetGlobalid() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Globalid = 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 fieldseekerQamosquitoinspectionMods) RandomGlobalid(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Globalid = 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 fieldseekerQamosquitoinspectionMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Globalid = 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 fieldseekerQamosquitoinspectionMods) Startdatetime(val null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Startdatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) StartdatetimeFunc(f func() null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Startdatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetStartdatetime() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Startdatetime = 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 fieldseekerQamosquitoinspectionMods) RandomStartdatetime(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerQamosquitoinspectionMods) RandomStartdatetimeNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Enddatetime(val null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Enddatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) EnddatetimeFunc(f func() null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Enddatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetEnddatetime() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Enddatetime = 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 fieldseekerQamosquitoinspectionMods) RandomEnddatetime(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerQamosquitoinspectionMods) RandomEnddatetimeNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Winddir(val null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Winddir = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) WinddirFunc(f func() null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Winddir = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetWinddir() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Winddir = 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 fieldseekerQamosquitoinspectionMods) RandomWinddir(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Winddir = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "3") + 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 fieldseekerQamosquitoinspectionMods) RandomWinddirNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Winddir = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "3") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Reviewed(val null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) ReviewedFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Reviewed = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetReviewed() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Reviewed = 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 fieldseekerQamosquitoinspectionMods) RandomReviewed(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(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 fieldseekerQamosquitoinspectionMods) RandomReviewedNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Reviewedby(val null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Reviewedby = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) ReviewedbyFunc(f func() null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Reviewedby = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetReviewedby() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Reviewedby = 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 fieldseekerQamosquitoinspectionMods) RandomReviewedby(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerQamosquitoinspectionMods) RandomReviewedbyNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Revieweddate(val null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Revieweddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) RevieweddateFunc(f func() null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Revieweddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetRevieweddate() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Revieweddate = 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 fieldseekerQamosquitoinspectionMods) RandomRevieweddate(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerQamosquitoinspectionMods) RandomRevieweddateNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Locationname(val null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Locationname = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) LocationnameFunc(f func() null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Locationname = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetLocationname() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Locationname = 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 fieldseekerQamosquitoinspectionMods) RandomLocationname(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerQamosquitoinspectionMods) RandomLocationnameNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Zone(val null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) ZoneFunc(f func() null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetZone() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Zone = 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 fieldseekerQamosquitoinspectionMods) RandomZone(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerQamosquitoinspectionMods) RandomZoneNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Recordstatus(val null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Recordstatus = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) RecordstatusFunc(f func() null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Recordstatus = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetRecordstatus() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Recordstatus = 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 fieldseekerQamosquitoinspectionMods) RandomRecordstatus(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerQamosquitoinspectionMods) RandomRecordstatusNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Zone2(val null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) Zone2Func(f func() null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetZone2() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Zone2 = 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 fieldseekerQamosquitoinspectionMods) RandomZone2(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerQamosquitoinspectionMods) RandomZone2NotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) LR(val null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LR = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) LRFunc(f func() null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LR = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetLR() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LR = 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 fieldseekerQamosquitoinspectionMods) RandomLR(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LR = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerQamosquitoinspectionMods) RandomLRNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LR = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Negdips(val null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Negdips = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) NegdipsFunc(f func() null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Negdips = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetNegdips() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Negdips = 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 fieldseekerQamosquitoinspectionMods) RandomNegdips(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Negdips = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerQamosquitoinspectionMods) RandomNegdipsNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Negdips = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Totalacres(val null.Val[float64]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Totalacres = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) TotalacresFunc(f func() null.Val[float64]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Totalacres = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetTotalacres() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Totalacres = 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 fieldseekerQamosquitoinspectionMods) RandomTotalacres(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Totalacres = 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 fieldseekerQamosquitoinspectionMods) RandomTotalacresNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Totalacres = 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 fieldseekerQamosquitoinspectionMods) Acresbreeding(val null.Val[float64]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Acresbreeding = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) AcresbreedingFunc(f func() null.Val[float64]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Acresbreeding = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetAcresbreeding() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Acresbreeding = 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 fieldseekerQamosquitoinspectionMods) RandomAcresbreeding(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Acresbreeding = 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 fieldseekerQamosquitoinspectionMods) RandomAcresbreedingNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Acresbreeding = 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 fieldseekerQamosquitoinspectionMods) Fish(val null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Fish = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) FishFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Fish = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetFish() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Fish = 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 fieldseekerQamosquitoinspectionMods) RandomFish(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Fish = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(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 fieldseekerQamosquitoinspectionMods) RandomFishNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Fish = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Sitetype(val null.Val[enums.FieldseekerQamosquitoinspectionQasitetypeEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Sitetype = func() null.Val[enums.FieldseekerQamosquitoinspectionQasitetypeEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) SitetypeFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionQasitetypeEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Sitetype = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetSitetype() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Sitetype = 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 fieldseekerQamosquitoinspectionMods) RandomSitetype(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Sitetype = func() null.Val[enums.FieldseekerQamosquitoinspectionQasitetypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQasitetypeEnum(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 fieldseekerQamosquitoinspectionMods) RandomSitetypeNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Sitetype = func() null.Val[enums.FieldseekerQamosquitoinspectionQasitetypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQasitetypeEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Breedingpotential(val null.Val[enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Breedingpotential = func() null.Val[enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) BreedingpotentialFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Breedingpotential = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetBreedingpotential() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Breedingpotential = 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 fieldseekerQamosquitoinspectionMods) RandomBreedingpotential(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Breedingpotential = func() null.Val[enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQabreedingpotentialEnum(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 fieldseekerQamosquitoinspectionMods) RandomBreedingpotentialNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Breedingpotential = func() null.Val[enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQabreedingpotentialEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Movingwater(val null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Movingwater = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) MovingwaterFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Movingwater = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetMovingwater() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Movingwater = 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 fieldseekerQamosquitoinspectionMods) RandomMovingwater(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Movingwater = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(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 fieldseekerQamosquitoinspectionMods) RandomMovingwaterNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Movingwater = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Nowaterever(val null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Nowaterever = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) NowatereverFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Nowaterever = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetNowaterever() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Nowaterever = 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 fieldseekerQamosquitoinspectionMods) RandomNowaterever(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Nowaterever = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(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 fieldseekerQamosquitoinspectionMods) RandomNowatereverNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Nowaterever = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Mosquitohabitat(val null.Val[enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Mosquitohabitat = func() null.Val[enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) MosquitohabitatFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Mosquitohabitat = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetMosquitohabitat() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Mosquitohabitat = 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 fieldseekerQamosquitoinspectionMods) RandomMosquitohabitat(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Mosquitohabitat = func() null.Val[enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQamosquitohabitatEnum(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 fieldseekerQamosquitoinspectionMods) RandomMosquitohabitatNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Mosquitohabitat = func() null.Val[enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQamosquitohabitatEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Habvalue1(val null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue1 = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) Habvalue1Func(f func() null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue1 = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetHabvalue1() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue1 = 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 fieldseekerQamosquitoinspectionMods) RandomHabvalue1(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue1 = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerQamosquitoinspectionMods) RandomHabvalue1NotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue1 = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Habvalue1percent(val null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue1percent = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) Habvalue1percentFunc(f func() null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue1percent = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetHabvalue1percent() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue1percent = 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 fieldseekerQamosquitoinspectionMods) RandomHabvalue1percent(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue1percent = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerQamosquitoinspectionMods) RandomHabvalue1percentNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue1percent = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Habvalue2(val null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue2 = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) Habvalue2Func(f func() null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetHabvalue2() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue2 = 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 fieldseekerQamosquitoinspectionMods) RandomHabvalue2(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue2 = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerQamosquitoinspectionMods) RandomHabvalue2NotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue2 = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Habvalue2percent(val null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue2percent = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) Habvalue2percentFunc(f func() null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue2percent = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetHabvalue2percent() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue2percent = 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 fieldseekerQamosquitoinspectionMods) RandomHabvalue2percent(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue2percent = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerQamosquitoinspectionMods) RandomHabvalue2percentNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Habvalue2percent = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Potential(val null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Potential = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) PotentialFunc(f func() null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Potential = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetPotential() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Potential = 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 fieldseekerQamosquitoinspectionMods) RandomPotential(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Potential = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerQamosquitoinspectionMods) RandomPotentialNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Potential = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Larvaepresent(val null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaepresent = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) LarvaepresentFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaepresent = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetLarvaepresent() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaepresent = 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 fieldseekerQamosquitoinspectionMods) RandomLarvaepresent(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaepresent = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(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 fieldseekerQamosquitoinspectionMods) RandomLarvaepresentNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaepresent = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Larvaeinsidetreatedarea(val null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaeinsidetreatedarea = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) LarvaeinsidetreatedareaFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaeinsidetreatedarea = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetLarvaeinsidetreatedarea() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaeinsidetreatedarea = 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 fieldseekerQamosquitoinspectionMods) RandomLarvaeinsidetreatedarea(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaeinsidetreatedarea = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(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 fieldseekerQamosquitoinspectionMods) RandomLarvaeinsidetreatedareaNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaeinsidetreatedarea = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Larvaeoutsidetreatedarea(val null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaeoutsidetreatedarea = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) LarvaeoutsidetreatedareaFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaeoutsidetreatedarea = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetLarvaeoutsidetreatedarea() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaeoutsidetreatedarea = 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 fieldseekerQamosquitoinspectionMods) RandomLarvaeoutsidetreatedarea(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaeoutsidetreatedarea = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(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 fieldseekerQamosquitoinspectionMods) RandomLarvaeoutsidetreatedareaNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaeoutsidetreatedarea = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Larvaereason(val null.Val[enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaereason = func() null.Val[enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) LarvaereasonFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaereason = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetLarvaereason() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaereason = 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 fieldseekerQamosquitoinspectionMods) RandomLarvaereason(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaereason = func() null.Val[enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQalarvaereasonEnum(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 fieldseekerQamosquitoinspectionMods) RandomLarvaereasonNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Larvaereason = func() null.Val[enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQalarvaereasonEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Aquaticorganisms(val null.Val[enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Aquaticorganisms = func() null.Val[enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) AquaticorganismsFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Aquaticorganisms = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetAquaticorganisms() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Aquaticorganisms = 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 fieldseekerQamosquitoinspectionMods) RandomAquaticorganisms(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Aquaticorganisms = func() null.Val[enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQaaquaticorganismsEnum(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 fieldseekerQamosquitoinspectionMods) RandomAquaticorganismsNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Aquaticorganisms = func() null.Val[enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQaaquaticorganismsEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Vegetation(val null.Val[enums.FieldseekerQamosquitoinspectionQavegetationEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Vegetation = func() null.Val[enums.FieldseekerQamosquitoinspectionQavegetationEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) VegetationFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionQavegetationEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Vegetation = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetVegetation() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Vegetation = 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 fieldseekerQamosquitoinspectionMods) RandomVegetation(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Vegetation = func() null.Val[enums.FieldseekerQamosquitoinspectionQavegetationEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQavegetationEnum(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 fieldseekerQamosquitoinspectionMods) RandomVegetationNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Vegetation = func() null.Val[enums.FieldseekerQamosquitoinspectionQavegetationEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQavegetationEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Sourcereduction(val null.Val[enums.FieldseekerQamosquitoinspectionQasourcereductionEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Sourcereduction = func() null.Val[enums.FieldseekerQamosquitoinspectionQasourcereductionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) SourcereductionFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionQasourcereductionEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Sourcereduction = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetSourcereduction() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Sourcereduction = 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 fieldseekerQamosquitoinspectionMods) RandomSourcereduction(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Sourcereduction = func() null.Val[enums.FieldseekerQamosquitoinspectionQasourcereductionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQasourcereductionEnum(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 fieldseekerQamosquitoinspectionMods) RandomSourcereductionNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Sourcereduction = func() null.Val[enums.FieldseekerQamosquitoinspectionQasourcereductionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQasourcereductionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Waterpresent(val null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterpresent = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) WaterpresentFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterpresent = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetWaterpresent() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterpresent = 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 fieldseekerQamosquitoinspectionMods) RandomWaterpresent(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterpresent = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(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 fieldseekerQamosquitoinspectionMods) RandomWaterpresentNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterpresent = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Watermovement1(val null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement1 = func() null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) Watermovement1Func(f func() null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement1 = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetWatermovement1() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement1 = 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 fieldseekerQamosquitoinspectionMods) RandomWatermovement1(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement1 = func() null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQawatermovementEnum(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 fieldseekerQamosquitoinspectionMods) RandomWatermovement1NotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement1 = func() null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQawatermovementEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Watermovement1percent(val null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement1percent = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) Watermovement1percentFunc(f func() null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement1percent = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetWatermovement1percent() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement1percent = 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 fieldseekerQamosquitoinspectionMods) RandomWatermovement1percent(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement1percent = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerQamosquitoinspectionMods) RandomWatermovement1percentNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement1percent = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Watermovement2(val null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement2 = func() null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) Watermovement2Func(f func() null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetWatermovement2() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement2 = 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 fieldseekerQamosquitoinspectionMods) RandomWatermovement2(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement2 = func() null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQawatermovementEnum(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 fieldseekerQamosquitoinspectionMods) RandomWatermovement2NotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement2 = func() null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQawatermovementEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Watermovement2percent(val null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement2percent = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) Watermovement2percentFunc(f func() null.Val[int16]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement2percent = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetWatermovement2percent() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement2percent = 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 fieldseekerQamosquitoinspectionMods) RandomWatermovement2percent(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement2percent = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerQamosquitoinspectionMods) RandomWatermovement2percentNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watermovement2percent = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Soilconditions(val null.Val[enums.FieldseekerQamosquitoinspectionQasoilconditionEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Soilconditions = func() null.Val[enums.FieldseekerQamosquitoinspectionQasoilconditionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) SoilconditionsFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionQasoilconditionEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Soilconditions = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetSoilconditions() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Soilconditions = 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 fieldseekerQamosquitoinspectionMods) RandomSoilconditions(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Soilconditions = func() null.Val[enums.FieldseekerQamosquitoinspectionQasoilconditionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQasoilconditionEnum(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 fieldseekerQamosquitoinspectionMods) RandomSoilconditionsNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Soilconditions = func() null.Val[enums.FieldseekerQamosquitoinspectionQasoilconditionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQasoilconditionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Waterduration(val null.Val[enums.FieldseekerQamosquitoinspectionQawaterdurationEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterduration = func() null.Val[enums.FieldseekerQamosquitoinspectionQawaterdurationEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) WaterdurationFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionQawaterdurationEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterduration = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetWaterduration() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterduration = 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 fieldseekerQamosquitoinspectionMods) RandomWaterduration(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterduration = func() null.Val[enums.FieldseekerQamosquitoinspectionQawaterdurationEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQawaterdurationEnum(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 fieldseekerQamosquitoinspectionMods) RandomWaterdurationNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterduration = func() null.Val[enums.FieldseekerQamosquitoinspectionQawaterdurationEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQawaterdurationEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Watersource(val null.Val[enums.FieldseekerQamosquitoinspectionQawatersourceEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watersource = func() null.Val[enums.FieldseekerQamosquitoinspectionQawatersourceEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) WatersourceFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionQawatersourceEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watersource = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetWatersource() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watersource = 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 fieldseekerQamosquitoinspectionMods) RandomWatersource(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watersource = func() null.Val[enums.FieldseekerQamosquitoinspectionQawatersourceEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQawatersourceEnum(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 fieldseekerQamosquitoinspectionMods) RandomWatersourceNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Watersource = func() null.Val[enums.FieldseekerQamosquitoinspectionQawatersourceEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQawatersourceEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Waterconditions(val null.Val[enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterconditions = func() null.Val[enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) WaterconditionsFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterconditions = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetWaterconditions() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterconditions = 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 fieldseekerQamosquitoinspectionMods) RandomWaterconditions(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterconditions = func() null.Val[enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQawaterconditionsEnum(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 fieldseekerQamosquitoinspectionMods) RandomWaterconditionsNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Waterconditions = func() null.Val[enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionQawaterconditionsEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Adultactivity(val null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Adultactivity = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) AdultactivityFunc(f func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Adultactivity = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetAdultactivity() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Adultactivity = 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 fieldseekerQamosquitoinspectionMods) RandomAdultactivity(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Adultactivity = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(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 fieldseekerQamosquitoinspectionMods) RandomAdultactivityNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Adultactivity = func() null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerQamosquitoinspectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Linelocid(val null.Val[uuid.UUID]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Linelocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) LinelocidFunc(f func() null.Val[uuid.UUID]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Linelocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetLinelocid() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Linelocid = 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 fieldseekerQamosquitoinspectionMods) RandomLinelocid(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Linelocid = 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 fieldseekerQamosquitoinspectionMods) RandomLinelocidNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Linelocid = 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 fieldseekerQamosquitoinspectionMods) Pointlocid(val null.Val[uuid.UUID]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Pointlocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) PointlocidFunc(f func() null.Val[uuid.UUID]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Pointlocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetPointlocid() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Pointlocid = 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 fieldseekerQamosquitoinspectionMods) RandomPointlocid(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Pointlocid = 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 fieldseekerQamosquitoinspectionMods) RandomPointlocidNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Pointlocid = 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 fieldseekerQamosquitoinspectionMods) Polygonlocid(val null.Val[uuid.UUID]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Polygonlocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) PolygonlocidFunc(f func() null.Val[uuid.UUID]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Polygonlocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetPolygonlocid() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Polygonlocid = 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 fieldseekerQamosquitoinspectionMods) RandomPolygonlocid(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Polygonlocid = 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 fieldseekerQamosquitoinspectionMods) RandomPolygonlocidNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Polygonlocid = 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 fieldseekerQamosquitoinspectionMods) CreatedUser(val null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetCreatedUser() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.CreatedUser = 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 fieldseekerQamosquitoinspectionMods) RandomCreatedUser(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerQamosquitoinspectionMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) CreatedDate(val null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetCreatedDate() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.CreatedDate = 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 fieldseekerQamosquitoinspectionMods) RandomCreatedDate(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerQamosquitoinspectionMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) LastEditedUser(val null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetLastEditedUser() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LastEditedUser = 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 fieldseekerQamosquitoinspectionMods) RandomLastEditedUser(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerQamosquitoinspectionMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) LastEditedDate(val null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetLastEditedDate() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LastEditedDate = 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 fieldseekerQamosquitoinspectionMods) RandomLastEditedDate(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerQamosquitoinspectionMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Fieldtech(val null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Fieldtech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) FieldtechFunc(f func() null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Fieldtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetFieldtech() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Fieldtech = 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 fieldseekerQamosquitoinspectionMods) RandomFieldtech(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerQamosquitoinspectionMods) RandomFieldtechNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Creationdate(val null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetCreationdate() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Creationdate = 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 fieldseekerQamosquitoinspectionMods) RandomCreationdate(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerQamosquitoinspectionMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Creator(val null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) CreatorFunc(f func() null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetCreator() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Creator = 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 fieldseekerQamosquitoinspectionMods) RandomCreator(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerQamosquitoinspectionMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Editdate(val null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetEditdate() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Editdate = 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 fieldseekerQamosquitoinspectionMods) RandomEditdate(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerQamosquitoinspectionMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerQamosquitoinspectionMods) Editor(val null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerQamosquitoinspectionMods) EditorFunc(f func() null.Val[string]) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerQamosquitoinspectionMods) UnsetEditor() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Editor = 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 fieldseekerQamosquitoinspectionMods) RandomEditor(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerQamosquitoinspectionMods) RandomEditorNotNull(f *faker.Faker) FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(_ context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +func (m fieldseekerQamosquitoinspectionMods) WithParentsCascading() FieldseekerQamosquitoinspectionMod { + return FieldseekerQamosquitoinspectionModFunc(func(ctx context.Context, o *FieldseekerQamosquitoinspectionTemplate) { + if isDone, _ := fieldseekerQamosquitoinspectionWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerQamosquitoinspectionWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.qaproductobservation.bob.go b/db/factory/fieldseeker.qaproductobservation.bob.go new file mode 100644 index 00000000..006d9e17 --- /dev/null +++ b/db/factory/fieldseeker.qaproductobservation.bob.go @@ -0,0 +1,91 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerQaproductobservationMod interface { + Apply(context.Context, *FieldseekerQaproductobservationTemplate) +} + +type FieldseekerQaproductobservationModFunc func(context.Context, *FieldseekerQaproductobservationTemplate) + +func (f FieldseekerQaproductobservationModFunc) Apply(ctx context.Context, n *FieldseekerQaproductobservationTemplate) { + f(ctx, n) +} + +type FieldseekerQaproductobservationModSlice []FieldseekerQaproductobservationMod + +func (mods FieldseekerQaproductobservationModSlice) Apply(ctx context.Context, n *FieldseekerQaproductobservationTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerQaproductobservationTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerQaproductobservationTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerQaproductobservationTemplate +func (o *FieldseekerQaproductobservationTemplate) Apply(ctx context.Context, mods ...FieldseekerQaproductobservationMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerQaproductobservation +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerQaproductobservationTemplate) setModelRels(o *models.FieldseekerQaproductobservation) { +} + +// Build returns an *models.FieldseekerQaproductobservation +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerQaproductobservationTemplate.Create +func (o FieldseekerQaproductobservationTemplate) Build() *models.FieldseekerQaproductobservation { + m := &models.FieldseekerQaproductobservation{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerQaproductobservationSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerQaproductobservationTemplate.CreateMany +func (o FieldseekerQaproductobservationTemplate) BuildMany(number int) models.FieldseekerQaproductobservationSlice { + m := make(models.FieldseekerQaproductobservationSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerQaproductobservation has methods that act as mods for the FieldseekerQaproductobservationTemplate +var FieldseekerQaproductobservationMods fieldseekerQaproductobservationMods + +type fieldseekerQaproductobservationMods struct{} + +func (m fieldseekerQaproductobservationMods) RandomizeAllColumns(f *faker.Faker) FieldseekerQaproductobservationMod { + return FieldseekerQaproductobservationModSlice{} +} + +func (m fieldseekerQaproductobservationMods) WithParentsCascading() FieldseekerQaproductobservationMod { + return FieldseekerQaproductobservationModFunc(func(ctx context.Context, o *FieldseekerQaproductobservationTemplate) { + if isDone, _ := fieldseekerQaproductobservationWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerQaproductobservationWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.restrictedarea.bob.go b/db/factory/fieldseeker.restrictedarea.bob.go new file mode 100644 index 00000000..184502a2 --- /dev/null +++ b/db/factory/fieldseeker.restrictedarea.bob.go @@ -0,0 +1,90 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerRestrictedareaMod interface { + Apply(context.Context, *FieldseekerRestrictedareaTemplate) +} + +type FieldseekerRestrictedareaModFunc func(context.Context, *FieldseekerRestrictedareaTemplate) + +func (f FieldseekerRestrictedareaModFunc) Apply(ctx context.Context, n *FieldseekerRestrictedareaTemplate) { + f(ctx, n) +} + +type FieldseekerRestrictedareaModSlice []FieldseekerRestrictedareaMod + +func (mods FieldseekerRestrictedareaModSlice) Apply(ctx context.Context, n *FieldseekerRestrictedareaTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerRestrictedareaTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerRestrictedareaTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerRestrictedareaTemplate +func (o *FieldseekerRestrictedareaTemplate) Apply(ctx context.Context, mods ...FieldseekerRestrictedareaMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerRestrictedarea +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerRestrictedareaTemplate) setModelRels(o *models.FieldseekerRestrictedarea) {} + +// Build returns an *models.FieldseekerRestrictedarea +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerRestrictedareaTemplate.Create +func (o FieldseekerRestrictedareaTemplate) Build() *models.FieldseekerRestrictedarea { + m := &models.FieldseekerRestrictedarea{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerRestrictedareaSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerRestrictedareaTemplate.CreateMany +func (o FieldseekerRestrictedareaTemplate) BuildMany(number int) models.FieldseekerRestrictedareaSlice { + m := make(models.FieldseekerRestrictedareaSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerRestrictedarea has methods that act as mods for the FieldseekerRestrictedareaTemplate +var FieldseekerRestrictedareaMods fieldseekerRestrictedareaMods + +type fieldseekerRestrictedareaMods struct{} + +func (m fieldseekerRestrictedareaMods) RandomizeAllColumns(f *faker.Faker) FieldseekerRestrictedareaMod { + return FieldseekerRestrictedareaModSlice{} +} + +func (m fieldseekerRestrictedareaMods) WithParentsCascading() FieldseekerRestrictedareaMod { + return FieldseekerRestrictedareaModFunc(func(ctx context.Context, o *FieldseekerRestrictedareaTemplate) { + if isDone, _ := fieldseekerRestrictedareaWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerRestrictedareaWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.rodentinspection.bob.go b/db/factory/fieldseeker.rodentinspection.bob.go new file mode 100644 index 00000000..72d766a0 --- /dev/null +++ b/db/factory/fieldseeker.rodentinspection.bob.go @@ -0,0 +1,90 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerRodentinspectionMod interface { + Apply(context.Context, *FieldseekerRodentinspectionTemplate) +} + +type FieldseekerRodentinspectionModFunc func(context.Context, *FieldseekerRodentinspectionTemplate) + +func (f FieldseekerRodentinspectionModFunc) Apply(ctx context.Context, n *FieldseekerRodentinspectionTemplate) { + f(ctx, n) +} + +type FieldseekerRodentinspectionModSlice []FieldseekerRodentinspectionMod + +func (mods FieldseekerRodentinspectionModSlice) Apply(ctx context.Context, n *FieldseekerRodentinspectionTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerRodentinspectionTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerRodentinspectionTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerRodentinspectionTemplate +func (o *FieldseekerRodentinspectionTemplate) Apply(ctx context.Context, mods ...FieldseekerRodentinspectionMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerRodentinspection +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerRodentinspectionTemplate) setModelRels(o *models.FieldseekerRodentinspection) {} + +// Build returns an *models.FieldseekerRodentinspection +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerRodentinspectionTemplate.Create +func (o FieldseekerRodentinspectionTemplate) Build() *models.FieldseekerRodentinspection { + m := &models.FieldseekerRodentinspection{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerRodentinspectionSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerRodentinspectionTemplate.CreateMany +func (o FieldseekerRodentinspectionTemplate) BuildMany(number int) models.FieldseekerRodentinspectionSlice { + m := make(models.FieldseekerRodentinspectionSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerRodentinspection has methods that act as mods for the FieldseekerRodentinspectionTemplate +var FieldseekerRodentinspectionMods fieldseekerRodentinspectionMods + +type fieldseekerRodentinspectionMods struct{} + +func (m fieldseekerRodentinspectionMods) RandomizeAllColumns(f *faker.Faker) FieldseekerRodentinspectionMod { + return FieldseekerRodentinspectionModSlice{} +} + +func (m fieldseekerRodentinspectionMods) WithParentsCascading() FieldseekerRodentinspectionMod { + return FieldseekerRodentinspectionModFunc(func(ctx context.Context, o *FieldseekerRodentinspectionTemplate) { + if isDone, _ := fieldseekerRodentinspectionWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerRodentinspectionWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.rodentlocation.bob.go b/db/factory/fieldseeker.rodentlocation.bob.go new file mode 100644 index 00000000..d71b2423 --- /dev/null +++ b/db/factory/fieldseeker.rodentlocation.bob.go @@ -0,0 +1,2168 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerRodentlocationMod interface { + Apply(context.Context, *FieldseekerRodentlocationTemplate) +} + +type FieldseekerRodentlocationModFunc func(context.Context, *FieldseekerRodentlocationTemplate) + +func (f FieldseekerRodentlocationModFunc) Apply(ctx context.Context, n *FieldseekerRodentlocationTemplate) { + f(ctx, n) +} + +type FieldseekerRodentlocationModSlice []FieldseekerRodentlocationMod + +func (mods FieldseekerRodentlocationModSlice) Apply(ctx context.Context, n *FieldseekerRodentlocationTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerRodentlocationTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerRodentlocationTemplate struct { + OrganizationID func() int32 + Objectid func() int64 + Locationname func() null.Val[string] + Zone func() null.Val[string] + Zone2 func() null.Val[string] + Habitat func() null.Val[enums.FieldseekerRodentlocationRodentlocationhabitatEnum] + Priority func() null.Val[enums.FieldseekerRodentlocationLocationpriority1Enum] + Usetype func() null.Val[enums.FieldseekerRodentlocationLocationusetype1Enum] + Active func() null.Val[enums.FieldseekerRodentlocationNotinuitF1Enum] + Description func() null.Val[string] + Accessdesc func() null.Val[string] + Comments func() null.Val[string] + Symbology func() null.Val[enums.FieldseekerRodentlocationRodentlocationSymbologyEnum] + Externalid func() null.Val[string] + Nextactiondatescheduled func() null.Val[time.Time] + Locationnumber func() null.Val[int32] + Lastinspectdate func() null.Val[time.Time] + Lastinspectspecies func() null.Val[string] + Lastinspectaction func() null.Val[string] + Lastinspectconditions func() null.Val[string] + Lastinspectrodentevidence func() null.Val[string] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Jurisdiction func() null.Val[string] + + r fieldseekerRodentlocationR + f *Factory + + alreadyPersisted bool +} + +type fieldseekerRodentlocationR struct { + Organization *fieldseekerRodentlocationROrganizationR +} + +type fieldseekerRodentlocationROrganizationR struct { + o *OrganizationTemplate +} + +// Apply mods to the FieldseekerRodentlocationTemplate +func (o *FieldseekerRodentlocationTemplate) Apply(ctx context.Context, mods ...FieldseekerRodentlocationMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerRodentlocation +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerRodentlocationTemplate) setModelRels(o *models.FieldseekerRodentlocation) { + if t.r.Organization != nil { + rel := t.r.Organization.o.Build() + rel.R.Rodentlocations = append(rel.R.Rodentlocations, o) + o.OrganizationID = rel.ID // h2 + o.R.Organization = rel + } +} + +// BuildSetter returns an *models.FieldseekerRodentlocationSetter +// this does nothing with the relationship templates +func (o FieldseekerRodentlocationTemplate) BuildSetter() *models.FieldseekerRodentlocationSetter { + m := &models.FieldseekerRodentlocationSetter{} + + if o.OrganizationID != nil { + val := o.OrganizationID() + m.OrganizationID = omit.From(val) + } + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Locationname != nil { + val := o.Locationname() + m.Locationname = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Habitat != nil { + val := o.Habitat() + m.Habitat = omitnull.FromNull(val) + } + if o.Priority != nil { + val := o.Priority() + m.Priority = omitnull.FromNull(val) + } + if o.Usetype != nil { + val := o.Usetype() + m.Usetype = omitnull.FromNull(val) + } + if o.Active != nil { + val := o.Active() + m.Active = omitnull.FromNull(val) + } + if o.Description != nil { + val := o.Description() + m.Description = omitnull.FromNull(val) + } + if o.Accessdesc != nil { + val := o.Accessdesc() + m.Accessdesc = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Symbology != nil { + val := o.Symbology() + m.Symbology = omitnull.FromNull(val) + } + if o.Externalid != nil { + val := o.Externalid() + m.Externalid = omitnull.FromNull(val) + } + if o.Nextactiondatescheduled != nil { + val := o.Nextactiondatescheduled() + m.Nextactiondatescheduled = omitnull.FromNull(val) + } + if o.Locationnumber != nil { + val := o.Locationnumber() + m.Locationnumber = omitnull.FromNull(val) + } + if o.Lastinspectdate != nil { + val := o.Lastinspectdate() + m.Lastinspectdate = omitnull.FromNull(val) + } + if o.Lastinspectspecies != nil { + val := o.Lastinspectspecies() + m.Lastinspectspecies = omitnull.FromNull(val) + } + if o.Lastinspectaction != nil { + val := o.Lastinspectaction() + m.Lastinspectaction = omitnull.FromNull(val) + } + if o.Lastinspectconditions != nil { + val := o.Lastinspectconditions() + m.Lastinspectconditions = omitnull.FromNull(val) + } + if o.Lastinspectrodentevidence != nil { + val := o.Lastinspectrodentevidence() + m.Lastinspectrodentevidence = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Jurisdiction != nil { + val := o.Jurisdiction() + m.Jurisdiction = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerRodentlocationSetter +// this does nothing with the relationship templates +func (o FieldseekerRodentlocationTemplate) BuildManySetter(number int) []*models.FieldseekerRodentlocationSetter { + m := make([]*models.FieldseekerRodentlocationSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerRodentlocation +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerRodentlocationTemplate.Create +func (o FieldseekerRodentlocationTemplate) Build() *models.FieldseekerRodentlocation { + m := &models.FieldseekerRodentlocation{} + + if o.OrganizationID != nil { + m.OrganizationID = o.OrganizationID() + } + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Locationname != nil { + m.Locationname = o.Locationname() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Habitat != nil { + m.Habitat = o.Habitat() + } + if o.Priority != nil { + m.Priority = o.Priority() + } + if o.Usetype != nil { + m.Usetype = o.Usetype() + } + if o.Active != nil { + m.Active = o.Active() + } + if o.Description != nil { + m.Description = o.Description() + } + if o.Accessdesc != nil { + m.Accessdesc = o.Accessdesc() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Symbology != nil { + m.Symbology = o.Symbology() + } + if o.Externalid != nil { + m.Externalid = o.Externalid() + } + if o.Nextactiondatescheduled != nil { + m.Nextactiondatescheduled = o.Nextactiondatescheduled() + } + if o.Locationnumber != nil { + m.Locationnumber = o.Locationnumber() + } + if o.Lastinspectdate != nil { + m.Lastinspectdate = o.Lastinspectdate() + } + if o.Lastinspectspecies != nil { + m.Lastinspectspecies = o.Lastinspectspecies() + } + if o.Lastinspectaction != nil { + m.Lastinspectaction = o.Lastinspectaction() + } + if o.Lastinspectconditions != nil { + m.Lastinspectconditions = o.Lastinspectconditions() + } + if o.Lastinspectrodentevidence != nil { + m.Lastinspectrodentevidence = o.Lastinspectrodentevidence() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Jurisdiction != nil { + m.Jurisdiction = o.Jurisdiction() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerRodentlocationSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerRodentlocationTemplate.CreateMany +func (o FieldseekerRodentlocationTemplate) BuildMany(number int) models.FieldseekerRodentlocationSlice { + m := make(models.FieldseekerRodentlocationSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerRodentlocation(m *models.FieldseekerRodentlocationSetter) { + if !(m.OrganizationID.IsValue()) { + val := random_int32(nil) + m.OrganizationID = omit.From(val) + } +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerRodentlocation +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerRodentlocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerRodentlocation) error { + var err error + + return err +} + +// Create builds a fieldseekerRodentlocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerRodentlocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerRodentlocation, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerRodentlocation(opt) + + if o.r.Organization == nil { + FieldseekerRodentlocationMods.WithNewOrganization().Apply(ctx, o) + } + + var rel0 *models.Organization + + if o.r.Organization.o.alreadyPersisted { + rel0 = o.r.Organization.o.Build() + } else { + rel0, err = o.r.Organization.o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + opt.OrganizationID = omit.From(rel0.ID) + + m, err := models.FieldseekerRodentlocations.Insert(opt).One(ctx, exec) + if err != nil { + return nil, err + } + + m.R.Organization = rel0 + + if err := o.insertOptRels(ctx, exec, m); err != nil { + return nil, err + } + return m, err +} + +// MustCreate builds a fieldseekerRodentlocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerRodentlocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerRodentlocation { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerRodentlocation 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 *FieldseekerRodentlocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerRodentlocation { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerRodentlocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerRodentlocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerRodentlocationSlice, error) { + var err error + m := make(models.FieldseekerRodentlocationSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerRodentlocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerRodentlocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerRodentlocationSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerRodentlocations 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 FieldseekerRodentlocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerRodentlocationSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerRodentlocation has methods that act as mods for the FieldseekerRodentlocationTemplate +var FieldseekerRodentlocationMods fieldseekerRodentlocationMods + +type fieldseekerRodentlocationMods struct{} + +func (m fieldseekerRodentlocationMods) RandomizeAllColumns(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModSlice{ + FieldseekerRodentlocationMods.RandomOrganizationID(f), + FieldseekerRodentlocationMods.RandomObjectid(f), + FieldseekerRodentlocationMods.RandomLocationname(f), + FieldseekerRodentlocationMods.RandomZone(f), + FieldseekerRodentlocationMods.RandomZone2(f), + FieldseekerRodentlocationMods.RandomHabitat(f), + FieldseekerRodentlocationMods.RandomPriority(f), + FieldseekerRodentlocationMods.RandomUsetype(f), + FieldseekerRodentlocationMods.RandomActive(f), + FieldseekerRodentlocationMods.RandomDescription(f), + FieldseekerRodentlocationMods.RandomAccessdesc(f), + FieldseekerRodentlocationMods.RandomComments(f), + FieldseekerRodentlocationMods.RandomSymbology(f), + FieldseekerRodentlocationMods.RandomExternalid(f), + FieldseekerRodentlocationMods.RandomNextactiondatescheduled(f), + FieldseekerRodentlocationMods.RandomLocationnumber(f), + FieldseekerRodentlocationMods.RandomLastinspectdate(f), + FieldseekerRodentlocationMods.RandomLastinspectspecies(f), + FieldseekerRodentlocationMods.RandomLastinspectaction(f), + FieldseekerRodentlocationMods.RandomLastinspectconditions(f), + FieldseekerRodentlocationMods.RandomLastinspectrodentevidence(f), + FieldseekerRodentlocationMods.RandomGlobalid(f), + FieldseekerRodentlocationMods.RandomCreatedUser(f), + FieldseekerRodentlocationMods.RandomCreatedDate(f), + FieldseekerRodentlocationMods.RandomLastEditedUser(f), + FieldseekerRodentlocationMods.RandomLastEditedDate(f), + FieldseekerRodentlocationMods.RandomCreationdate(f), + FieldseekerRodentlocationMods.RandomCreator(f), + FieldseekerRodentlocationMods.RandomEditdate(f), + FieldseekerRodentlocationMods.RandomEditor(f), + FieldseekerRodentlocationMods.RandomJurisdiction(f), + } +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) OrganizationID(val int32) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.OrganizationID = func() int32 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) OrganizationIDFunc(f func() int32) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.OrganizationID = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetOrganizationID() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.OrganizationID = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerRodentlocationMods) RandomOrganizationID(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.OrganizationID = func() int32 { + return random_int32(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Objectid(val int64) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) ObjectidFunc(f func() int64) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetObjectid() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerRodentlocationMods) RandomObjectid(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Locationname(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Locationname = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) LocationnameFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Locationname = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetLocationname() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Locationname = 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 fieldseekerRodentlocationMods) RandomLocationname(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerRodentlocationMods) RandomLocationnameNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Zone(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) ZoneFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetZone() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Zone = 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 fieldseekerRodentlocationMods) RandomZone(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerRodentlocationMods) RandomZoneNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Zone2(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) Zone2Func(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetZone2() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Zone2 = 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 fieldseekerRodentlocationMods) RandomZone2(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerRodentlocationMods) RandomZone2NotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Habitat(val null.Val[enums.FieldseekerRodentlocationRodentlocationhabitatEnum]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerRodentlocationRodentlocationhabitatEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) HabitatFunc(f func() null.Val[enums.FieldseekerRodentlocationRodentlocationhabitatEnum]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Habitat = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetHabitat() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Habitat = 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 fieldseekerRodentlocationMods) RandomHabitat(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerRodentlocationRodentlocationhabitatEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerRodentlocationRodentlocationhabitatEnum(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 fieldseekerRodentlocationMods) RandomHabitatNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerRodentlocationRodentlocationhabitatEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerRodentlocationRodentlocationhabitatEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Priority(val null.Val[enums.FieldseekerRodentlocationLocationpriority1Enum]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerRodentlocationLocationpriority1Enum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) PriorityFunc(f func() null.Val[enums.FieldseekerRodentlocationLocationpriority1Enum]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Priority = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetPriority() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Priority = 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 fieldseekerRodentlocationMods) RandomPriority(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerRodentlocationLocationpriority1Enum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerRodentlocationLocationpriority1Enum(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 fieldseekerRodentlocationMods) RandomPriorityNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerRodentlocationLocationpriority1Enum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerRodentlocationLocationpriority1Enum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Usetype(val null.Val[enums.FieldseekerRodentlocationLocationusetype1Enum]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerRodentlocationLocationusetype1Enum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) UsetypeFunc(f func() null.Val[enums.FieldseekerRodentlocationLocationusetype1Enum]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Usetype = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetUsetype() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Usetype = 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 fieldseekerRodentlocationMods) RandomUsetype(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerRodentlocationLocationusetype1Enum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerRodentlocationLocationusetype1Enum(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 fieldseekerRodentlocationMods) RandomUsetypeNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerRodentlocationLocationusetype1Enum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerRodentlocationLocationusetype1Enum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Active(val null.Val[enums.FieldseekerRodentlocationNotinuitF1Enum]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerRodentlocationNotinuitF1Enum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) ActiveFunc(f func() null.Val[enums.FieldseekerRodentlocationNotinuitF1Enum]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Active = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetActive() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Active = 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 fieldseekerRodentlocationMods) RandomActive(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerRodentlocationNotinuitF1Enum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerRodentlocationNotinuitF1Enum(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 fieldseekerRodentlocationMods) RandomActiveNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerRodentlocationNotinuitF1Enum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerRodentlocationNotinuitF1Enum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Description(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Description = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) DescriptionFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Description = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetDescription() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Description = 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 fieldseekerRodentlocationMods) RandomDescription(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerRodentlocationMods) RandomDescriptionNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Accessdesc(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Accessdesc = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) AccessdescFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Accessdesc = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetAccessdesc() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Accessdesc = 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 fieldseekerRodentlocationMods) RandomAccessdesc(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Accessdesc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerRodentlocationMods) RandomAccessdescNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Accessdesc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Comments(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) CommentsFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetComments() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Comments = 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 fieldseekerRodentlocationMods) RandomComments(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerRodentlocationMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Symbology(val null.Val[enums.FieldseekerRodentlocationRodentlocationSymbologyEnum]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerRodentlocationRodentlocationSymbologyEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) SymbologyFunc(f func() null.Val[enums.FieldseekerRodentlocationRodentlocationSymbologyEnum]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Symbology = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetSymbology() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Symbology = 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 fieldseekerRodentlocationMods) RandomSymbology(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerRodentlocationRodentlocationSymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerRodentlocationRodentlocationSymbologyEnum(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 fieldseekerRodentlocationMods) RandomSymbologyNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerRodentlocationRodentlocationSymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerRodentlocationRodentlocationSymbologyEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Externalid(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Externalid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) ExternalidFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Externalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetExternalid() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Externalid = 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 fieldseekerRodentlocationMods) RandomExternalid(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerRodentlocationMods) RandomExternalidNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Nextactiondatescheduled(val null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) NextactiondatescheduledFunc(f func() null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Nextactiondatescheduled = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetNextactiondatescheduled() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Nextactiondatescheduled = 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 fieldseekerRodentlocationMods) RandomNextactiondatescheduled(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerRodentlocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Locationnumber(val null.Val[int32]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Locationnumber = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) LocationnumberFunc(f func() null.Val[int32]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Locationnumber = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetLocationnumber() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Locationnumber = 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 fieldseekerRodentlocationMods) RandomLocationnumber(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Locationnumber = 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 fieldseekerRodentlocationMods) RandomLocationnumberNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Locationnumber = 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 fieldseekerRodentlocationMods) Lastinspectdate(val null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) LastinspectdateFunc(f func() null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetLastinspectdate() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectdate = 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 fieldseekerRodentlocationMods) RandomLastinspectdate(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerRodentlocationMods) RandomLastinspectdateNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Lastinspectspecies(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectspecies = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) LastinspectspeciesFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectspecies = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetLastinspectspecies() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectspecies = 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 fieldseekerRodentlocationMods) RandomLastinspectspecies(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerRodentlocationMods) RandomLastinspectspeciesNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Lastinspectaction(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectaction = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) LastinspectactionFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectaction = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetLastinspectaction() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectaction = 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 fieldseekerRodentlocationMods) RandomLastinspectaction(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectaction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerRodentlocationMods) RandomLastinspectactionNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectaction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Lastinspectconditions(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) LastinspectconditionsFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectconditions = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetLastinspectconditions() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectconditions = 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 fieldseekerRodentlocationMods) RandomLastinspectconditions(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerRodentlocationMods) RandomLastinspectconditionsNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectconditions = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Lastinspectrodentevidence(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectrodentevidence = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) LastinspectrodentevidenceFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectrodentevidence = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetLastinspectrodentevidence() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectrodentevidence = 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 fieldseekerRodentlocationMods) RandomLastinspectrodentevidence(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectrodentevidence = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerRodentlocationMods) RandomLastinspectrodentevidenceNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Lastinspectrodentevidence = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Globalid(val null.Val[uuid.UUID]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetGlobalid() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Globalid = 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 fieldseekerRodentlocationMods) RandomGlobalid(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Globalid = 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 fieldseekerRodentlocationMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Globalid = 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 fieldseekerRodentlocationMods) CreatedUser(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetCreatedUser() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.CreatedUser = 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 fieldseekerRodentlocationMods) RandomCreatedUser(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerRodentlocationMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) CreatedDate(val null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetCreatedDate() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.CreatedDate = 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 fieldseekerRodentlocationMods) RandomCreatedDate(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerRodentlocationMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) LastEditedUser(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetLastEditedUser() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.LastEditedUser = 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 fieldseekerRodentlocationMods) RandomLastEditedUser(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerRodentlocationMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) LastEditedDate(val null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetLastEditedDate() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.LastEditedDate = 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 fieldseekerRodentlocationMods) RandomLastEditedDate(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerRodentlocationMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Creationdate(val null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetCreationdate() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Creationdate = 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 fieldseekerRodentlocationMods) RandomCreationdate(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerRodentlocationMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Creator(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) CreatorFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetCreator() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Creator = 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 fieldseekerRodentlocationMods) RandomCreator(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerRodentlocationMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Editdate(val null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetEditdate() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Editdate = 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 fieldseekerRodentlocationMods) RandomEditdate(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerRodentlocationMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Editor(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) EditorFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetEditor() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Editor = 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 fieldseekerRodentlocationMods) RandomEditor(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerRodentlocationMods) RandomEditorNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerRodentlocationMods) Jurisdiction(val null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Jurisdiction = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerRodentlocationMods) JurisdictionFunc(f func() null.Val[string]) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Jurisdiction = f + }) +} + +// Clear any values for the column +func (m fieldseekerRodentlocationMods) UnsetJurisdiction() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Jurisdiction = 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 fieldseekerRodentlocationMods) RandomJurisdiction(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerRodentlocationMods) RandomJurisdictionNotNull(f *faker.Faker) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(_ context.Context, o *FieldseekerRodentlocationTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +func (m fieldseekerRodentlocationMods) WithParentsCascading() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(ctx context.Context, o *FieldseekerRodentlocationTemplate) { + if isDone, _ := fieldseekerRodentlocationWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerRodentlocationWithParentsCascadingCtx.WithValue(ctx, true) + { + + related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading()) + m.WithOrganization(related).Apply(ctx, o) + } + }) +} + +func (m fieldseekerRodentlocationMods) WithOrganization(rel *OrganizationTemplate) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(ctx context.Context, o *FieldseekerRodentlocationTemplate) { + o.r.Organization = &fieldseekerRodentlocationROrganizationR{ + o: rel, + } + }) +} + +func (m fieldseekerRodentlocationMods) WithNewOrganization(mods ...OrganizationMod) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(ctx context.Context, o *FieldseekerRodentlocationTemplate) { + related := o.f.NewOrganizationWithContext(ctx, mods...) + + m.WithOrganization(related).Apply(ctx, o) + }) +} + +func (m fieldseekerRodentlocationMods) WithExistingOrganization(em *models.Organization) FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(ctx context.Context, o *FieldseekerRodentlocationTemplate) { + o.r.Organization = &fieldseekerRodentlocationROrganizationR{ + o: o.f.FromExistingOrganization(em), + } + }) +} + +func (m fieldseekerRodentlocationMods) WithoutOrganization() FieldseekerRodentlocationMod { + return FieldseekerRodentlocationModFunc(func(ctx context.Context, o *FieldseekerRodentlocationTemplate) { + o.r.Organization = nil + }) +} diff --git a/db/factory/fieldseeker.samplecollection.bob.go b/db/factory/fieldseeker.samplecollection.bob.go new file mode 100644 index 00000000..a4873006 --- /dev/null +++ b/db/factory/fieldseeker.samplecollection.bob.go @@ -0,0 +1,3046 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerSamplecollectionMod interface { + Apply(context.Context, *FieldseekerSamplecollectionTemplate) +} + +type FieldseekerSamplecollectionModFunc func(context.Context, *FieldseekerSamplecollectionTemplate) + +func (f FieldseekerSamplecollectionModFunc) Apply(ctx context.Context, n *FieldseekerSamplecollectionTemplate) { + f(ctx, n) +} + +type FieldseekerSamplecollectionModSlice []FieldseekerSamplecollectionMod + +func (mods FieldseekerSamplecollectionModSlice) Apply(ctx context.Context, n *FieldseekerSamplecollectionTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerSamplecollectionTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerSamplecollectionTemplate struct { + Objectid func() int64 + LocID func() null.Val[uuid.UUID] + Startdatetime func() null.Val[time.Time] + Enddatetime func() null.Val[time.Time] + Sitecond func() null.Val[enums.FieldseekerSamplecollectionMosquitositeconditionEnum] + Sampleid func() null.Val[string] + Survtech func() null.Val[string] + Datesent func() null.Val[time.Time] + Datetested func() null.Val[time.Time] + Testtech func() null.Val[string] + Comments func() null.Val[string] + Processed func() null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] + Sampletype func() null.Val[enums.FieldseekerSamplecollectionMosquitosampletypeEnum] + Samplecond func() null.Val[enums.FieldseekerSamplecollectionMosquitosampleconditionEnum] + Species func() null.Val[enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum] + Sex func() null.Val[enums.FieldseekerSamplecollectionNotinuisexEnum] + Avetemp func() null.Val[float64] + Windspeed func() null.Val[float64] + Winddir func() null.Val[enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum] + Raingauge func() null.Val[float64] + Activity func() null.Val[enums.FieldseekerSamplecollectionMosquitoactivityEnum] + Testmethod func() null.Val[enums.FieldseekerSamplecollectionMosquitotestmethodEnum] + Diseasetested func() null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] + Diseasepos func() null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] + Reviewed func() null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] + Reviewedby func() null.Val[string] + Revieweddate func() null.Val[time.Time] + Locationname func() null.Val[string] + Zone func() null.Val[string] + Recordstatus func() null.Val[int16] + Zone2 func() null.Val[string] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Lab func() null.Val[enums.FieldseekerSamplecollectionMosquitolabnameEnum] + Fieldtech func() null.Val[string] + Flockid func() null.Val[uuid.UUID] + Samplecount func() null.Val[int16] + Chickenid func() null.Val[uuid.UUID] + Gatewaysync func() null.Val[int16] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerSamplecollectionTemplate +func (o *FieldseekerSamplecollectionTemplate) Apply(ctx context.Context, mods ...FieldseekerSamplecollectionMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerSamplecollection +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerSamplecollectionTemplate) setModelRels(o *models.FieldseekerSamplecollection) {} + +// BuildSetter returns an *models.FieldseekerSamplecollectionSetter +// this does nothing with the relationship templates +func (o FieldseekerSamplecollectionTemplate) BuildSetter() *models.FieldseekerSamplecollectionSetter { + m := &models.FieldseekerSamplecollectionSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.LocID != nil { + val := o.LocID() + m.LocID = omitnull.FromNull(val) + } + if o.Startdatetime != nil { + val := o.Startdatetime() + m.Startdatetime = omitnull.FromNull(val) + } + if o.Enddatetime != nil { + val := o.Enddatetime() + m.Enddatetime = omitnull.FromNull(val) + } + if o.Sitecond != nil { + val := o.Sitecond() + m.Sitecond = omitnull.FromNull(val) + } + if o.Sampleid != nil { + val := o.Sampleid() + m.Sampleid = omitnull.FromNull(val) + } + if o.Survtech != nil { + val := o.Survtech() + m.Survtech = omitnull.FromNull(val) + } + if o.Datesent != nil { + val := o.Datesent() + m.Datesent = omitnull.FromNull(val) + } + if o.Datetested != nil { + val := o.Datetested() + m.Datetested = omitnull.FromNull(val) + } + if o.Testtech != nil { + val := o.Testtech() + m.Testtech = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Processed != nil { + val := o.Processed() + m.Processed = omitnull.FromNull(val) + } + if o.Sampletype != nil { + val := o.Sampletype() + m.Sampletype = omitnull.FromNull(val) + } + if o.Samplecond != nil { + val := o.Samplecond() + m.Samplecond = omitnull.FromNull(val) + } + if o.Species != nil { + val := o.Species() + m.Species = omitnull.FromNull(val) + } + if o.Sex != nil { + val := o.Sex() + m.Sex = omitnull.FromNull(val) + } + if o.Avetemp != nil { + val := o.Avetemp() + m.Avetemp = omitnull.FromNull(val) + } + if o.Windspeed != nil { + val := o.Windspeed() + m.Windspeed = omitnull.FromNull(val) + } + if o.Winddir != nil { + val := o.Winddir() + m.Winddir = omitnull.FromNull(val) + } + if o.Raingauge != nil { + val := o.Raingauge() + m.Raingauge = omitnull.FromNull(val) + } + if o.Activity != nil { + val := o.Activity() + m.Activity = omitnull.FromNull(val) + } + if o.Testmethod != nil { + val := o.Testmethod() + m.Testmethod = omitnull.FromNull(val) + } + if o.Diseasetested != nil { + val := o.Diseasetested() + m.Diseasetested = omitnull.FromNull(val) + } + if o.Diseasepos != nil { + val := o.Diseasepos() + m.Diseasepos = omitnull.FromNull(val) + } + if o.Reviewed != nil { + val := o.Reviewed() + m.Reviewed = omitnull.FromNull(val) + } + if o.Reviewedby != nil { + val := o.Reviewedby() + m.Reviewedby = omitnull.FromNull(val) + } + if o.Revieweddate != nil { + val := o.Revieweddate() + m.Revieweddate = omitnull.FromNull(val) + } + if o.Locationname != nil { + val := o.Locationname() + m.Locationname = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Recordstatus != nil { + val := o.Recordstatus() + m.Recordstatus = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Lab != nil { + val := o.Lab() + m.Lab = omitnull.FromNull(val) + } + if o.Fieldtech != nil { + val := o.Fieldtech() + m.Fieldtech = omitnull.FromNull(val) + } + if o.Flockid != nil { + val := o.Flockid() + m.Flockid = omitnull.FromNull(val) + } + if o.Samplecount != nil { + val := o.Samplecount() + m.Samplecount = omitnull.FromNull(val) + } + if o.Chickenid != nil { + val := o.Chickenid() + m.Chickenid = omitnull.FromNull(val) + } + if o.Gatewaysync != nil { + val := o.Gatewaysync() + m.Gatewaysync = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerSamplecollectionSetter +// this does nothing with the relationship templates +func (o FieldseekerSamplecollectionTemplate) BuildManySetter(number int) []*models.FieldseekerSamplecollectionSetter { + m := make([]*models.FieldseekerSamplecollectionSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerSamplecollection +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerSamplecollectionTemplate.Create +func (o FieldseekerSamplecollectionTemplate) Build() *models.FieldseekerSamplecollection { + m := &models.FieldseekerSamplecollection{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.LocID != nil { + m.LocID = o.LocID() + } + if o.Startdatetime != nil { + m.Startdatetime = o.Startdatetime() + } + if o.Enddatetime != nil { + m.Enddatetime = o.Enddatetime() + } + if o.Sitecond != nil { + m.Sitecond = o.Sitecond() + } + if o.Sampleid != nil { + m.Sampleid = o.Sampleid() + } + if o.Survtech != nil { + m.Survtech = o.Survtech() + } + if o.Datesent != nil { + m.Datesent = o.Datesent() + } + if o.Datetested != nil { + m.Datetested = o.Datetested() + } + if o.Testtech != nil { + m.Testtech = o.Testtech() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Processed != nil { + m.Processed = o.Processed() + } + if o.Sampletype != nil { + m.Sampletype = o.Sampletype() + } + if o.Samplecond != nil { + m.Samplecond = o.Samplecond() + } + if o.Species != nil { + m.Species = o.Species() + } + if o.Sex != nil { + m.Sex = o.Sex() + } + if o.Avetemp != nil { + m.Avetemp = o.Avetemp() + } + if o.Windspeed != nil { + m.Windspeed = o.Windspeed() + } + if o.Winddir != nil { + m.Winddir = o.Winddir() + } + if o.Raingauge != nil { + m.Raingauge = o.Raingauge() + } + if o.Activity != nil { + m.Activity = o.Activity() + } + if o.Testmethod != nil { + m.Testmethod = o.Testmethod() + } + if o.Diseasetested != nil { + m.Diseasetested = o.Diseasetested() + } + if o.Diseasepos != nil { + m.Diseasepos = o.Diseasepos() + } + if o.Reviewed != nil { + m.Reviewed = o.Reviewed() + } + if o.Reviewedby != nil { + m.Reviewedby = o.Reviewedby() + } + if o.Revieweddate != nil { + m.Revieweddate = o.Revieweddate() + } + if o.Locationname != nil { + m.Locationname = o.Locationname() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Recordstatus != nil { + m.Recordstatus = o.Recordstatus() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Lab != nil { + m.Lab = o.Lab() + } + if o.Fieldtech != nil { + m.Fieldtech = o.Fieldtech() + } + if o.Flockid != nil { + m.Flockid = o.Flockid() + } + if o.Samplecount != nil { + m.Samplecount = o.Samplecount() + } + if o.Chickenid != nil { + m.Chickenid = o.Chickenid() + } + if o.Gatewaysync != nil { + m.Gatewaysync = o.Gatewaysync() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerSamplecollectionSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerSamplecollectionTemplate.CreateMany +func (o FieldseekerSamplecollectionTemplate) BuildMany(number int) models.FieldseekerSamplecollectionSlice { + m := make(models.FieldseekerSamplecollectionSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerSamplecollection(m *models.FieldseekerSamplecollectionSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerSamplecollection +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerSamplecollectionTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerSamplecollection) error { + var err error + + return err +} + +// Create builds a fieldseekerSamplecollection and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerSamplecollectionTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerSamplecollection, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerSamplecollection(opt) + + m, err := models.FieldseekerSamplecollections.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 fieldseekerSamplecollection and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerSamplecollectionTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerSamplecollection { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerSamplecollection 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 *FieldseekerSamplecollectionTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerSamplecollection { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerSamplecollections and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerSamplecollectionTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerSamplecollectionSlice, error) { + var err error + m := make(models.FieldseekerSamplecollectionSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerSamplecollections and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerSamplecollectionTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerSamplecollectionSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerSamplecollections 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 FieldseekerSamplecollectionTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerSamplecollectionSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerSamplecollection has methods that act as mods for the FieldseekerSamplecollectionTemplate +var FieldseekerSamplecollectionMods fieldseekerSamplecollectionMods + +type fieldseekerSamplecollectionMods struct{} + +func (m fieldseekerSamplecollectionMods) RandomizeAllColumns(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModSlice{ + FieldseekerSamplecollectionMods.RandomObjectid(f), + FieldseekerSamplecollectionMods.RandomLocID(f), + FieldseekerSamplecollectionMods.RandomStartdatetime(f), + FieldseekerSamplecollectionMods.RandomEnddatetime(f), + FieldseekerSamplecollectionMods.RandomSitecond(f), + FieldseekerSamplecollectionMods.RandomSampleid(f), + FieldseekerSamplecollectionMods.RandomSurvtech(f), + FieldseekerSamplecollectionMods.RandomDatesent(f), + FieldseekerSamplecollectionMods.RandomDatetested(f), + FieldseekerSamplecollectionMods.RandomTesttech(f), + FieldseekerSamplecollectionMods.RandomComments(f), + FieldseekerSamplecollectionMods.RandomProcessed(f), + FieldseekerSamplecollectionMods.RandomSampletype(f), + FieldseekerSamplecollectionMods.RandomSamplecond(f), + FieldseekerSamplecollectionMods.RandomSpecies(f), + FieldseekerSamplecollectionMods.RandomSex(f), + FieldseekerSamplecollectionMods.RandomAvetemp(f), + FieldseekerSamplecollectionMods.RandomWindspeed(f), + FieldseekerSamplecollectionMods.RandomWinddir(f), + FieldseekerSamplecollectionMods.RandomRaingauge(f), + FieldseekerSamplecollectionMods.RandomActivity(f), + FieldseekerSamplecollectionMods.RandomTestmethod(f), + FieldseekerSamplecollectionMods.RandomDiseasetested(f), + FieldseekerSamplecollectionMods.RandomDiseasepos(f), + FieldseekerSamplecollectionMods.RandomReviewed(f), + FieldseekerSamplecollectionMods.RandomReviewedby(f), + FieldseekerSamplecollectionMods.RandomRevieweddate(f), + FieldseekerSamplecollectionMods.RandomLocationname(f), + FieldseekerSamplecollectionMods.RandomZone(f), + FieldseekerSamplecollectionMods.RandomRecordstatus(f), + FieldseekerSamplecollectionMods.RandomZone2(f), + FieldseekerSamplecollectionMods.RandomGlobalid(f), + FieldseekerSamplecollectionMods.RandomCreatedUser(f), + FieldseekerSamplecollectionMods.RandomCreatedDate(f), + FieldseekerSamplecollectionMods.RandomLastEditedUser(f), + FieldseekerSamplecollectionMods.RandomLastEditedDate(f), + FieldseekerSamplecollectionMods.RandomLab(f), + FieldseekerSamplecollectionMods.RandomFieldtech(f), + FieldseekerSamplecollectionMods.RandomFlockid(f), + FieldseekerSamplecollectionMods.RandomSamplecount(f), + FieldseekerSamplecollectionMods.RandomChickenid(f), + FieldseekerSamplecollectionMods.RandomGatewaysync(f), + FieldseekerSamplecollectionMods.RandomCreationdate(f), + FieldseekerSamplecollectionMods.RandomCreator(f), + FieldseekerSamplecollectionMods.RandomEditdate(f), + FieldseekerSamplecollectionMods.RandomEditor(f), + } +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Objectid(val int64) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) ObjectidFunc(f func() int64) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetObjectid() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerSamplecollectionMods) RandomObjectid(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) LocID(val null.Val[uuid.UUID]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LocID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) LocIDFunc(f func() null.Val[uuid.UUID]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LocID = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetLocID() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LocID = 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 fieldseekerSamplecollectionMods) RandomLocID(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LocID = 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 fieldseekerSamplecollectionMods) RandomLocIDNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LocID = 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 fieldseekerSamplecollectionMods) Startdatetime(val null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Startdatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) StartdatetimeFunc(f func() null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Startdatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetStartdatetime() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Startdatetime = 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 fieldseekerSamplecollectionMods) RandomStartdatetime(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplecollectionMods) RandomStartdatetimeNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Enddatetime(val null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Enddatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) EnddatetimeFunc(f func() null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Enddatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetEnddatetime() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Enddatetime = 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 fieldseekerSamplecollectionMods) RandomEnddatetime(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplecollectionMods) RandomEnddatetimeNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Sitecond(val null.Val[enums.FieldseekerSamplecollectionMosquitositeconditionEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerSamplecollectionMosquitositeconditionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) SitecondFunc(f func() null.Val[enums.FieldseekerSamplecollectionMosquitositeconditionEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sitecond = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetSitecond() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sitecond = 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 fieldseekerSamplecollectionMods) RandomSitecond(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerSamplecollectionMosquitositeconditionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitositeconditionEnum(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 fieldseekerSamplecollectionMods) RandomSitecondNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerSamplecollectionMosquitositeconditionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitositeconditionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Sampleid(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sampleid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) SampleidFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sampleid = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetSampleid() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sampleid = 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 fieldseekerSamplecollectionMods) RandomSampleid(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sampleid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerSamplecollectionMods) RandomSampleidNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sampleid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Survtech(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Survtech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) SurvtechFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Survtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetSurvtech() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Survtech = 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 fieldseekerSamplecollectionMods) RandomSurvtech(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Survtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerSamplecollectionMods) RandomSurvtechNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Survtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Datesent(val null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Datesent = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) DatesentFunc(f func() null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Datesent = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetDatesent() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Datesent = 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 fieldseekerSamplecollectionMods) RandomDatesent(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Datesent = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplecollectionMods) RandomDatesentNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Datesent = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Datetested(val null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Datetested = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) DatetestedFunc(f func() null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Datetested = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetDatetested() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Datetested = 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 fieldseekerSamplecollectionMods) RandomDatetested(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Datetested = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplecollectionMods) RandomDatetestedNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Datetested = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Testtech(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Testtech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) TesttechFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Testtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetTesttech() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Testtech = 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 fieldseekerSamplecollectionMods) RandomTesttech(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Testtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerSamplecollectionMods) RandomTesttechNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Testtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Comments(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) CommentsFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetComments() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Comments = 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 fieldseekerSamplecollectionMods) RandomComments(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerSamplecollectionMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Processed(val null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Processed = func() null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) ProcessedFunc(f func() null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Processed = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetProcessed() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Processed = 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 fieldseekerSamplecollectionMods) RandomProcessed(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Processed = func() null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionNotinuitFEnum(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 fieldseekerSamplecollectionMods) RandomProcessedNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Processed = func() null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Sampletype(val null.Val[enums.FieldseekerSamplecollectionMosquitosampletypeEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sampletype = func() null.Val[enums.FieldseekerSamplecollectionMosquitosampletypeEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) SampletypeFunc(f func() null.Val[enums.FieldseekerSamplecollectionMosquitosampletypeEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sampletype = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetSampletype() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sampletype = 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 fieldseekerSamplecollectionMods) RandomSampletype(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sampletype = func() null.Val[enums.FieldseekerSamplecollectionMosquitosampletypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitosampletypeEnum(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 fieldseekerSamplecollectionMods) RandomSampletypeNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sampletype = func() null.Val[enums.FieldseekerSamplecollectionMosquitosampletypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitosampletypeEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Samplecond(val null.Val[enums.FieldseekerSamplecollectionMosquitosampleconditionEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Samplecond = func() null.Val[enums.FieldseekerSamplecollectionMosquitosampleconditionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) SamplecondFunc(f func() null.Val[enums.FieldseekerSamplecollectionMosquitosampleconditionEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Samplecond = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetSamplecond() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Samplecond = 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 fieldseekerSamplecollectionMods) RandomSamplecond(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Samplecond = func() null.Val[enums.FieldseekerSamplecollectionMosquitosampleconditionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitosampleconditionEnum(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 fieldseekerSamplecollectionMods) RandomSamplecondNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Samplecond = func() null.Val[enums.FieldseekerSamplecollectionMosquitosampleconditionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitosampleconditionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Species(val null.Val[enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Species = func() null.Val[enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) SpeciesFunc(f func() null.Val[enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Species = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetSpecies() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Species = 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 fieldseekerSamplecollectionMods) RandomSpecies(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Species = func() null.Val[enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitosamplespeciesEnum(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 fieldseekerSamplecollectionMods) RandomSpeciesNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Species = func() null.Val[enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitosamplespeciesEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Sex(val null.Val[enums.FieldseekerSamplecollectionNotinuisexEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sex = func() null.Val[enums.FieldseekerSamplecollectionNotinuisexEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) SexFunc(f func() null.Val[enums.FieldseekerSamplecollectionNotinuisexEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sex = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetSex() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sex = 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 fieldseekerSamplecollectionMods) RandomSex(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sex = func() null.Val[enums.FieldseekerSamplecollectionNotinuisexEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionNotinuisexEnum(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 fieldseekerSamplecollectionMods) RandomSexNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Sex = func() null.Val[enums.FieldseekerSamplecollectionNotinuisexEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionNotinuisexEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Avetemp(val null.Val[float64]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Avetemp = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) AvetempFunc(f func() null.Val[float64]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Avetemp = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetAvetemp() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Avetemp = 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 fieldseekerSamplecollectionMods) RandomAvetemp(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Avetemp = 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 fieldseekerSamplecollectionMods) RandomAvetempNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Avetemp = 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 fieldseekerSamplecollectionMods) Windspeed(val null.Val[float64]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Windspeed = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) WindspeedFunc(f func() null.Val[float64]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Windspeed = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetWindspeed() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Windspeed = 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 fieldseekerSamplecollectionMods) RandomWindspeed(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Windspeed = 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 fieldseekerSamplecollectionMods) RandomWindspeedNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Windspeed = 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 fieldseekerSamplecollectionMods) Winddir(val null.Val[enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) WinddirFunc(f func() null.Val[enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Winddir = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetWinddir() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Winddir = 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 fieldseekerSamplecollectionMods) RandomWinddir(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionNotinuiwinddirectionEnum(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 fieldseekerSamplecollectionMods) RandomWinddirNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionNotinuiwinddirectionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Raingauge(val null.Val[float64]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Raingauge = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) RaingaugeFunc(f func() null.Val[float64]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Raingauge = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetRaingauge() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Raingauge = 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 fieldseekerSamplecollectionMods) RandomRaingauge(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Raingauge = 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 fieldseekerSamplecollectionMods) RandomRaingaugeNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Raingauge = 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 fieldseekerSamplecollectionMods) Activity(val null.Val[enums.FieldseekerSamplecollectionMosquitoactivityEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Activity = func() null.Val[enums.FieldseekerSamplecollectionMosquitoactivityEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) ActivityFunc(f func() null.Val[enums.FieldseekerSamplecollectionMosquitoactivityEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Activity = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetActivity() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Activity = 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 fieldseekerSamplecollectionMods) RandomActivity(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Activity = func() null.Val[enums.FieldseekerSamplecollectionMosquitoactivityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitoactivityEnum(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 fieldseekerSamplecollectionMods) RandomActivityNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Activity = func() null.Val[enums.FieldseekerSamplecollectionMosquitoactivityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitoactivityEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Testmethod(val null.Val[enums.FieldseekerSamplecollectionMosquitotestmethodEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Testmethod = func() null.Val[enums.FieldseekerSamplecollectionMosquitotestmethodEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) TestmethodFunc(f func() null.Val[enums.FieldseekerSamplecollectionMosquitotestmethodEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Testmethod = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetTestmethod() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Testmethod = 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 fieldseekerSamplecollectionMods) RandomTestmethod(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Testmethod = func() null.Val[enums.FieldseekerSamplecollectionMosquitotestmethodEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitotestmethodEnum(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 fieldseekerSamplecollectionMods) RandomTestmethodNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Testmethod = func() null.Val[enums.FieldseekerSamplecollectionMosquitotestmethodEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitotestmethodEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Diseasetested(val null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Diseasetested = func() null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) DiseasetestedFunc(f func() null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Diseasetested = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetDiseasetested() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Diseasetested = 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 fieldseekerSamplecollectionMods) RandomDiseasetested(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Diseasetested = func() null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitodiseaseEnum(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 fieldseekerSamplecollectionMods) RandomDiseasetestedNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Diseasetested = func() null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitodiseaseEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Diseasepos(val null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Diseasepos = func() null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) DiseaseposFunc(f func() null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Diseasepos = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetDiseasepos() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Diseasepos = 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 fieldseekerSamplecollectionMods) RandomDiseasepos(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Diseasepos = func() null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitodiseaseEnum(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 fieldseekerSamplecollectionMods) RandomDiseaseposNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Diseasepos = func() null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitodiseaseEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Reviewed(val null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) ReviewedFunc(f func() null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Reviewed = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetReviewed() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Reviewed = 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 fieldseekerSamplecollectionMods) RandomReviewed(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionNotinuitFEnum(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 fieldseekerSamplecollectionMods) RandomReviewedNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Reviewedby(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Reviewedby = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) ReviewedbyFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Reviewedby = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetReviewedby() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Reviewedby = 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 fieldseekerSamplecollectionMods) RandomReviewedby(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerSamplecollectionMods) RandomReviewedbyNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Revieweddate(val null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Revieweddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) RevieweddateFunc(f func() null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Revieweddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetRevieweddate() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Revieweddate = 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 fieldseekerSamplecollectionMods) RandomRevieweddate(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplecollectionMods) RandomRevieweddateNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Locationname(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Locationname = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) LocationnameFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Locationname = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetLocationname() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Locationname = 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 fieldseekerSamplecollectionMods) RandomLocationname(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerSamplecollectionMods) RandomLocationnameNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Zone(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) ZoneFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetZone() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Zone = 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 fieldseekerSamplecollectionMods) RandomZone(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerSamplecollectionMods) RandomZoneNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Recordstatus(val null.Val[int16]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Recordstatus = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) RecordstatusFunc(f func() null.Val[int16]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Recordstatus = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetRecordstatus() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Recordstatus = 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 fieldseekerSamplecollectionMods) RandomRecordstatus(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSamplecollectionMods) RandomRecordstatusNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Zone2(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) Zone2Func(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetZone2() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Zone2 = 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 fieldseekerSamplecollectionMods) RandomZone2(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerSamplecollectionMods) RandomZone2NotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Globalid(val null.Val[uuid.UUID]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetGlobalid() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Globalid = 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 fieldseekerSamplecollectionMods) RandomGlobalid(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Globalid = 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 fieldseekerSamplecollectionMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Globalid = 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 fieldseekerSamplecollectionMods) CreatedUser(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetCreatedUser() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.CreatedUser = 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 fieldseekerSamplecollectionMods) RandomCreatedUser(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerSamplecollectionMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) CreatedDate(val null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetCreatedDate() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.CreatedDate = 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 fieldseekerSamplecollectionMods) RandomCreatedDate(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplecollectionMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) LastEditedUser(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetLastEditedUser() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LastEditedUser = 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 fieldseekerSamplecollectionMods) RandomLastEditedUser(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerSamplecollectionMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) LastEditedDate(val null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetLastEditedDate() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LastEditedDate = 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 fieldseekerSamplecollectionMods) RandomLastEditedDate(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplecollectionMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Lab(val null.Val[enums.FieldseekerSamplecollectionMosquitolabnameEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Lab = func() null.Val[enums.FieldseekerSamplecollectionMosquitolabnameEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) LabFunc(f func() null.Val[enums.FieldseekerSamplecollectionMosquitolabnameEnum]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Lab = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetLab() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Lab = 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 fieldseekerSamplecollectionMods) RandomLab(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Lab = func() null.Val[enums.FieldseekerSamplecollectionMosquitolabnameEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitolabnameEnum(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 fieldseekerSamplecollectionMods) RandomLabNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Lab = func() null.Val[enums.FieldseekerSamplecollectionMosquitolabnameEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplecollectionMosquitolabnameEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Fieldtech(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Fieldtech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) FieldtechFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Fieldtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetFieldtech() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Fieldtech = 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 fieldseekerSamplecollectionMods) RandomFieldtech(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerSamplecollectionMods) RandomFieldtechNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Flockid(val null.Val[uuid.UUID]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Flockid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) FlockidFunc(f func() null.Val[uuid.UUID]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Flockid = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetFlockid() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Flockid = 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 fieldseekerSamplecollectionMods) RandomFlockid(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Flockid = 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 fieldseekerSamplecollectionMods) RandomFlockidNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Flockid = 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 fieldseekerSamplecollectionMods) Samplecount(val null.Val[int16]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Samplecount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) SamplecountFunc(f func() null.Val[int16]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Samplecount = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetSamplecount() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Samplecount = 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 fieldseekerSamplecollectionMods) RandomSamplecount(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Samplecount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSamplecollectionMods) RandomSamplecountNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Samplecount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Chickenid(val null.Val[uuid.UUID]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Chickenid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) ChickenidFunc(f func() null.Val[uuid.UUID]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Chickenid = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetChickenid() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Chickenid = 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 fieldseekerSamplecollectionMods) RandomChickenid(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Chickenid = 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 fieldseekerSamplecollectionMods) RandomChickenidNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Chickenid = 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 fieldseekerSamplecollectionMods) Gatewaysync(val null.Val[int16]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Gatewaysync = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) GatewaysyncFunc(f func() null.Val[int16]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Gatewaysync = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetGatewaysync() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Gatewaysync = 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 fieldseekerSamplecollectionMods) RandomGatewaysync(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Gatewaysync = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSamplecollectionMods) RandomGatewaysyncNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Gatewaysync = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Creationdate(val null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetCreationdate() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Creationdate = 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 fieldseekerSamplecollectionMods) RandomCreationdate(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplecollectionMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Creator(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) CreatorFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetCreator() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Creator = 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 fieldseekerSamplecollectionMods) RandomCreator(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerSamplecollectionMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Editdate(val null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetEditdate() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Editdate = 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 fieldseekerSamplecollectionMods) RandomEditdate(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplecollectionMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplecollectionMods) Editor(val null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplecollectionMods) EditorFunc(f func() null.Val[string]) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplecollectionMods) UnsetEditor() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Editor = 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 fieldseekerSamplecollectionMods) RandomEditor(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerSamplecollectionMods) RandomEditorNotNull(f *faker.Faker) FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(_ context.Context, o *FieldseekerSamplecollectionTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +func (m fieldseekerSamplecollectionMods) WithParentsCascading() FieldseekerSamplecollectionMod { + return FieldseekerSamplecollectionModFunc(func(ctx context.Context, o *FieldseekerSamplecollectionTemplate) { + if isDone, _ := fieldseekerSamplecollectionWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerSamplecollectionWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.samplelocation.bob.go b/db/factory/fieldseeker.samplelocation.bob.go new file mode 100644 index 00000000..39e9a567 --- /dev/null +++ b/db/factory/fieldseeker.samplelocation.bob.go @@ -0,0 +1,1682 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerSamplelocationMod interface { + Apply(context.Context, *FieldseekerSamplelocationTemplate) +} + +type FieldseekerSamplelocationModFunc func(context.Context, *FieldseekerSamplelocationTemplate) + +func (f FieldseekerSamplelocationModFunc) Apply(ctx context.Context, n *FieldseekerSamplelocationTemplate) { + f(ctx, n) +} + +type FieldseekerSamplelocationModSlice []FieldseekerSamplelocationMod + +func (mods FieldseekerSamplelocationModSlice) Apply(ctx context.Context, n *FieldseekerSamplelocationTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerSamplelocationTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerSamplelocationTemplate struct { + Objectid func() int64 + Name func() null.Val[string] + Zone func() null.Val[string] + Habitat func() null.Val[enums.FieldseekerSamplelocationLocationhabitattypeEnum] + Priority func() null.Val[enums.FieldseekerSamplelocationLocationpriorityEnum] + Usetype func() null.Val[enums.FieldseekerSamplelocationSamplelocationusetypeEnum] + Active func() null.Val[enums.FieldseekerSamplelocationNotinuitFEnum] + Description func() null.Val[string] + Accessdesc func() null.Val[string] + Comments func() null.Val[string] + Externalid func() null.Val[string] + Nextactiondatescheduled func() null.Val[time.Time] + Zone2 func() null.Val[string] + Locationnumber func() null.Val[int32] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Gatewaysync func() null.Val[int16] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerSamplelocationTemplate +func (o *FieldseekerSamplelocationTemplate) Apply(ctx context.Context, mods ...FieldseekerSamplelocationMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerSamplelocation +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerSamplelocationTemplate) setModelRels(o *models.FieldseekerSamplelocation) {} + +// BuildSetter returns an *models.FieldseekerSamplelocationSetter +// this does nothing with the relationship templates +func (o FieldseekerSamplelocationTemplate) BuildSetter() *models.FieldseekerSamplelocationSetter { + m := &models.FieldseekerSamplelocationSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Name != nil { + val := o.Name() + m.Name = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Habitat != nil { + val := o.Habitat() + m.Habitat = omitnull.FromNull(val) + } + if o.Priority != nil { + val := o.Priority() + m.Priority = omitnull.FromNull(val) + } + if o.Usetype != nil { + val := o.Usetype() + m.Usetype = omitnull.FromNull(val) + } + if o.Active != nil { + val := o.Active() + m.Active = omitnull.FromNull(val) + } + if o.Description != nil { + val := o.Description() + m.Description = omitnull.FromNull(val) + } + if o.Accessdesc != nil { + val := o.Accessdesc() + m.Accessdesc = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Externalid != nil { + val := o.Externalid() + m.Externalid = omitnull.FromNull(val) + } + if o.Nextactiondatescheduled != nil { + val := o.Nextactiondatescheduled() + m.Nextactiondatescheduled = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Locationnumber != nil { + val := o.Locationnumber() + m.Locationnumber = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Gatewaysync != nil { + val := o.Gatewaysync() + m.Gatewaysync = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerSamplelocationSetter +// this does nothing with the relationship templates +func (o FieldseekerSamplelocationTemplate) BuildManySetter(number int) []*models.FieldseekerSamplelocationSetter { + m := make([]*models.FieldseekerSamplelocationSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerSamplelocation +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerSamplelocationTemplate.Create +func (o FieldseekerSamplelocationTemplate) Build() *models.FieldseekerSamplelocation { + m := &models.FieldseekerSamplelocation{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Name != nil { + m.Name = o.Name() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Habitat != nil { + m.Habitat = o.Habitat() + } + if o.Priority != nil { + m.Priority = o.Priority() + } + if o.Usetype != nil { + m.Usetype = o.Usetype() + } + if o.Active != nil { + m.Active = o.Active() + } + if o.Description != nil { + m.Description = o.Description() + } + if o.Accessdesc != nil { + m.Accessdesc = o.Accessdesc() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Externalid != nil { + m.Externalid = o.Externalid() + } + if o.Nextactiondatescheduled != nil { + m.Nextactiondatescheduled = o.Nextactiondatescheduled() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Locationnumber != nil { + m.Locationnumber = o.Locationnumber() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Gatewaysync != nil { + m.Gatewaysync = o.Gatewaysync() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerSamplelocationSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerSamplelocationTemplate.CreateMany +func (o FieldseekerSamplelocationTemplate) BuildMany(number int) models.FieldseekerSamplelocationSlice { + m := make(models.FieldseekerSamplelocationSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerSamplelocation(m *models.FieldseekerSamplelocationSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerSamplelocation +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerSamplelocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerSamplelocation) error { + var err error + + return err +} + +// Create builds a fieldseekerSamplelocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerSamplelocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerSamplelocation, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerSamplelocation(opt) + + m, err := models.FieldseekerSamplelocations.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 fieldseekerSamplelocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerSamplelocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerSamplelocation { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerSamplelocation 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 *FieldseekerSamplelocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerSamplelocation { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerSamplelocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerSamplelocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerSamplelocationSlice, error) { + var err error + m := make(models.FieldseekerSamplelocationSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerSamplelocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerSamplelocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerSamplelocationSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerSamplelocations 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 FieldseekerSamplelocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerSamplelocationSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerSamplelocation has methods that act as mods for the FieldseekerSamplelocationTemplate +var FieldseekerSamplelocationMods fieldseekerSamplelocationMods + +type fieldseekerSamplelocationMods struct{} + +func (m fieldseekerSamplelocationMods) RandomizeAllColumns(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModSlice{ + FieldseekerSamplelocationMods.RandomObjectid(f), + FieldseekerSamplelocationMods.RandomName(f), + FieldseekerSamplelocationMods.RandomZone(f), + FieldseekerSamplelocationMods.RandomHabitat(f), + FieldseekerSamplelocationMods.RandomPriority(f), + FieldseekerSamplelocationMods.RandomUsetype(f), + FieldseekerSamplelocationMods.RandomActive(f), + FieldseekerSamplelocationMods.RandomDescription(f), + FieldseekerSamplelocationMods.RandomAccessdesc(f), + FieldseekerSamplelocationMods.RandomComments(f), + FieldseekerSamplelocationMods.RandomExternalid(f), + FieldseekerSamplelocationMods.RandomNextactiondatescheduled(f), + FieldseekerSamplelocationMods.RandomZone2(f), + FieldseekerSamplelocationMods.RandomLocationnumber(f), + FieldseekerSamplelocationMods.RandomGlobalid(f), + FieldseekerSamplelocationMods.RandomCreatedUser(f), + FieldseekerSamplelocationMods.RandomCreatedDate(f), + FieldseekerSamplelocationMods.RandomLastEditedUser(f), + FieldseekerSamplelocationMods.RandomLastEditedDate(f), + FieldseekerSamplelocationMods.RandomGatewaysync(f), + FieldseekerSamplelocationMods.RandomCreationdate(f), + FieldseekerSamplelocationMods.RandomCreator(f), + FieldseekerSamplelocationMods.RandomEditdate(f), + FieldseekerSamplelocationMods.RandomEditor(f), + } +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Objectid(val int64) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) ObjectidFunc(f func() int64) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetObjectid() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerSamplelocationMods) RandomObjectid(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Name(val null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Name = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) NameFunc(f func() null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Name = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetName() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Name = 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 fieldseekerSamplelocationMods) RandomName(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerSamplelocationMods) RandomNameNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Zone(val null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) ZoneFunc(f func() null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetZone() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Zone = 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 fieldseekerSamplelocationMods) RandomZone(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerSamplelocationMods) RandomZoneNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Habitat(val null.Val[enums.FieldseekerSamplelocationLocationhabitattypeEnum]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerSamplelocationLocationhabitattypeEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) HabitatFunc(f func() null.Val[enums.FieldseekerSamplelocationLocationhabitattypeEnum]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Habitat = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetHabitat() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Habitat = 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 fieldseekerSamplelocationMods) RandomHabitat(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerSamplelocationLocationhabitattypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplelocationLocationhabitattypeEnum(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 fieldseekerSamplelocationMods) RandomHabitatNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerSamplelocationLocationhabitattypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplelocationLocationhabitattypeEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Priority(val null.Val[enums.FieldseekerSamplelocationLocationpriorityEnum]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerSamplelocationLocationpriorityEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) PriorityFunc(f func() null.Val[enums.FieldseekerSamplelocationLocationpriorityEnum]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Priority = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetPriority() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Priority = 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 fieldseekerSamplelocationMods) RandomPriority(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerSamplelocationLocationpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplelocationLocationpriorityEnum(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 fieldseekerSamplelocationMods) RandomPriorityNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerSamplelocationLocationpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplelocationLocationpriorityEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Usetype(val null.Val[enums.FieldseekerSamplelocationSamplelocationusetypeEnum]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerSamplelocationSamplelocationusetypeEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) UsetypeFunc(f func() null.Val[enums.FieldseekerSamplelocationSamplelocationusetypeEnum]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Usetype = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetUsetype() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Usetype = 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 fieldseekerSamplelocationMods) RandomUsetype(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerSamplelocationSamplelocationusetypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplelocationSamplelocationusetypeEnum(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 fieldseekerSamplelocationMods) RandomUsetypeNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerSamplelocationSamplelocationusetypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplelocationSamplelocationusetypeEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Active(val null.Val[enums.FieldseekerSamplelocationNotinuitFEnum]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerSamplelocationNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) ActiveFunc(f func() null.Val[enums.FieldseekerSamplelocationNotinuitFEnum]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Active = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetActive() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Active = 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 fieldseekerSamplelocationMods) RandomActive(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerSamplelocationNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplelocationNotinuitFEnum(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 fieldseekerSamplelocationMods) RandomActiveNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerSamplelocationNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSamplelocationNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Description(val null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Description = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) DescriptionFunc(f func() null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Description = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetDescription() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Description = 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 fieldseekerSamplelocationMods) RandomDescription(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerSamplelocationMods) RandomDescriptionNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Accessdesc(val null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Accessdesc = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) AccessdescFunc(f func() null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Accessdesc = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetAccessdesc() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Accessdesc = 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 fieldseekerSamplelocationMods) RandomAccessdesc(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Accessdesc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerSamplelocationMods) RandomAccessdescNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Accessdesc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Comments(val null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) CommentsFunc(f func() null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetComments() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Comments = 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 fieldseekerSamplelocationMods) RandomComments(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerSamplelocationMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Externalid(val null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Externalid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) ExternalidFunc(f func() null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Externalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetExternalid() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Externalid = 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 fieldseekerSamplelocationMods) RandomExternalid(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerSamplelocationMods) RandomExternalidNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Nextactiondatescheduled(val null.Val[time.Time]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) NextactiondatescheduledFunc(f func() null.Val[time.Time]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Nextactiondatescheduled = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetNextactiondatescheduled() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Nextactiondatescheduled = 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 fieldseekerSamplelocationMods) RandomNextactiondatescheduled(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplelocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Zone2(val null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) Zone2Func(f func() null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetZone2() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Zone2 = 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 fieldseekerSamplelocationMods) RandomZone2(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerSamplelocationMods) RandomZone2NotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Locationnumber(val null.Val[int32]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Locationnumber = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) LocationnumberFunc(f func() null.Val[int32]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Locationnumber = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetLocationnumber() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Locationnumber = 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 fieldseekerSamplelocationMods) RandomLocationnumber(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Locationnumber = 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 fieldseekerSamplelocationMods) RandomLocationnumberNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Locationnumber = 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 fieldseekerSamplelocationMods) Globalid(val null.Val[uuid.UUID]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetGlobalid() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Globalid = 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 fieldseekerSamplelocationMods) RandomGlobalid(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Globalid = 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 fieldseekerSamplelocationMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Globalid = 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 fieldseekerSamplelocationMods) CreatedUser(val null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetCreatedUser() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.CreatedUser = 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 fieldseekerSamplelocationMods) RandomCreatedUser(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerSamplelocationMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) CreatedDate(val null.Val[time.Time]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetCreatedDate() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.CreatedDate = 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 fieldseekerSamplelocationMods) RandomCreatedDate(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplelocationMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) LastEditedUser(val null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetLastEditedUser() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.LastEditedUser = 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 fieldseekerSamplelocationMods) RandomLastEditedUser(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerSamplelocationMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) LastEditedDate(val null.Val[time.Time]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetLastEditedDate() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.LastEditedDate = 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 fieldseekerSamplelocationMods) RandomLastEditedDate(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplelocationMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Gatewaysync(val null.Val[int16]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Gatewaysync = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) GatewaysyncFunc(f func() null.Val[int16]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Gatewaysync = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetGatewaysync() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Gatewaysync = 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 fieldseekerSamplelocationMods) RandomGatewaysync(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Gatewaysync = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSamplelocationMods) RandomGatewaysyncNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Gatewaysync = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Creationdate(val null.Val[time.Time]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetCreationdate() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Creationdate = 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 fieldseekerSamplelocationMods) RandomCreationdate(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplelocationMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Creator(val null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) CreatorFunc(f func() null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetCreator() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Creator = 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 fieldseekerSamplelocationMods) RandomCreator(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerSamplelocationMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Editdate(val null.Val[time.Time]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetEditdate() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Editdate = 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 fieldseekerSamplelocationMods) RandomEditdate(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSamplelocationMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSamplelocationMods) Editor(val null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSamplelocationMods) EditorFunc(f func() null.Val[string]) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerSamplelocationMods) UnsetEditor() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Editor = 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 fieldseekerSamplelocationMods) RandomEditor(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerSamplelocationMods) RandomEditorNotNull(f *faker.Faker) FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +func (m fieldseekerSamplelocationMods) WithParentsCascading() FieldseekerSamplelocationMod { + return FieldseekerSamplelocationModFunc(func(ctx context.Context, o *FieldseekerSamplelocationTemplate) { + if isDone, _ := fieldseekerSamplelocationWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerSamplelocationWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.servicerequest.bob.go b/db/factory/fieldseeker.servicerequest.bob.go new file mode 100644 index 00000000..ae0696a2 --- /dev/null +++ b/db/factory/fieldseeker.servicerequest.bob.go @@ -0,0 +1,5532 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerServicerequestMod interface { + Apply(context.Context, *FieldseekerServicerequestTemplate) +} + +type FieldseekerServicerequestModFunc func(context.Context, *FieldseekerServicerequestTemplate) + +func (f FieldseekerServicerequestModFunc) Apply(ctx context.Context, n *FieldseekerServicerequestTemplate) { + f(ctx, n) +} + +type FieldseekerServicerequestModSlice []FieldseekerServicerequestMod + +func (mods FieldseekerServicerequestModSlice) Apply(ctx context.Context, n *FieldseekerServicerequestTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerServicerequestTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerServicerequestTemplate struct { + Objectid func() int64 + Recdatetime func() null.Val[time.Time] + Source func() null.Val[enums.FieldseekerServicerequestServicerequestsourceEnum] + Entrytech func() null.Val[string] + Priority func() null.Val[enums.FieldseekerServicerequestServicerequestpriorityEnum] + Supervisor func() null.Val[enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808] + Assignedtech func() null.Val[enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8] + Status func() null.Val[enums.FieldseekerServicerequestServicerequeststatusEnum] + Clranon func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] + Clrfname func() null.Val[string] + Clrphone1 func() null.Val[string] + Clrphone2 func() null.Val[string] + Clremail func() null.Val[string] + Clrcompany func() null.Val[string] + Clraddr1 func() null.Val[string] + Clraddr2 func() null.Val[string] + Clrcity func() null.Val[string] + Clrstate func() null.Val[enums.FieldseekerServicerequestServicerequestregionEnum] + Clrzip func() null.Val[string] + Clrother func() null.Val[string] + Clrcontpref func() null.Val[enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum] + Reqcompany func() null.Val[string] + Reqaddr1 func() null.Val[string] + Reqaddr2 func() null.Val[string] + Reqcity func() null.Val[string] + Reqstate func() null.Val[enums.FieldseekerServicerequestServicerequestregionEnum] + Reqzip func() null.Val[string] + Reqcrossst func() null.Val[string] + Reqsubdiv func() null.Val[string] + Reqmapgrid func() null.Val[string] + Reqpermission func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] + Reqtarget func() null.Val[enums.FieldseekerServicerequestServicerequesttargetEnum] + Reqdescr func() null.Val[string] + Reqnotesfortech func() null.Val[string] + Reqnotesforcust func() null.Val[string] + Reqfldnotes func() null.Val[string] + Reqprogramactions func() null.Val[string] + Datetimeclosed func() null.Val[time.Time] + Techclosed func() null.Val[string] + SRNumber func() null.Val[int32] + Reviewed func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] + Reviewedby func() null.Val[string] + Revieweddate func() null.Val[time.Time] + Accepted func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] + Accepteddate func() null.Val[time.Time] + Rejectedby func() null.Val[string] + Rejecteddate func() null.Val[time.Time] + Rejectedreason func() null.Val[enums.FieldseekerServicerequestServicerequestrejectedreasonEnum] + Duedate func() null.Val[time.Time] + Acceptedby func() null.Val[string] + Comments func() null.Val[string] + Estcompletedate func() null.Val[time.Time] + Nextaction func() null.Val[enums.FieldseekerServicerequestServicerequestnextactionEnum] + Recordstatus func() null.Val[int16] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Firstresponsedate func() null.Val[time.Time] + Responsedaycount func() null.Val[int16] + Allowed func() null.Val[string] + Xvalue func() null.Val[string] + Yvalue func() null.Val[string] + Validx func() null.Val[string] + Validy func() null.Val[string] + Externalid func() null.Val[string] + Externalerror func() null.Val[string] + Pointlocid func() null.Val[uuid.UUID] + Notified func() null.Val[int16] + Notifieddate func() null.Val[time.Time] + Scheduled func() null.Val[int16] + Scheduleddate func() null.Val[time.Time] + Dog func() null.Val[enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31] + SchedulePeriod func() null.Val[enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab] + ScheduleNotes func() null.Val[string] + Spanish func() null.Val[enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Issuesreported func() null.Val[enums.FieldseekerServicerequestServicerequestissuesEnum] + Jurisdiction func() null.Val[string] + Notificationtimestamp func() null.Val[string] + Zone func() null.Val[string] + Zone2 func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerServicerequestTemplate +func (o *FieldseekerServicerequestTemplate) Apply(ctx context.Context, mods ...FieldseekerServicerequestMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerServicerequest +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerServicerequestTemplate) setModelRels(o *models.FieldseekerServicerequest) {} + +// BuildSetter returns an *models.FieldseekerServicerequestSetter +// this does nothing with the relationship templates +func (o FieldseekerServicerequestTemplate) BuildSetter() *models.FieldseekerServicerequestSetter { + m := &models.FieldseekerServicerequestSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Recdatetime != nil { + val := o.Recdatetime() + m.Recdatetime = omitnull.FromNull(val) + } + if o.Source != nil { + val := o.Source() + m.Source = omitnull.FromNull(val) + } + if o.Entrytech != nil { + val := o.Entrytech() + m.Entrytech = omitnull.FromNull(val) + } + if o.Priority != nil { + val := o.Priority() + m.Priority = omitnull.FromNull(val) + } + if o.Supervisor != nil { + val := o.Supervisor() + m.Supervisor = omitnull.FromNull(val) + } + if o.Assignedtech != nil { + val := o.Assignedtech() + m.Assignedtech = omitnull.FromNull(val) + } + if o.Status != nil { + val := o.Status() + m.Status = omitnull.FromNull(val) + } + if o.Clranon != nil { + val := o.Clranon() + m.Clranon = omitnull.FromNull(val) + } + if o.Clrfname != nil { + val := o.Clrfname() + m.Clrfname = omitnull.FromNull(val) + } + if o.Clrphone1 != nil { + val := o.Clrphone1() + m.Clrphone1 = omitnull.FromNull(val) + } + if o.Clrphone2 != nil { + val := o.Clrphone2() + m.Clrphone2 = omitnull.FromNull(val) + } + if o.Clremail != nil { + val := o.Clremail() + m.Clremail = omitnull.FromNull(val) + } + if o.Clrcompany != nil { + val := o.Clrcompany() + m.Clrcompany = omitnull.FromNull(val) + } + if o.Clraddr1 != nil { + val := o.Clraddr1() + m.Clraddr1 = omitnull.FromNull(val) + } + if o.Clraddr2 != nil { + val := o.Clraddr2() + m.Clraddr2 = omitnull.FromNull(val) + } + if o.Clrcity != nil { + val := o.Clrcity() + m.Clrcity = omitnull.FromNull(val) + } + if o.Clrstate != nil { + val := o.Clrstate() + m.Clrstate = omitnull.FromNull(val) + } + if o.Clrzip != nil { + val := o.Clrzip() + m.Clrzip = omitnull.FromNull(val) + } + if o.Clrother != nil { + val := o.Clrother() + m.Clrother = omitnull.FromNull(val) + } + if o.Clrcontpref != nil { + val := o.Clrcontpref() + m.Clrcontpref = omitnull.FromNull(val) + } + if o.Reqcompany != nil { + val := o.Reqcompany() + m.Reqcompany = omitnull.FromNull(val) + } + if o.Reqaddr1 != nil { + val := o.Reqaddr1() + m.Reqaddr1 = omitnull.FromNull(val) + } + if o.Reqaddr2 != nil { + val := o.Reqaddr2() + m.Reqaddr2 = omitnull.FromNull(val) + } + if o.Reqcity != nil { + val := o.Reqcity() + m.Reqcity = omitnull.FromNull(val) + } + if o.Reqstate != nil { + val := o.Reqstate() + m.Reqstate = omitnull.FromNull(val) + } + if o.Reqzip != nil { + val := o.Reqzip() + m.Reqzip = omitnull.FromNull(val) + } + if o.Reqcrossst != nil { + val := o.Reqcrossst() + m.Reqcrossst = omitnull.FromNull(val) + } + if o.Reqsubdiv != nil { + val := o.Reqsubdiv() + m.Reqsubdiv = omitnull.FromNull(val) + } + if o.Reqmapgrid != nil { + val := o.Reqmapgrid() + m.Reqmapgrid = omitnull.FromNull(val) + } + if o.Reqpermission != nil { + val := o.Reqpermission() + m.Reqpermission = omitnull.FromNull(val) + } + if o.Reqtarget != nil { + val := o.Reqtarget() + m.Reqtarget = omitnull.FromNull(val) + } + if o.Reqdescr != nil { + val := o.Reqdescr() + m.Reqdescr = omitnull.FromNull(val) + } + if o.Reqnotesfortech != nil { + val := o.Reqnotesfortech() + m.Reqnotesfortech = omitnull.FromNull(val) + } + if o.Reqnotesforcust != nil { + val := o.Reqnotesforcust() + m.Reqnotesforcust = omitnull.FromNull(val) + } + if o.Reqfldnotes != nil { + val := o.Reqfldnotes() + m.Reqfldnotes = omitnull.FromNull(val) + } + if o.Reqprogramactions != nil { + val := o.Reqprogramactions() + m.Reqprogramactions = omitnull.FromNull(val) + } + if o.Datetimeclosed != nil { + val := o.Datetimeclosed() + m.Datetimeclosed = omitnull.FromNull(val) + } + if o.Techclosed != nil { + val := o.Techclosed() + m.Techclosed = omitnull.FromNull(val) + } + if o.SRNumber != nil { + val := o.SRNumber() + m.SRNumber = omitnull.FromNull(val) + } + if o.Reviewed != nil { + val := o.Reviewed() + m.Reviewed = omitnull.FromNull(val) + } + if o.Reviewedby != nil { + val := o.Reviewedby() + m.Reviewedby = omitnull.FromNull(val) + } + if o.Revieweddate != nil { + val := o.Revieweddate() + m.Revieweddate = omitnull.FromNull(val) + } + if o.Accepted != nil { + val := o.Accepted() + m.Accepted = omitnull.FromNull(val) + } + if o.Accepteddate != nil { + val := o.Accepteddate() + m.Accepteddate = omitnull.FromNull(val) + } + if o.Rejectedby != nil { + val := o.Rejectedby() + m.Rejectedby = omitnull.FromNull(val) + } + if o.Rejecteddate != nil { + val := o.Rejecteddate() + m.Rejecteddate = omitnull.FromNull(val) + } + if o.Rejectedreason != nil { + val := o.Rejectedreason() + m.Rejectedreason = omitnull.FromNull(val) + } + if o.Duedate != nil { + val := o.Duedate() + m.Duedate = omitnull.FromNull(val) + } + if o.Acceptedby != nil { + val := o.Acceptedby() + m.Acceptedby = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Estcompletedate != nil { + val := o.Estcompletedate() + m.Estcompletedate = omitnull.FromNull(val) + } + if o.Nextaction != nil { + val := o.Nextaction() + m.Nextaction = omitnull.FromNull(val) + } + if o.Recordstatus != nil { + val := o.Recordstatus() + m.Recordstatus = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Firstresponsedate != nil { + val := o.Firstresponsedate() + m.Firstresponsedate = omitnull.FromNull(val) + } + if o.Responsedaycount != nil { + val := o.Responsedaycount() + m.Responsedaycount = omitnull.FromNull(val) + } + if o.Allowed != nil { + val := o.Allowed() + m.Allowed = omitnull.FromNull(val) + } + if o.Xvalue != nil { + val := o.Xvalue() + m.Xvalue = omitnull.FromNull(val) + } + if o.Yvalue != nil { + val := o.Yvalue() + m.Yvalue = omitnull.FromNull(val) + } + if o.Validx != nil { + val := o.Validx() + m.Validx = omitnull.FromNull(val) + } + if o.Validy != nil { + val := o.Validy() + m.Validy = omitnull.FromNull(val) + } + if o.Externalid != nil { + val := o.Externalid() + m.Externalid = omitnull.FromNull(val) + } + if o.Externalerror != nil { + val := o.Externalerror() + m.Externalerror = omitnull.FromNull(val) + } + if o.Pointlocid != nil { + val := o.Pointlocid() + m.Pointlocid = omitnull.FromNull(val) + } + if o.Notified != nil { + val := o.Notified() + m.Notified = omitnull.FromNull(val) + } + if o.Notifieddate != nil { + val := o.Notifieddate() + m.Notifieddate = omitnull.FromNull(val) + } + if o.Scheduled != nil { + val := o.Scheduled() + m.Scheduled = omitnull.FromNull(val) + } + if o.Scheduleddate != nil { + val := o.Scheduleddate() + m.Scheduleddate = omitnull.FromNull(val) + } + if o.Dog != nil { + val := o.Dog() + m.Dog = omitnull.FromNull(val) + } + if o.SchedulePeriod != nil { + val := o.SchedulePeriod() + m.SchedulePeriod = omitnull.FromNull(val) + } + if o.ScheduleNotes != nil { + val := o.ScheduleNotes() + m.ScheduleNotes = omitnull.FromNull(val) + } + if o.Spanish != nil { + val := o.Spanish() + m.Spanish = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Issuesreported != nil { + val := o.Issuesreported() + m.Issuesreported = omitnull.FromNull(val) + } + if o.Jurisdiction != nil { + val := o.Jurisdiction() + m.Jurisdiction = omitnull.FromNull(val) + } + if o.Notificationtimestamp != nil { + val := o.Notificationtimestamp() + m.Notificationtimestamp = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerServicerequestSetter +// this does nothing with the relationship templates +func (o FieldseekerServicerequestTemplate) BuildManySetter(number int) []*models.FieldseekerServicerequestSetter { + m := make([]*models.FieldseekerServicerequestSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerServicerequest +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerServicerequestTemplate.Create +func (o FieldseekerServicerequestTemplate) Build() *models.FieldseekerServicerequest { + m := &models.FieldseekerServicerequest{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Recdatetime != nil { + m.Recdatetime = o.Recdatetime() + } + if o.Source != nil { + m.Source = o.Source() + } + if o.Entrytech != nil { + m.Entrytech = o.Entrytech() + } + if o.Priority != nil { + m.Priority = o.Priority() + } + if o.Supervisor != nil { + m.Supervisor = o.Supervisor() + } + if o.Assignedtech != nil { + m.Assignedtech = o.Assignedtech() + } + if o.Status != nil { + m.Status = o.Status() + } + if o.Clranon != nil { + m.Clranon = o.Clranon() + } + if o.Clrfname != nil { + m.Clrfname = o.Clrfname() + } + if o.Clrphone1 != nil { + m.Clrphone1 = o.Clrphone1() + } + if o.Clrphone2 != nil { + m.Clrphone2 = o.Clrphone2() + } + if o.Clremail != nil { + m.Clremail = o.Clremail() + } + if o.Clrcompany != nil { + m.Clrcompany = o.Clrcompany() + } + if o.Clraddr1 != nil { + m.Clraddr1 = o.Clraddr1() + } + if o.Clraddr2 != nil { + m.Clraddr2 = o.Clraddr2() + } + if o.Clrcity != nil { + m.Clrcity = o.Clrcity() + } + if o.Clrstate != nil { + m.Clrstate = o.Clrstate() + } + if o.Clrzip != nil { + m.Clrzip = o.Clrzip() + } + if o.Clrother != nil { + m.Clrother = o.Clrother() + } + if o.Clrcontpref != nil { + m.Clrcontpref = o.Clrcontpref() + } + if o.Reqcompany != nil { + m.Reqcompany = o.Reqcompany() + } + if o.Reqaddr1 != nil { + m.Reqaddr1 = o.Reqaddr1() + } + if o.Reqaddr2 != nil { + m.Reqaddr2 = o.Reqaddr2() + } + if o.Reqcity != nil { + m.Reqcity = o.Reqcity() + } + if o.Reqstate != nil { + m.Reqstate = o.Reqstate() + } + if o.Reqzip != nil { + m.Reqzip = o.Reqzip() + } + if o.Reqcrossst != nil { + m.Reqcrossst = o.Reqcrossst() + } + if o.Reqsubdiv != nil { + m.Reqsubdiv = o.Reqsubdiv() + } + if o.Reqmapgrid != nil { + m.Reqmapgrid = o.Reqmapgrid() + } + if o.Reqpermission != nil { + m.Reqpermission = o.Reqpermission() + } + if o.Reqtarget != nil { + m.Reqtarget = o.Reqtarget() + } + if o.Reqdescr != nil { + m.Reqdescr = o.Reqdescr() + } + if o.Reqnotesfortech != nil { + m.Reqnotesfortech = o.Reqnotesfortech() + } + if o.Reqnotesforcust != nil { + m.Reqnotesforcust = o.Reqnotesforcust() + } + if o.Reqfldnotes != nil { + m.Reqfldnotes = o.Reqfldnotes() + } + if o.Reqprogramactions != nil { + m.Reqprogramactions = o.Reqprogramactions() + } + if o.Datetimeclosed != nil { + m.Datetimeclosed = o.Datetimeclosed() + } + if o.Techclosed != nil { + m.Techclosed = o.Techclosed() + } + if o.SRNumber != nil { + m.SRNumber = o.SRNumber() + } + if o.Reviewed != nil { + m.Reviewed = o.Reviewed() + } + if o.Reviewedby != nil { + m.Reviewedby = o.Reviewedby() + } + if o.Revieweddate != nil { + m.Revieweddate = o.Revieweddate() + } + if o.Accepted != nil { + m.Accepted = o.Accepted() + } + if o.Accepteddate != nil { + m.Accepteddate = o.Accepteddate() + } + if o.Rejectedby != nil { + m.Rejectedby = o.Rejectedby() + } + if o.Rejecteddate != nil { + m.Rejecteddate = o.Rejecteddate() + } + if o.Rejectedreason != nil { + m.Rejectedreason = o.Rejectedreason() + } + if o.Duedate != nil { + m.Duedate = o.Duedate() + } + if o.Acceptedby != nil { + m.Acceptedby = o.Acceptedby() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Estcompletedate != nil { + m.Estcompletedate = o.Estcompletedate() + } + if o.Nextaction != nil { + m.Nextaction = o.Nextaction() + } + if o.Recordstatus != nil { + m.Recordstatus = o.Recordstatus() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Firstresponsedate != nil { + m.Firstresponsedate = o.Firstresponsedate() + } + if o.Responsedaycount != nil { + m.Responsedaycount = o.Responsedaycount() + } + if o.Allowed != nil { + m.Allowed = o.Allowed() + } + if o.Xvalue != nil { + m.Xvalue = o.Xvalue() + } + if o.Yvalue != nil { + m.Yvalue = o.Yvalue() + } + if o.Validx != nil { + m.Validx = o.Validx() + } + if o.Validy != nil { + m.Validy = o.Validy() + } + if o.Externalid != nil { + m.Externalid = o.Externalid() + } + if o.Externalerror != nil { + m.Externalerror = o.Externalerror() + } + if o.Pointlocid != nil { + m.Pointlocid = o.Pointlocid() + } + if o.Notified != nil { + m.Notified = o.Notified() + } + if o.Notifieddate != nil { + m.Notifieddate = o.Notifieddate() + } + if o.Scheduled != nil { + m.Scheduled = o.Scheduled() + } + if o.Scheduleddate != nil { + m.Scheduleddate = o.Scheduleddate() + } + if o.Dog != nil { + m.Dog = o.Dog() + } + if o.SchedulePeriod != nil { + m.SchedulePeriod = o.SchedulePeriod() + } + if o.ScheduleNotes != nil { + m.ScheduleNotes = o.ScheduleNotes() + } + if o.Spanish != nil { + m.Spanish = o.Spanish() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Issuesreported != nil { + m.Issuesreported = o.Issuesreported() + } + if o.Jurisdiction != nil { + m.Jurisdiction = o.Jurisdiction() + } + if o.Notificationtimestamp != nil { + m.Notificationtimestamp = o.Notificationtimestamp() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerServicerequestSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerServicerequestTemplate.CreateMany +func (o FieldseekerServicerequestTemplate) BuildMany(number int) models.FieldseekerServicerequestSlice { + m := make(models.FieldseekerServicerequestSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerServicerequest(m *models.FieldseekerServicerequestSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerServicerequest +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerServicerequestTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerServicerequest) error { + var err error + + return err +} + +// Create builds a fieldseekerServicerequest and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerServicerequestTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerServicerequest, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerServicerequest(opt) + + m, err := models.FieldseekerServicerequests.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 fieldseekerServicerequest and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerServicerequestTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerServicerequest { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerServicerequest 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 *FieldseekerServicerequestTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerServicerequest { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerServicerequests and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerServicerequestTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerServicerequestSlice, error) { + var err error + m := make(models.FieldseekerServicerequestSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerServicerequests and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerServicerequestTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerServicerequestSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerServicerequests 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 FieldseekerServicerequestTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerServicerequestSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerServicerequest has methods that act as mods for the FieldseekerServicerequestTemplate +var FieldseekerServicerequestMods fieldseekerServicerequestMods + +type fieldseekerServicerequestMods struct{} + +func (m fieldseekerServicerequestMods) RandomizeAllColumns(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModSlice{ + FieldseekerServicerequestMods.RandomObjectid(f), + FieldseekerServicerequestMods.RandomRecdatetime(f), + FieldseekerServicerequestMods.RandomSource(f), + FieldseekerServicerequestMods.RandomEntrytech(f), + FieldseekerServicerequestMods.RandomPriority(f), + FieldseekerServicerequestMods.RandomSupervisor(f), + FieldseekerServicerequestMods.RandomAssignedtech(f), + FieldseekerServicerequestMods.RandomStatus(f), + FieldseekerServicerequestMods.RandomClranon(f), + FieldseekerServicerequestMods.RandomClrfname(f), + FieldseekerServicerequestMods.RandomClrphone1(f), + FieldseekerServicerequestMods.RandomClrphone2(f), + FieldseekerServicerequestMods.RandomClremail(f), + FieldseekerServicerequestMods.RandomClrcompany(f), + FieldseekerServicerequestMods.RandomClraddr1(f), + FieldseekerServicerequestMods.RandomClraddr2(f), + FieldseekerServicerequestMods.RandomClrcity(f), + FieldseekerServicerequestMods.RandomClrstate(f), + FieldseekerServicerequestMods.RandomClrzip(f), + FieldseekerServicerequestMods.RandomClrother(f), + FieldseekerServicerequestMods.RandomClrcontpref(f), + FieldseekerServicerequestMods.RandomReqcompany(f), + FieldseekerServicerequestMods.RandomReqaddr1(f), + FieldseekerServicerequestMods.RandomReqaddr2(f), + FieldseekerServicerequestMods.RandomReqcity(f), + FieldseekerServicerequestMods.RandomReqstate(f), + FieldseekerServicerequestMods.RandomReqzip(f), + FieldseekerServicerequestMods.RandomReqcrossst(f), + FieldseekerServicerequestMods.RandomReqsubdiv(f), + FieldseekerServicerequestMods.RandomReqmapgrid(f), + FieldseekerServicerequestMods.RandomReqpermission(f), + FieldseekerServicerequestMods.RandomReqtarget(f), + FieldseekerServicerequestMods.RandomReqdescr(f), + FieldseekerServicerequestMods.RandomReqnotesfortech(f), + FieldseekerServicerequestMods.RandomReqnotesforcust(f), + FieldseekerServicerequestMods.RandomReqfldnotes(f), + FieldseekerServicerequestMods.RandomReqprogramactions(f), + FieldseekerServicerequestMods.RandomDatetimeclosed(f), + FieldseekerServicerequestMods.RandomTechclosed(f), + FieldseekerServicerequestMods.RandomSRNumber(f), + FieldseekerServicerequestMods.RandomReviewed(f), + FieldseekerServicerequestMods.RandomReviewedby(f), + FieldseekerServicerequestMods.RandomRevieweddate(f), + FieldseekerServicerequestMods.RandomAccepted(f), + FieldseekerServicerequestMods.RandomAccepteddate(f), + FieldseekerServicerequestMods.RandomRejectedby(f), + FieldseekerServicerequestMods.RandomRejecteddate(f), + FieldseekerServicerequestMods.RandomRejectedreason(f), + FieldseekerServicerequestMods.RandomDuedate(f), + FieldseekerServicerequestMods.RandomAcceptedby(f), + FieldseekerServicerequestMods.RandomComments(f), + FieldseekerServicerequestMods.RandomEstcompletedate(f), + FieldseekerServicerequestMods.RandomNextaction(f), + FieldseekerServicerequestMods.RandomRecordstatus(f), + FieldseekerServicerequestMods.RandomGlobalid(f), + FieldseekerServicerequestMods.RandomCreatedUser(f), + FieldseekerServicerequestMods.RandomCreatedDate(f), + FieldseekerServicerequestMods.RandomLastEditedUser(f), + FieldseekerServicerequestMods.RandomLastEditedDate(f), + FieldseekerServicerequestMods.RandomFirstresponsedate(f), + FieldseekerServicerequestMods.RandomResponsedaycount(f), + FieldseekerServicerequestMods.RandomAllowed(f), + FieldseekerServicerequestMods.RandomXvalue(f), + FieldseekerServicerequestMods.RandomYvalue(f), + FieldseekerServicerequestMods.RandomValidx(f), + FieldseekerServicerequestMods.RandomValidy(f), + FieldseekerServicerequestMods.RandomExternalid(f), + FieldseekerServicerequestMods.RandomExternalerror(f), + FieldseekerServicerequestMods.RandomPointlocid(f), + FieldseekerServicerequestMods.RandomNotified(f), + FieldseekerServicerequestMods.RandomNotifieddate(f), + FieldseekerServicerequestMods.RandomScheduled(f), + FieldseekerServicerequestMods.RandomScheduleddate(f), + FieldseekerServicerequestMods.RandomDog(f), + FieldseekerServicerequestMods.RandomSchedulePeriod(f), + FieldseekerServicerequestMods.RandomScheduleNotes(f), + FieldseekerServicerequestMods.RandomSpanish(f), + FieldseekerServicerequestMods.RandomCreationdate(f), + FieldseekerServicerequestMods.RandomCreator(f), + FieldseekerServicerequestMods.RandomEditdate(f), + FieldseekerServicerequestMods.RandomEditor(f), + FieldseekerServicerequestMods.RandomIssuesreported(f), + FieldseekerServicerequestMods.RandomJurisdiction(f), + FieldseekerServicerequestMods.RandomNotificationtimestamp(f), + FieldseekerServicerequestMods.RandomZone(f), + FieldseekerServicerequestMods.RandomZone2(f), + } +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Objectid(val int64) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ObjectidFunc(f func() int64) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetObjectid() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerServicerequestMods) RandomObjectid(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Recdatetime(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Recdatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) RecdatetimeFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Recdatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetRecdatetime() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Recdatetime = 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 fieldseekerServicerequestMods) RandomRecdatetime(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Recdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomRecdatetimeNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Recdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Source(val null.Val[enums.FieldseekerServicerequestServicerequestsourceEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Source = func() null.Val[enums.FieldseekerServicerequestServicerequestsourceEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) SourceFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestsourceEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Source = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetSource() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Source = 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 fieldseekerServicerequestMods) RandomSource(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Source = func() null.Val[enums.FieldseekerServicerequestServicerequestsourceEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestsourceEnum(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 fieldseekerServicerequestMods) RandomSourceNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Source = func() null.Val[enums.FieldseekerServicerequestServicerequestsourceEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestsourceEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Entrytech(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Entrytech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) EntrytechFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Entrytech = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetEntrytech() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Entrytech = 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 fieldseekerServicerequestMods) RandomEntrytech(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Entrytech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomEntrytechNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Entrytech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Priority(val null.Val[enums.FieldseekerServicerequestServicerequestpriorityEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Priority = func() null.Val[enums.FieldseekerServicerequestServicerequestpriorityEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) PriorityFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestpriorityEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Priority = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetPriority() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Priority = 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 fieldseekerServicerequestMods) RandomPriority(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Priority = func() null.Val[enums.FieldseekerServicerequestServicerequestpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestpriorityEnum(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 fieldseekerServicerequestMods) RandomPriorityNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Priority = func() null.Val[enums.FieldseekerServicerequestServicerequestpriorityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestpriorityEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Supervisor(val null.Val[enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Supervisor = func() null.Val[enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) SupervisorFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Supervisor = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetSupervisor() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Supervisor = 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 fieldseekerServicerequestMods) RandomSupervisor(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Supervisor = func() null.Val[enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808(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 fieldseekerServicerequestMods) RandomSupervisorNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Supervisor = func() null.Val[enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Assignedtech(val null.Val[enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Assignedtech = func() null.Val[enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) AssignedtechFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Assignedtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetAssignedtech() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Assignedtech = 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 fieldseekerServicerequestMods) RandomAssignedtech(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Assignedtech = func() null.Val[enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8(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 fieldseekerServicerequestMods) RandomAssignedtechNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Assignedtech = func() null.Val[enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Status(val null.Val[enums.FieldseekerServicerequestServicerequeststatusEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Status = func() null.Val[enums.FieldseekerServicerequestServicerequeststatusEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) StatusFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequeststatusEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Status = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetStatus() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Status = 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 fieldseekerServicerequestMods) RandomStatus(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Status = func() null.Val[enums.FieldseekerServicerequestServicerequeststatusEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequeststatusEnum(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 fieldseekerServicerequestMods) RandomStatusNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Status = func() null.Val[enums.FieldseekerServicerequestServicerequeststatusEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequeststatusEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clranon(val null.Val[enums.FieldseekerServicerequestNotinuitFEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clranon = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ClranonFunc(f func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clranon = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClranon() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clranon = 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 fieldseekerServicerequestMods) RandomClranon(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clranon = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestNotinuitFEnum(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 fieldseekerServicerequestMods) RandomClranonNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clranon = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clrfname(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrfname = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ClrfnameFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrfname = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClrfname() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrfname = 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 fieldseekerServicerequestMods) RandomClrfname(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrfname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomClrfnameNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrfname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clrphone1(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrphone1 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) Clrphone1Func(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrphone1 = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClrphone1() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrphone1 = 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 fieldseekerServicerequestMods) RandomClrphone1(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrphone1 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomClrphone1NotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrphone1 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clrphone2(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrphone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) Clrphone2Func(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrphone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClrphone2() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrphone2 = 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 fieldseekerServicerequestMods) RandomClrphone2(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrphone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomClrphone2NotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrphone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clremail(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clremail = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ClremailFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clremail = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClremail() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clremail = 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 fieldseekerServicerequestMods) RandomClremail(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clremail = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerServicerequestMods) RandomClremailNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clremail = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clrcompany(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcompany = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ClrcompanyFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcompany = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClrcompany() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcompany = 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 fieldseekerServicerequestMods) RandomClrcompany(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcompany = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomClrcompanyNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcompany = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clraddr1(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clraddr1 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) Clraddr1Func(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clraddr1 = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClraddr1() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clraddr1 = 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 fieldseekerServicerequestMods) RandomClraddr1(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clraddr1 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerServicerequestMods) RandomClraddr1NotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clraddr1 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clraddr2(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clraddr2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) Clraddr2Func(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clraddr2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClraddr2() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clraddr2 = 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 fieldseekerServicerequestMods) RandomClraddr2(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clraddr2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerServicerequestMods) RandomClraddr2NotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clraddr2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clrcity(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcity = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ClrcityFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcity = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClrcity() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcity = 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 fieldseekerServicerequestMods) RandomClrcity(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomClrcityNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clrstate(val null.Val[enums.FieldseekerServicerequestServicerequestregionEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrstate = func() null.Val[enums.FieldseekerServicerequestServicerequestregionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ClrstateFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestregionEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrstate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClrstate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrstate = 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 fieldseekerServicerequestMods) RandomClrstate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrstate = func() null.Val[enums.FieldseekerServicerequestServicerequestregionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestregionEnum(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 fieldseekerServicerequestMods) RandomClrstateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrstate = func() null.Val[enums.FieldseekerServicerequestServicerequestregionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestregionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clrzip(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrzip = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ClrzipFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrzip = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClrzip() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrzip = 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 fieldseekerServicerequestMods) RandomClrzip(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrzip = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomClrzipNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrzip = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clrother(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrother = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ClrotherFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrother = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClrother() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrother = 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 fieldseekerServicerequestMods) RandomClrother(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrother = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomClrotherNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrother = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Clrcontpref(val null.Val[enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcontpref = func() null.Val[enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ClrcontprefFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcontpref = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetClrcontpref() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcontpref = 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 fieldseekerServicerequestMods) RandomClrcontpref(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcontpref = func() null.Val[enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestcontactpreferencesEnum(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 fieldseekerServicerequestMods) RandomClrcontprefNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Clrcontpref = func() null.Val[enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestcontactpreferencesEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqcompany(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcompany = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqcompanyFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcompany = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqcompany() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcompany = 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 fieldseekerServicerequestMods) RandomReqcompany(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcompany = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomReqcompanyNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcompany = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqaddr1(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqaddr1 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) Reqaddr1Func(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqaddr1 = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqaddr1() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqaddr1 = 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 fieldseekerServicerequestMods) RandomReqaddr1(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqaddr1 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerServicerequestMods) RandomReqaddr1NotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqaddr1 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqaddr2(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqaddr2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) Reqaddr2Func(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqaddr2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqaddr2() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqaddr2 = 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 fieldseekerServicerequestMods) RandomReqaddr2(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqaddr2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerServicerequestMods) RandomReqaddr2NotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqaddr2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqcity(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcity = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqcityFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcity = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqcity() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcity = 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 fieldseekerServicerequestMods) RandomReqcity(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomReqcityNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcity = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqstate(val null.Val[enums.FieldseekerServicerequestServicerequestregionEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqstate = func() null.Val[enums.FieldseekerServicerequestServicerequestregionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqstateFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestregionEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqstate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqstate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqstate = 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 fieldseekerServicerequestMods) RandomReqstate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqstate = func() null.Val[enums.FieldseekerServicerequestServicerequestregionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestregionEnum(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 fieldseekerServicerequestMods) RandomReqstateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqstate = func() null.Val[enums.FieldseekerServicerequestServicerequestregionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestregionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqzip(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqzip = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqzipFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqzip = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqzip() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqzip = 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 fieldseekerServicerequestMods) RandomReqzip(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqzip = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomReqzipNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqzip = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqcrossst(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcrossst = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqcrossstFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcrossst = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqcrossst() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcrossst = 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 fieldseekerServicerequestMods) RandomReqcrossst(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcrossst = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomReqcrossstNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqcrossst = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqsubdiv(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqsubdiv = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqsubdivFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqsubdiv = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqsubdiv() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqsubdiv = 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 fieldseekerServicerequestMods) RandomReqsubdiv(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqsubdiv = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomReqsubdivNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqsubdiv = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqmapgrid(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqmapgrid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqmapgridFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqmapgrid = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqmapgrid() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqmapgrid = 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 fieldseekerServicerequestMods) RandomReqmapgrid(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqmapgrid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomReqmapgridNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqmapgrid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqpermission(val null.Val[enums.FieldseekerServicerequestNotinuitFEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqpermission = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqpermissionFunc(f func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqpermission = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqpermission() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqpermission = 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 fieldseekerServicerequestMods) RandomReqpermission(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqpermission = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestNotinuitFEnum(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 fieldseekerServicerequestMods) RandomReqpermissionNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqpermission = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqtarget(val null.Val[enums.FieldseekerServicerequestServicerequesttargetEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqtarget = func() null.Val[enums.FieldseekerServicerequestServicerequesttargetEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqtargetFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequesttargetEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqtarget = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqtarget() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqtarget = 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 fieldseekerServicerequestMods) RandomReqtarget(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqtarget = func() null.Val[enums.FieldseekerServicerequestServicerequesttargetEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequesttargetEnum(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 fieldseekerServicerequestMods) RandomReqtargetNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqtarget = func() null.Val[enums.FieldseekerServicerequestServicerequesttargetEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequesttargetEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqdescr(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqdescr = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqdescrFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqdescr = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqdescr() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqdescr = 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 fieldseekerServicerequestMods) RandomReqdescr(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqdescr = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "1000") + 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 fieldseekerServicerequestMods) RandomReqdescrNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqdescr = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "1000") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqnotesfortech(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqnotesfortech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqnotesfortechFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqnotesfortech = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqnotesfortech() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqnotesfortech = 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 fieldseekerServicerequestMods) RandomReqnotesfortech(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqnotesfortech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerServicerequestMods) RandomReqnotesfortechNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqnotesfortech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqnotesforcust(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqnotesforcust = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqnotesforcustFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqnotesforcust = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqnotesforcust() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqnotesforcust = 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 fieldseekerServicerequestMods) RandomReqnotesforcust(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqnotesforcust = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerServicerequestMods) RandomReqnotesforcustNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqnotesforcust = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqfldnotes(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqfldnotes = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqfldnotesFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqfldnotes = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqfldnotes() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqfldnotes = 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 fieldseekerServicerequestMods) RandomReqfldnotes(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqfldnotes = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerServicerequestMods) RandomReqfldnotesNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqfldnotes = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reqprogramactions(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqprogramactions = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReqprogramactionsFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqprogramactions = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReqprogramactions() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqprogramactions = 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 fieldseekerServicerequestMods) RandomReqprogramactions(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqprogramactions = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerServicerequestMods) RandomReqprogramactionsNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reqprogramactions = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Datetimeclosed(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Datetimeclosed = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) DatetimeclosedFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Datetimeclosed = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetDatetimeclosed() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Datetimeclosed = 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 fieldseekerServicerequestMods) RandomDatetimeclosed(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Datetimeclosed = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomDatetimeclosedNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Datetimeclosed = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Techclosed(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Techclosed = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) TechclosedFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Techclosed = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetTechclosed() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Techclosed = 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 fieldseekerServicerequestMods) RandomTechclosed(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Techclosed = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomTechclosedNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Techclosed = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) SRNumber(val null.Val[int32]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.SRNumber = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) SRNumberFunc(f func() null.Val[int32]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.SRNumber = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetSRNumber() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.SRNumber = 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 fieldseekerServicerequestMods) RandomSRNumber(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.SRNumber = 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 fieldseekerServicerequestMods) RandomSRNumberNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.SRNumber = 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 fieldseekerServicerequestMods) Reviewed(val null.Val[enums.FieldseekerServicerequestNotinuitFEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReviewedFunc(f func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reviewed = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReviewed() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reviewed = 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 fieldseekerServicerequestMods) RandomReviewed(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestNotinuitFEnum(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 fieldseekerServicerequestMods) RandomReviewedNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Reviewedby(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reviewedby = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ReviewedbyFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reviewedby = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetReviewedby() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reviewedby = 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 fieldseekerServicerequestMods) RandomReviewedby(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomReviewedbyNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Revieweddate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Revieweddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) RevieweddateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Revieweddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetRevieweddate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Revieweddate = 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 fieldseekerServicerequestMods) RandomRevieweddate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomRevieweddateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Accepted(val null.Val[enums.FieldseekerServicerequestNotinuitFEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Accepted = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) AcceptedFunc(f func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Accepted = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetAccepted() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Accepted = 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 fieldseekerServicerequestMods) RandomAccepted(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Accepted = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestNotinuitFEnum(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 fieldseekerServicerequestMods) RandomAcceptedNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Accepted = func() null.Val[enums.FieldseekerServicerequestNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Accepteddate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Accepteddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) AccepteddateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Accepteddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetAccepteddate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Accepteddate = 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 fieldseekerServicerequestMods) RandomAccepteddate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Accepteddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomAccepteddateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Accepteddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Rejectedby(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejectedby = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) RejectedbyFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejectedby = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetRejectedby() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejectedby = 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 fieldseekerServicerequestMods) RandomRejectedby(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejectedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomRejectedbyNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejectedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Rejecteddate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejecteddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) RejecteddateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejecteddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetRejecteddate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejecteddate = 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 fieldseekerServicerequestMods) RandomRejecteddate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejecteddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomRejecteddateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejecteddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Rejectedreason(val null.Val[enums.FieldseekerServicerequestServicerequestrejectedreasonEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejectedreason = func() null.Val[enums.FieldseekerServicerequestServicerequestrejectedreasonEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) RejectedreasonFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestrejectedreasonEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejectedreason = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetRejectedreason() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejectedreason = 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 fieldseekerServicerequestMods) RandomRejectedreason(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejectedreason = func() null.Val[enums.FieldseekerServicerequestServicerequestrejectedreasonEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestrejectedreasonEnum(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 fieldseekerServicerequestMods) RandomRejectedreasonNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Rejectedreason = func() null.Val[enums.FieldseekerServicerequestServicerequestrejectedreasonEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestrejectedreasonEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Duedate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Duedate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) DuedateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Duedate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetDuedate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Duedate = 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 fieldseekerServicerequestMods) RandomDuedate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Duedate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomDuedateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Duedate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Acceptedby(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Acceptedby = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) AcceptedbyFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Acceptedby = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetAcceptedby() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Acceptedby = 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 fieldseekerServicerequestMods) RandomAcceptedby(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Acceptedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomAcceptedbyNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Acceptedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Comments(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) CommentsFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetComments() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Comments = 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 fieldseekerServicerequestMods) RandomComments(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "2500") + 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 fieldseekerServicerequestMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "2500") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Estcompletedate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Estcompletedate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) EstcompletedateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Estcompletedate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetEstcompletedate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Estcompletedate = 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 fieldseekerServicerequestMods) RandomEstcompletedate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Estcompletedate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomEstcompletedateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Estcompletedate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Nextaction(val null.Val[enums.FieldseekerServicerequestServicerequestnextactionEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Nextaction = func() null.Val[enums.FieldseekerServicerequestServicerequestnextactionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) NextactionFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestnextactionEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Nextaction = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetNextaction() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Nextaction = 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 fieldseekerServicerequestMods) RandomNextaction(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Nextaction = func() null.Val[enums.FieldseekerServicerequestServicerequestnextactionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestnextactionEnum(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 fieldseekerServicerequestMods) RandomNextactionNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Nextaction = func() null.Val[enums.FieldseekerServicerequestServicerequestnextactionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestnextactionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Recordstatus(val null.Val[int16]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Recordstatus = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) RecordstatusFunc(f func() null.Val[int16]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Recordstatus = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetRecordstatus() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Recordstatus = 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 fieldseekerServicerequestMods) RandomRecordstatus(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerServicerequestMods) RandomRecordstatusNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Globalid(val null.Val[uuid.UUID]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetGlobalid() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Globalid = 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 fieldseekerServicerequestMods) RandomGlobalid(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Globalid = 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 fieldseekerServicerequestMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Globalid = 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 fieldseekerServicerequestMods) CreatedUser(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetCreatedUser() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.CreatedUser = 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 fieldseekerServicerequestMods) RandomCreatedUser(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerServicerequestMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) CreatedDate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetCreatedDate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.CreatedDate = 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 fieldseekerServicerequestMods) RandomCreatedDate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) LastEditedUser(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetLastEditedUser() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.LastEditedUser = 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 fieldseekerServicerequestMods) RandomLastEditedUser(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerServicerequestMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) LastEditedDate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetLastEditedDate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.LastEditedDate = 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 fieldseekerServicerequestMods) RandomLastEditedDate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Firstresponsedate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Firstresponsedate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) FirstresponsedateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Firstresponsedate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetFirstresponsedate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Firstresponsedate = 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 fieldseekerServicerequestMods) RandomFirstresponsedate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Firstresponsedate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomFirstresponsedateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Firstresponsedate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Responsedaycount(val null.Val[int16]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Responsedaycount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ResponsedaycountFunc(f func() null.Val[int16]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Responsedaycount = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetResponsedaycount() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Responsedaycount = 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 fieldseekerServicerequestMods) RandomResponsedaycount(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Responsedaycount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerServicerequestMods) RandomResponsedaycountNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Responsedaycount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Allowed(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Allowed = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) AllowedFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Allowed = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetAllowed() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Allowed = 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 fieldseekerServicerequestMods) RandomAllowed(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Allowed = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomAllowedNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Allowed = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Xvalue(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Xvalue = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) XvalueFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Xvalue = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetXvalue() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Xvalue = 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 fieldseekerServicerequestMods) RandomXvalue(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Xvalue = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomXvalueNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Xvalue = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Yvalue(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Yvalue = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) YvalueFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Yvalue = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetYvalue() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Yvalue = 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 fieldseekerServicerequestMods) RandomYvalue(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Yvalue = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomYvalueNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Yvalue = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Validx(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Validx = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ValidxFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Validx = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetValidx() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Validx = 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 fieldseekerServicerequestMods) RandomValidx(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Validx = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomValidxNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Validx = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Validy(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Validy = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ValidyFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Validy = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetValidy() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Validy = 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 fieldseekerServicerequestMods) RandomValidy(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Validy = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomValidyNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Validy = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Externalid(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Externalid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ExternalidFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Externalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetExternalid() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Externalid = 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 fieldseekerServicerequestMods) RandomExternalid(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomExternalidNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Externalerror(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Externalerror = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ExternalerrorFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Externalerror = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetExternalerror() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Externalerror = 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 fieldseekerServicerequestMods) RandomExternalerror(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Externalerror = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "500") + 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 fieldseekerServicerequestMods) RandomExternalerrorNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Externalerror = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "500") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Pointlocid(val null.Val[uuid.UUID]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Pointlocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) PointlocidFunc(f func() null.Val[uuid.UUID]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Pointlocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetPointlocid() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Pointlocid = 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 fieldseekerServicerequestMods) RandomPointlocid(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Pointlocid = 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 fieldseekerServicerequestMods) RandomPointlocidNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Pointlocid = 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 fieldseekerServicerequestMods) Notified(val null.Val[int16]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notified = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) NotifiedFunc(f func() null.Val[int16]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notified = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetNotified() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notified = 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 fieldseekerServicerequestMods) RandomNotified(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notified = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerServicerequestMods) RandomNotifiedNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notified = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Notifieddate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notifieddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) NotifieddateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notifieddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetNotifieddate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notifieddate = 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 fieldseekerServicerequestMods) RandomNotifieddate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notifieddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomNotifieddateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notifieddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Scheduled(val null.Val[int16]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Scheduled = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ScheduledFunc(f func() null.Val[int16]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Scheduled = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetScheduled() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Scheduled = 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 fieldseekerServicerequestMods) RandomScheduled(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Scheduled = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerServicerequestMods) RandomScheduledNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Scheduled = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Scheduleddate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Scheduleddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ScheduleddateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Scheduleddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetScheduleddate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Scheduleddate = 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 fieldseekerServicerequestMods) RandomScheduleddate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Scheduleddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomScheduleddateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Scheduleddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Dog(val null.Val[enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Dog = func() null.Val[enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) DogFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Dog = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetDog() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Dog = 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 fieldseekerServicerequestMods) RandomDog(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Dog = func() null.Val[enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31(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 fieldseekerServicerequestMods) RandomDogNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Dog = func() null.Val[enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) SchedulePeriod(val null.Val[enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.SchedulePeriod = func() null.Val[enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) SchedulePeriodFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.SchedulePeriod = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetSchedulePeriod() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.SchedulePeriod = 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 fieldseekerServicerequestMods) RandomSchedulePeriod(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.SchedulePeriod = func() null.Val[enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab(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 fieldseekerServicerequestMods) RandomSchedulePeriodNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.SchedulePeriod = func() null.Val[enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) ScheduleNotes(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.ScheduleNotes = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ScheduleNotesFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.ScheduleNotes = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetScheduleNotes() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.ScheduleNotes = 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 fieldseekerServicerequestMods) RandomScheduleNotes(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.ScheduleNotes = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "256") + 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 fieldseekerServicerequestMods) RandomScheduleNotesNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.ScheduleNotes = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "256") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Spanish(val null.Val[enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Spanish = func() null.Val[enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) SpanishFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Spanish = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetSpanish() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Spanish = 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 fieldseekerServicerequestMods) RandomSpanish(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Spanish = func() null.Val[enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC(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 fieldseekerServicerequestMods) RandomSpanishNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Spanish = func() null.Val[enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Creationdate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetCreationdate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Creationdate = 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 fieldseekerServicerequestMods) RandomCreationdate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Creator(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) CreatorFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetCreator() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Creator = 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 fieldseekerServicerequestMods) RandomCreator(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerServicerequestMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Editdate(val null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetEditdate() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Editdate = 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 fieldseekerServicerequestMods) RandomEditdate(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerServicerequestMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Editor(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) EditorFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetEditor() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Editor = 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 fieldseekerServicerequestMods) RandomEditor(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerServicerequestMods) RandomEditorNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Issuesreported(val null.Val[enums.FieldseekerServicerequestServicerequestissuesEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Issuesreported = func() null.Val[enums.FieldseekerServicerequestServicerequestissuesEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) IssuesreportedFunc(f func() null.Val[enums.FieldseekerServicerequestServicerequestissuesEnum]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Issuesreported = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetIssuesreported() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Issuesreported = 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 fieldseekerServicerequestMods) RandomIssuesreported(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Issuesreported = func() null.Val[enums.FieldseekerServicerequestServicerequestissuesEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestissuesEnum(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 fieldseekerServicerequestMods) RandomIssuesreportedNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Issuesreported = func() null.Val[enums.FieldseekerServicerequestServicerequestissuesEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerServicerequestServicerequestissuesEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Jurisdiction(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Jurisdiction = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) JurisdictionFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Jurisdiction = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetJurisdiction() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Jurisdiction = 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 fieldseekerServicerequestMods) RandomJurisdiction(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerServicerequestMods) RandomJurisdictionNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Notificationtimestamp(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notificationtimestamp = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) NotificationtimestampFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notificationtimestamp = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetNotificationtimestamp() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notificationtimestamp = 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 fieldseekerServicerequestMods) RandomNotificationtimestamp(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notificationtimestamp = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerServicerequestMods) RandomNotificationtimestampNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Notificationtimestamp = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Zone(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) ZoneFunc(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetZone() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Zone = 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 fieldseekerServicerequestMods) RandomZone(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerServicerequestMods) RandomZoneNotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerServicerequestMods) Zone2(val null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerServicerequestMods) Zone2Func(f func() null.Val[string]) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerServicerequestMods) UnsetZone2() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Zone2 = 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 fieldseekerServicerequestMods) RandomZone2(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerServicerequestMods) RandomZone2NotNull(f *faker.Faker) FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(_ context.Context, o *FieldseekerServicerequestTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +func (m fieldseekerServicerequestMods) WithParentsCascading() FieldseekerServicerequestMod { + return FieldseekerServicerequestModFunc(func(ctx context.Context, o *FieldseekerServicerequestTemplate) { + if isDone, _ := fieldseekerServicerequestWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerServicerequestWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.speciesabundance.bob.go b/db/factory/fieldseeker.speciesabundance.bob.go new file mode 100644 index 00000000..ecb643de --- /dev/null +++ b/db/factory/fieldseeker.speciesabundance.bob.go @@ -0,0 +1,1992 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerSpeciesabundanceMod interface { + Apply(context.Context, *FieldseekerSpeciesabundanceTemplate) +} + +type FieldseekerSpeciesabundanceModFunc func(context.Context, *FieldseekerSpeciesabundanceTemplate) + +func (f FieldseekerSpeciesabundanceModFunc) Apply(ctx context.Context, n *FieldseekerSpeciesabundanceTemplate) { + f(ctx, n) +} + +type FieldseekerSpeciesabundanceModSlice []FieldseekerSpeciesabundanceMod + +func (mods FieldseekerSpeciesabundanceModSlice) Apply(ctx context.Context, n *FieldseekerSpeciesabundanceTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerSpeciesabundanceTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerSpeciesabundanceTemplate struct { + Objectid func() int64 + TrapdataID func() null.Val[uuid.UUID] + Species func() null.Val[string] + Males func() null.Val[int16] + Unknown func() null.Val[int16] + Bloodedfem func() null.Val[int16] + Gravidfem func() null.Val[int16] + Larvae func() null.Val[int16] + Poolstogen func() null.Val[int16] + Processed func() null.Val[enums.FieldseekerSpeciesabundanceNotinuitFEnum] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Pupae func() null.Val[int16] + Eggs func() null.Val[int16] + Females func() null.Val[int32] + Total func() null.Val[int32] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Yearweek func() null.Val[int32] + Globalzscore func() null.Val[float64] + R7score func() null.Val[float64] + R8score func() null.Val[float64] + H3R7 func() null.Val[string] + H3R8 func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerSpeciesabundanceTemplate +func (o *FieldseekerSpeciesabundanceTemplate) Apply(ctx context.Context, mods ...FieldseekerSpeciesabundanceMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerSpeciesabundance +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerSpeciesabundanceTemplate) setModelRels(o *models.FieldseekerSpeciesabundance) {} + +// BuildSetter returns an *models.FieldseekerSpeciesabundanceSetter +// this does nothing with the relationship templates +func (o FieldseekerSpeciesabundanceTemplate) BuildSetter() *models.FieldseekerSpeciesabundanceSetter { + m := &models.FieldseekerSpeciesabundanceSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.TrapdataID != nil { + val := o.TrapdataID() + m.TrapdataID = omitnull.FromNull(val) + } + if o.Species != nil { + val := o.Species() + m.Species = omitnull.FromNull(val) + } + if o.Males != nil { + val := o.Males() + m.Males = omitnull.FromNull(val) + } + if o.Unknown != nil { + val := o.Unknown() + m.Unknown = omitnull.FromNull(val) + } + if o.Bloodedfem != nil { + val := o.Bloodedfem() + m.Bloodedfem = omitnull.FromNull(val) + } + if o.Gravidfem != nil { + val := o.Gravidfem() + m.Gravidfem = omitnull.FromNull(val) + } + if o.Larvae != nil { + val := o.Larvae() + m.Larvae = omitnull.FromNull(val) + } + if o.Poolstogen != nil { + val := o.Poolstogen() + m.Poolstogen = omitnull.FromNull(val) + } + if o.Processed != nil { + val := o.Processed() + m.Processed = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Pupae != nil { + val := o.Pupae() + m.Pupae = omitnull.FromNull(val) + } + if o.Eggs != nil { + val := o.Eggs() + m.Eggs = omitnull.FromNull(val) + } + if o.Females != nil { + val := o.Females() + m.Females = omitnull.FromNull(val) + } + if o.Total != nil { + val := o.Total() + m.Total = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Yearweek != nil { + val := o.Yearweek() + m.Yearweek = omitnull.FromNull(val) + } + if o.Globalzscore != nil { + val := o.Globalzscore() + m.Globalzscore = omitnull.FromNull(val) + } + if o.R7score != nil { + val := o.R7score() + m.R7score = omitnull.FromNull(val) + } + if o.R8score != nil { + val := o.R8score() + m.R8score = omitnull.FromNull(val) + } + if o.H3R7 != nil { + val := o.H3R7() + m.H3R7 = omitnull.FromNull(val) + } + if o.H3R8 != nil { + val := o.H3R8() + m.H3R8 = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerSpeciesabundanceSetter +// this does nothing with the relationship templates +func (o FieldseekerSpeciesabundanceTemplate) BuildManySetter(number int) []*models.FieldseekerSpeciesabundanceSetter { + m := make([]*models.FieldseekerSpeciesabundanceSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerSpeciesabundance +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerSpeciesabundanceTemplate.Create +func (o FieldseekerSpeciesabundanceTemplate) Build() *models.FieldseekerSpeciesabundance { + m := &models.FieldseekerSpeciesabundance{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.TrapdataID != nil { + m.TrapdataID = o.TrapdataID() + } + if o.Species != nil { + m.Species = o.Species() + } + if o.Males != nil { + m.Males = o.Males() + } + if o.Unknown != nil { + m.Unknown = o.Unknown() + } + if o.Bloodedfem != nil { + m.Bloodedfem = o.Bloodedfem() + } + if o.Gravidfem != nil { + m.Gravidfem = o.Gravidfem() + } + if o.Larvae != nil { + m.Larvae = o.Larvae() + } + if o.Poolstogen != nil { + m.Poolstogen = o.Poolstogen() + } + if o.Processed != nil { + m.Processed = o.Processed() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Pupae != nil { + m.Pupae = o.Pupae() + } + if o.Eggs != nil { + m.Eggs = o.Eggs() + } + if o.Females != nil { + m.Females = o.Females() + } + if o.Total != nil { + m.Total = o.Total() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Yearweek != nil { + m.Yearweek = o.Yearweek() + } + if o.Globalzscore != nil { + m.Globalzscore = o.Globalzscore() + } + if o.R7score != nil { + m.R7score = o.R7score() + } + if o.R8score != nil { + m.R8score = o.R8score() + } + if o.H3R7 != nil { + m.H3R7 = o.H3R7() + } + if o.H3R8 != nil { + m.H3R8 = o.H3R8() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerSpeciesabundanceSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerSpeciesabundanceTemplate.CreateMany +func (o FieldseekerSpeciesabundanceTemplate) BuildMany(number int) models.FieldseekerSpeciesabundanceSlice { + m := make(models.FieldseekerSpeciesabundanceSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerSpeciesabundance(m *models.FieldseekerSpeciesabundanceSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerSpeciesabundance +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerSpeciesabundanceTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerSpeciesabundance) error { + var err error + + return err +} + +// Create builds a fieldseekerSpeciesabundance and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerSpeciesabundanceTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerSpeciesabundance, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerSpeciesabundance(opt) + + m, err := models.FieldseekerSpeciesabundances.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 fieldseekerSpeciesabundance and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerSpeciesabundanceTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerSpeciesabundance { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerSpeciesabundance 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 *FieldseekerSpeciesabundanceTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerSpeciesabundance { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerSpeciesabundances and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerSpeciesabundanceTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerSpeciesabundanceSlice, error) { + var err error + m := make(models.FieldseekerSpeciesabundanceSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerSpeciesabundances and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerSpeciesabundanceTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerSpeciesabundanceSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerSpeciesabundances 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 FieldseekerSpeciesabundanceTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerSpeciesabundanceSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerSpeciesabundance has methods that act as mods for the FieldseekerSpeciesabundanceTemplate +var FieldseekerSpeciesabundanceMods fieldseekerSpeciesabundanceMods + +type fieldseekerSpeciesabundanceMods struct{} + +func (m fieldseekerSpeciesabundanceMods) RandomizeAllColumns(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModSlice{ + FieldseekerSpeciesabundanceMods.RandomObjectid(f), + FieldseekerSpeciesabundanceMods.RandomTrapdataID(f), + FieldseekerSpeciesabundanceMods.RandomSpecies(f), + FieldseekerSpeciesabundanceMods.RandomMales(f), + FieldseekerSpeciesabundanceMods.RandomUnknown(f), + FieldseekerSpeciesabundanceMods.RandomBloodedfem(f), + FieldseekerSpeciesabundanceMods.RandomGravidfem(f), + FieldseekerSpeciesabundanceMods.RandomLarvae(f), + FieldseekerSpeciesabundanceMods.RandomPoolstogen(f), + FieldseekerSpeciesabundanceMods.RandomProcessed(f), + FieldseekerSpeciesabundanceMods.RandomGlobalid(f), + FieldseekerSpeciesabundanceMods.RandomCreatedUser(f), + FieldseekerSpeciesabundanceMods.RandomCreatedDate(f), + FieldseekerSpeciesabundanceMods.RandomLastEditedUser(f), + FieldseekerSpeciesabundanceMods.RandomLastEditedDate(f), + FieldseekerSpeciesabundanceMods.RandomPupae(f), + FieldseekerSpeciesabundanceMods.RandomEggs(f), + FieldseekerSpeciesabundanceMods.RandomFemales(f), + FieldseekerSpeciesabundanceMods.RandomTotal(f), + FieldseekerSpeciesabundanceMods.RandomCreationdate(f), + FieldseekerSpeciesabundanceMods.RandomCreator(f), + FieldseekerSpeciesabundanceMods.RandomEditdate(f), + FieldseekerSpeciesabundanceMods.RandomEditor(f), + FieldseekerSpeciesabundanceMods.RandomYearweek(f), + FieldseekerSpeciesabundanceMods.RandomGlobalzscore(f), + FieldseekerSpeciesabundanceMods.RandomR7score(f), + FieldseekerSpeciesabundanceMods.RandomR8score(f), + FieldseekerSpeciesabundanceMods.RandomH3R7(f), + FieldseekerSpeciesabundanceMods.RandomH3R8(f), + } +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Objectid(val int64) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) ObjectidFunc(f func() int64) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetObjectid() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerSpeciesabundanceMods) RandomObjectid(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) TrapdataID(val null.Val[uuid.UUID]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.TrapdataID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) TrapdataIDFunc(f func() null.Val[uuid.UUID]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.TrapdataID = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetTrapdataID() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.TrapdataID = 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 fieldseekerSpeciesabundanceMods) RandomTrapdataID(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.TrapdataID = 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 fieldseekerSpeciesabundanceMods) RandomTrapdataIDNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.TrapdataID = 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 fieldseekerSpeciesabundanceMods) Species(val null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Species = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) SpeciesFunc(f func() null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Species = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetSpecies() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Species = 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 fieldseekerSpeciesabundanceMods) RandomSpecies(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Species = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerSpeciesabundanceMods) RandomSpeciesNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Species = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Males(val null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Males = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) MalesFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Males = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetMales() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Males = 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 fieldseekerSpeciesabundanceMods) RandomMales(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Males = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSpeciesabundanceMods) RandomMalesNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Males = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Unknown(val null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Unknown = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) UnknownFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Unknown = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetUnknown() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Unknown = 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 fieldseekerSpeciesabundanceMods) RandomUnknown(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Unknown = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSpeciesabundanceMods) RandomUnknownNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Unknown = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Bloodedfem(val null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Bloodedfem = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) BloodedfemFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Bloodedfem = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetBloodedfem() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Bloodedfem = 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 fieldseekerSpeciesabundanceMods) RandomBloodedfem(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Bloodedfem = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSpeciesabundanceMods) RandomBloodedfemNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Bloodedfem = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Gravidfem(val null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Gravidfem = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) GravidfemFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Gravidfem = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetGravidfem() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Gravidfem = 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 fieldseekerSpeciesabundanceMods) RandomGravidfem(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Gravidfem = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSpeciesabundanceMods) RandomGravidfemNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Gravidfem = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Larvae(val null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Larvae = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) LarvaeFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Larvae = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetLarvae() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Larvae = 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 fieldseekerSpeciesabundanceMods) RandomLarvae(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Larvae = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSpeciesabundanceMods) RandomLarvaeNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Larvae = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Poolstogen(val null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Poolstogen = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) PoolstogenFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Poolstogen = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetPoolstogen() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Poolstogen = 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 fieldseekerSpeciesabundanceMods) RandomPoolstogen(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Poolstogen = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSpeciesabundanceMods) RandomPoolstogenNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Poolstogen = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Processed(val null.Val[enums.FieldseekerSpeciesabundanceNotinuitFEnum]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Processed = func() null.Val[enums.FieldseekerSpeciesabundanceNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) ProcessedFunc(f func() null.Val[enums.FieldseekerSpeciesabundanceNotinuitFEnum]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Processed = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetProcessed() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Processed = 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 fieldseekerSpeciesabundanceMods) RandomProcessed(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Processed = func() null.Val[enums.FieldseekerSpeciesabundanceNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSpeciesabundanceNotinuitFEnum(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 fieldseekerSpeciesabundanceMods) RandomProcessedNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Processed = func() null.Val[enums.FieldseekerSpeciesabundanceNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerSpeciesabundanceNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Globalid(val null.Val[uuid.UUID]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetGlobalid() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Globalid = 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 fieldseekerSpeciesabundanceMods) RandomGlobalid(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Globalid = 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 fieldseekerSpeciesabundanceMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Globalid = 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 fieldseekerSpeciesabundanceMods) CreatedUser(val null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetCreatedUser() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.CreatedUser = 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 fieldseekerSpeciesabundanceMods) RandomCreatedUser(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerSpeciesabundanceMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) CreatedDate(val null.Val[time.Time]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetCreatedDate() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.CreatedDate = 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 fieldseekerSpeciesabundanceMods) RandomCreatedDate(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSpeciesabundanceMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) LastEditedUser(val null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetLastEditedUser() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.LastEditedUser = 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 fieldseekerSpeciesabundanceMods) RandomLastEditedUser(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerSpeciesabundanceMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) LastEditedDate(val null.Val[time.Time]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetLastEditedDate() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.LastEditedDate = 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 fieldseekerSpeciesabundanceMods) RandomLastEditedDate(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSpeciesabundanceMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Pupae(val null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Pupae = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) PupaeFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Pupae = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetPupae() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Pupae = 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 fieldseekerSpeciesabundanceMods) RandomPupae(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Pupae = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSpeciesabundanceMods) RandomPupaeNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Pupae = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Eggs(val null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Eggs = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) EggsFunc(f func() null.Val[int16]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Eggs = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetEggs() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Eggs = 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 fieldseekerSpeciesabundanceMods) RandomEggs(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Eggs = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerSpeciesabundanceMods) RandomEggsNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Eggs = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Females(val null.Val[int32]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Females = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) FemalesFunc(f func() null.Val[int32]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Females = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetFemales() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Females = 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 fieldseekerSpeciesabundanceMods) RandomFemales(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Females = 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 fieldseekerSpeciesabundanceMods) RandomFemalesNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Females = 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 fieldseekerSpeciesabundanceMods) Total(val null.Val[int32]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Total = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) TotalFunc(f func() null.Val[int32]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Total = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetTotal() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Total = 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 fieldseekerSpeciesabundanceMods) RandomTotal(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Total = 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 fieldseekerSpeciesabundanceMods) RandomTotalNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Total = 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 fieldseekerSpeciesabundanceMods) Creationdate(val null.Val[time.Time]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetCreationdate() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Creationdate = 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 fieldseekerSpeciesabundanceMods) RandomCreationdate(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSpeciesabundanceMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Creator(val null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) CreatorFunc(f func() null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetCreator() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Creator = 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 fieldseekerSpeciesabundanceMods) RandomCreator(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerSpeciesabundanceMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Editdate(val null.Val[time.Time]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetEditdate() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Editdate = 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 fieldseekerSpeciesabundanceMods) RandomEditdate(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerSpeciesabundanceMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Editor(val null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) EditorFunc(f func() null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetEditor() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Editor = 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 fieldseekerSpeciesabundanceMods) RandomEditor(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerSpeciesabundanceMods) RandomEditorNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) Yearweek(val null.Val[int32]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Yearweek = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) YearweekFunc(f func() null.Val[int32]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Yearweek = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetYearweek() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Yearweek = 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 fieldseekerSpeciesabundanceMods) RandomYearweek(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Yearweek = 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 fieldseekerSpeciesabundanceMods) RandomYearweekNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Yearweek = 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 fieldseekerSpeciesabundanceMods) Globalzscore(val null.Val[float64]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Globalzscore = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) GlobalzscoreFunc(f func() null.Val[float64]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Globalzscore = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetGlobalzscore() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Globalzscore = 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 fieldseekerSpeciesabundanceMods) RandomGlobalzscore(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Globalzscore = 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 fieldseekerSpeciesabundanceMods) RandomGlobalzscoreNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.Globalzscore = 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 fieldseekerSpeciesabundanceMods) R7score(val null.Val[float64]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.R7score = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) R7scoreFunc(f func() null.Val[float64]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.R7score = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetR7score() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.R7score = 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 fieldseekerSpeciesabundanceMods) RandomR7score(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.R7score = 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 fieldseekerSpeciesabundanceMods) RandomR7scoreNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.R7score = 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 fieldseekerSpeciesabundanceMods) R8score(val null.Val[float64]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.R8score = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) R8scoreFunc(f func() null.Val[float64]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.R8score = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetR8score() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.R8score = 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 fieldseekerSpeciesabundanceMods) RandomR8score(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.R8score = 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 fieldseekerSpeciesabundanceMods) RandomR8scoreNotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.R8score = 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 fieldseekerSpeciesabundanceMods) H3R7(val null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.H3R7 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) H3R7Func(f func() null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.H3R7 = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetH3R7() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.H3R7 = 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 fieldseekerSpeciesabundanceMods) RandomH3R7(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.H3R7 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "256") + 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 fieldseekerSpeciesabundanceMods) RandomH3R7NotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.H3R7 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "256") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerSpeciesabundanceMods) H3R8(val null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.H3R8 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerSpeciesabundanceMods) H3R8Func(f func() null.Val[string]) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.H3R8 = f + }) +} + +// Clear any values for the column +func (m fieldseekerSpeciesabundanceMods) UnsetH3R8() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.H3R8 = 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 fieldseekerSpeciesabundanceMods) RandomH3R8(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.H3R8 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "256") + 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 fieldseekerSpeciesabundanceMods) RandomH3R8NotNull(f *faker.Faker) FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(_ context.Context, o *FieldseekerSpeciesabundanceTemplate) { + o.H3R8 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "256") + return null.From(val) + } + }) +} + +func (m fieldseekerSpeciesabundanceMods) WithParentsCascading() FieldseekerSpeciesabundanceMod { + return FieldseekerSpeciesabundanceModFunc(func(ctx context.Context, o *FieldseekerSpeciesabundanceTemplate) { + if isDone, _ := fieldseekerSpeciesabundanceWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerSpeciesabundanceWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.stormdrain.bob.go b/db/factory/fieldseeker.stormdrain.bob.go new file mode 100644 index 00000000..c0e69695 --- /dev/null +++ b/db/factory/fieldseeker.stormdrain.bob.go @@ -0,0 +1,1372 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerStormdrainMod interface { + Apply(context.Context, *FieldseekerStormdrainTemplate) +} + +type FieldseekerStormdrainModFunc func(context.Context, *FieldseekerStormdrainTemplate) + +func (f FieldseekerStormdrainModFunc) Apply(ctx context.Context, n *FieldseekerStormdrainTemplate) { + f(ctx, n) +} + +type FieldseekerStormdrainModSlice []FieldseekerStormdrainMod + +func (mods FieldseekerStormdrainModSlice) Apply(ctx context.Context, n *FieldseekerStormdrainTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerStormdrainTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerStormdrainTemplate struct { + Objectid func() int64 + Nexttreatmentdate func() null.Val[time.Time] + Lasttreatdate func() null.Val[time.Time] + Lastaction func() null.Val[string] + Symbology func() null.Val[enums.FieldseekerStormdrainStormdrainsymbologyEnum] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Laststatus func() null.Val[string] + Zone func() null.Val[string] + Zone2 func() null.Val[string] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Type func() null.Val[string] + Jurisdiction func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerStormdrainTemplate +func (o *FieldseekerStormdrainTemplate) Apply(ctx context.Context, mods ...FieldseekerStormdrainMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerStormdrain +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerStormdrainTemplate) setModelRels(o *models.FieldseekerStormdrain) {} + +// BuildSetter returns an *models.FieldseekerStormdrainSetter +// this does nothing with the relationship templates +func (o FieldseekerStormdrainTemplate) BuildSetter() *models.FieldseekerStormdrainSetter { + m := &models.FieldseekerStormdrainSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Nexttreatmentdate != nil { + val := o.Nexttreatmentdate() + m.Nexttreatmentdate = omitnull.FromNull(val) + } + if o.Lasttreatdate != nil { + val := o.Lasttreatdate() + m.Lasttreatdate = omitnull.FromNull(val) + } + if o.Lastaction != nil { + val := o.Lastaction() + m.Lastaction = omitnull.FromNull(val) + } + if o.Symbology != nil { + val := o.Symbology() + m.Symbology = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Laststatus != nil { + val := o.Laststatus() + m.Laststatus = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Type != nil { + val := o.Type() + m.Type = omitnull.FromNull(val) + } + if o.Jurisdiction != nil { + val := o.Jurisdiction() + m.Jurisdiction = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerStormdrainSetter +// this does nothing with the relationship templates +func (o FieldseekerStormdrainTemplate) BuildManySetter(number int) []*models.FieldseekerStormdrainSetter { + m := make([]*models.FieldseekerStormdrainSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerStormdrain +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerStormdrainTemplate.Create +func (o FieldseekerStormdrainTemplate) Build() *models.FieldseekerStormdrain { + m := &models.FieldseekerStormdrain{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Nexttreatmentdate != nil { + m.Nexttreatmentdate = o.Nexttreatmentdate() + } + if o.Lasttreatdate != nil { + m.Lasttreatdate = o.Lasttreatdate() + } + if o.Lastaction != nil { + m.Lastaction = o.Lastaction() + } + if o.Symbology != nil { + m.Symbology = o.Symbology() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Laststatus != nil { + m.Laststatus = o.Laststatus() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Type != nil { + m.Type = o.Type() + } + if o.Jurisdiction != nil { + m.Jurisdiction = o.Jurisdiction() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerStormdrainSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerStormdrainTemplate.CreateMany +func (o FieldseekerStormdrainTemplate) BuildMany(number int) models.FieldseekerStormdrainSlice { + m := make(models.FieldseekerStormdrainSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerStormdrain(m *models.FieldseekerStormdrainSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerStormdrain +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerStormdrainTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerStormdrain) error { + var err error + + return err +} + +// Create builds a fieldseekerStormdrain and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerStormdrainTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerStormdrain, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerStormdrain(opt) + + m, err := models.FieldseekerStormdrains.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 fieldseekerStormdrain and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerStormdrainTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerStormdrain { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerStormdrain 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 *FieldseekerStormdrainTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerStormdrain { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerStormdrains and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerStormdrainTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerStormdrainSlice, error) { + var err error + m := make(models.FieldseekerStormdrainSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerStormdrains and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerStormdrainTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerStormdrainSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerStormdrains 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 FieldseekerStormdrainTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerStormdrainSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerStormdrain has methods that act as mods for the FieldseekerStormdrainTemplate +var FieldseekerStormdrainMods fieldseekerStormdrainMods + +type fieldseekerStormdrainMods struct{} + +func (m fieldseekerStormdrainMods) RandomizeAllColumns(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModSlice{ + FieldseekerStormdrainMods.RandomObjectid(f), + FieldseekerStormdrainMods.RandomNexttreatmentdate(f), + FieldseekerStormdrainMods.RandomLasttreatdate(f), + FieldseekerStormdrainMods.RandomLastaction(f), + FieldseekerStormdrainMods.RandomSymbology(f), + FieldseekerStormdrainMods.RandomGlobalid(f), + FieldseekerStormdrainMods.RandomCreatedUser(f), + FieldseekerStormdrainMods.RandomCreatedDate(f), + FieldseekerStormdrainMods.RandomLastEditedUser(f), + FieldseekerStormdrainMods.RandomLastEditedDate(f), + FieldseekerStormdrainMods.RandomLaststatus(f), + FieldseekerStormdrainMods.RandomZone(f), + FieldseekerStormdrainMods.RandomZone2(f), + FieldseekerStormdrainMods.RandomCreationdate(f), + FieldseekerStormdrainMods.RandomCreator(f), + FieldseekerStormdrainMods.RandomEditdate(f), + FieldseekerStormdrainMods.RandomEditor(f), + FieldseekerStormdrainMods.RandomType(f), + FieldseekerStormdrainMods.RandomJurisdiction(f), + } +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Objectid(val int64) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) ObjectidFunc(f func() int64) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetObjectid() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerStormdrainMods) RandomObjectid(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Nexttreatmentdate(val null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Nexttreatmentdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) NexttreatmentdateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Nexttreatmentdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetNexttreatmentdate() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Nexttreatmentdate = 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 fieldseekerStormdrainMods) RandomNexttreatmentdate(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Nexttreatmentdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerStormdrainMods) RandomNexttreatmentdateNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Nexttreatmentdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Lasttreatdate(val null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) LasttreatdateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Lasttreatdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetLasttreatdate() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Lasttreatdate = 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 fieldseekerStormdrainMods) RandomLasttreatdate(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerStormdrainMods) RandomLasttreatdateNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Lasttreatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Lastaction(val null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Lastaction = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) LastactionFunc(f func() null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Lastaction = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetLastaction() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Lastaction = 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 fieldseekerStormdrainMods) RandomLastaction(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Lastaction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerStormdrainMods) RandomLastactionNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Lastaction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Symbology(val null.Val[enums.FieldseekerStormdrainStormdrainsymbologyEnum]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerStormdrainStormdrainsymbologyEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) SymbologyFunc(f func() null.Val[enums.FieldseekerStormdrainStormdrainsymbologyEnum]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Symbology = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetSymbology() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Symbology = 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 fieldseekerStormdrainMods) RandomSymbology(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerStormdrainStormdrainsymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerStormdrainStormdrainsymbologyEnum(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 fieldseekerStormdrainMods) RandomSymbologyNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Symbology = func() null.Val[enums.FieldseekerStormdrainStormdrainsymbologyEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerStormdrainStormdrainsymbologyEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Globalid(val null.Val[uuid.UUID]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetGlobalid() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Globalid = 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 fieldseekerStormdrainMods) RandomGlobalid(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Globalid = 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 fieldseekerStormdrainMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Globalid = 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 fieldseekerStormdrainMods) CreatedUser(val null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetCreatedUser() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.CreatedUser = 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 fieldseekerStormdrainMods) RandomCreatedUser(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerStormdrainMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) CreatedDate(val null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetCreatedDate() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.CreatedDate = 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 fieldseekerStormdrainMods) RandomCreatedDate(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerStormdrainMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) LastEditedUser(val null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetLastEditedUser() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.LastEditedUser = 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 fieldseekerStormdrainMods) RandomLastEditedUser(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerStormdrainMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) LastEditedDate(val null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetLastEditedDate() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.LastEditedDate = 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 fieldseekerStormdrainMods) RandomLastEditedDate(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerStormdrainMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Laststatus(val null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Laststatus = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) LaststatusFunc(f func() null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Laststatus = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetLaststatus() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Laststatus = 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 fieldseekerStormdrainMods) RandomLaststatus(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Laststatus = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerStormdrainMods) RandomLaststatusNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Laststatus = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Zone(val null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) ZoneFunc(f func() null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetZone() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Zone = 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 fieldseekerStormdrainMods) RandomZone(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerStormdrainMods) RandomZoneNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Zone2(val null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) Zone2Func(f func() null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetZone2() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Zone2 = 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 fieldseekerStormdrainMods) RandomZone2(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerStormdrainMods) RandomZone2NotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Creationdate(val null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetCreationdate() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Creationdate = 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 fieldseekerStormdrainMods) RandomCreationdate(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerStormdrainMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Creator(val null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) CreatorFunc(f func() null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetCreator() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Creator = 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 fieldseekerStormdrainMods) RandomCreator(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerStormdrainMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Editdate(val null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetEditdate() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Editdate = 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 fieldseekerStormdrainMods) RandomEditdate(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerStormdrainMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Editor(val null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) EditorFunc(f func() null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetEditor() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Editor = 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 fieldseekerStormdrainMods) RandomEditor(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerStormdrainMods) RandomEditorNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Type(val null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Type = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) TypeFunc(f func() null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Type = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetType() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Type = 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 fieldseekerStormdrainMods) RandomType(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Type = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerStormdrainMods) RandomTypeNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Type = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerStormdrainMods) Jurisdiction(val null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Jurisdiction = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerStormdrainMods) JurisdictionFunc(f func() null.Val[string]) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Jurisdiction = f + }) +} + +// Clear any values for the column +func (m fieldseekerStormdrainMods) UnsetJurisdiction() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Jurisdiction = 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 fieldseekerStormdrainMods) RandomJurisdiction(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerStormdrainMods) RandomJurisdictionNotNull(f *faker.Faker) FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) { + o.Jurisdiction = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +func (m fieldseekerStormdrainMods) WithParentsCascading() FieldseekerStormdrainMod { + return FieldseekerStormdrainModFunc(func(ctx context.Context, o *FieldseekerStormdrainTemplate) { + if isDone, _ := fieldseekerStormdrainWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerStormdrainWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.timecard.bob.go b/db/factory/fieldseeker.timecard.bob.go new file mode 100644 index 00000000..2c78c3b0 --- /dev/null +++ b/db/factory/fieldseeker.timecard.bob.go @@ -0,0 +1,1932 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerTimecardMod interface { + Apply(context.Context, *FieldseekerTimecardTemplate) +} + +type FieldseekerTimecardModFunc func(context.Context, *FieldseekerTimecardTemplate) + +func (f FieldseekerTimecardModFunc) Apply(ctx context.Context, n *FieldseekerTimecardTemplate) { + f(ctx, n) +} + +type FieldseekerTimecardModSlice []FieldseekerTimecardMod + +func (mods FieldseekerTimecardModSlice) Apply(ctx context.Context, n *FieldseekerTimecardTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerTimecardTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerTimecardTemplate struct { + Objectid func() int64 + Activity func() null.Val[enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu] + Startdatetime func() null.Val[time.Time] + Enddatetime func() null.Val[time.Time] + Comments func() null.Val[string] + Externalid func() null.Val[string] + Equiptype func() null.Val[enums.FieldseekerTimecardTimecardequipmenttypeEnum] + Locationname func() null.Val[string] + Zone func() null.Val[string] + Zone2 func() null.Val[string] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Linelocid func() null.Val[uuid.UUID] + Pointlocid func() null.Val[uuid.UUID] + Polygonlocid func() null.Val[uuid.UUID] + Lclocid func() null.Val[uuid.UUID] + Samplelocid func() null.Val[uuid.UUID] + Srid func() null.Val[uuid.UUID] + Traplocid func() null.Val[uuid.UUID] + Fieldtech func() null.Val[string] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Rodentlocid func() null.Val[uuid.UUID] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerTimecardTemplate +func (o *FieldseekerTimecardTemplate) Apply(ctx context.Context, mods ...FieldseekerTimecardMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerTimecard +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerTimecardTemplate) setModelRels(o *models.FieldseekerTimecard) {} + +// BuildSetter returns an *models.FieldseekerTimecardSetter +// this does nothing with the relationship templates +func (o FieldseekerTimecardTemplate) BuildSetter() *models.FieldseekerTimecardSetter { + m := &models.FieldseekerTimecardSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Activity != nil { + val := o.Activity() + m.Activity = omitnull.FromNull(val) + } + if o.Startdatetime != nil { + val := o.Startdatetime() + m.Startdatetime = omitnull.FromNull(val) + } + if o.Enddatetime != nil { + val := o.Enddatetime() + m.Enddatetime = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Externalid != nil { + val := o.Externalid() + m.Externalid = omitnull.FromNull(val) + } + if o.Equiptype != nil { + val := o.Equiptype() + m.Equiptype = omitnull.FromNull(val) + } + if o.Locationname != nil { + val := o.Locationname() + m.Locationname = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Linelocid != nil { + val := o.Linelocid() + m.Linelocid = omitnull.FromNull(val) + } + if o.Pointlocid != nil { + val := o.Pointlocid() + m.Pointlocid = omitnull.FromNull(val) + } + if o.Polygonlocid != nil { + val := o.Polygonlocid() + m.Polygonlocid = omitnull.FromNull(val) + } + if o.Lclocid != nil { + val := o.Lclocid() + m.Lclocid = omitnull.FromNull(val) + } + if o.Samplelocid != nil { + val := o.Samplelocid() + m.Samplelocid = omitnull.FromNull(val) + } + if o.Srid != nil { + val := o.Srid() + m.Srid = omitnull.FromNull(val) + } + if o.Traplocid != nil { + val := o.Traplocid() + m.Traplocid = omitnull.FromNull(val) + } + if o.Fieldtech != nil { + val := o.Fieldtech() + m.Fieldtech = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Rodentlocid != nil { + val := o.Rodentlocid() + m.Rodentlocid = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerTimecardSetter +// this does nothing with the relationship templates +func (o FieldseekerTimecardTemplate) BuildManySetter(number int) []*models.FieldseekerTimecardSetter { + m := make([]*models.FieldseekerTimecardSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerTimecard +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTimecardTemplate.Create +func (o FieldseekerTimecardTemplate) Build() *models.FieldseekerTimecard { + m := &models.FieldseekerTimecard{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Activity != nil { + m.Activity = o.Activity() + } + if o.Startdatetime != nil { + m.Startdatetime = o.Startdatetime() + } + if o.Enddatetime != nil { + m.Enddatetime = o.Enddatetime() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Externalid != nil { + m.Externalid = o.Externalid() + } + if o.Equiptype != nil { + m.Equiptype = o.Equiptype() + } + if o.Locationname != nil { + m.Locationname = o.Locationname() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Linelocid != nil { + m.Linelocid = o.Linelocid() + } + if o.Pointlocid != nil { + m.Pointlocid = o.Pointlocid() + } + if o.Polygonlocid != nil { + m.Polygonlocid = o.Polygonlocid() + } + if o.Lclocid != nil { + m.Lclocid = o.Lclocid() + } + if o.Samplelocid != nil { + m.Samplelocid = o.Samplelocid() + } + if o.Srid != nil { + m.Srid = o.Srid() + } + if o.Traplocid != nil { + m.Traplocid = o.Traplocid() + } + if o.Fieldtech != nil { + m.Fieldtech = o.Fieldtech() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Rodentlocid != nil { + m.Rodentlocid = o.Rodentlocid() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerTimecardSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTimecardTemplate.CreateMany +func (o FieldseekerTimecardTemplate) BuildMany(number int) models.FieldseekerTimecardSlice { + m := make(models.FieldseekerTimecardSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerTimecard(m *models.FieldseekerTimecardSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerTimecard +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerTimecardTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerTimecard) error { + var err error + + return err +} + +// Create builds a fieldseekerTimecard and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerTimecardTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerTimecard, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerTimecard(opt) + + m, err := models.FieldseekerTimecards.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 fieldseekerTimecard and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerTimecardTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerTimecard { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerTimecard 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 *FieldseekerTimecardTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerTimecard { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerTimecards and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerTimecardTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerTimecardSlice, error) { + var err error + m := make(models.FieldseekerTimecardSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerTimecards and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerTimecardTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerTimecardSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerTimecards 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 FieldseekerTimecardTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerTimecardSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerTimecard has methods that act as mods for the FieldseekerTimecardTemplate +var FieldseekerTimecardMods fieldseekerTimecardMods + +type fieldseekerTimecardMods struct{} + +func (m fieldseekerTimecardMods) RandomizeAllColumns(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModSlice{ + FieldseekerTimecardMods.RandomObjectid(f), + FieldseekerTimecardMods.RandomActivity(f), + FieldseekerTimecardMods.RandomStartdatetime(f), + FieldseekerTimecardMods.RandomEnddatetime(f), + FieldseekerTimecardMods.RandomComments(f), + FieldseekerTimecardMods.RandomExternalid(f), + FieldseekerTimecardMods.RandomEquiptype(f), + FieldseekerTimecardMods.RandomLocationname(f), + FieldseekerTimecardMods.RandomZone(f), + FieldseekerTimecardMods.RandomZone2(f), + FieldseekerTimecardMods.RandomGlobalid(f), + FieldseekerTimecardMods.RandomCreatedUser(f), + FieldseekerTimecardMods.RandomCreatedDate(f), + FieldseekerTimecardMods.RandomLastEditedUser(f), + FieldseekerTimecardMods.RandomLastEditedDate(f), + FieldseekerTimecardMods.RandomLinelocid(f), + FieldseekerTimecardMods.RandomPointlocid(f), + FieldseekerTimecardMods.RandomPolygonlocid(f), + FieldseekerTimecardMods.RandomLclocid(f), + FieldseekerTimecardMods.RandomSamplelocid(f), + FieldseekerTimecardMods.RandomSrid(f), + FieldseekerTimecardMods.RandomTraplocid(f), + FieldseekerTimecardMods.RandomFieldtech(f), + FieldseekerTimecardMods.RandomCreationdate(f), + FieldseekerTimecardMods.RandomCreator(f), + FieldseekerTimecardMods.RandomEditdate(f), + FieldseekerTimecardMods.RandomEditor(f), + FieldseekerTimecardMods.RandomRodentlocid(f), + } +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Objectid(val int64) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) ObjectidFunc(f func() int64) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetObjectid() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerTimecardMods) RandomObjectid(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Activity(val null.Val[enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Activity = func() null.Val[enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) ActivityFunc(f func() null.Val[enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Activity = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetActivity() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Activity = 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 fieldseekerTimecardMods) RandomActivity(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Activity = func() null.Val[enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu(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 fieldseekerTimecardMods) RandomActivityNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Activity = func() null.Val[enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Startdatetime(val null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Startdatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) StartdatetimeFunc(f func() null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Startdatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetStartdatetime() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Startdatetime = 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 fieldseekerTimecardMods) RandomStartdatetime(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTimecardMods) RandomStartdatetimeNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Enddatetime(val null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Enddatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) EnddatetimeFunc(f func() null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Enddatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetEnddatetime() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Enddatetime = 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 fieldseekerTimecardMods) RandomEnddatetime(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTimecardMods) RandomEnddatetimeNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Comments(val null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) CommentsFunc(f func() null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetComments() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Comments = 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 fieldseekerTimecardMods) RandomComments(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerTimecardMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Externalid(val null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Externalid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) ExternalidFunc(f func() null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Externalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetExternalid() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Externalid = 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 fieldseekerTimecardMods) RandomExternalid(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTimecardMods) RandomExternalidNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Equiptype(val null.Val[enums.FieldseekerTimecardTimecardequipmenttypeEnum]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Equiptype = func() null.Val[enums.FieldseekerTimecardTimecardequipmenttypeEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) EquiptypeFunc(f func() null.Val[enums.FieldseekerTimecardTimecardequipmenttypeEnum]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Equiptype = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetEquiptype() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Equiptype = 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 fieldseekerTimecardMods) RandomEquiptype(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Equiptype = func() null.Val[enums.FieldseekerTimecardTimecardequipmenttypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTimecardTimecardequipmenttypeEnum(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 fieldseekerTimecardMods) RandomEquiptypeNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Equiptype = func() null.Val[enums.FieldseekerTimecardTimecardequipmenttypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTimecardTimecardequipmenttypeEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Locationname(val null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Locationname = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) LocationnameFunc(f func() null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Locationname = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetLocationname() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Locationname = 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 fieldseekerTimecardMods) RandomLocationname(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTimecardMods) RandomLocationnameNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Zone(val null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) ZoneFunc(f func() null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetZone() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Zone = 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 fieldseekerTimecardMods) RandomZone(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTimecardMods) RandomZoneNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Zone2(val null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) Zone2Func(f func() null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetZone2() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Zone2 = 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 fieldseekerTimecardMods) RandomZone2(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTimecardMods) RandomZone2NotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Globalid(val null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetGlobalid() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Globalid = 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 fieldseekerTimecardMods) RandomGlobalid(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Globalid = 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 fieldseekerTimecardMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Globalid = 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 fieldseekerTimecardMods) CreatedUser(val null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetCreatedUser() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.CreatedUser = 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 fieldseekerTimecardMods) RandomCreatedUser(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerTimecardMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) CreatedDate(val null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetCreatedDate() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.CreatedDate = 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 fieldseekerTimecardMods) RandomCreatedDate(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTimecardMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) LastEditedUser(val null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetLastEditedUser() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.LastEditedUser = 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 fieldseekerTimecardMods) RandomLastEditedUser(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerTimecardMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) LastEditedDate(val null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetLastEditedDate() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.LastEditedDate = 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 fieldseekerTimecardMods) RandomLastEditedDate(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTimecardMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Linelocid(val null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Linelocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) LinelocidFunc(f func() null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Linelocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetLinelocid() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Linelocid = 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 fieldseekerTimecardMods) RandomLinelocid(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Linelocid = 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 fieldseekerTimecardMods) RandomLinelocidNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Linelocid = 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 fieldseekerTimecardMods) Pointlocid(val null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Pointlocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) PointlocidFunc(f func() null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Pointlocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetPointlocid() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Pointlocid = 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 fieldseekerTimecardMods) RandomPointlocid(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Pointlocid = 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 fieldseekerTimecardMods) RandomPointlocidNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Pointlocid = 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 fieldseekerTimecardMods) Polygonlocid(val null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Polygonlocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) PolygonlocidFunc(f func() null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Polygonlocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetPolygonlocid() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Polygonlocid = 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 fieldseekerTimecardMods) RandomPolygonlocid(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Polygonlocid = 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 fieldseekerTimecardMods) RandomPolygonlocidNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Polygonlocid = 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 fieldseekerTimecardMods) Lclocid(val null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Lclocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) LclocidFunc(f func() null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Lclocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetLclocid() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Lclocid = 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 fieldseekerTimecardMods) RandomLclocid(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Lclocid = 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 fieldseekerTimecardMods) RandomLclocidNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Lclocid = 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 fieldseekerTimecardMods) Samplelocid(val null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Samplelocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) SamplelocidFunc(f func() null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Samplelocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetSamplelocid() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Samplelocid = 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 fieldseekerTimecardMods) RandomSamplelocid(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Samplelocid = 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 fieldseekerTimecardMods) RandomSamplelocidNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Samplelocid = 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 fieldseekerTimecardMods) Srid(val null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Srid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) SridFunc(f func() null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Srid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetSrid() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Srid = 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 fieldseekerTimecardMods) RandomSrid(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Srid = 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 fieldseekerTimecardMods) RandomSridNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Srid = 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 fieldseekerTimecardMods) Traplocid(val null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Traplocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) TraplocidFunc(f func() null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Traplocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetTraplocid() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Traplocid = 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 fieldseekerTimecardMods) RandomTraplocid(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Traplocid = 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 fieldseekerTimecardMods) RandomTraplocidNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Traplocid = 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 fieldseekerTimecardMods) Fieldtech(val null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Fieldtech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) FieldtechFunc(f func() null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Fieldtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetFieldtech() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Fieldtech = 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 fieldseekerTimecardMods) RandomFieldtech(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTimecardMods) RandomFieldtechNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Creationdate(val null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetCreationdate() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Creationdate = 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 fieldseekerTimecardMods) RandomCreationdate(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTimecardMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Creator(val null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) CreatorFunc(f func() null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetCreator() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Creator = 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 fieldseekerTimecardMods) RandomCreator(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerTimecardMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Editdate(val null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetEditdate() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Editdate = 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 fieldseekerTimecardMods) RandomEditdate(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTimecardMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Editor(val null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) EditorFunc(f func() null.Val[string]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetEditor() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Editor = 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 fieldseekerTimecardMods) RandomEditor(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerTimecardMods) RandomEditorNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTimecardMods) Rodentlocid(val null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Rodentlocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTimecardMods) RodentlocidFunc(f func() null.Val[uuid.UUID]) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Rodentlocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTimecardMods) UnsetRodentlocid() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Rodentlocid = 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 fieldseekerTimecardMods) RandomRodentlocid(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Rodentlocid = 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 fieldseekerTimecardMods) RandomRodentlocidNotNull(f *faker.Faker) FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(_ context.Context, o *FieldseekerTimecardTemplate) { + o.Rodentlocid = func() null.Val[uuid.UUID] { + if f == nil { + f = &defaultFaker + } + + val := random_uuid_UUID(f) + return null.From(val) + } + }) +} + +func (m fieldseekerTimecardMods) WithParentsCascading() FieldseekerTimecardMod { + return FieldseekerTimecardModFunc(func(ctx context.Context, o *FieldseekerTimecardTemplate) { + if isDone, _ := fieldseekerTimecardWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerTimecardWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.tracklog.bob.go b/db/factory/fieldseeker.tracklog.bob.go new file mode 100644 index 00000000..377fa181 --- /dev/null +++ b/db/factory/fieldseeker.tracklog.bob.go @@ -0,0 +1,90 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerTracklogMod interface { + Apply(context.Context, *FieldseekerTracklogTemplate) +} + +type FieldseekerTracklogModFunc func(context.Context, *FieldseekerTracklogTemplate) + +func (f FieldseekerTracklogModFunc) Apply(ctx context.Context, n *FieldseekerTracklogTemplate) { + f(ctx, n) +} + +type FieldseekerTracklogModSlice []FieldseekerTracklogMod + +func (mods FieldseekerTracklogModSlice) Apply(ctx context.Context, n *FieldseekerTracklogTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerTracklogTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerTracklogTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerTracklogTemplate +func (o *FieldseekerTracklogTemplate) Apply(ctx context.Context, mods ...FieldseekerTracklogMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerTracklog +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerTracklogTemplate) setModelRels(o *models.FieldseekerTracklog) {} + +// Build returns an *models.FieldseekerTracklog +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTracklogTemplate.Create +func (o FieldseekerTracklogTemplate) Build() *models.FieldseekerTracklog { + m := &models.FieldseekerTracklog{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerTracklogSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTracklogTemplate.CreateMany +func (o FieldseekerTracklogTemplate) BuildMany(number int) models.FieldseekerTracklogSlice { + m := make(models.FieldseekerTracklogSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerTracklog has methods that act as mods for the FieldseekerTracklogTemplate +var FieldseekerTracklogMods fieldseekerTracklogMods + +type fieldseekerTracklogMods struct{} + +func (m fieldseekerTracklogMods) RandomizeAllColumns(f *faker.Faker) FieldseekerTracklogMod { + return FieldseekerTracklogModSlice{} +} + +func (m fieldseekerTracklogMods) WithParentsCascading() FieldseekerTracklogMod { + return FieldseekerTracklogModFunc(func(ctx context.Context, o *FieldseekerTracklogTemplate) { + if isDone, _ := fieldseekerTracklogWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerTracklogWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.trapdata.bob.go b/db/factory/fieldseeker.trapdata.bob.go new file mode 100644 index 00000000..22c233d8 --- /dev/null +++ b/db/factory/fieldseeker.trapdata.bob.go @@ -0,0 +1,2798 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerTrapdatumMod interface { + Apply(context.Context, *FieldseekerTrapdatumTemplate) +} + +type FieldseekerTrapdatumModFunc func(context.Context, *FieldseekerTrapdatumTemplate) + +func (f FieldseekerTrapdatumModFunc) Apply(ctx context.Context, n *FieldseekerTrapdatumTemplate) { + f(ctx, n) +} + +type FieldseekerTrapdatumModSlice []FieldseekerTrapdatumMod + +func (mods FieldseekerTrapdatumModSlice) Apply(ctx context.Context, n *FieldseekerTrapdatumTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerTrapdatumTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerTrapdatumTemplate struct { + Objectid func() int64 + Traptype func() null.Val[enums.FieldseekerTrapdataMosquitotraptypeEnum] + Trapactivitytype func() null.Val[enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum] + Startdatetime func() null.Val[time.Time] + Enddatetime func() null.Val[time.Time] + Comments func() null.Val[string] + Idbytech func() null.Val[string] + Sortbytech func() null.Val[string] + Processed func() null.Val[enums.FieldseekerTrapdataNotinuitFEnum] + Sitecond func() null.Val[enums.FieldseekerTrapdataMosquitositeconditionEnum] + Locationname func() null.Val[string] + Recordstatus func() null.Val[int16] + Reviewed func() null.Val[enums.FieldseekerTrapdataNotinuitFEnum] + Reviewedby func() null.Val[string] + Revieweddate func() null.Val[time.Time] + Trapcondition func() null.Val[enums.FieldseekerTrapdataMosquitotrapconditionEnum] + Trapnights func() null.Val[int16] + Zone func() null.Val[string] + Zone2 func() null.Val[string] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Srid func() null.Val[uuid.UUID] + Fieldtech func() null.Val[string] + Gatewaysync func() null.Val[int16] + LocID func() null.Val[uuid.UUID] + Voltage func() null.Val[float64] + Winddir func() null.Val[enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166] + Windspeed func() null.Val[float64] + Avetemp func() null.Val[float64] + Raingauge func() null.Val[float64] + LR func() null.Val[int16] + Field func() null.Val[int32] + Vectorsurvtrapdataid func() null.Val[string] + Vectorsurvtraplocationid func() null.Val[string] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Lure func() null.Val[enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerTrapdatumTemplate +func (o *FieldseekerTrapdatumTemplate) Apply(ctx context.Context, mods ...FieldseekerTrapdatumMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerTrapdatum +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerTrapdatumTemplate) setModelRels(o *models.FieldseekerTrapdatum) {} + +// BuildSetter returns an *models.FieldseekerTrapdatumSetter +// this does nothing with the relationship templates +func (o FieldseekerTrapdatumTemplate) BuildSetter() *models.FieldseekerTrapdatumSetter { + m := &models.FieldseekerTrapdatumSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Traptype != nil { + val := o.Traptype() + m.Traptype = omitnull.FromNull(val) + } + if o.Trapactivitytype != nil { + val := o.Trapactivitytype() + m.Trapactivitytype = omitnull.FromNull(val) + } + if o.Startdatetime != nil { + val := o.Startdatetime() + m.Startdatetime = omitnull.FromNull(val) + } + if o.Enddatetime != nil { + val := o.Enddatetime() + m.Enddatetime = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Idbytech != nil { + val := o.Idbytech() + m.Idbytech = omitnull.FromNull(val) + } + if o.Sortbytech != nil { + val := o.Sortbytech() + m.Sortbytech = omitnull.FromNull(val) + } + if o.Processed != nil { + val := o.Processed() + m.Processed = omitnull.FromNull(val) + } + if o.Sitecond != nil { + val := o.Sitecond() + m.Sitecond = omitnull.FromNull(val) + } + if o.Locationname != nil { + val := o.Locationname() + m.Locationname = omitnull.FromNull(val) + } + if o.Recordstatus != nil { + val := o.Recordstatus() + m.Recordstatus = omitnull.FromNull(val) + } + if o.Reviewed != nil { + val := o.Reviewed() + m.Reviewed = omitnull.FromNull(val) + } + if o.Reviewedby != nil { + val := o.Reviewedby() + m.Reviewedby = omitnull.FromNull(val) + } + if o.Revieweddate != nil { + val := o.Revieweddate() + m.Revieweddate = omitnull.FromNull(val) + } + if o.Trapcondition != nil { + val := o.Trapcondition() + m.Trapcondition = omitnull.FromNull(val) + } + if o.Trapnights != nil { + val := o.Trapnights() + m.Trapnights = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Srid != nil { + val := o.Srid() + m.Srid = omitnull.FromNull(val) + } + if o.Fieldtech != nil { + val := o.Fieldtech() + m.Fieldtech = omitnull.FromNull(val) + } + if o.Gatewaysync != nil { + val := o.Gatewaysync() + m.Gatewaysync = omitnull.FromNull(val) + } + if o.LocID != nil { + val := o.LocID() + m.LocID = omitnull.FromNull(val) + } + if o.Voltage != nil { + val := o.Voltage() + m.Voltage = omitnull.FromNull(val) + } + if o.Winddir != nil { + val := o.Winddir() + m.Winddir = omitnull.FromNull(val) + } + if o.Windspeed != nil { + val := o.Windspeed() + m.Windspeed = omitnull.FromNull(val) + } + if o.Avetemp != nil { + val := o.Avetemp() + m.Avetemp = omitnull.FromNull(val) + } + if o.Raingauge != nil { + val := o.Raingauge() + m.Raingauge = omitnull.FromNull(val) + } + if o.LR != nil { + val := o.LR() + m.LR = omitnull.FromNull(val) + } + if o.Field != nil { + val := o.Field() + m.Field = omitnull.FromNull(val) + } + if o.Vectorsurvtrapdataid != nil { + val := o.Vectorsurvtrapdataid() + m.Vectorsurvtrapdataid = omitnull.FromNull(val) + } + if o.Vectorsurvtraplocationid != nil { + val := o.Vectorsurvtraplocationid() + m.Vectorsurvtraplocationid = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Lure != nil { + val := o.Lure() + m.Lure = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerTrapdatumSetter +// this does nothing with the relationship templates +func (o FieldseekerTrapdatumTemplate) BuildManySetter(number int) []*models.FieldseekerTrapdatumSetter { + m := make([]*models.FieldseekerTrapdatumSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerTrapdatum +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTrapdatumTemplate.Create +func (o FieldseekerTrapdatumTemplate) Build() *models.FieldseekerTrapdatum { + m := &models.FieldseekerTrapdatum{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Traptype != nil { + m.Traptype = o.Traptype() + } + if o.Trapactivitytype != nil { + m.Trapactivitytype = o.Trapactivitytype() + } + if o.Startdatetime != nil { + m.Startdatetime = o.Startdatetime() + } + if o.Enddatetime != nil { + m.Enddatetime = o.Enddatetime() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Idbytech != nil { + m.Idbytech = o.Idbytech() + } + if o.Sortbytech != nil { + m.Sortbytech = o.Sortbytech() + } + if o.Processed != nil { + m.Processed = o.Processed() + } + if o.Sitecond != nil { + m.Sitecond = o.Sitecond() + } + if o.Locationname != nil { + m.Locationname = o.Locationname() + } + if o.Recordstatus != nil { + m.Recordstatus = o.Recordstatus() + } + if o.Reviewed != nil { + m.Reviewed = o.Reviewed() + } + if o.Reviewedby != nil { + m.Reviewedby = o.Reviewedby() + } + if o.Revieweddate != nil { + m.Revieweddate = o.Revieweddate() + } + if o.Trapcondition != nil { + m.Trapcondition = o.Trapcondition() + } + if o.Trapnights != nil { + m.Trapnights = o.Trapnights() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Srid != nil { + m.Srid = o.Srid() + } + if o.Fieldtech != nil { + m.Fieldtech = o.Fieldtech() + } + if o.Gatewaysync != nil { + m.Gatewaysync = o.Gatewaysync() + } + if o.LocID != nil { + m.LocID = o.LocID() + } + if o.Voltage != nil { + m.Voltage = o.Voltage() + } + if o.Winddir != nil { + m.Winddir = o.Winddir() + } + if o.Windspeed != nil { + m.Windspeed = o.Windspeed() + } + if o.Avetemp != nil { + m.Avetemp = o.Avetemp() + } + if o.Raingauge != nil { + m.Raingauge = o.Raingauge() + } + if o.LR != nil { + m.LR = o.LR() + } + if o.Field != nil { + m.Field = o.Field() + } + if o.Vectorsurvtrapdataid != nil { + m.Vectorsurvtrapdataid = o.Vectorsurvtrapdataid() + } + if o.Vectorsurvtraplocationid != nil { + m.Vectorsurvtraplocationid = o.Vectorsurvtraplocationid() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Lure != nil { + m.Lure = o.Lure() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerTrapdatumSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTrapdatumTemplate.CreateMany +func (o FieldseekerTrapdatumTemplate) BuildMany(number int) models.FieldseekerTrapdatumSlice { + m := make(models.FieldseekerTrapdatumSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerTrapdatum(m *models.FieldseekerTrapdatumSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerTrapdatum +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerTrapdatumTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerTrapdatum) error { + var err error + + return err +} + +// Create builds a fieldseekerTrapdatum and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerTrapdatumTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerTrapdatum, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerTrapdatum(opt) + + m, err := models.FieldseekerTrapdata.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 fieldseekerTrapdatum and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerTrapdatumTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerTrapdatum { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerTrapdatum 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 *FieldseekerTrapdatumTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerTrapdatum { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerTrapdata and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerTrapdatumTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerTrapdatumSlice, error) { + var err error + m := make(models.FieldseekerTrapdatumSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerTrapdata and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerTrapdatumTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerTrapdatumSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerTrapdata 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 FieldseekerTrapdatumTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerTrapdatumSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerTrapdatum has methods that act as mods for the FieldseekerTrapdatumTemplate +var FieldseekerTrapdatumMods fieldseekerTrapdatumMods + +type fieldseekerTrapdatumMods struct{} + +func (m fieldseekerTrapdatumMods) RandomizeAllColumns(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModSlice{ + FieldseekerTrapdatumMods.RandomObjectid(f), + FieldseekerTrapdatumMods.RandomTraptype(f), + FieldseekerTrapdatumMods.RandomTrapactivitytype(f), + FieldseekerTrapdatumMods.RandomStartdatetime(f), + FieldseekerTrapdatumMods.RandomEnddatetime(f), + FieldseekerTrapdatumMods.RandomComments(f), + FieldseekerTrapdatumMods.RandomIdbytech(f), + FieldseekerTrapdatumMods.RandomSortbytech(f), + FieldseekerTrapdatumMods.RandomProcessed(f), + FieldseekerTrapdatumMods.RandomSitecond(f), + FieldseekerTrapdatumMods.RandomLocationname(f), + FieldseekerTrapdatumMods.RandomRecordstatus(f), + FieldseekerTrapdatumMods.RandomReviewed(f), + FieldseekerTrapdatumMods.RandomReviewedby(f), + FieldseekerTrapdatumMods.RandomRevieweddate(f), + FieldseekerTrapdatumMods.RandomTrapcondition(f), + FieldseekerTrapdatumMods.RandomTrapnights(f), + FieldseekerTrapdatumMods.RandomZone(f), + FieldseekerTrapdatumMods.RandomZone2(f), + FieldseekerTrapdatumMods.RandomGlobalid(f), + FieldseekerTrapdatumMods.RandomCreatedUser(f), + FieldseekerTrapdatumMods.RandomCreatedDate(f), + FieldseekerTrapdatumMods.RandomLastEditedUser(f), + FieldseekerTrapdatumMods.RandomLastEditedDate(f), + FieldseekerTrapdatumMods.RandomSrid(f), + FieldseekerTrapdatumMods.RandomFieldtech(f), + FieldseekerTrapdatumMods.RandomGatewaysync(f), + FieldseekerTrapdatumMods.RandomLocID(f), + FieldseekerTrapdatumMods.RandomVoltage(f), + FieldseekerTrapdatumMods.RandomWinddir(f), + FieldseekerTrapdatumMods.RandomWindspeed(f), + FieldseekerTrapdatumMods.RandomAvetemp(f), + FieldseekerTrapdatumMods.RandomRaingauge(f), + FieldseekerTrapdatumMods.RandomLR(f), + FieldseekerTrapdatumMods.RandomField(f), + FieldseekerTrapdatumMods.RandomVectorsurvtrapdataid(f), + FieldseekerTrapdatumMods.RandomVectorsurvtraplocationid(f), + FieldseekerTrapdatumMods.RandomCreationdate(f), + FieldseekerTrapdatumMods.RandomCreator(f), + FieldseekerTrapdatumMods.RandomEditdate(f), + FieldseekerTrapdatumMods.RandomEditor(f), + FieldseekerTrapdatumMods.RandomLure(f), + } +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Objectid(val int64) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) ObjectidFunc(f func() int64) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetObjectid() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerTrapdatumMods) RandomObjectid(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Traptype(val null.Val[enums.FieldseekerTrapdataMosquitotraptypeEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Traptype = func() null.Val[enums.FieldseekerTrapdataMosquitotraptypeEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) TraptypeFunc(f func() null.Val[enums.FieldseekerTrapdataMosquitotraptypeEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Traptype = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetTraptype() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Traptype = 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 fieldseekerTrapdatumMods) RandomTraptype(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Traptype = func() null.Val[enums.FieldseekerTrapdataMosquitotraptypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataMosquitotraptypeEnum(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 fieldseekerTrapdatumMods) RandomTraptypeNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Traptype = func() null.Val[enums.FieldseekerTrapdataMosquitotraptypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataMosquitotraptypeEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Trapactivitytype(val null.Val[enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapactivitytype = func() null.Val[enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) TrapactivitytypeFunc(f func() null.Val[enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapactivitytype = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetTrapactivitytype() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapactivitytype = 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 fieldseekerTrapdatumMods) RandomTrapactivitytype(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapactivitytype = func() null.Val[enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataNotinuitrapactivitytypeEnum(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 fieldseekerTrapdatumMods) RandomTrapactivitytypeNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapactivitytype = func() null.Val[enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataNotinuitrapactivitytypeEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Startdatetime(val null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Startdatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) StartdatetimeFunc(f func() null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Startdatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetStartdatetime() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Startdatetime = 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 fieldseekerTrapdatumMods) RandomStartdatetime(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTrapdatumMods) RandomStartdatetimeNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Enddatetime(val null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Enddatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) EnddatetimeFunc(f func() null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Enddatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetEnddatetime() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Enddatetime = 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 fieldseekerTrapdatumMods) RandomEnddatetime(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTrapdatumMods) RandomEnddatetimeNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Comments(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) CommentsFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetComments() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Comments = 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 fieldseekerTrapdatumMods) RandomComments(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerTrapdatumMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Idbytech(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Idbytech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) IdbytechFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Idbytech = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetIdbytech() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Idbytech = 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 fieldseekerTrapdatumMods) RandomIdbytech(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Idbytech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTrapdatumMods) RandomIdbytechNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Idbytech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Sortbytech(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Sortbytech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) SortbytechFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Sortbytech = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetSortbytech() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Sortbytech = 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 fieldseekerTrapdatumMods) RandomSortbytech(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Sortbytech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTrapdatumMods) RandomSortbytechNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Sortbytech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Processed(val null.Val[enums.FieldseekerTrapdataNotinuitFEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Processed = func() null.Val[enums.FieldseekerTrapdataNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) ProcessedFunc(f func() null.Val[enums.FieldseekerTrapdataNotinuitFEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Processed = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetProcessed() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Processed = 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 fieldseekerTrapdatumMods) RandomProcessed(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Processed = func() null.Val[enums.FieldseekerTrapdataNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataNotinuitFEnum(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 fieldseekerTrapdatumMods) RandomProcessedNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Processed = func() null.Val[enums.FieldseekerTrapdataNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Sitecond(val null.Val[enums.FieldseekerTrapdataMosquitositeconditionEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerTrapdataMosquitositeconditionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) SitecondFunc(f func() null.Val[enums.FieldseekerTrapdataMosquitositeconditionEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Sitecond = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetSitecond() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Sitecond = 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 fieldseekerTrapdatumMods) RandomSitecond(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerTrapdataMosquitositeconditionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataMosquitositeconditionEnum(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 fieldseekerTrapdatumMods) RandomSitecondNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerTrapdataMosquitositeconditionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataMosquitositeconditionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Locationname(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Locationname = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) LocationnameFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Locationname = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetLocationname() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Locationname = 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 fieldseekerTrapdatumMods) RandomLocationname(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTrapdatumMods) RandomLocationnameNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Recordstatus(val null.Val[int16]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Recordstatus = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) RecordstatusFunc(f func() null.Val[int16]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Recordstatus = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetRecordstatus() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Recordstatus = 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 fieldseekerTrapdatumMods) RandomRecordstatus(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerTrapdatumMods) RandomRecordstatusNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Reviewed(val null.Val[enums.FieldseekerTrapdataNotinuitFEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerTrapdataNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) ReviewedFunc(f func() null.Val[enums.FieldseekerTrapdataNotinuitFEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Reviewed = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetReviewed() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Reviewed = 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 fieldseekerTrapdatumMods) RandomReviewed(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerTrapdataNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataNotinuitFEnum(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 fieldseekerTrapdatumMods) RandomReviewedNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerTrapdataNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Reviewedby(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Reviewedby = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) ReviewedbyFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Reviewedby = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetReviewedby() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Reviewedby = 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 fieldseekerTrapdatumMods) RandomReviewedby(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTrapdatumMods) RandomReviewedbyNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Revieweddate(val null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Revieweddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) RevieweddateFunc(f func() null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Revieweddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetRevieweddate() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Revieweddate = 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 fieldseekerTrapdatumMods) RandomRevieweddate(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTrapdatumMods) RandomRevieweddateNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Trapcondition(val null.Val[enums.FieldseekerTrapdataMosquitotrapconditionEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapcondition = func() null.Val[enums.FieldseekerTrapdataMosquitotrapconditionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) TrapconditionFunc(f func() null.Val[enums.FieldseekerTrapdataMosquitotrapconditionEnum]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapcondition = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetTrapcondition() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapcondition = 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 fieldseekerTrapdatumMods) RandomTrapcondition(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapcondition = func() null.Val[enums.FieldseekerTrapdataMosquitotrapconditionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataMosquitotrapconditionEnum(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 fieldseekerTrapdatumMods) RandomTrapconditionNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapcondition = func() null.Val[enums.FieldseekerTrapdataMosquitotrapconditionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataMosquitotrapconditionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Trapnights(val null.Val[int16]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapnights = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) TrapnightsFunc(f func() null.Val[int16]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapnights = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetTrapnights() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapnights = 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 fieldseekerTrapdatumMods) RandomTrapnights(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapnights = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerTrapdatumMods) RandomTrapnightsNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Trapnights = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Zone(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) ZoneFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetZone() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Zone = 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 fieldseekerTrapdatumMods) RandomZone(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTrapdatumMods) RandomZoneNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Zone2(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) Zone2Func(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetZone2() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Zone2 = 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 fieldseekerTrapdatumMods) RandomZone2(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTrapdatumMods) RandomZone2NotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Globalid(val null.Val[uuid.UUID]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetGlobalid() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Globalid = 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 fieldseekerTrapdatumMods) RandomGlobalid(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Globalid = 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 fieldseekerTrapdatumMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Globalid = 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 fieldseekerTrapdatumMods) CreatedUser(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetCreatedUser() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.CreatedUser = 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 fieldseekerTrapdatumMods) RandomCreatedUser(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerTrapdatumMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) CreatedDate(val null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetCreatedDate() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.CreatedDate = 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 fieldseekerTrapdatumMods) RandomCreatedDate(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTrapdatumMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) LastEditedUser(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetLastEditedUser() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LastEditedUser = 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 fieldseekerTrapdatumMods) RandomLastEditedUser(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerTrapdatumMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) LastEditedDate(val null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetLastEditedDate() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LastEditedDate = 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 fieldseekerTrapdatumMods) RandomLastEditedDate(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTrapdatumMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Srid(val null.Val[uuid.UUID]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Srid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) SridFunc(f func() null.Val[uuid.UUID]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Srid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetSrid() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Srid = 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 fieldseekerTrapdatumMods) RandomSrid(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Srid = 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 fieldseekerTrapdatumMods) RandomSridNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Srid = 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 fieldseekerTrapdatumMods) Fieldtech(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Fieldtech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) FieldtechFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Fieldtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetFieldtech() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Fieldtech = 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 fieldseekerTrapdatumMods) RandomFieldtech(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTrapdatumMods) RandomFieldtechNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Gatewaysync(val null.Val[int16]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Gatewaysync = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) GatewaysyncFunc(f func() null.Val[int16]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Gatewaysync = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetGatewaysync() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Gatewaysync = 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 fieldseekerTrapdatumMods) RandomGatewaysync(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Gatewaysync = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerTrapdatumMods) RandomGatewaysyncNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Gatewaysync = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) LocID(val null.Val[uuid.UUID]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LocID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) LocIDFunc(f func() null.Val[uuid.UUID]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LocID = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetLocID() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LocID = 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 fieldseekerTrapdatumMods) RandomLocID(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LocID = 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 fieldseekerTrapdatumMods) RandomLocIDNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LocID = 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 fieldseekerTrapdatumMods) Voltage(val null.Val[float64]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Voltage = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) VoltageFunc(f func() null.Val[float64]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Voltage = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetVoltage() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Voltage = 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 fieldseekerTrapdatumMods) RandomVoltage(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Voltage = 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 fieldseekerTrapdatumMods) RandomVoltageNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Voltage = 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 fieldseekerTrapdatumMods) Winddir(val null.Val[enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) WinddirFunc(f func() null.Val[enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Winddir = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetWinddir() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Winddir = 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 fieldseekerTrapdatumMods) RandomWinddir(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166(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 fieldseekerTrapdatumMods) RandomWinddirNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Windspeed(val null.Val[float64]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Windspeed = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) WindspeedFunc(f func() null.Val[float64]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Windspeed = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetWindspeed() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Windspeed = 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 fieldseekerTrapdatumMods) RandomWindspeed(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Windspeed = 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 fieldseekerTrapdatumMods) RandomWindspeedNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Windspeed = 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 fieldseekerTrapdatumMods) Avetemp(val null.Val[float64]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Avetemp = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) AvetempFunc(f func() null.Val[float64]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Avetemp = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetAvetemp() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Avetemp = 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 fieldseekerTrapdatumMods) RandomAvetemp(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Avetemp = 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 fieldseekerTrapdatumMods) RandomAvetempNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Avetemp = 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 fieldseekerTrapdatumMods) Raingauge(val null.Val[float64]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Raingauge = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) RaingaugeFunc(f func() null.Val[float64]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Raingauge = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetRaingauge() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Raingauge = 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 fieldseekerTrapdatumMods) RandomRaingauge(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Raingauge = 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 fieldseekerTrapdatumMods) RandomRaingaugeNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Raingauge = 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 fieldseekerTrapdatumMods) LR(val null.Val[int16]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LR = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) LRFunc(f func() null.Val[int16]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LR = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetLR() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LR = 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 fieldseekerTrapdatumMods) RandomLR(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LR = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerTrapdatumMods) RandomLRNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.LR = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Field(val null.Val[int32]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Field = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) FieldFunc(f func() null.Val[int32]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Field = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetField() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Field = 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 fieldseekerTrapdatumMods) RandomField(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Field = 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 fieldseekerTrapdatumMods) RandomFieldNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Field = 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 fieldseekerTrapdatumMods) Vectorsurvtrapdataid(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Vectorsurvtrapdataid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) VectorsurvtrapdataidFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Vectorsurvtrapdataid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetVectorsurvtrapdataid() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Vectorsurvtrapdataid = 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 fieldseekerTrapdatumMods) RandomVectorsurvtrapdataid(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Vectorsurvtrapdataid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerTrapdatumMods) RandomVectorsurvtrapdataidNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Vectorsurvtrapdataid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Vectorsurvtraplocationid(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Vectorsurvtraplocationid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) VectorsurvtraplocationidFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Vectorsurvtraplocationid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetVectorsurvtraplocationid() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Vectorsurvtraplocationid = 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 fieldseekerTrapdatumMods) RandomVectorsurvtraplocationid(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Vectorsurvtraplocationid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerTrapdatumMods) RandomVectorsurvtraplocationidNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Vectorsurvtraplocationid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Creationdate(val null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetCreationdate() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Creationdate = 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 fieldseekerTrapdatumMods) RandomCreationdate(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTrapdatumMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Creator(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) CreatorFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetCreator() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Creator = 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 fieldseekerTrapdatumMods) RandomCreator(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerTrapdatumMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Editdate(val null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetEditdate() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Editdate = 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 fieldseekerTrapdatumMods) RandomEditdate(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTrapdatumMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Editor(val null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) EditorFunc(f func() null.Val[string]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetEditor() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Editor = 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 fieldseekerTrapdatumMods) RandomEditor(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerTrapdatumMods) RandomEditorNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTrapdatumMods) Lure(val null.Val[enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Lure = func() null.Val[enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTrapdatumMods) LureFunc(f func() null.Val[enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu]) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Lure = f + }) +} + +// Clear any values for the column +func (m fieldseekerTrapdatumMods) UnsetLure() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Lure = 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 fieldseekerTrapdatumMods) RandomLure(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Lure = func() null.Val[enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu(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 fieldseekerTrapdatumMods) RandomLureNotNull(f *faker.Faker) FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(_ context.Context, o *FieldseekerTrapdatumTemplate) { + o.Lure = func() null.Val[enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu(f) + return null.From(val) + } + }) +} + +func (m fieldseekerTrapdatumMods) WithParentsCascading() FieldseekerTrapdatumMod { + return FieldseekerTrapdatumModFunc(func(ctx context.Context, o *FieldseekerTrapdatumTemplate) { + if isDone, _ := fieldseekerTrapdatumWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerTrapdatumWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.traplocation.bob.go b/db/factory/fieldseeker.traplocation.bob.go new file mode 100644 index 00000000..54ab3e35 --- /dev/null +++ b/db/factory/fieldseeker.traplocation.bob.go @@ -0,0 +1,2060 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerTraplocationMod interface { + Apply(context.Context, *FieldseekerTraplocationTemplate) +} + +type FieldseekerTraplocationModFunc func(context.Context, *FieldseekerTraplocationTemplate) + +func (f FieldseekerTraplocationModFunc) Apply(ctx context.Context, n *FieldseekerTraplocationTemplate) { + f(ctx, n) +} + +type FieldseekerTraplocationModSlice []FieldseekerTraplocationMod + +func (mods FieldseekerTraplocationModSlice) Apply(ctx context.Context, n *FieldseekerTraplocationTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerTraplocationTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerTraplocationTemplate struct { + Objectid func() int64 + Name func() null.Val[string] + Zone func() null.Val[string] + Habitat func() null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e] + Priority func() null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B] + Usetype func() null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2] + Active func() null.Val[enums.FieldseekerTraplocationNotinuitFEnum] + Description func() null.Val[string] + Accessdesc func() null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0] + Comments func() null.Val[string] + Externalid func() null.Val[string] + Nextactiondatescheduled func() null.Val[time.Time] + Zone2 func() null.Val[string] + Locationnumber func() null.Val[int32] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Gatewaysync func() null.Val[int16] + Route func() null.Val[int32] + SetDow func() null.Val[int32] + RouteOrder func() null.Val[int32] + Vectorsurvsiteid func() null.Val[string] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + H3R7 func() null.Val[string] + H3R8 func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerTraplocationTemplate +func (o *FieldseekerTraplocationTemplate) Apply(ctx context.Context, mods ...FieldseekerTraplocationMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerTraplocation +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerTraplocationTemplate) setModelRels(o *models.FieldseekerTraplocation) {} + +// BuildSetter returns an *models.FieldseekerTraplocationSetter +// this does nothing with the relationship templates +func (o FieldseekerTraplocationTemplate) BuildSetter() *models.FieldseekerTraplocationSetter { + m := &models.FieldseekerTraplocationSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Name != nil { + val := o.Name() + m.Name = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Habitat != nil { + val := o.Habitat() + m.Habitat = omitnull.FromNull(val) + } + if o.Priority != nil { + val := o.Priority() + m.Priority = omitnull.FromNull(val) + } + if o.Usetype != nil { + val := o.Usetype() + m.Usetype = omitnull.FromNull(val) + } + if o.Active != nil { + val := o.Active() + m.Active = omitnull.FromNull(val) + } + if o.Description != nil { + val := o.Description() + m.Description = omitnull.FromNull(val) + } + if o.Accessdesc != nil { + val := o.Accessdesc() + m.Accessdesc = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Externalid != nil { + val := o.Externalid() + m.Externalid = omitnull.FromNull(val) + } + if o.Nextactiondatescheduled != nil { + val := o.Nextactiondatescheduled() + m.Nextactiondatescheduled = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Locationnumber != nil { + val := o.Locationnumber() + m.Locationnumber = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Gatewaysync != nil { + val := o.Gatewaysync() + m.Gatewaysync = omitnull.FromNull(val) + } + if o.Route != nil { + val := o.Route() + m.Route = omitnull.FromNull(val) + } + if o.SetDow != nil { + val := o.SetDow() + m.SetDow = omitnull.FromNull(val) + } + if o.RouteOrder != nil { + val := o.RouteOrder() + m.RouteOrder = omitnull.FromNull(val) + } + if o.Vectorsurvsiteid != nil { + val := o.Vectorsurvsiteid() + m.Vectorsurvsiteid = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.H3R7 != nil { + val := o.H3R7() + m.H3R7 = omitnull.FromNull(val) + } + if o.H3R8 != nil { + val := o.H3R8() + m.H3R8 = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerTraplocationSetter +// this does nothing with the relationship templates +func (o FieldseekerTraplocationTemplate) BuildManySetter(number int) []*models.FieldseekerTraplocationSetter { + m := make([]*models.FieldseekerTraplocationSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerTraplocation +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTraplocationTemplate.Create +func (o FieldseekerTraplocationTemplate) Build() *models.FieldseekerTraplocation { + m := &models.FieldseekerTraplocation{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Name != nil { + m.Name = o.Name() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Habitat != nil { + m.Habitat = o.Habitat() + } + if o.Priority != nil { + m.Priority = o.Priority() + } + if o.Usetype != nil { + m.Usetype = o.Usetype() + } + if o.Active != nil { + m.Active = o.Active() + } + if o.Description != nil { + m.Description = o.Description() + } + if o.Accessdesc != nil { + m.Accessdesc = o.Accessdesc() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Externalid != nil { + m.Externalid = o.Externalid() + } + if o.Nextactiondatescheduled != nil { + m.Nextactiondatescheduled = o.Nextactiondatescheduled() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Locationnumber != nil { + m.Locationnumber = o.Locationnumber() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Gatewaysync != nil { + m.Gatewaysync = o.Gatewaysync() + } + if o.Route != nil { + m.Route = o.Route() + } + if o.SetDow != nil { + m.SetDow = o.SetDow() + } + if o.RouteOrder != nil { + m.RouteOrder = o.RouteOrder() + } + if o.Vectorsurvsiteid != nil { + m.Vectorsurvsiteid = o.Vectorsurvsiteid() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.H3R7 != nil { + m.H3R7 = o.H3R7() + } + if o.H3R8 != nil { + m.H3R8 = o.H3R8() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerTraplocationSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTraplocationTemplate.CreateMany +func (o FieldseekerTraplocationTemplate) BuildMany(number int) models.FieldseekerTraplocationSlice { + m := make(models.FieldseekerTraplocationSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerTraplocation(m *models.FieldseekerTraplocationSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerTraplocation +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerTraplocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerTraplocation) error { + var err error + + return err +} + +// Create builds a fieldseekerTraplocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerTraplocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerTraplocation, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerTraplocation(opt) + + m, err := models.FieldseekerTraplocations.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 fieldseekerTraplocation and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerTraplocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerTraplocation { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerTraplocation 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 *FieldseekerTraplocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerTraplocation { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerTraplocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerTraplocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerTraplocationSlice, error) { + var err error + m := make(models.FieldseekerTraplocationSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerTraplocations and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerTraplocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerTraplocationSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerTraplocations 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 FieldseekerTraplocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerTraplocationSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerTraplocation has methods that act as mods for the FieldseekerTraplocationTemplate +var FieldseekerTraplocationMods fieldseekerTraplocationMods + +type fieldseekerTraplocationMods struct{} + +func (m fieldseekerTraplocationMods) RandomizeAllColumns(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModSlice{ + FieldseekerTraplocationMods.RandomObjectid(f), + FieldseekerTraplocationMods.RandomName(f), + FieldseekerTraplocationMods.RandomZone(f), + FieldseekerTraplocationMods.RandomHabitat(f), + FieldseekerTraplocationMods.RandomPriority(f), + FieldseekerTraplocationMods.RandomUsetype(f), + FieldseekerTraplocationMods.RandomActive(f), + FieldseekerTraplocationMods.RandomDescription(f), + FieldseekerTraplocationMods.RandomAccessdesc(f), + FieldseekerTraplocationMods.RandomComments(f), + FieldseekerTraplocationMods.RandomExternalid(f), + FieldseekerTraplocationMods.RandomNextactiondatescheduled(f), + FieldseekerTraplocationMods.RandomZone2(f), + FieldseekerTraplocationMods.RandomLocationnumber(f), + FieldseekerTraplocationMods.RandomGlobalid(f), + FieldseekerTraplocationMods.RandomCreatedUser(f), + FieldseekerTraplocationMods.RandomCreatedDate(f), + FieldseekerTraplocationMods.RandomLastEditedUser(f), + FieldseekerTraplocationMods.RandomLastEditedDate(f), + FieldseekerTraplocationMods.RandomGatewaysync(f), + FieldseekerTraplocationMods.RandomRoute(f), + FieldseekerTraplocationMods.RandomSetDow(f), + FieldseekerTraplocationMods.RandomRouteOrder(f), + FieldseekerTraplocationMods.RandomVectorsurvsiteid(f), + FieldseekerTraplocationMods.RandomCreationdate(f), + FieldseekerTraplocationMods.RandomCreator(f), + FieldseekerTraplocationMods.RandomEditdate(f), + FieldseekerTraplocationMods.RandomEditor(f), + FieldseekerTraplocationMods.RandomH3R7(f), + FieldseekerTraplocationMods.RandomH3R8(f), + } +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Objectid(val int64) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) ObjectidFunc(f func() int64) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetObjectid() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerTraplocationMods) RandomObjectid(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Name(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Name = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) NameFunc(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Name = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetName() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Name = 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 fieldseekerTraplocationMods) RandomName(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTraplocationMods) RandomNameNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Zone(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) ZoneFunc(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetZone() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Zone = 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 fieldseekerTraplocationMods) RandomZone(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTraplocationMods) RandomZoneNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Habitat(val null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) HabitatFunc(f func() null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Habitat = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetHabitat() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Habitat = 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 fieldseekerTraplocationMods) RandomHabitat(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e(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 fieldseekerTraplocationMods) RandomHabitatNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Priority(val null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) PriorityFunc(f func() null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Priority = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetPriority() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Priority = 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 fieldseekerTraplocationMods) RandomPriority(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B(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 fieldseekerTraplocationMods) RandomPriorityNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Priority = func() null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Usetype(val null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) UsetypeFunc(f func() null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Usetype = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetUsetype() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Usetype = 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 fieldseekerTraplocationMods) RandomUsetype(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2(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 fieldseekerTraplocationMods) RandomUsetypeNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Usetype = func() null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Active(val null.Val[enums.FieldseekerTraplocationNotinuitFEnum]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerTraplocationNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) ActiveFunc(f func() null.Val[enums.FieldseekerTraplocationNotinuitFEnum]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Active = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetActive() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Active = 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 fieldseekerTraplocationMods) RandomActive(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerTraplocationNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTraplocationNotinuitFEnum(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 fieldseekerTraplocationMods) RandomActiveNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Active = func() null.Val[enums.FieldseekerTraplocationNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTraplocationNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Description(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Description = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) DescriptionFunc(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Description = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetDescription() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Description = 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 fieldseekerTraplocationMods) RandomDescription(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerTraplocationMods) RandomDescriptionNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Description = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Accessdesc(val null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Accessdesc = func() null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) AccessdescFunc(f func() null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Accessdesc = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetAccessdesc() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Accessdesc = 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 fieldseekerTraplocationMods) RandomAccessdesc(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Accessdesc = func() null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0(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 fieldseekerTraplocationMods) RandomAccessdescNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Accessdesc = func() null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Comments(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) CommentsFunc(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetComments() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Comments = 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 fieldseekerTraplocationMods) RandomComments(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerTraplocationMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Externalid(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Externalid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) ExternalidFunc(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Externalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetExternalid() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Externalid = 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 fieldseekerTraplocationMods) RandomExternalid(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerTraplocationMods) RandomExternalidNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Externalid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Nextactiondatescheduled(val null.Val[time.Time]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) NextactiondatescheduledFunc(f func() null.Val[time.Time]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Nextactiondatescheduled = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetNextactiondatescheduled() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Nextactiondatescheduled = 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 fieldseekerTraplocationMods) RandomNextactiondatescheduled(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTraplocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Nextactiondatescheduled = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Zone2(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) Zone2Func(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetZone2() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Zone2 = 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 fieldseekerTraplocationMods) RandomZone2(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTraplocationMods) RandomZone2NotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Locationnumber(val null.Val[int32]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Locationnumber = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) LocationnumberFunc(f func() null.Val[int32]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Locationnumber = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetLocationnumber() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Locationnumber = 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 fieldseekerTraplocationMods) RandomLocationnumber(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Locationnumber = 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 fieldseekerTraplocationMods) RandomLocationnumberNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Locationnumber = 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 fieldseekerTraplocationMods) Globalid(val null.Val[uuid.UUID]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetGlobalid() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Globalid = 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 fieldseekerTraplocationMods) RandomGlobalid(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Globalid = 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 fieldseekerTraplocationMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Globalid = 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 fieldseekerTraplocationMods) CreatedUser(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetCreatedUser() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.CreatedUser = 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 fieldseekerTraplocationMods) RandomCreatedUser(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerTraplocationMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) CreatedDate(val null.Val[time.Time]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetCreatedDate() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.CreatedDate = 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 fieldseekerTraplocationMods) RandomCreatedDate(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTraplocationMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) LastEditedUser(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetLastEditedUser() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.LastEditedUser = 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 fieldseekerTraplocationMods) RandomLastEditedUser(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerTraplocationMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) LastEditedDate(val null.Val[time.Time]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetLastEditedDate() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.LastEditedDate = 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 fieldseekerTraplocationMods) RandomLastEditedDate(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTraplocationMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Gatewaysync(val null.Val[int16]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Gatewaysync = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) GatewaysyncFunc(f func() null.Val[int16]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Gatewaysync = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetGatewaysync() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Gatewaysync = 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 fieldseekerTraplocationMods) RandomGatewaysync(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Gatewaysync = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerTraplocationMods) RandomGatewaysyncNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Gatewaysync = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Route(val null.Val[int32]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Route = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) RouteFunc(f func() null.Val[int32]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Route = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetRoute() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Route = 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 fieldseekerTraplocationMods) RandomRoute(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Route = 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 fieldseekerTraplocationMods) RandomRouteNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Route = 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 fieldseekerTraplocationMods) SetDow(val null.Val[int32]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.SetDow = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) SetDowFunc(f func() null.Val[int32]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.SetDow = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetSetDow() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.SetDow = 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 fieldseekerTraplocationMods) RandomSetDow(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.SetDow = 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 fieldseekerTraplocationMods) RandomSetDowNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.SetDow = 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 fieldseekerTraplocationMods) RouteOrder(val null.Val[int32]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.RouteOrder = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) RouteOrderFunc(f func() null.Val[int32]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.RouteOrder = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetRouteOrder() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.RouteOrder = 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 fieldseekerTraplocationMods) RandomRouteOrder(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.RouteOrder = 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 fieldseekerTraplocationMods) RandomRouteOrderNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.RouteOrder = 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 fieldseekerTraplocationMods) Vectorsurvsiteid(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Vectorsurvsiteid = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) VectorsurvsiteidFunc(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Vectorsurvsiteid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetVectorsurvsiteid() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Vectorsurvsiteid = 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 fieldseekerTraplocationMods) RandomVectorsurvsiteid(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Vectorsurvsiteid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerTraplocationMods) RandomVectorsurvsiteidNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Vectorsurvsiteid = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Creationdate(val null.Val[time.Time]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetCreationdate() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Creationdate = 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 fieldseekerTraplocationMods) RandomCreationdate(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTraplocationMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Creator(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) CreatorFunc(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetCreator() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Creator = 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 fieldseekerTraplocationMods) RandomCreator(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerTraplocationMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Editdate(val null.Val[time.Time]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetEditdate() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Editdate = 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 fieldseekerTraplocationMods) RandomEditdate(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTraplocationMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) Editor(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) EditorFunc(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetEditor() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Editor = 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 fieldseekerTraplocationMods) RandomEditor(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerTraplocationMods) RandomEditorNotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) H3R7(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.H3R7 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) H3R7Func(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.H3R7 = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetH3R7() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.H3R7 = 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 fieldseekerTraplocationMods) RandomH3R7(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.H3R7 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerTraplocationMods) RandomH3R7NotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.H3R7 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTraplocationMods) H3R8(val null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.H3R8 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTraplocationMods) H3R8Func(f func() null.Val[string]) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.H3R8 = f + }) +} + +// Clear any values for the column +func (m fieldseekerTraplocationMods) UnsetH3R8() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.H3R8 = 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 fieldseekerTraplocationMods) RandomH3R8(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.H3R8 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerTraplocationMods) RandomH3R8NotNull(f *faker.Faker) FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) { + o.H3R8 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +func (m fieldseekerTraplocationMods) WithParentsCascading() FieldseekerTraplocationMod { + return FieldseekerTraplocationModFunc(func(ctx context.Context, o *FieldseekerTraplocationTemplate) { + if isDone, _ := fieldseekerTraplocationWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerTraplocationWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.treatment.bob.go b/db/factory/fieldseeker.treatment.bob.go new file mode 100644 index 00000000..bd8e58a4 --- /dev/null +++ b/db/factory/fieldseeker.treatment.bob.go @@ -0,0 +1,3548 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerTreatmentMod interface { + Apply(context.Context, *FieldseekerTreatmentTemplate) +} + +type FieldseekerTreatmentModFunc func(context.Context, *FieldseekerTreatmentTemplate) + +func (f FieldseekerTreatmentModFunc) Apply(ctx context.Context, n *FieldseekerTreatmentTemplate) { + f(ctx, n) +} + +type FieldseekerTreatmentModSlice []FieldseekerTreatmentMod + +func (mods FieldseekerTreatmentModSlice) Apply(ctx context.Context, n *FieldseekerTreatmentTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerTreatmentTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerTreatmentTemplate struct { + Objectid func() int64 + Activity func() null.Val[enums.FieldseekerTreatmentMosquitoactivityEnum] + Treatarea func() null.Val[float64] + Areaunit func() null.Val[enums.FieldseekerTreatmentMosquitoproductareaunitEnum] + Product func() null.Val[string] + Qty func() null.Val[float64] + Qtyunit func() null.Val[enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum] + Method func() null.Val[enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu] + Equiptype func() null.Val[enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f] + Comments func() null.Val[string] + Avetemp func() null.Val[float64] + Windspeed func() null.Val[float64] + Winddir func() null.Val[enums.FieldseekerTreatmentNotinuiwinddirectionEnum] + Raingauge func() null.Val[float64] + Startdatetime func() null.Val[time.Time] + Enddatetime func() null.Val[time.Time] + InspID func() null.Val[uuid.UUID] + Reviewed func() null.Val[enums.FieldseekerTreatmentNotinuitFEnum] + Reviewedby func() null.Val[string] + Revieweddate func() null.Val[time.Time] + Locationname func() null.Val[string] + Zone func() null.Val[string] + Warningoverride func() null.Val[enums.FieldseekerTreatmentNotinuitFEnum] + Recordstatus func() null.Val[int16] + Zone2 func() null.Val[string] + Treatacres func() null.Val[float64] + Tirecount func() null.Val[int16] + Cbcount func() null.Val[int16] + Containercount func() null.Val[int16] + Globalid func() null.Val[uuid.UUID] + Treatmentlength func() null.Val[float64] + Treatmenthours func() null.Val[float64] + Treatmentlengthunits func() null.Val[string] + Linelocid func() null.Val[uuid.UUID] + Pointlocid func() null.Val[uuid.UUID] + Polygonlocid func() null.Val[uuid.UUID] + Srid func() null.Val[uuid.UUID] + Sdid func() null.Val[uuid.UUID] + Barrierrouteid func() null.Val[uuid.UUID] + Ulvrouteid func() null.Val[uuid.UUID] + Fieldtech func() null.Val[string] + Ptaid func() null.Val[uuid.UUID] + Flowrate func() null.Val[float64] + Habitat func() null.Val[enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1] + Treathectares func() null.Val[float64] + Invloc func() null.Val[string] + TempSitecond func() null.Val[enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E] + Sitecond func() null.Val[enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E] + Totalcostprodcut func() null.Val[float64] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + Targetspecies func() null.Val[string] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerTreatmentTemplate +func (o *FieldseekerTreatmentTemplate) Apply(ctx context.Context, mods ...FieldseekerTreatmentMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerTreatment +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerTreatmentTemplate) setModelRels(o *models.FieldseekerTreatment) {} + +// BuildSetter returns an *models.FieldseekerTreatmentSetter +// this does nothing with the relationship templates +func (o FieldseekerTreatmentTemplate) BuildSetter() *models.FieldseekerTreatmentSetter { + m := &models.FieldseekerTreatmentSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Activity != nil { + val := o.Activity() + m.Activity = omitnull.FromNull(val) + } + if o.Treatarea != nil { + val := o.Treatarea() + m.Treatarea = omitnull.FromNull(val) + } + if o.Areaunit != nil { + val := o.Areaunit() + m.Areaunit = omitnull.FromNull(val) + } + if o.Product != nil { + val := o.Product() + m.Product = omitnull.FromNull(val) + } + if o.Qty != nil { + val := o.Qty() + m.Qty = omitnull.FromNull(val) + } + if o.Qtyunit != nil { + val := o.Qtyunit() + m.Qtyunit = omitnull.FromNull(val) + } + if o.Method != nil { + val := o.Method() + m.Method = omitnull.FromNull(val) + } + if o.Equiptype != nil { + val := o.Equiptype() + m.Equiptype = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Avetemp != nil { + val := o.Avetemp() + m.Avetemp = omitnull.FromNull(val) + } + if o.Windspeed != nil { + val := o.Windspeed() + m.Windspeed = omitnull.FromNull(val) + } + if o.Winddir != nil { + val := o.Winddir() + m.Winddir = omitnull.FromNull(val) + } + if o.Raingauge != nil { + val := o.Raingauge() + m.Raingauge = omitnull.FromNull(val) + } + if o.Startdatetime != nil { + val := o.Startdatetime() + m.Startdatetime = omitnull.FromNull(val) + } + if o.Enddatetime != nil { + val := o.Enddatetime() + m.Enddatetime = omitnull.FromNull(val) + } + if o.InspID != nil { + val := o.InspID() + m.InspID = omitnull.FromNull(val) + } + if o.Reviewed != nil { + val := o.Reviewed() + m.Reviewed = omitnull.FromNull(val) + } + if o.Reviewedby != nil { + val := o.Reviewedby() + m.Reviewedby = omitnull.FromNull(val) + } + if o.Revieweddate != nil { + val := o.Revieweddate() + m.Revieweddate = omitnull.FromNull(val) + } + if o.Locationname != nil { + val := o.Locationname() + m.Locationname = omitnull.FromNull(val) + } + if o.Zone != nil { + val := o.Zone() + m.Zone = omitnull.FromNull(val) + } + if o.Warningoverride != nil { + val := o.Warningoverride() + m.Warningoverride = omitnull.FromNull(val) + } + if o.Recordstatus != nil { + val := o.Recordstatus() + m.Recordstatus = omitnull.FromNull(val) + } + if o.Zone2 != nil { + val := o.Zone2() + m.Zone2 = omitnull.FromNull(val) + } + if o.Treatacres != nil { + val := o.Treatacres() + m.Treatacres = omitnull.FromNull(val) + } + if o.Tirecount != nil { + val := o.Tirecount() + m.Tirecount = omitnull.FromNull(val) + } + if o.Cbcount != nil { + val := o.Cbcount() + m.Cbcount = omitnull.FromNull(val) + } + if o.Containercount != nil { + val := o.Containercount() + m.Containercount = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.Treatmentlength != nil { + val := o.Treatmentlength() + m.Treatmentlength = omitnull.FromNull(val) + } + if o.Treatmenthours != nil { + val := o.Treatmenthours() + m.Treatmenthours = omitnull.FromNull(val) + } + if o.Treatmentlengthunits != nil { + val := o.Treatmentlengthunits() + m.Treatmentlengthunits = omitnull.FromNull(val) + } + if o.Linelocid != nil { + val := o.Linelocid() + m.Linelocid = omitnull.FromNull(val) + } + if o.Pointlocid != nil { + val := o.Pointlocid() + m.Pointlocid = omitnull.FromNull(val) + } + if o.Polygonlocid != nil { + val := o.Polygonlocid() + m.Polygonlocid = omitnull.FromNull(val) + } + if o.Srid != nil { + val := o.Srid() + m.Srid = omitnull.FromNull(val) + } + if o.Sdid != nil { + val := o.Sdid() + m.Sdid = omitnull.FromNull(val) + } + if o.Barrierrouteid != nil { + val := o.Barrierrouteid() + m.Barrierrouteid = omitnull.FromNull(val) + } + if o.Ulvrouteid != nil { + val := o.Ulvrouteid() + m.Ulvrouteid = omitnull.FromNull(val) + } + if o.Fieldtech != nil { + val := o.Fieldtech() + m.Fieldtech = omitnull.FromNull(val) + } + if o.Ptaid != nil { + val := o.Ptaid() + m.Ptaid = omitnull.FromNull(val) + } + if o.Flowrate != nil { + val := o.Flowrate() + m.Flowrate = omitnull.FromNull(val) + } + if o.Habitat != nil { + val := o.Habitat() + m.Habitat = omitnull.FromNull(val) + } + if o.Treathectares != nil { + val := o.Treathectares() + m.Treathectares = omitnull.FromNull(val) + } + if o.Invloc != nil { + val := o.Invloc() + m.Invloc = omitnull.FromNull(val) + } + if o.TempSitecond != nil { + val := o.TempSitecond() + m.TempSitecond = omitnull.FromNull(val) + } + if o.Sitecond != nil { + val := o.Sitecond() + m.Sitecond = omitnull.FromNull(val) + } + if o.Totalcostprodcut != nil { + val := o.Totalcostprodcut() + m.Totalcostprodcut = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.Targetspecies != nil { + val := o.Targetspecies() + m.Targetspecies = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerTreatmentSetter +// this does nothing with the relationship templates +func (o FieldseekerTreatmentTemplate) BuildManySetter(number int) []*models.FieldseekerTreatmentSetter { + m := make([]*models.FieldseekerTreatmentSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerTreatment +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTreatmentTemplate.Create +func (o FieldseekerTreatmentTemplate) Build() *models.FieldseekerTreatment { + m := &models.FieldseekerTreatment{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Activity != nil { + m.Activity = o.Activity() + } + if o.Treatarea != nil { + m.Treatarea = o.Treatarea() + } + if o.Areaunit != nil { + m.Areaunit = o.Areaunit() + } + if o.Product != nil { + m.Product = o.Product() + } + if o.Qty != nil { + m.Qty = o.Qty() + } + if o.Qtyunit != nil { + m.Qtyunit = o.Qtyunit() + } + if o.Method != nil { + m.Method = o.Method() + } + if o.Equiptype != nil { + m.Equiptype = o.Equiptype() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Avetemp != nil { + m.Avetemp = o.Avetemp() + } + if o.Windspeed != nil { + m.Windspeed = o.Windspeed() + } + if o.Winddir != nil { + m.Winddir = o.Winddir() + } + if o.Raingauge != nil { + m.Raingauge = o.Raingauge() + } + if o.Startdatetime != nil { + m.Startdatetime = o.Startdatetime() + } + if o.Enddatetime != nil { + m.Enddatetime = o.Enddatetime() + } + if o.InspID != nil { + m.InspID = o.InspID() + } + if o.Reviewed != nil { + m.Reviewed = o.Reviewed() + } + if o.Reviewedby != nil { + m.Reviewedby = o.Reviewedby() + } + if o.Revieweddate != nil { + m.Revieweddate = o.Revieweddate() + } + if o.Locationname != nil { + m.Locationname = o.Locationname() + } + if o.Zone != nil { + m.Zone = o.Zone() + } + if o.Warningoverride != nil { + m.Warningoverride = o.Warningoverride() + } + if o.Recordstatus != nil { + m.Recordstatus = o.Recordstatus() + } + if o.Zone2 != nil { + m.Zone2 = o.Zone2() + } + if o.Treatacres != nil { + m.Treatacres = o.Treatacres() + } + if o.Tirecount != nil { + m.Tirecount = o.Tirecount() + } + if o.Cbcount != nil { + m.Cbcount = o.Cbcount() + } + if o.Containercount != nil { + m.Containercount = o.Containercount() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.Treatmentlength != nil { + m.Treatmentlength = o.Treatmentlength() + } + if o.Treatmenthours != nil { + m.Treatmenthours = o.Treatmenthours() + } + if o.Treatmentlengthunits != nil { + m.Treatmentlengthunits = o.Treatmentlengthunits() + } + if o.Linelocid != nil { + m.Linelocid = o.Linelocid() + } + if o.Pointlocid != nil { + m.Pointlocid = o.Pointlocid() + } + if o.Polygonlocid != nil { + m.Polygonlocid = o.Polygonlocid() + } + if o.Srid != nil { + m.Srid = o.Srid() + } + if o.Sdid != nil { + m.Sdid = o.Sdid() + } + if o.Barrierrouteid != nil { + m.Barrierrouteid = o.Barrierrouteid() + } + if o.Ulvrouteid != nil { + m.Ulvrouteid = o.Ulvrouteid() + } + if o.Fieldtech != nil { + m.Fieldtech = o.Fieldtech() + } + if o.Ptaid != nil { + m.Ptaid = o.Ptaid() + } + if o.Flowrate != nil { + m.Flowrate = o.Flowrate() + } + if o.Habitat != nil { + m.Habitat = o.Habitat() + } + if o.Treathectares != nil { + m.Treathectares = o.Treathectares() + } + if o.Invloc != nil { + m.Invloc = o.Invloc() + } + if o.TempSitecond != nil { + m.TempSitecond = o.TempSitecond() + } + if o.Sitecond != nil { + m.Sitecond = o.Sitecond() + } + if o.Totalcostprodcut != nil { + m.Totalcostprodcut = o.Totalcostprodcut() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.Targetspecies != nil { + m.Targetspecies = o.Targetspecies() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerTreatmentSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTreatmentTemplate.CreateMany +func (o FieldseekerTreatmentTemplate) BuildMany(number int) models.FieldseekerTreatmentSlice { + m := make(models.FieldseekerTreatmentSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerTreatment(m *models.FieldseekerTreatmentSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerTreatment +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerTreatmentTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerTreatment) error { + var err error + + return err +} + +// Create builds a fieldseekerTreatment and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerTreatmentTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerTreatment, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerTreatment(opt) + + m, err := models.FieldseekerTreatments.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 fieldseekerTreatment and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerTreatmentTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerTreatment { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerTreatment 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 *FieldseekerTreatmentTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerTreatment { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerTreatments and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerTreatmentTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerTreatmentSlice, error) { + var err error + m := make(models.FieldseekerTreatmentSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerTreatments and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerTreatmentTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerTreatmentSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerTreatments 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 FieldseekerTreatmentTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerTreatmentSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerTreatment has methods that act as mods for the FieldseekerTreatmentTemplate +var FieldseekerTreatmentMods fieldseekerTreatmentMods + +type fieldseekerTreatmentMods struct{} + +func (m fieldseekerTreatmentMods) RandomizeAllColumns(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModSlice{ + FieldseekerTreatmentMods.RandomObjectid(f), + FieldseekerTreatmentMods.RandomActivity(f), + FieldseekerTreatmentMods.RandomTreatarea(f), + FieldseekerTreatmentMods.RandomAreaunit(f), + FieldseekerTreatmentMods.RandomProduct(f), + FieldseekerTreatmentMods.RandomQty(f), + FieldseekerTreatmentMods.RandomQtyunit(f), + FieldseekerTreatmentMods.RandomMethod(f), + FieldseekerTreatmentMods.RandomEquiptype(f), + FieldseekerTreatmentMods.RandomComments(f), + FieldseekerTreatmentMods.RandomAvetemp(f), + FieldseekerTreatmentMods.RandomWindspeed(f), + FieldseekerTreatmentMods.RandomWinddir(f), + FieldseekerTreatmentMods.RandomRaingauge(f), + FieldseekerTreatmentMods.RandomStartdatetime(f), + FieldseekerTreatmentMods.RandomEnddatetime(f), + FieldseekerTreatmentMods.RandomInspID(f), + FieldseekerTreatmentMods.RandomReviewed(f), + FieldseekerTreatmentMods.RandomReviewedby(f), + FieldseekerTreatmentMods.RandomRevieweddate(f), + FieldseekerTreatmentMods.RandomLocationname(f), + FieldseekerTreatmentMods.RandomZone(f), + FieldseekerTreatmentMods.RandomWarningoverride(f), + FieldseekerTreatmentMods.RandomRecordstatus(f), + FieldseekerTreatmentMods.RandomZone2(f), + FieldseekerTreatmentMods.RandomTreatacres(f), + FieldseekerTreatmentMods.RandomTirecount(f), + FieldseekerTreatmentMods.RandomCbcount(f), + FieldseekerTreatmentMods.RandomContainercount(f), + FieldseekerTreatmentMods.RandomGlobalid(f), + FieldseekerTreatmentMods.RandomTreatmentlength(f), + FieldseekerTreatmentMods.RandomTreatmenthours(f), + FieldseekerTreatmentMods.RandomTreatmentlengthunits(f), + FieldseekerTreatmentMods.RandomLinelocid(f), + FieldseekerTreatmentMods.RandomPointlocid(f), + FieldseekerTreatmentMods.RandomPolygonlocid(f), + FieldseekerTreatmentMods.RandomSrid(f), + FieldseekerTreatmentMods.RandomSdid(f), + FieldseekerTreatmentMods.RandomBarrierrouteid(f), + FieldseekerTreatmentMods.RandomUlvrouteid(f), + FieldseekerTreatmentMods.RandomFieldtech(f), + FieldseekerTreatmentMods.RandomPtaid(f), + FieldseekerTreatmentMods.RandomFlowrate(f), + FieldseekerTreatmentMods.RandomHabitat(f), + FieldseekerTreatmentMods.RandomTreathectares(f), + FieldseekerTreatmentMods.RandomInvloc(f), + FieldseekerTreatmentMods.RandomTempSitecond(f), + FieldseekerTreatmentMods.RandomSitecond(f), + FieldseekerTreatmentMods.RandomTotalcostprodcut(f), + FieldseekerTreatmentMods.RandomCreationdate(f), + FieldseekerTreatmentMods.RandomCreator(f), + FieldseekerTreatmentMods.RandomEditdate(f), + FieldseekerTreatmentMods.RandomEditor(f), + FieldseekerTreatmentMods.RandomTargetspecies(f), + } +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Objectid(val int64) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) ObjectidFunc(f func() int64) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetObjectid() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerTreatmentMods) RandomObjectid(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Activity(val null.Val[enums.FieldseekerTreatmentMosquitoactivityEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Activity = func() null.Val[enums.FieldseekerTreatmentMosquitoactivityEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) ActivityFunc(f func() null.Val[enums.FieldseekerTreatmentMosquitoactivityEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Activity = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetActivity() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Activity = 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 fieldseekerTreatmentMods) RandomActivity(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Activity = func() null.Val[enums.FieldseekerTreatmentMosquitoactivityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentMosquitoactivityEnum(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 fieldseekerTreatmentMods) RandomActivityNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Activity = func() null.Val[enums.FieldseekerTreatmentMosquitoactivityEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentMosquitoactivityEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Treatarea(val null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatarea = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) TreatareaFunc(f func() null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatarea = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetTreatarea() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatarea = 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 fieldseekerTreatmentMods) RandomTreatarea(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatarea = 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 fieldseekerTreatmentMods) RandomTreatareaNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatarea = 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 fieldseekerTreatmentMods) Areaunit(val null.Val[enums.FieldseekerTreatmentMosquitoproductareaunitEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Areaunit = func() null.Val[enums.FieldseekerTreatmentMosquitoproductareaunitEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) AreaunitFunc(f func() null.Val[enums.FieldseekerTreatmentMosquitoproductareaunitEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Areaunit = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetAreaunit() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Areaunit = 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 fieldseekerTreatmentMods) RandomAreaunit(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Areaunit = func() null.Val[enums.FieldseekerTreatmentMosquitoproductareaunitEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentMosquitoproductareaunitEnum(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 fieldseekerTreatmentMods) RandomAreaunitNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Areaunit = func() null.Val[enums.FieldseekerTreatmentMosquitoproductareaunitEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentMosquitoproductareaunitEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Product(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Product = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) ProductFunc(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Product = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetProduct() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Product = 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 fieldseekerTreatmentMods) RandomProduct(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Product = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTreatmentMods) RandomProductNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Product = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Qty(val null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Qty = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) QtyFunc(f func() null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Qty = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetQty() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Qty = 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 fieldseekerTreatmentMods) RandomQty(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Qty = 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 fieldseekerTreatmentMods) RandomQtyNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Qty = 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 fieldseekerTreatmentMods) Qtyunit(val null.Val[enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Qtyunit = func() null.Val[enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) QtyunitFunc(f func() null.Val[enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Qtyunit = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetQtyunit() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Qtyunit = 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 fieldseekerTreatmentMods) RandomQtyunit(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Qtyunit = func() null.Val[enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentMosquitoproductmeasureunitEnum(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 fieldseekerTreatmentMods) RandomQtyunitNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Qtyunit = func() null.Val[enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentMosquitoproductmeasureunitEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Method(val null.Val[enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Method = func() null.Val[enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) MethodFunc(f func() null.Val[enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Method = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetMethod() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Method = 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 fieldseekerTreatmentMods) RandomMethod(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Method = func() null.Val[enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu(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 fieldseekerTreatmentMods) RandomMethodNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Method = func() null.Val[enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Equiptype(val null.Val[enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Equiptype = func() null.Val[enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) EquiptypeFunc(f func() null.Val[enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Equiptype = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetEquiptype() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Equiptype = 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 fieldseekerTreatmentMods) RandomEquiptype(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Equiptype = func() null.Val[enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f(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 fieldseekerTreatmentMods) RandomEquiptypeNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Equiptype = func() null.Val[enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Comments(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) CommentsFunc(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetComments() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Comments = 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 fieldseekerTreatmentMods) RandomComments(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerTreatmentMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Avetemp(val null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Avetemp = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) AvetempFunc(f func() null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Avetemp = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetAvetemp() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Avetemp = 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 fieldseekerTreatmentMods) RandomAvetemp(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Avetemp = 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 fieldseekerTreatmentMods) RandomAvetempNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Avetemp = 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 fieldseekerTreatmentMods) Windspeed(val null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Windspeed = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) WindspeedFunc(f func() null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Windspeed = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetWindspeed() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Windspeed = 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 fieldseekerTreatmentMods) RandomWindspeed(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Windspeed = 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 fieldseekerTreatmentMods) RandomWindspeedNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Windspeed = 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 fieldseekerTreatmentMods) Winddir(val null.Val[enums.FieldseekerTreatmentNotinuiwinddirectionEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerTreatmentNotinuiwinddirectionEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) WinddirFunc(f func() null.Val[enums.FieldseekerTreatmentNotinuiwinddirectionEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Winddir = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetWinddir() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Winddir = 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 fieldseekerTreatmentMods) RandomWinddir(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerTreatmentNotinuiwinddirectionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentNotinuiwinddirectionEnum(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 fieldseekerTreatmentMods) RandomWinddirNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Winddir = func() null.Val[enums.FieldseekerTreatmentNotinuiwinddirectionEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentNotinuiwinddirectionEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Raingauge(val null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Raingauge = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) RaingaugeFunc(f func() null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Raingauge = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetRaingauge() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Raingauge = 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 fieldseekerTreatmentMods) RandomRaingauge(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Raingauge = 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 fieldseekerTreatmentMods) RandomRaingaugeNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Raingauge = 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 fieldseekerTreatmentMods) Startdatetime(val null.Val[time.Time]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Startdatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) StartdatetimeFunc(f func() null.Val[time.Time]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Startdatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetStartdatetime() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Startdatetime = 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 fieldseekerTreatmentMods) RandomStartdatetime(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTreatmentMods) RandomStartdatetimeNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Startdatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Enddatetime(val null.Val[time.Time]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Enddatetime = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) EnddatetimeFunc(f func() null.Val[time.Time]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Enddatetime = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetEnddatetime() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Enddatetime = 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 fieldseekerTreatmentMods) RandomEnddatetime(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTreatmentMods) RandomEnddatetimeNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Enddatetime = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) InspID(val null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.InspID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) InspIDFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.InspID = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetInspID() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.InspID = 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 fieldseekerTreatmentMods) RandomInspID(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.InspID = 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 fieldseekerTreatmentMods) RandomInspIDNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.InspID = 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 fieldseekerTreatmentMods) Reviewed(val null.Val[enums.FieldseekerTreatmentNotinuitFEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerTreatmentNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) ReviewedFunc(f func() null.Val[enums.FieldseekerTreatmentNotinuitFEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Reviewed = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetReviewed() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Reviewed = 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 fieldseekerTreatmentMods) RandomReviewed(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerTreatmentNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentNotinuitFEnum(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 fieldseekerTreatmentMods) RandomReviewedNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Reviewed = func() null.Val[enums.FieldseekerTreatmentNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Reviewedby(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Reviewedby = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) ReviewedbyFunc(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Reviewedby = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetReviewedby() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Reviewedby = 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 fieldseekerTreatmentMods) RandomReviewedby(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTreatmentMods) RandomReviewedbyNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Reviewedby = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Revieweddate(val null.Val[time.Time]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Revieweddate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) RevieweddateFunc(f func() null.Val[time.Time]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Revieweddate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetRevieweddate() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Revieweddate = 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 fieldseekerTreatmentMods) RandomRevieweddate(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTreatmentMods) RandomRevieweddateNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Revieweddate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Locationname(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Locationname = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) LocationnameFunc(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Locationname = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetLocationname() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Locationname = 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 fieldseekerTreatmentMods) RandomLocationname(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTreatmentMods) RandomLocationnameNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Locationname = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Zone(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Zone = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) ZoneFunc(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Zone = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetZone() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Zone = 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 fieldseekerTreatmentMods) RandomZone(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTreatmentMods) RandomZoneNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Zone = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Warningoverride(val null.Val[enums.FieldseekerTreatmentNotinuitFEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Warningoverride = func() null.Val[enums.FieldseekerTreatmentNotinuitFEnum] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) WarningoverrideFunc(f func() null.Val[enums.FieldseekerTreatmentNotinuitFEnum]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Warningoverride = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetWarningoverride() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Warningoverride = 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 fieldseekerTreatmentMods) RandomWarningoverride(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Warningoverride = func() null.Val[enums.FieldseekerTreatmentNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentNotinuitFEnum(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 fieldseekerTreatmentMods) RandomWarningoverrideNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Warningoverride = func() null.Val[enums.FieldseekerTreatmentNotinuitFEnum] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentNotinuitFEnum(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Recordstatus(val null.Val[int16]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Recordstatus = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) RecordstatusFunc(f func() null.Val[int16]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Recordstatus = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetRecordstatus() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Recordstatus = 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 fieldseekerTreatmentMods) RandomRecordstatus(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerTreatmentMods) RandomRecordstatusNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Recordstatus = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Zone2(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Zone2 = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) Zone2Func(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Zone2 = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetZone2() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Zone2 = 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 fieldseekerTreatmentMods) RandomZone2(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTreatmentMods) RandomZone2NotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Zone2 = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Treatacres(val null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatacres = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) TreatacresFunc(f func() null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatacres = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetTreatacres() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatacres = 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 fieldseekerTreatmentMods) RandomTreatacres(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatacres = 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 fieldseekerTreatmentMods) RandomTreatacresNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatacres = 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 fieldseekerTreatmentMods) Tirecount(val null.Val[int16]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Tirecount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) TirecountFunc(f func() null.Val[int16]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Tirecount = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetTirecount() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Tirecount = 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 fieldseekerTreatmentMods) RandomTirecount(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Tirecount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerTreatmentMods) RandomTirecountNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Tirecount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Cbcount(val null.Val[int16]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Cbcount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) CbcountFunc(f func() null.Val[int16]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Cbcount = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetCbcount() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Cbcount = 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 fieldseekerTreatmentMods) RandomCbcount(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Cbcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerTreatmentMods) RandomCbcountNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Cbcount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Containercount(val null.Val[int16]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Containercount = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) ContainercountFunc(f func() null.Val[int16]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Containercount = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetContainercount() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Containercount = 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 fieldseekerTreatmentMods) RandomContainercount(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Containercount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerTreatmentMods) RandomContainercountNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Containercount = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Globalid(val null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetGlobalid() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Globalid = 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 fieldseekerTreatmentMods) RandomGlobalid(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Globalid = 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 fieldseekerTreatmentMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Globalid = 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 fieldseekerTreatmentMods) Treatmentlength(val null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmentlength = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) TreatmentlengthFunc(f func() null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmentlength = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetTreatmentlength() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmentlength = 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 fieldseekerTreatmentMods) RandomTreatmentlength(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmentlength = 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 fieldseekerTreatmentMods) RandomTreatmentlengthNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmentlength = 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 fieldseekerTreatmentMods) Treatmenthours(val null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmenthours = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) TreatmenthoursFunc(f func() null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmenthours = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetTreatmenthours() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmenthours = 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 fieldseekerTreatmentMods) RandomTreatmenthours(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmenthours = 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 fieldseekerTreatmentMods) RandomTreatmenthoursNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmenthours = 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 fieldseekerTreatmentMods) Treatmentlengthunits(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmentlengthunits = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) TreatmentlengthunitsFunc(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmentlengthunits = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetTreatmentlengthunits() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmentlengthunits = 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 fieldseekerTreatmentMods) RandomTreatmentlengthunits(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmentlengthunits = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "5") + 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 fieldseekerTreatmentMods) RandomTreatmentlengthunitsNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treatmentlengthunits = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "5") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Linelocid(val null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Linelocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) LinelocidFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Linelocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetLinelocid() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Linelocid = 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 fieldseekerTreatmentMods) RandomLinelocid(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Linelocid = 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 fieldseekerTreatmentMods) RandomLinelocidNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Linelocid = 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 fieldseekerTreatmentMods) Pointlocid(val null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Pointlocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) PointlocidFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Pointlocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetPointlocid() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Pointlocid = 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 fieldseekerTreatmentMods) RandomPointlocid(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Pointlocid = 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 fieldseekerTreatmentMods) RandomPointlocidNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Pointlocid = 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 fieldseekerTreatmentMods) Polygonlocid(val null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Polygonlocid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) PolygonlocidFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Polygonlocid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetPolygonlocid() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Polygonlocid = 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 fieldseekerTreatmentMods) RandomPolygonlocid(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Polygonlocid = 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 fieldseekerTreatmentMods) RandomPolygonlocidNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Polygonlocid = 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 fieldseekerTreatmentMods) Srid(val null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Srid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) SridFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Srid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetSrid() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Srid = 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 fieldseekerTreatmentMods) RandomSrid(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Srid = 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 fieldseekerTreatmentMods) RandomSridNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Srid = 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 fieldseekerTreatmentMods) Sdid(val null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Sdid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) SdidFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Sdid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetSdid() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Sdid = 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 fieldseekerTreatmentMods) RandomSdid(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Sdid = 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 fieldseekerTreatmentMods) RandomSdidNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Sdid = 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 fieldseekerTreatmentMods) Barrierrouteid(val null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Barrierrouteid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) BarrierrouteidFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Barrierrouteid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetBarrierrouteid() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Barrierrouteid = 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 fieldseekerTreatmentMods) RandomBarrierrouteid(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Barrierrouteid = 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 fieldseekerTreatmentMods) RandomBarrierrouteidNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Barrierrouteid = 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 fieldseekerTreatmentMods) Ulvrouteid(val null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Ulvrouteid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) UlvrouteidFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Ulvrouteid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetUlvrouteid() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Ulvrouteid = 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 fieldseekerTreatmentMods) RandomUlvrouteid(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Ulvrouteid = 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 fieldseekerTreatmentMods) RandomUlvrouteidNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Ulvrouteid = 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 fieldseekerTreatmentMods) Fieldtech(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Fieldtech = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) FieldtechFunc(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Fieldtech = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetFieldtech() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Fieldtech = 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 fieldseekerTreatmentMods) RandomFieldtech(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTreatmentMods) RandomFieldtechNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Fieldtech = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Ptaid(val null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Ptaid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) PtaidFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Ptaid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetPtaid() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Ptaid = 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 fieldseekerTreatmentMods) RandomPtaid(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Ptaid = 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 fieldseekerTreatmentMods) RandomPtaidNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Ptaid = 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 fieldseekerTreatmentMods) Flowrate(val null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Flowrate = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) FlowrateFunc(f func() null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Flowrate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetFlowrate() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Flowrate = 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 fieldseekerTreatmentMods) RandomFlowrate(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Flowrate = 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 fieldseekerTreatmentMods) RandomFlowrateNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Flowrate = 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 fieldseekerTreatmentMods) Habitat(val null.Val[enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) HabitatFunc(f func() null.Val[enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Habitat = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetHabitat() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Habitat = 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 fieldseekerTreatmentMods) RandomHabitat(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1(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 fieldseekerTreatmentMods) RandomHabitatNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Habitat = func() null.Val[enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Treathectares(val null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treathectares = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) TreathectaresFunc(f func() null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treathectares = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetTreathectares() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treathectares = 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 fieldseekerTreatmentMods) RandomTreathectares(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treathectares = 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 fieldseekerTreatmentMods) RandomTreathectaresNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Treathectares = 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 fieldseekerTreatmentMods) Invloc(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Invloc = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) InvlocFunc(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Invloc = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetInvloc() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Invloc = 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 fieldseekerTreatmentMods) RandomInvloc(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Invloc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTreatmentMods) RandomInvlocNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Invloc = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) TempSitecond(val null.Val[enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.TempSitecond = func() null.Val[enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) TempSitecondFunc(f func() null.Val[enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.TempSitecond = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetTempSitecond() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.TempSitecond = 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 fieldseekerTreatmentMods) RandomTempSitecond(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.TempSitecond = func() null.Val[enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E(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 fieldseekerTreatmentMods) RandomTempSitecondNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.TempSitecond = func() null.Val[enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Sitecond(val null.Val[enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E] { + return val + } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) SitecondFunc(f func() null.Val[enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Sitecond = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetSitecond() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Sitecond = 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 fieldseekerTreatmentMods) RandomSitecond(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E(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 fieldseekerTreatmentMods) RandomSitecondNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Sitecond = func() null.Val[enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E] { + if f == nil { + f = &defaultFaker + } + + val := random_enums_FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Totalcostprodcut(val null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Totalcostprodcut = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) TotalcostprodcutFunc(f func() null.Val[float64]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Totalcostprodcut = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetTotalcostprodcut() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Totalcostprodcut = 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 fieldseekerTreatmentMods) RandomTotalcostprodcut(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Totalcostprodcut = 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 fieldseekerTreatmentMods) RandomTotalcostprodcutNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Totalcostprodcut = 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 fieldseekerTreatmentMods) Creationdate(val null.Val[time.Time]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetCreationdate() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Creationdate = 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 fieldseekerTreatmentMods) RandomCreationdate(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTreatmentMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Creator(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) CreatorFunc(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetCreator() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Creator = 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 fieldseekerTreatmentMods) RandomCreator(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerTreatmentMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Editdate(val null.Val[time.Time]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetEditdate() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Editdate = 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 fieldseekerTreatmentMods) RandomEditdate(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTreatmentMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Editor(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) EditorFunc(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetEditor() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Editor = 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 fieldseekerTreatmentMods) RandomEditor(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerTreatmentMods) RandomEditorNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentMods) Targetspecies(val null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Targetspecies = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentMods) TargetspeciesFunc(f func() null.Val[string]) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Targetspecies = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentMods) UnsetTargetspecies() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Targetspecies = 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 fieldseekerTreatmentMods) RandomTargetspecies(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Targetspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerTreatmentMods) RandomTargetspeciesNotNull(f *faker.Faker) FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(_ context.Context, o *FieldseekerTreatmentTemplate) { + o.Targetspecies = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +func (m fieldseekerTreatmentMods) WithParentsCascading() FieldseekerTreatmentMod { + return FieldseekerTreatmentModFunc(func(ctx context.Context, o *FieldseekerTreatmentTemplate) { + if isDone, _ := fieldseekerTreatmentWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerTreatmentWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.treatmentarea.bob.go b/db/factory/fieldseeker.treatmentarea.bob.go new file mode 100644 index 00000000..6bd5fa90 --- /dev/null +++ b/db/factory/fieldseeker.treatmentarea.bob.go @@ -0,0 +1,1309 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerTreatmentareaMod interface { + Apply(context.Context, *FieldseekerTreatmentareaTemplate) +} + +type FieldseekerTreatmentareaModFunc func(context.Context, *FieldseekerTreatmentareaTemplate) + +func (f FieldseekerTreatmentareaModFunc) Apply(ctx context.Context, n *FieldseekerTreatmentareaTemplate) { + f(ctx, n) +} + +type FieldseekerTreatmentareaModSlice []FieldseekerTreatmentareaMod + +func (mods FieldseekerTreatmentareaModSlice) Apply(ctx context.Context, n *FieldseekerTreatmentareaTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerTreatmentareaTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerTreatmentareaTemplate struct { + Objectid func() int64 + TreatID func() null.Val[uuid.UUID] + SessionID func() null.Val[uuid.UUID] + Treatdate func() null.Val[time.Time] + Comments func() null.Val[string] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Notified func() null.Val[int16] + Type func() null.Val[string] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + ShapeArea func() null.Val[float64] + ShapeLength func() null.Val[float64] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerTreatmentareaTemplate +func (o *FieldseekerTreatmentareaTemplate) Apply(ctx context.Context, mods ...FieldseekerTreatmentareaMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerTreatmentarea +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerTreatmentareaTemplate) setModelRels(o *models.FieldseekerTreatmentarea) {} + +// BuildSetter returns an *models.FieldseekerTreatmentareaSetter +// this does nothing with the relationship templates +func (o FieldseekerTreatmentareaTemplate) BuildSetter() *models.FieldseekerTreatmentareaSetter { + m := &models.FieldseekerTreatmentareaSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.TreatID != nil { + val := o.TreatID() + m.TreatID = omitnull.FromNull(val) + } + if o.SessionID != nil { + val := o.SessionID() + m.SessionID = omitnull.FromNull(val) + } + if o.Treatdate != nil { + val := o.Treatdate() + m.Treatdate = omitnull.FromNull(val) + } + if o.Comments != nil { + val := o.Comments() + m.Comments = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Notified != nil { + val := o.Notified() + m.Notified = omitnull.FromNull(val) + } + if o.Type != nil { + val := o.Type() + m.Type = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.ShapeArea != nil { + val := o.ShapeArea() + m.ShapeArea = omitnull.FromNull(val) + } + if o.ShapeLength != nil { + val := o.ShapeLength() + m.ShapeLength = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerTreatmentareaSetter +// this does nothing with the relationship templates +func (o FieldseekerTreatmentareaTemplate) BuildManySetter(number int) []*models.FieldseekerTreatmentareaSetter { + m := make([]*models.FieldseekerTreatmentareaSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerTreatmentarea +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTreatmentareaTemplate.Create +func (o FieldseekerTreatmentareaTemplate) Build() *models.FieldseekerTreatmentarea { + m := &models.FieldseekerTreatmentarea{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.TreatID != nil { + m.TreatID = o.TreatID() + } + if o.SessionID != nil { + m.SessionID = o.SessionID() + } + if o.Treatdate != nil { + m.Treatdate = o.Treatdate() + } + if o.Comments != nil { + m.Comments = o.Comments() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Notified != nil { + m.Notified = o.Notified() + } + if o.Type != nil { + m.Type = o.Type() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.ShapeArea != nil { + m.ShapeArea = o.ShapeArea() + } + if o.ShapeLength != nil { + m.ShapeLength = o.ShapeLength() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerTreatmentareaSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerTreatmentareaTemplate.CreateMany +func (o FieldseekerTreatmentareaTemplate) BuildMany(number int) models.FieldseekerTreatmentareaSlice { + m := make(models.FieldseekerTreatmentareaSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerTreatmentarea(m *models.FieldseekerTreatmentareaSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerTreatmentarea +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerTreatmentareaTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerTreatmentarea) error { + var err error + + return err +} + +// Create builds a fieldseekerTreatmentarea and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerTreatmentareaTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerTreatmentarea, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerTreatmentarea(opt) + + m, err := models.FieldseekerTreatmentareas.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 fieldseekerTreatmentarea and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerTreatmentareaTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerTreatmentarea { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerTreatmentarea 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 *FieldseekerTreatmentareaTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerTreatmentarea { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerTreatmentareas and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerTreatmentareaTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerTreatmentareaSlice, error) { + var err error + m := make(models.FieldseekerTreatmentareaSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerTreatmentareas and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerTreatmentareaTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerTreatmentareaSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerTreatmentareas 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 FieldseekerTreatmentareaTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerTreatmentareaSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerTreatmentarea has methods that act as mods for the FieldseekerTreatmentareaTemplate +var FieldseekerTreatmentareaMods fieldseekerTreatmentareaMods + +type fieldseekerTreatmentareaMods struct{} + +func (m fieldseekerTreatmentareaMods) RandomizeAllColumns(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModSlice{ + FieldseekerTreatmentareaMods.RandomObjectid(f), + FieldseekerTreatmentareaMods.RandomTreatID(f), + FieldseekerTreatmentareaMods.RandomSessionID(f), + FieldseekerTreatmentareaMods.RandomTreatdate(f), + FieldseekerTreatmentareaMods.RandomComments(f), + FieldseekerTreatmentareaMods.RandomGlobalid(f), + FieldseekerTreatmentareaMods.RandomCreatedUser(f), + FieldseekerTreatmentareaMods.RandomCreatedDate(f), + FieldseekerTreatmentareaMods.RandomLastEditedUser(f), + FieldseekerTreatmentareaMods.RandomLastEditedDate(f), + FieldseekerTreatmentareaMods.RandomNotified(f), + FieldseekerTreatmentareaMods.RandomType(f), + FieldseekerTreatmentareaMods.RandomCreationdate(f), + FieldseekerTreatmentareaMods.RandomCreator(f), + FieldseekerTreatmentareaMods.RandomEditdate(f), + FieldseekerTreatmentareaMods.RandomEditor(f), + FieldseekerTreatmentareaMods.RandomShapeArea(f), + FieldseekerTreatmentareaMods.RandomShapeLength(f), + } +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) Objectid(val int64) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) ObjectidFunc(f func() int64) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetObjectid() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerTreatmentareaMods) RandomObjectid(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) TreatID(val null.Val[uuid.UUID]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.TreatID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) TreatIDFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.TreatID = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetTreatID() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.TreatID = 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 fieldseekerTreatmentareaMods) RandomTreatID(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.TreatID = 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 fieldseekerTreatmentareaMods) RandomTreatIDNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.TreatID = 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 fieldseekerTreatmentareaMods) SessionID(val null.Val[uuid.UUID]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.SessionID = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) SessionIDFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.SessionID = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetSessionID() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.SessionID = 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 fieldseekerTreatmentareaMods) RandomSessionID(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.SessionID = 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 fieldseekerTreatmentareaMods) RandomSessionIDNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.SessionID = 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 fieldseekerTreatmentareaMods) Treatdate(val null.Val[time.Time]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Treatdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) TreatdateFunc(f func() null.Val[time.Time]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Treatdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetTreatdate() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Treatdate = 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 fieldseekerTreatmentareaMods) RandomTreatdate(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Treatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTreatmentareaMods) RandomTreatdateNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Treatdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) Comments(val null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Comments = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) CommentsFunc(f func() null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Comments = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetComments() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Comments = 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 fieldseekerTreatmentareaMods) RandomComments(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + 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 fieldseekerTreatmentareaMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Comments = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "250") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) Globalid(val null.Val[uuid.UUID]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetGlobalid() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Globalid = 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 fieldseekerTreatmentareaMods) RandomGlobalid(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Globalid = 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 fieldseekerTreatmentareaMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Globalid = 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 fieldseekerTreatmentareaMods) CreatedUser(val null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetCreatedUser() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.CreatedUser = 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 fieldseekerTreatmentareaMods) RandomCreatedUser(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerTreatmentareaMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) CreatedDate(val null.Val[time.Time]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetCreatedDate() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.CreatedDate = 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 fieldseekerTreatmentareaMods) RandomCreatedDate(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTreatmentareaMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) LastEditedUser(val null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetLastEditedUser() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.LastEditedUser = 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 fieldseekerTreatmentareaMods) RandomLastEditedUser(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerTreatmentareaMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) LastEditedDate(val null.Val[time.Time]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetLastEditedDate() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.LastEditedDate = 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 fieldseekerTreatmentareaMods) RandomLastEditedDate(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTreatmentareaMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) Notified(val null.Val[int16]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Notified = func() null.Val[int16] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) NotifiedFunc(f func() null.Val[int16]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Notified = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetNotified() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Notified = 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 fieldseekerTreatmentareaMods) RandomNotified(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Notified = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(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 fieldseekerTreatmentareaMods) RandomNotifiedNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Notified = func() null.Val[int16] { + if f == nil { + f = &defaultFaker + } + + val := random_int16(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) Type(val null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Type = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) TypeFunc(f func() null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Type = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetType() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Type = 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 fieldseekerTreatmentareaMods) RandomType(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Type = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + 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 fieldseekerTreatmentareaMods) RandomTypeNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Type = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "25") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) Creationdate(val null.Val[time.Time]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetCreationdate() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Creationdate = 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 fieldseekerTreatmentareaMods) RandomCreationdate(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTreatmentareaMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) Creator(val null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) CreatorFunc(f func() null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetCreator() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Creator = 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 fieldseekerTreatmentareaMods) RandomCreator(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerTreatmentareaMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) Editdate(val null.Val[time.Time]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetEditdate() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Editdate = 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 fieldseekerTreatmentareaMods) RandomEditdate(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerTreatmentareaMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) Editor(val null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) EditorFunc(f func() null.Val[string]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetEditor() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Editor = 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 fieldseekerTreatmentareaMods) RandomEditor(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerTreatmentareaMods) RandomEditorNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerTreatmentareaMods) ShapeArea(val null.Val[float64]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.ShapeArea = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) ShapeAreaFunc(f func() null.Val[float64]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.ShapeArea = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetShapeArea() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.ShapeArea = 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 fieldseekerTreatmentareaMods) RandomShapeArea(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.ShapeArea = 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 fieldseekerTreatmentareaMods) RandomShapeAreaNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.ShapeArea = 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 fieldseekerTreatmentareaMods) ShapeLength(val null.Val[float64]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.ShapeLength = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerTreatmentareaMods) ShapeLengthFunc(f func() null.Val[float64]) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.ShapeLength = f + }) +} + +// Clear any values for the column +func (m fieldseekerTreatmentareaMods) UnsetShapeLength() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.ShapeLength = 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 fieldseekerTreatmentareaMods) RandomShapeLength(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.ShapeLength = 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 fieldseekerTreatmentareaMods) RandomShapeLengthNotNull(f *faker.Faker) FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(_ context.Context, o *FieldseekerTreatmentareaTemplate) { + o.ShapeLength = func() null.Val[float64] { + if f == nil { + f = &defaultFaker + } + + val := random_float64(f) + return null.From(val) + } + }) +} + +func (m fieldseekerTreatmentareaMods) WithParentsCascading() FieldseekerTreatmentareaMod { + return FieldseekerTreatmentareaModFunc(func(ctx context.Context, o *FieldseekerTreatmentareaTemplate) { + if isDone, _ := fieldseekerTreatmentareaWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerTreatmentareaWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.ulvsprayroute.bob.go b/db/factory/fieldseeker.ulvsprayroute.bob.go new file mode 100644 index 00000000..9766a8a6 --- /dev/null +++ b/db/factory/fieldseeker.ulvsprayroute.bob.go @@ -0,0 +1,90 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + + models "github.com/Gleipnir-Technology/nidus-sync/db/models" + "github.com/jaswdr/faker/v2" +) + +type FieldseekerUlvsprayrouteMod interface { + Apply(context.Context, *FieldseekerUlvsprayrouteTemplate) +} + +type FieldseekerUlvsprayrouteModFunc func(context.Context, *FieldseekerUlvsprayrouteTemplate) + +func (f FieldseekerUlvsprayrouteModFunc) Apply(ctx context.Context, n *FieldseekerUlvsprayrouteTemplate) { + f(ctx, n) +} + +type FieldseekerUlvsprayrouteModSlice []FieldseekerUlvsprayrouteMod + +func (mods FieldseekerUlvsprayrouteModSlice) Apply(ctx context.Context, n *FieldseekerUlvsprayrouteTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerUlvsprayrouteTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerUlvsprayrouteTemplate struct { + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerUlvsprayrouteTemplate +func (o *FieldseekerUlvsprayrouteTemplate) Apply(ctx context.Context, mods ...FieldseekerUlvsprayrouteMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerUlvsprayroute +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerUlvsprayrouteTemplate) setModelRels(o *models.FieldseekerUlvsprayroute) {} + +// Build returns an *models.FieldseekerUlvsprayroute +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerUlvsprayrouteTemplate.Create +func (o FieldseekerUlvsprayrouteTemplate) Build() *models.FieldseekerUlvsprayroute { + m := &models.FieldseekerUlvsprayroute{} + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerUlvsprayrouteSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerUlvsprayrouteTemplate.CreateMany +func (o FieldseekerUlvsprayrouteTemplate) BuildMany(number int) models.FieldseekerUlvsprayrouteSlice { + m := make(models.FieldseekerUlvsprayrouteSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +// FieldseekerUlvsprayroute has methods that act as mods for the FieldseekerUlvsprayrouteTemplate +var FieldseekerUlvsprayrouteMods fieldseekerUlvsprayrouteMods + +type fieldseekerUlvsprayrouteMods struct{} + +func (m fieldseekerUlvsprayrouteMods) RandomizeAllColumns(f *faker.Faker) FieldseekerUlvsprayrouteMod { + return FieldseekerUlvsprayrouteModSlice{} +} + +func (m fieldseekerUlvsprayrouteMods) WithParentsCascading() FieldseekerUlvsprayrouteMod { + return FieldseekerUlvsprayrouteModFunc(func(ctx context.Context, o *FieldseekerUlvsprayrouteTemplate) { + if isDone, _ := fieldseekerUlvsprayrouteWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerUlvsprayrouteWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.zones.bob.go b/db/factory/fieldseeker.zones.bob.go new file mode 100644 index 00000000..20aa804b --- /dev/null +++ b/db/factory/fieldseeker.zones.bob.go @@ -0,0 +1,1061 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerZoneMod interface { + Apply(context.Context, *FieldseekerZoneTemplate) +} + +type FieldseekerZoneModFunc func(context.Context, *FieldseekerZoneTemplate) + +func (f FieldseekerZoneModFunc) Apply(ctx context.Context, n *FieldseekerZoneTemplate) { + f(ctx, n) +} + +type FieldseekerZoneModSlice []FieldseekerZoneMod + +func (mods FieldseekerZoneModSlice) Apply(ctx context.Context, n *FieldseekerZoneTemplate) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerZoneTemplate is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerZoneTemplate struct { + Objectid func() int64 + Name func() null.Val[string] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Active func() null.Val[int32] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + ShapeArea func() null.Val[float64] + ShapeLength func() null.Val[float64] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerZoneTemplate +func (o *FieldseekerZoneTemplate) Apply(ctx context.Context, mods ...FieldseekerZoneMod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerZone +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerZoneTemplate) setModelRels(o *models.FieldseekerZone) {} + +// BuildSetter returns an *models.FieldseekerZoneSetter +// this does nothing with the relationship templates +func (o FieldseekerZoneTemplate) BuildSetter() *models.FieldseekerZoneSetter { + m := &models.FieldseekerZoneSetter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Name != nil { + val := o.Name() + m.Name = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Active != nil { + val := o.Active() + m.Active = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.ShapeArea != nil { + val := o.ShapeArea() + m.ShapeArea = omitnull.FromNull(val) + } + if o.ShapeLength != nil { + val := o.ShapeLength() + m.ShapeLength = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerZoneSetter +// this does nothing with the relationship templates +func (o FieldseekerZoneTemplate) BuildManySetter(number int) []*models.FieldseekerZoneSetter { + m := make([]*models.FieldseekerZoneSetter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerZone +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerZoneTemplate.Create +func (o FieldseekerZoneTemplate) Build() *models.FieldseekerZone { + m := &models.FieldseekerZone{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Name != nil { + m.Name = o.Name() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Active != nil { + m.Active = o.Active() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.ShapeArea != nil { + m.ShapeArea = o.ShapeArea() + } + if o.ShapeLength != nil { + m.ShapeLength = o.ShapeLength() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerZoneSlice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerZoneTemplate.CreateMany +func (o FieldseekerZoneTemplate) BuildMany(number int) models.FieldseekerZoneSlice { + m := make(models.FieldseekerZoneSlice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerZone(m *models.FieldseekerZoneSetter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerZone +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerZoneTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerZone) error { + var err error + + return err +} + +// Create builds a fieldseekerZone and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerZoneTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerZone, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerZone(opt) + + m, err := models.FieldseekerZones.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 fieldseekerZone and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerZoneTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerZone { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerZone 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 *FieldseekerZoneTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerZone { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerZones and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerZoneTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerZoneSlice, error) { + var err error + m := make(models.FieldseekerZoneSlice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerZones and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerZoneTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerZoneSlice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerZones 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 FieldseekerZoneTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerZoneSlice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerZone has methods that act as mods for the FieldseekerZoneTemplate +var FieldseekerZoneMods fieldseekerZoneMods + +type fieldseekerZoneMods struct{} + +func (m fieldseekerZoneMods) RandomizeAllColumns(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModSlice{ + FieldseekerZoneMods.RandomObjectid(f), + FieldseekerZoneMods.RandomName(f), + FieldseekerZoneMods.RandomGlobalid(f), + FieldseekerZoneMods.RandomCreatedUser(f), + FieldseekerZoneMods.RandomCreatedDate(f), + FieldseekerZoneMods.RandomLastEditedUser(f), + FieldseekerZoneMods.RandomLastEditedDate(f), + FieldseekerZoneMods.RandomActive(f), + FieldseekerZoneMods.RandomCreationdate(f), + FieldseekerZoneMods.RandomCreator(f), + FieldseekerZoneMods.RandomEditdate(f), + FieldseekerZoneMods.RandomEditor(f), + FieldseekerZoneMods.RandomShapeArea(f), + FieldseekerZoneMods.RandomShapeLength(f), + } +} + +// Set the model columns to this value +func (m fieldseekerZoneMods) Objectid(val int64) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) ObjectidFunc(f func() int64) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetObjectid() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerZoneMods) RandomObjectid(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZoneMods) Name(val null.Val[string]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Name = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) NameFunc(f func() null.Val[string]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Name = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetName() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Name = 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 fieldseekerZoneMods) RandomName(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerZoneMods) RandomNameNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZoneMods) Globalid(val null.Val[uuid.UUID]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetGlobalid() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Globalid = 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 fieldseekerZoneMods) RandomGlobalid(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Globalid = 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 fieldseekerZoneMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Globalid = 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 fieldseekerZoneMods) CreatedUser(val null.Val[string]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetCreatedUser() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.CreatedUser = 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 fieldseekerZoneMods) RandomCreatedUser(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerZoneMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZoneMods) CreatedDate(val null.Val[time.Time]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetCreatedDate() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.CreatedDate = 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 fieldseekerZoneMods) RandomCreatedDate(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerZoneMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZoneMods) LastEditedUser(val null.Val[string]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetLastEditedUser() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.LastEditedUser = 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 fieldseekerZoneMods) RandomLastEditedUser(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerZoneMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZoneMods) LastEditedDate(val null.Val[time.Time]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetLastEditedDate() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.LastEditedDate = 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 fieldseekerZoneMods) RandomLastEditedDate(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerZoneMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZoneMods) Active(val null.Val[int32]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Active = func() null.Val[int32] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) ActiveFunc(f func() null.Val[int32]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Active = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetActive() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Active = 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 fieldseekerZoneMods) RandomActive(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Active = 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 fieldseekerZoneMods) RandomActiveNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Active = 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 fieldseekerZoneMods) Creationdate(val null.Val[time.Time]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetCreationdate() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Creationdate = 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 fieldseekerZoneMods) RandomCreationdate(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerZoneMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZoneMods) Creator(val null.Val[string]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) CreatorFunc(f func() null.Val[string]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetCreator() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Creator = 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 fieldseekerZoneMods) RandomCreator(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerZoneMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZoneMods) Editdate(val null.Val[time.Time]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetEditdate() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Editdate = 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 fieldseekerZoneMods) RandomEditdate(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerZoneMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZoneMods) Editor(val null.Val[string]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) EditorFunc(f func() null.Val[string]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetEditor() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Editor = 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 fieldseekerZoneMods) RandomEditor(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerZoneMods) RandomEditorNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZoneMods) ShapeArea(val null.Val[float64]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.ShapeArea = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) ShapeAreaFunc(f func() null.Val[float64]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.ShapeArea = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetShapeArea() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.ShapeArea = 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 fieldseekerZoneMods) RandomShapeArea(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.ShapeArea = 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 fieldseekerZoneMods) RandomShapeAreaNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.ShapeArea = 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 fieldseekerZoneMods) ShapeLength(val null.Val[float64]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.ShapeLength = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZoneMods) ShapeLengthFunc(f func() null.Val[float64]) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.ShapeLength = f + }) +} + +// Clear any values for the column +func (m fieldseekerZoneMods) UnsetShapeLength() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.ShapeLength = 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 fieldseekerZoneMods) RandomShapeLength(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.ShapeLength = 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 fieldseekerZoneMods) RandomShapeLengthNotNull(f *faker.Faker) FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(_ context.Context, o *FieldseekerZoneTemplate) { + o.ShapeLength = func() null.Val[float64] { + if f == nil { + f = &defaultFaker + } + + val := random_float64(f) + return null.From(val) + } + }) +} + +func (m fieldseekerZoneMods) WithParentsCascading() FieldseekerZoneMod { + return FieldseekerZoneModFunc(func(ctx context.Context, o *FieldseekerZoneTemplate) { + if isDone, _ := fieldseekerZoneWithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerZoneWithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker.zones2.bob.go b/db/factory/fieldseeker.zones2.bob.go new file mode 100644 index 00000000..3e55b9c4 --- /dev/null +++ b/db/factory/fieldseeker.zones2.bob.go @@ -0,0 +1,999 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package factory + +import ( + "context" + "testing" + "time" + + 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/gofrs/uuid/v5" + "github.com/jaswdr/faker/v2" + "github.com/stephenafamo/bob" +) + +type FieldseekerZones2Mod interface { + Apply(context.Context, *FieldseekerZones2Template) +} + +type FieldseekerZones2ModFunc func(context.Context, *FieldseekerZones2Template) + +func (f FieldseekerZones2ModFunc) Apply(ctx context.Context, n *FieldseekerZones2Template) { + f(ctx, n) +} + +type FieldseekerZones2ModSlice []FieldseekerZones2Mod + +func (mods FieldseekerZones2ModSlice) Apply(ctx context.Context, n *FieldseekerZones2Template) { + for _, f := range mods { + f.Apply(ctx, n) + } +} + +// FieldseekerZones2Template is an object representing the database table. +// all columns are optional and should be set by mods +type FieldseekerZones2Template struct { + Objectid func() int64 + Name func() null.Val[string] + Globalid func() null.Val[uuid.UUID] + CreatedUser func() null.Val[string] + CreatedDate func() null.Val[time.Time] + LastEditedUser func() null.Val[string] + LastEditedDate func() null.Val[time.Time] + Creationdate func() null.Val[time.Time] + Creator func() null.Val[string] + Editdate func() null.Val[time.Time] + Editor func() null.Val[string] + ShapeArea func() null.Val[float64] + ShapeLength func() null.Val[float64] + + f *Factory + + alreadyPersisted bool +} + +// Apply mods to the FieldseekerZones2Template +func (o *FieldseekerZones2Template) Apply(ctx context.Context, mods ...FieldseekerZones2Mod) { + for _, mod := range mods { + mod.Apply(ctx, o) + } +} + +// setModelRels creates and sets the relationships on *models.FieldseekerZones2 +// according to the relationships in the template. Nothing is inserted into the db +func (t FieldseekerZones2Template) setModelRels(o *models.FieldseekerZones2) {} + +// BuildSetter returns an *models.FieldseekerZones2Setter +// this does nothing with the relationship templates +func (o FieldseekerZones2Template) BuildSetter() *models.FieldseekerZones2Setter { + m := &models.FieldseekerZones2Setter{} + + if o.Objectid != nil { + val := o.Objectid() + m.Objectid = omit.From(val) + } + if o.Name != nil { + val := o.Name() + m.Name = omitnull.FromNull(val) + } + if o.Globalid != nil { + val := o.Globalid() + m.Globalid = omitnull.FromNull(val) + } + if o.CreatedUser != nil { + val := o.CreatedUser() + m.CreatedUser = omitnull.FromNull(val) + } + if o.CreatedDate != nil { + val := o.CreatedDate() + m.CreatedDate = omitnull.FromNull(val) + } + if o.LastEditedUser != nil { + val := o.LastEditedUser() + m.LastEditedUser = omitnull.FromNull(val) + } + if o.LastEditedDate != nil { + val := o.LastEditedDate() + m.LastEditedDate = omitnull.FromNull(val) + } + if o.Creationdate != nil { + val := o.Creationdate() + m.Creationdate = omitnull.FromNull(val) + } + if o.Creator != nil { + val := o.Creator() + m.Creator = omitnull.FromNull(val) + } + if o.Editdate != nil { + val := o.Editdate() + m.Editdate = omitnull.FromNull(val) + } + if o.Editor != nil { + val := o.Editor() + m.Editor = omitnull.FromNull(val) + } + if o.ShapeArea != nil { + val := o.ShapeArea() + m.ShapeArea = omitnull.FromNull(val) + } + if o.ShapeLength != nil { + val := o.ShapeLength() + m.ShapeLength = omitnull.FromNull(val) + } + + return m +} + +// BuildManySetter returns an []*models.FieldseekerZones2Setter +// this does nothing with the relationship templates +func (o FieldseekerZones2Template) BuildManySetter(number int) []*models.FieldseekerZones2Setter { + m := make([]*models.FieldseekerZones2Setter, number) + + for i := range m { + m[i] = o.BuildSetter() + } + + return m +} + +// Build returns an *models.FieldseekerZones2 +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerZones2Template.Create +func (o FieldseekerZones2Template) Build() *models.FieldseekerZones2 { + m := &models.FieldseekerZones2{} + + if o.Objectid != nil { + m.Objectid = o.Objectid() + } + if o.Name != nil { + m.Name = o.Name() + } + if o.Globalid != nil { + m.Globalid = o.Globalid() + } + if o.CreatedUser != nil { + m.CreatedUser = o.CreatedUser() + } + if o.CreatedDate != nil { + m.CreatedDate = o.CreatedDate() + } + if o.LastEditedUser != nil { + m.LastEditedUser = o.LastEditedUser() + } + if o.LastEditedDate != nil { + m.LastEditedDate = o.LastEditedDate() + } + if o.Creationdate != nil { + m.Creationdate = o.Creationdate() + } + if o.Creator != nil { + m.Creator = o.Creator() + } + if o.Editdate != nil { + m.Editdate = o.Editdate() + } + if o.Editor != nil { + m.Editor = o.Editor() + } + if o.ShapeArea != nil { + m.ShapeArea = o.ShapeArea() + } + if o.ShapeLength != nil { + m.ShapeLength = o.ShapeLength() + } + + o.setModelRels(m) + + return m +} + +// BuildMany returns an models.FieldseekerZones2Slice +// Related objects are also created and placed in the .R field +// NOTE: Objects are not inserted into the database. Use FieldseekerZones2Template.CreateMany +func (o FieldseekerZones2Template) BuildMany(number int) models.FieldseekerZones2Slice { + m := make(models.FieldseekerZones2Slice, number) + + for i := range m { + m[i] = o.Build() + } + + return m +} + +func ensureCreatableFieldseekerZones2(m *models.FieldseekerZones2Setter) { +} + +// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerZones2 +// according to the relationships in the template. +// any required relationship should have already exist on the model +func (o *FieldseekerZones2Template) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerZones2) error { + var err error + + return err +} + +// Create builds a fieldseekerZones2 and inserts it into the database +// Relations objects are also inserted and placed in the .R field +func (o *FieldseekerZones2Template) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerZones2, error) { + var err error + opt := o.BuildSetter() + ensureCreatableFieldseekerZones2(opt) + + m, err := models.FieldseekerZones2s.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 fieldseekerZones2 and inserts it into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o *FieldseekerZones2Template) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerZones2 { + m, err := o.Create(ctx, exec) + if err != nil { + panic(err) + } + return m +} + +// CreateOrFail builds a fieldseekerZones2 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 *FieldseekerZones2Template) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerZones2 { + tb.Helper() + m, err := o.Create(ctx, exec) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// CreateMany builds multiple fieldseekerZones2s and inserts them into the database +// Relations objects are also inserted and placed in the .R field +func (o FieldseekerZones2Template) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerZones2Slice, error) { + var err error + m := make(models.FieldseekerZones2Slice, number) + + for i := range m { + m[i], err = o.Create(ctx, exec) + if err != nil { + return nil, err + } + } + + return m, nil +} + +// MustCreateMany builds multiple fieldseekerZones2s and inserts them into the database +// Relations objects are also inserted and placed in the .R field +// panics if an error occurs +func (o FieldseekerZones2Template) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerZones2Slice { + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + panic(err) + } + return m +} + +// CreateManyOrFail builds multiple fieldseekerZones2s 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 FieldseekerZones2Template) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerZones2Slice { + tb.Helper() + m, err := o.CreateMany(ctx, exec, number) + if err != nil { + tb.Fatal(err) + return nil + } + return m +} + +// FieldseekerZones2 has methods that act as mods for the FieldseekerZones2Template +var FieldseekerZones2Mods fieldseekerZones2Mods + +type fieldseekerZones2Mods struct{} + +func (m fieldseekerZones2Mods) RandomizeAllColumns(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModSlice{ + FieldseekerZones2Mods.RandomObjectid(f), + FieldseekerZones2Mods.RandomName(f), + FieldseekerZones2Mods.RandomGlobalid(f), + FieldseekerZones2Mods.RandomCreatedUser(f), + FieldseekerZones2Mods.RandomCreatedDate(f), + FieldseekerZones2Mods.RandomLastEditedUser(f), + FieldseekerZones2Mods.RandomLastEditedDate(f), + FieldseekerZones2Mods.RandomCreationdate(f), + FieldseekerZones2Mods.RandomCreator(f), + FieldseekerZones2Mods.RandomEditdate(f), + FieldseekerZones2Mods.RandomEditor(f), + FieldseekerZones2Mods.RandomShapeArea(f), + FieldseekerZones2Mods.RandomShapeLength(f), + } +} + +// Set the model columns to this value +func (m fieldseekerZones2Mods) Objectid(val int64) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Objectid = func() int64 { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) ObjectidFunc(f func() int64) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Objectid = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetObjectid() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Objectid = nil + }) +} + +// Generates a random value for the column using the given faker +// if faker is nil, a default faker is used +func (m fieldseekerZones2Mods) RandomObjectid(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Objectid = func() int64 { + return random_int64(f) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZones2Mods) Name(val null.Val[string]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Name = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) NameFunc(f func() null.Val[string]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Name = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetName() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Name = 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 fieldseekerZones2Mods) RandomName(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + 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 fieldseekerZones2Mods) RandomNameNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Name = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "50") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZones2Mods) Globalid(val null.Val[uuid.UUID]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Globalid = func() null.Val[uuid.UUID] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Globalid = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetGlobalid() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Globalid = 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 fieldseekerZones2Mods) RandomGlobalid(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Globalid = 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 fieldseekerZones2Mods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Globalid = 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 fieldseekerZones2Mods) CreatedUser(val null.Val[string]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.CreatedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) CreatedUserFunc(f func() null.Val[string]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.CreatedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetCreatedUser() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.CreatedUser = 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 fieldseekerZones2Mods) RandomCreatedUser(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerZones2Mods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.CreatedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZones2Mods) CreatedDate(val null.Val[time.Time]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.CreatedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.CreatedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetCreatedDate() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.CreatedDate = 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 fieldseekerZones2Mods) RandomCreatedDate(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerZones2Mods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.CreatedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZones2Mods) LastEditedUser(val null.Val[string]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.LastEditedUser = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.LastEditedUser = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetLastEditedUser() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.LastEditedUser = 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 fieldseekerZones2Mods) RandomLastEditedUser(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + 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 fieldseekerZones2Mods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.LastEditedUser = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "255") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZones2Mods) LastEditedDate(val null.Val[time.Time]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.LastEditedDate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.LastEditedDate = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetLastEditedDate() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.LastEditedDate = 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 fieldseekerZones2Mods) RandomLastEditedDate(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerZones2Mods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.LastEditedDate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZones2Mods) Creationdate(val null.Val[time.Time]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Creationdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Creationdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetCreationdate() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Creationdate = 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 fieldseekerZones2Mods) RandomCreationdate(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerZones2Mods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Creationdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZones2Mods) Creator(val null.Val[string]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Creator = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) CreatorFunc(f func() null.Val[string]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Creator = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetCreator() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Creator = 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 fieldseekerZones2Mods) RandomCreator(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerZones2Mods) RandomCreatorNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Creator = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZones2Mods) Editdate(val null.Val[time.Time]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Editdate = func() null.Val[time.Time] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Editdate = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetEditdate() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Editdate = 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 fieldseekerZones2Mods) RandomEditdate(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(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 fieldseekerZones2Mods) RandomEditdateNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Editdate = func() null.Val[time.Time] { + if f == nil { + f = &defaultFaker + } + + val := random_time_Time(f) + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZones2Mods) Editor(val null.Val[string]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Editor = func() null.Val[string] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) EditorFunc(f func() null.Val[string]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Editor = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetEditor() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Editor = 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 fieldseekerZones2Mods) RandomEditor(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + 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 fieldseekerZones2Mods) RandomEditorNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.Editor = func() null.Val[string] { + if f == nil { + f = &defaultFaker + } + + val := random_string(f, "128") + return null.From(val) + } + }) +} + +// Set the model columns to this value +func (m fieldseekerZones2Mods) ShapeArea(val null.Val[float64]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.ShapeArea = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) ShapeAreaFunc(f func() null.Val[float64]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.ShapeArea = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetShapeArea() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.ShapeArea = 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 fieldseekerZones2Mods) RandomShapeArea(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.ShapeArea = 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 fieldseekerZones2Mods) RandomShapeAreaNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.ShapeArea = 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 fieldseekerZones2Mods) ShapeLength(val null.Val[float64]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.ShapeLength = func() null.Val[float64] { return val } + }) +} + +// Set the Column from the function +func (m fieldseekerZones2Mods) ShapeLengthFunc(f func() null.Val[float64]) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.ShapeLength = f + }) +} + +// Clear any values for the column +func (m fieldseekerZones2Mods) UnsetShapeLength() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.ShapeLength = 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 fieldseekerZones2Mods) RandomShapeLength(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.ShapeLength = 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 fieldseekerZones2Mods) RandomShapeLengthNotNull(f *faker.Faker) FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(_ context.Context, o *FieldseekerZones2Template) { + o.ShapeLength = func() null.Val[float64] { + if f == nil { + f = &defaultFaker + } + + val := random_float64(f) + return null.From(val) + } + }) +} + +func (m fieldseekerZones2Mods) WithParentsCascading() FieldseekerZones2Mod { + return FieldseekerZones2ModFunc(func(ctx context.Context, o *FieldseekerZones2Template) { + if isDone, _ := fieldseekerZones2WithParentsCascadingCtx.Value(ctx); isDone { + return + } + ctx = fieldseekerZones2WithParentsCascadingCtx.WithValue(ctx, true) + }) +} diff --git a/db/factory/fieldseeker_sync.bob.go b/db/factory/fieldseeker_sync.bob.go index 59ed0b02..42c1edb1 100644 --- a/db/factory/fieldseeker_sync.bob.go +++ b/db/factory/fieldseeker_sync.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_containerrelate.bob.go b/db/factory/fs_containerrelate.bob.go index 3ab09310..f05d883e 100644 --- a/db/factory/fs_containerrelate.bob.go +++ b/db/factory/fs_containerrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_fieldscoutinglog.bob.go b/db/factory/fs_fieldscoutinglog.bob.go index 49fda1ed..0782e51d 100644 --- a/db/factory/fs_fieldscoutinglog.bob.go +++ b/db/factory/fs_fieldscoutinglog.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_habitatrelate.bob.go b/db/factory/fs_habitatrelate.bob.go index fce7b80e..f6545163 100644 --- a/db/factory/fs_habitatrelate.bob.go +++ b/db/factory/fs_habitatrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_inspectionsample.bob.go b/db/factory/fs_inspectionsample.bob.go index 65beb7e0..ee040bec 100644 --- a/db/factory/fs_inspectionsample.bob.go +++ b/db/factory/fs_inspectionsample.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_inspectionsampledetail.bob.go b/db/factory/fs_inspectionsampledetail.bob.go index 255a91f5..61dd286d 100644 --- a/db/factory/fs_inspectionsampledetail.bob.go +++ b/db/factory/fs_inspectionsampledetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_linelocation.bob.go b/db/factory/fs_linelocation.bob.go index d736c4a4..b2dd2b40 100644 --- a/db/factory/fs_linelocation.bob.go +++ b/db/factory/fs_linelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_locationtracking.bob.go b/db/factory/fs_locationtracking.bob.go index 93da331f..8e4e7ce0 100644 --- a/db/factory/fs_locationtracking.bob.go +++ b/db/factory/fs_locationtracking.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_mosquitoinspection.bob.go b/db/factory/fs_mosquitoinspection.bob.go index b2304781..00a17596 100644 --- a/db/factory/fs_mosquitoinspection.bob.go +++ b/db/factory/fs_mosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_pointlocation.bob.go b/db/factory/fs_pointlocation.bob.go index 6a1392a5..0488e432 100644 --- a/db/factory/fs_pointlocation.bob.go +++ b/db/factory/fs_pointlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_polygonlocation.bob.go b/db/factory/fs_polygonlocation.bob.go index f11eeb4d..adaebfd8 100644 --- a/db/factory/fs_polygonlocation.bob.go +++ b/db/factory/fs_polygonlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_pool.bob.go b/db/factory/fs_pool.bob.go index be5fc210..65f67bec 100644 --- a/db/factory/fs_pool.bob.go +++ b/db/factory/fs_pool.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_pooldetail.bob.go b/db/factory/fs_pooldetail.bob.go index ce42b13d..38b42f4b 100644 --- a/db/factory/fs_pooldetail.bob.go +++ b/db/factory/fs_pooldetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_proposedtreatmentarea.bob.go b/db/factory/fs_proposedtreatmentarea.bob.go index 17b1fb7e..60148e2c 100644 --- a/db/factory/fs_proposedtreatmentarea.bob.go +++ b/db/factory/fs_proposedtreatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_qamosquitoinspection.bob.go b/db/factory/fs_qamosquitoinspection.bob.go index 6b1c30f0..ffc68f34 100644 --- a/db/factory/fs_qamosquitoinspection.bob.go +++ b/db/factory/fs_qamosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_rodentlocation.bob.go b/db/factory/fs_rodentlocation.bob.go index e8ccfc52..af5fa7a5 100644 --- a/db/factory/fs_rodentlocation.bob.go +++ b/db/factory/fs_rodentlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_samplecollection.bob.go b/db/factory/fs_samplecollection.bob.go index 5c93d9a9..f2e261b3 100644 --- a/db/factory/fs_samplecollection.bob.go +++ b/db/factory/fs_samplecollection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_samplelocation.bob.go b/db/factory/fs_samplelocation.bob.go index b8521f85..5c13c7a7 100644 --- a/db/factory/fs_samplelocation.bob.go +++ b/db/factory/fs_samplelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_servicerequest.bob.go b/db/factory/fs_servicerequest.bob.go index ffbbcc8c..872070c0 100644 --- a/db/factory/fs_servicerequest.bob.go +++ b/db/factory/fs_servicerequest.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_speciesabundance.bob.go b/db/factory/fs_speciesabundance.bob.go index 27ac7a94..4565c360 100644 --- a/db/factory/fs_speciesabundance.bob.go +++ b/db/factory/fs_speciesabundance.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_stormdrain.bob.go b/db/factory/fs_stormdrain.bob.go index 8d5f932c..a5a1d35b 100644 --- a/db/factory/fs_stormdrain.bob.go +++ b/db/factory/fs_stormdrain.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_timecard.bob.go b/db/factory/fs_timecard.bob.go index d974931c..f1e5de12 100644 --- a/db/factory/fs_timecard.bob.go +++ b/db/factory/fs_timecard.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_trapdata.bob.go b/db/factory/fs_trapdata.bob.go index af17fac4..4e351412 100644 --- a/db/factory/fs_trapdata.bob.go +++ b/db/factory/fs_trapdata.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_traplocation.bob.go b/db/factory/fs_traplocation.bob.go index fec8543b..ba0ba928 100644 --- a/db/factory/fs_traplocation.bob.go +++ b/db/factory/fs_traplocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_treatment.bob.go b/db/factory/fs_treatment.bob.go index cf45d62c..320bda57 100644 --- a/db/factory/fs_treatment.bob.go +++ b/db/factory/fs_treatment.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_treatmentarea.bob.go b/db/factory/fs_treatmentarea.bob.go index 1ad0180d..a6a9aabf 100644 --- a/db/factory/fs_treatmentarea.bob.go +++ b/db/factory/fs_treatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_zones.bob.go b/db/factory/fs_zones.bob.go index cea2463e..f6c6bb92 100644 --- a/db/factory/fs_zones.bob.go +++ b/db/factory/fs_zones.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/fs_zones2.bob.go b/db/factory/fs_zones2.bob.go index 18018c40..94c7cf28 100644 --- a/db/factory/fs_zones2.bob.go +++ b/db/factory/fs_zones2.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/geography_columns.bob.go b/db/factory/geography_columns.bob.go index 0a8f92aa..a3f61ac2 100644 --- a/db/factory/geography_columns.bob.go +++ b/db/factory/geography_columns.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/geometry_columns.bob.go b/db/factory/geometry_columns.bob.go index 848ae2af..335ff162 100644 --- a/db/factory/geometry_columns.bob.go +++ b/db/factory/geometry_columns.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/goose_db_version.bob.go b/db/factory/goose_db_version.bob.go index 5d31ebeb..aba4837f 100644 --- a/db/factory/goose_db_version.bob.go +++ b/db/factory/goose_db_version.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/h3_aggregation.bob.go b/db/factory/h3_aggregation.bob.go index 83af6873..b63d1ebf 100644 --- a/db/factory/h3_aggregation.bob.go +++ b/db/factory/h3_aggregation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_containerrelate.bob.go b/db/factory/history_containerrelate.bob.go index e7b7f815..b928ca99 100644 --- a/db/factory/history_containerrelate.bob.go +++ b/db/factory/history_containerrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_fieldscoutinglog.bob.go b/db/factory/history_fieldscoutinglog.bob.go index a9e1fb78..b5b37939 100644 --- a/db/factory/history_fieldscoutinglog.bob.go +++ b/db/factory/history_fieldscoutinglog.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_habitatrelate.bob.go b/db/factory/history_habitatrelate.bob.go index b3736ec3..3266ada4 100644 --- a/db/factory/history_habitatrelate.bob.go +++ b/db/factory/history_habitatrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_inspectionsample.bob.go b/db/factory/history_inspectionsample.bob.go index 0d16eba6..318f6f9a 100644 --- a/db/factory/history_inspectionsample.bob.go +++ b/db/factory/history_inspectionsample.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_inspectionsampledetail.bob.go b/db/factory/history_inspectionsampledetail.bob.go index 08959e5e..b1c6d975 100644 --- a/db/factory/history_inspectionsampledetail.bob.go +++ b/db/factory/history_inspectionsampledetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_linelocation.bob.go b/db/factory/history_linelocation.bob.go index ceb26a9f..ed823697 100644 --- a/db/factory/history_linelocation.bob.go +++ b/db/factory/history_linelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_locationtracking.bob.go b/db/factory/history_locationtracking.bob.go index ed2b0f9e..03593ee0 100644 --- a/db/factory/history_locationtracking.bob.go +++ b/db/factory/history_locationtracking.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_mosquitoinspection.bob.go b/db/factory/history_mosquitoinspection.bob.go index 79cee51d..9b1b8039 100644 --- a/db/factory/history_mosquitoinspection.bob.go +++ b/db/factory/history_mosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_pointlocation.bob.go b/db/factory/history_pointlocation.bob.go index 926f45f8..7d9f045f 100644 --- a/db/factory/history_pointlocation.bob.go +++ b/db/factory/history_pointlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_polygonlocation.bob.go b/db/factory/history_polygonlocation.bob.go index c7e50547..01092e6b 100644 --- a/db/factory/history_polygonlocation.bob.go +++ b/db/factory/history_polygonlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_pool.bob.go b/db/factory/history_pool.bob.go index da7802ac..b70bc89d 100644 --- a/db/factory/history_pool.bob.go +++ b/db/factory/history_pool.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_pooldetail.bob.go b/db/factory/history_pooldetail.bob.go index 1828f907..61a7d99f 100644 --- a/db/factory/history_pooldetail.bob.go +++ b/db/factory/history_pooldetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_proposedtreatmentarea.bob.go b/db/factory/history_proposedtreatmentarea.bob.go index 429f4d56..52255ad2 100644 --- a/db/factory/history_proposedtreatmentarea.bob.go +++ b/db/factory/history_proposedtreatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_qamosquitoinspection.bob.go b/db/factory/history_qamosquitoinspection.bob.go index dd129e60..0430825c 100644 --- a/db/factory/history_qamosquitoinspection.bob.go +++ b/db/factory/history_qamosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_rodentlocation.bob.go b/db/factory/history_rodentlocation.bob.go index 7fa1e2c4..b31962da 100644 --- a/db/factory/history_rodentlocation.bob.go +++ b/db/factory/history_rodentlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_samplecollection.bob.go b/db/factory/history_samplecollection.bob.go index 5a879025..c521f0c4 100644 --- a/db/factory/history_samplecollection.bob.go +++ b/db/factory/history_samplecollection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_samplelocation.bob.go b/db/factory/history_samplelocation.bob.go index d730cb42..d0babd48 100644 --- a/db/factory/history_samplelocation.bob.go +++ b/db/factory/history_samplelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_servicerequest.bob.go b/db/factory/history_servicerequest.bob.go index 7d45c2f0..473d6c55 100644 --- a/db/factory/history_servicerequest.bob.go +++ b/db/factory/history_servicerequest.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_speciesabundance.bob.go b/db/factory/history_speciesabundance.bob.go index 26eebc52..24e57128 100644 --- a/db/factory/history_speciesabundance.bob.go +++ b/db/factory/history_speciesabundance.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_stormdrain.bob.go b/db/factory/history_stormdrain.bob.go index 446b85f7..922b59b1 100644 --- a/db/factory/history_stormdrain.bob.go +++ b/db/factory/history_stormdrain.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_timecard.bob.go b/db/factory/history_timecard.bob.go index 40ffb477..8503404e 100644 --- a/db/factory/history_timecard.bob.go +++ b/db/factory/history_timecard.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_trapdata.bob.go b/db/factory/history_trapdata.bob.go index aedfac40..52f490fe 100644 --- a/db/factory/history_trapdata.bob.go +++ b/db/factory/history_trapdata.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_traplocation.bob.go b/db/factory/history_traplocation.bob.go index c435ee0a..5aaf7d6f 100644 --- a/db/factory/history_traplocation.bob.go +++ b/db/factory/history_traplocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_treatment.bob.go b/db/factory/history_treatment.bob.go index 150607a1..8ee91950 100644 --- a/db/factory/history_treatment.bob.go +++ b/db/factory/history_treatment.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_treatmentarea.bob.go b/db/factory/history_treatmentarea.bob.go index 5ee12e53..84e0997f 100644 --- a/db/factory/history_treatmentarea.bob.go +++ b/db/factory/history_treatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_zones.bob.go b/db/factory/history_zones.bob.go index b566a128..9176010a 100644 --- a/db/factory/history_zones.bob.go +++ b/db/factory/history_zones.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/history_zones2.bob.go b/db/factory/history_zones2.bob.go index 72eab9b2..ba305e06 100644 --- a/db/factory/history_zones2.bob.go +++ b/db/factory/history_zones2.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/notification.bob.go b/db/factory/notification.bob.go index acd907cb..c709aa51 100644 --- a/db/factory/notification.bob.go +++ b/db/factory/notification.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/oauth_token.bob.go b/db/factory/oauth_token.bob.go index 2171e405..328b78ed 100644 --- a/db/factory/oauth_token.bob.go +++ b/db/factory/oauth_token.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/organization.bob.go b/db/factory/organization.bob.go index 8bc74d59..173b8602 100644 --- a/db/factory/organization.bob.go +++ b/db/factory/organization.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory @@ -49,6 +49,7 @@ type OrganizationTemplate struct { } type organizationR struct { + Rodentlocations []*organizationRRodentlocationsR FieldseekerSyncs []*organizationRFieldseekerSyncsR FSContainerrelates []*organizationRFSContainerrelatesR FSFieldscoutinglogs []*organizationRFSFieldscoutinglogsR @@ -108,6 +109,10 @@ type organizationR struct { User []*organizationRUserR } +type organizationRRodentlocationsR struct { + number int + o *FieldseekerRodentlocationTemplate +} type organizationRFieldseekerSyncsR struct { number int o *FieldseekerSyncTemplate @@ -347,6 +352,19 @@ func (o *OrganizationTemplate) Apply(ctx context.Context, mods ...OrganizationMo // 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.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.FieldseekerSyncs != nil { rel := models.FieldseekerSyncSlice{} for _, r := range t.r.FieldseekerSyncs { @@ -1179,6 +1197,26 @@ func ensureCreatableOrganization(m *models.OrganizationSetter) { func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.Organization) error { var err error + 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 { + rel0, err := r.o.CreateMany(ctx, exec, r.number) + if err != nil { + return err + } + + err = m.AttachRodentlocations(ctx, exec, rel0...) + if err != nil { + return err + } + } + } + } + isFieldseekerSyncsDone, _ := organizationRelFieldseekerSyncsCtx.Value(ctx) if !isFieldseekerSyncsDone && o.r.FieldseekerSyncs != nil { ctx = organizationRelFieldseekerSyncsCtx.WithValue(ctx, true) @@ -1186,12 +1224,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FieldseekerSyncs = append(m.R.FieldseekerSyncs, r.o.Build()) } else { - rel0, err := r.o.CreateMany(ctx, exec, r.number) + rel1, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFieldseekerSyncs(ctx, exec, rel0...) + err = m.AttachFieldseekerSyncs(ctx, exec, rel1...) if err != nil { return err } @@ -1206,12 +1244,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSContainerrelates = append(m.R.FSContainerrelates, r.o.Build()) } else { - rel1, err := r.o.CreateMany(ctx, exec, r.number) + rel2, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSContainerrelates(ctx, exec, rel1...) + err = m.AttachFSContainerrelates(ctx, exec, rel2...) if err != nil { return err } @@ -1226,12 +1264,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSFieldscoutinglogs = append(m.R.FSFieldscoutinglogs, r.o.Build()) } else { - rel2, err := r.o.CreateMany(ctx, exec, r.number) + rel3, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSFieldscoutinglogs(ctx, exec, rel2...) + err = m.AttachFSFieldscoutinglogs(ctx, exec, rel3...) if err != nil { return err } @@ -1246,12 +1284,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSHabitatrelates = append(m.R.FSHabitatrelates, r.o.Build()) } else { - rel3, err := r.o.CreateMany(ctx, exec, r.number) + rel4, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSHabitatrelates(ctx, exec, rel3...) + err = m.AttachFSHabitatrelates(ctx, exec, rel4...) if err != nil { return err } @@ -1266,12 +1304,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSInspectionsamples = append(m.R.FSInspectionsamples, r.o.Build()) } else { - rel4, err := r.o.CreateMany(ctx, exec, r.number) + rel5, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSInspectionsamples(ctx, exec, rel4...) + err = m.AttachFSInspectionsamples(ctx, exec, rel5...) if err != nil { return err } @@ -1286,12 +1324,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSInspectionsampledetails = append(m.R.FSInspectionsampledetails, r.o.Build()) } else { - rel5, err := r.o.CreateMany(ctx, exec, r.number) + rel6, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSInspectionsampledetails(ctx, exec, rel5...) + err = m.AttachFSInspectionsampledetails(ctx, exec, rel6...) if err != nil { return err } @@ -1306,12 +1344,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSLinelocations = append(m.R.FSLinelocations, r.o.Build()) } else { - rel6, err := r.o.CreateMany(ctx, exec, r.number) + rel7, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSLinelocations(ctx, exec, rel6...) + err = m.AttachFSLinelocations(ctx, exec, rel7...) if err != nil { return err } @@ -1326,12 +1364,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSLocationtrackings = append(m.R.FSLocationtrackings, r.o.Build()) } else { - rel7, err := r.o.CreateMany(ctx, exec, r.number) + rel8, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSLocationtrackings(ctx, exec, rel7...) + err = m.AttachFSLocationtrackings(ctx, exec, rel8...) if err != nil { return err } @@ -1346,12 +1384,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSMosquitoinspections = append(m.R.FSMosquitoinspections, r.o.Build()) } else { - rel8, err := r.o.CreateMany(ctx, exec, r.number) + rel9, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSMosquitoinspections(ctx, exec, rel8...) + err = m.AttachFSMosquitoinspections(ctx, exec, rel9...) if err != nil { return err } @@ -1366,12 +1404,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSPointlocations = append(m.R.FSPointlocations, r.o.Build()) } else { - rel9, err := r.o.CreateMany(ctx, exec, r.number) + rel10, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSPointlocations(ctx, exec, rel9...) + err = m.AttachFSPointlocations(ctx, exec, rel10...) if err != nil { return err } @@ -1386,12 +1424,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSPolygonlocations = append(m.R.FSPolygonlocations, r.o.Build()) } else { - rel10, err := r.o.CreateMany(ctx, exec, r.number) + rel11, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSPolygonlocations(ctx, exec, rel10...) + err = m.AttachFSPolygonlocations(ctx, exec, rel11...) if err != nil { return err } @@ -1406,12 +1444,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSPools = append(m.R.FSPools, r.o.Build()) } else { - rel11, err := r.o.CreateMany(ctx, exec, r.number) + rel12, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSPools(ctx, exec, rel11...) + err = m.AttachFSPools(ctx, exec, rel12...) if err != nil { return err } @@ -1426,12 +1464,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSPooldetails = append(m.R.FSPooldetails, r.o.Build()) } else { - rel12, err := r.o.CreateMany(ctx, exec, r.number) + rel13, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSPooldetails(ctx, exec, rel12...) + err = m.AttachFSPooldetails(ctx, exec, rel13...) if err != nil { return err } @@ -1446,12 +1484,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSProposedtreatmentareas = append(m.R.FSProposedtreatmentareas, r.o.Build()) } else { - rel13, err := r.o.CreateMany(ctx, exec, r.number) + rel14, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSProposedtreatmentareas(ctx, exec, rel13...) + err = m.AttachFSProposedtreatmentareas(ctx, exec, rel14...) if err != nil { return err } @@ -1466,12 +1504,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSQamosquitoinspections = append(m.R.FSQamosquitoinspections, r.o.Build()) } else { - rel14, err := r.o.CreateMany(ctx, exec, r.number) + rel15, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSQamosquitoinspections(ctx, exec, rel14...) + err = m.AttachFSQamosquitoinspections(ctx, exec, rel15...) if err != nil { return err } @@ -1486,12 +1524,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSRodentlocations = append(m.R.FSRodentlocations, r.o.Build()) } else { - rel15, err := r.o.CreateMany(ctx, exec, r.number) + rel16, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSRodentlocations(ctx, exec, rel15...) + err = m.AttachFSRodentlocations(ctx, exec, rel16...) if err != nil { return err } @@ -1506,12 +1544,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSSamplecollections = append(m.R.FSSamplecollections, r.o.Build()) } else { - rel16, err := r.o.CreateMany(ctx, exec, r.number) + rel17, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSSamplecollections(ctx, exec, rel16...) + err = m.AttachFSSamplecollections(ctx, exec, rel17...) if err != nil { return err } @@ -1526,12 +1564,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSSamplelocations = append(m.R.FSSamplelocations, r.o.Build()) } else { - rel17, err := r.o.CreateMany(ctx, exec, r.number) + rel18, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSSamplelocations(ctx, exec, rel17...) + err = m.AttachFSSamplelocations(ctx, exec, rel18...) if err != nil { return err } @@ -1546,12 +1584,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSServicerequests = append(m.R.FSServicerequests, r.o.Build()) } else { - rel18, err := r.o.CreateMany(ctx, exec, r.number) + rel19, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSServicerequests(ctx, exec, rel18...) + err = m.AttachFSServicerequests(ctx, exec, rel19...) if err != nil { return err } @@ -1566,12 +1604,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSSpeciesabundances = append(m.R.FSSpeciesabundances, r.o.Build()) } else { - rel19, err := r.o.CreateMany(ctx, exec, r.number) + rel20, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSSpeciesabundances(ctx, exec, rel19...) + err = m.AttachFSSpeciesabundances(ctx, exec, rel20...) if err != nil { return err } @@ -1586,12 +1624,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSStormdrains = append(m.R.FSStormdrains, r.o.Build()) } else { - rel20, err := r.o.CreateMany(ctx, exec, r.number) + rel21, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSStormdrains(ctx, exec, rel20...) + err = m.AttachFSStormdrains(ctx, exec, rel21...) if err != nil { return err } @@ -1606,12 +1644,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSTimecards = append(m.R.FSTimecards, r.o.Build()) } else { - rel21, err := r.o.CreateMany(ctx, exec, r.number) + rel22, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSTimecards(ctx, exec, rel21...) + err = m.AttachFSTimecards(ctx, exec, rel22...) if err != nil { return err } @@ -1626,12 +1664,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSTrapdata = append(m.R.FSTrapdata, r.o.Build()) } else { - rel22, err := r.o.CreateMany(ctx, exec, r.number) + rel23, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSTrapdata(ctx, exec, rel22...) + err = m.AttachFSTrapdata(ctx, exec, rel23...) if err != nil { return err } @@ -1646,12 +1684,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSTraplocations = append(m.R.FSTraplocations, r.o.Build()) } else { - rel23, err := r.o.CreateMany(ctx, exec, r.number) + rel24, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSTraplocations(ctx, exec, rel23...) + err = m.AttachFSTraplocations(ctx, exec, rel24...) if err != nil { return err } @@ -1666,12 +1704,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSTreatments = append(m.R.FSTreatments, r.o.Build()) } else { - rel24, err := r.o.CreateMany(ctx, exec, r.number) + rel25, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSTreatments(ctx, exec, rel24...) + err = m.AttachFSTreatments(ctx, exec, rel25...) if err != nil { return err } @@ -1686,12 +1724,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSTreatmentareas = append(m.R.FSTreatmentareas, r.o.Build()) } else { - rel25, err := r.o.CreateMany(ctx, exec, r.number) + rel26, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSTreatmentareas(ctx, exec, rel25...) + err = m.AttachFSTreatmentareas(ctx, exec, rel26...) if err != nil { return err } @@ -1706,12 +1744,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSZones = append(m.R.FSZones, r.o.Build()) } else { - rel26, err := r.o.CreateMany(ctx, exec, r.number) + rel27, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSZones(ctx, exec, rel26...) + err = m.AttachFSZones(ctx, exec, rel27...) if err != nil { return err } @@ -1726,12 +1764,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.FSZones2s = append(m.R.FSZones2s, r.o.Build()) } else { - rel27, err := r.o.CreateMany(ctx, exec, r.number) + rel28, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachFSZones2s(ctx, exec, rel27...) + err = m.AttachFSZones2s(ctx, exec, rel28...) if err != nil { return err } @@ -1746,12 +1784,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.H3Aggregations = append(m.R.H3Aggregations, r.o.Build()) } else { - rel28, err := r.o.CreateMany(ctx, exec, r.number) + rel29, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachH3Aggregations(ctx, exec, rel28...) + err = m.AttachH3Aggregations(ctx, exec, rel29...) if err != nil { return err } @@ -1766,12 +1804,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryContainerrelates = append(m.R.HistoryContainerrelates, r.o.Build()) } else { - rel29, err := r.o.CreateMany(ctx, exec, r.number) + rel30, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryContainerrelates(ctx, exec, rel29...) + err = m.AttachHistoryContainerrelates(ctx, exec, rel30...) if err != nil { return err } @@ -1786,12 +1824,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryFieldscoutinglogs = append(m.R.HistoryFieldscoutinglogs, r.o.Build()) } else { - rel30, err := r.o.CreateMany(ctx, exec, r.number) + rel31, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryFieldscoutinglogs(ctx, exec, rel30...) + err = m.AttachHistoryFieldscoutinglogs(ctx, exec, rel31...) if err != nil { return err } @@ -1806,12 +1844,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryHabitatrelates = append(m.R.HistoryHabitatrelates, r.o.Build()) } else { - rel31, err := r.o.CreateMany(ctx, exec, r.number) + rel32, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryHabitatrelates(ctx, exec, rel31...) + err = m.AttachHistoryHabitatrelates(ctx, exec, rel32...) if err != nil { return err } @@ -1826,12 +1864,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryInspectionsamples = append(m.R.HistoryInspectionsamples, r.o.Build()) } else { - rel32, err := r.o.CreateMany(ctx, exec, r.number) + rel33, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryInspectionsamples(ctx, exec, rel32...) + err = m.AttachHistoryInspectionsamples(ctx, exec, rel33...) if err != nil { return err } @@ -1846,12 +1884,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryInspectionsampledetails = append(m.R.HistoryInspectionsampledetails, r.o.Build()) } else { - rel33, err := r.o.CreateMany(ctx, exec, r.number) + rel34, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryInspectionsampledetails(ctx, exec, rel33...) + err = m.AttachHistoryInspectionsampledetails(ctx, exec, rel34...) if err != nil { return err } @@ -1866,12 +1904,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryLinelocations = append(m.R.HistoryLinelocations, r.o.Build()) } else { - rel34, err := r.o.CreateMany(ctx, exec, r.number) + rel35, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryLinelocations(ctx, exec, rel34...) + err = m.AttachHistoryLinelocations(ctx, exec, rel35...) if err != nil { return err } @@ -1886,12 +1924,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryLocationtrackings = append(m.R.HistoryLocationtrackings, r.o.Build()) } else { - rel35, err := r.o.CreateMany(ctx, exec, r.number) + rel36, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryLocationtrackings(ctx, exec, rel35...) + err = m.AttachHistoryLocationtrackings(ctx, exec, rel36...) if err != nil { return err } @@ -1906,12 +1944,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryMosquitoinspections = append(m.R.HistoryMosquitoinspections, r.o.Build()) } else { - rel36, err := r.o.CreateMany(ctx, exec, r.number) + rel37, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryMosquitoinspections(ctx, exec, rel36...) + err = m.AttachHistoryMosquitoinspections(ctx, exec, rel37...) if err != nil { return err } @@ -1926,12 +1964,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryPointlocations = append(m.R.HistoryPointlocations, r.o.Build()) } else { - rel37, err := r.o.CreateMany(ctx, exec, r.number) + rel38, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryPointlocations(ctx, exec, rel37...) + err = m.AttachHistoryPointlocations(ctx, exec, rel38...) if err != nil { return err } @@ -1946,12 +1984,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryPolygonlocations = append(m.R.HistoryPolygonlocations, r.o.Build()) } else { - rel38, err := r.o.CreateMany(ctx, exec, r.number) + rel39, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryPolygonlocations(ctx, exec, rel38...) + err = m.AttachHistoryPolygonlocations(ctx, exec, rel39...) if err != nil { return err } @@ -1966,12 +2004,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryPools = append(m.R.HistoryPools, r.o.Build()) } else { - rel39, err := r.o.CreateMany(ctx, exec, r.number) + rel40, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryPools(ctx, exec, rel39...) + err = m.AttachHistoryPools(ctx, exec, rel40...) if err != nil { return err } @@ -1986,12 +2024,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryPooldetails = append(m.R.HistoryPooldetails, r.o.Build()) } else { - rel40, err := r.o.CreateMany(ctx, exec, r.number) + rel41, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryPooldetails(ctx, exec, rel40...) + err = m.AttachHistoryPooldetails(ctx, exec, rel41...) if err != nil { return err } @@ -2006,12 +2044,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryProposedtreatmentareas = append(m.R.HistoryProposedtreatmentareas, r.o.Build()) } else { - rel41, err := r.o.CreateMany(ctx, exec, r.number) + rel42, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryProposedtreatmentareas(ctx, exec, rel41...) + err = m.AttachHistoryProposedtreatmentareas(ctx, exec, rel42...) if err != nil { return err } @@ -2026,12 +2064,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryQamosquitoinspections = append(m.R.HistoryQamosquitoinspections, r.o.Build()) } else { - rel42, err := r.o.CreateMany(ctx, exec, r.number) + rel43, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryQamosquitoinspections(ctx, exec, rel42...) + err = m.AttachHistoryQamosquitoinspections(ctx, exec, rel43...) if err != nil { return err } @@ -2046,12 +2084,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryRodentlocations = append(m.R.HistoryRodentlocations, r.o.Build()) } else { - rel43, err := r.o.CreateMany(ctx, exec, r.number) + rel44, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryRodentlocations(ctx, exec, rel43...) + err = m.AttachHistoryRodentlocations(ctx, exec, rel44...) if err != nil { return err } @@ -2066,12 +2104,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistorySamplecollections = append(m.R.HistorySamplecollections, r.o.Build()) } else { - rel44, err := r.o.CreateMany(ctx, exec, r.number) + rel45, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistorySamplecollections(ctx, exec, rel44...) + err = m.AttachHistorySamplecollections(ctx, exec, rel45...) if err != nil { return err } @@ -2086,12 +2124,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistorySamplelocations = append(m.R.HistorySamplelocations, r.o.Build()) } else { - rel45, err := r.o.CreateMany(ctx, exec, r.number) + rel46, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistorySamplelocations(ctx, exec, rel45...) + err = m.AttachHistorySamplelocations(ctx, exec, rel46...) if err != nil { return err } @@ -2106,12 +2144,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryServicerequests = append(m.R.HistoryServicerequests, r.o.Build()) } else { - rel46, err := r.o.CreateMany(ctx, exec, r.number) + rel47, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryServicerequests(ctx, exec, rel46...) + err = m.AttachHistoryServicerequests(ctx, exec, rel47...) if err != nil { return err } @@ -2126,12 +2164,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistorySpeciesabundances = append(m.R.HistorySpeciesabundances, r.o.Build()) } else { - rel47, err := r.o.CreateMany(ctx, exec, r.number) + rel48, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistorySpeciesabundances(ctx, exec, rel47...) + err = m.AttachHistorySpeciesabundances(ctx, exec, rel48...) if err != nil { return err } @@ -2146,12 +2184,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryStormdrains = append(m.R.HistoryStormdrains, r.o.Build()) } else { - rel48, err := r.o.CreateMany(ctx, exec, r.number) + rel49, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryStormdrains(ctx, exec, rel48...) + err = m.AttachHistoryStormdrains(ctx, exec, rel49...) if err != nil { return err } @@ -2166,12 +2204,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryTimecards = append(m.R.HistoryTimecards, r.o.Build()) } else { - rel49, err := r.o.CreateMany(ctx, exec, r.number) + rel50, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryTimecards(ctx, exec, rel49...) + err = m.AttachHistoryTimecards(ctx, exec, rel50...) if err != nil { return err } @@ -2186,12 +2224,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryTrapdata = append(m.R.HistoryTrapdata, r.o.Build()) } else { - rel50, err := r.o.CreateMany(ctx, exec, r.number) + rel51, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryTrapdata(ctx, exec, rel50...) + err = m.AttachHistoryTrapdata(ctx, exec, rel51...) if err != nil { return err } @@ -2206,12 +2244,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryTraplocations = append(m.R.HistoryTraplocations, r.o.Build()) } else { - rel51, err := r.o.CreateMany(ctx, exec, r.number) + rel52, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryTraplocations(ctx, exec, rel51...) + err = m.AttachHistoryTraplocations(ctx, exec, rel52...) if err != nil { return err } @@ -2226,12 +2264,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryTreatments = append(m.R.HistoryTreatments, r.o.Build()) } else { - rel52, err := r.o.CreateMany(ctx, exec, r.number) + rel53, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryTreatments(ctx, exec, rel52...) + err = m.AttachHistoryTreatments(ctx, exec, rel53...) if err != nil { return err } @@ -2246,12 +2284,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryTreatmentareas = append(m.R.HistoryTreatmentareas, r.o.Build()) } else { - rel53, err := r.o.CreateMany(ctx, exec, r.number) + rel54, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryTreatmentareas(ctx, exec, rel53...) + err = m.AttachHistoryTreatmentareas(ctx, exec, rel54...) if err != nil { return err } @@ -2266,12 +2304,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryZones = append(m.R.HistoryZones, r.o.Build()) } else { - rel54, err := r.o.CreateMany(ctx, exec, r.number) + rel55, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryZones(ctx, exec, rel54...) + err = m.AttachHistoryZones(ctx, exec, rel55...) if err != nil { return err } @@ -2286,12 +2324,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.HistoryZones2s = append(m.R.HistoryZones2s, r.o.Build()) } else { - rel55, err := r.o.CreateMany(ctx, exec, r.number) + rel56, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachHistoryZones2s(ctx, exec, rel55...) + err = m.AttachHistoryZones2s(ctx, exec, rel56...) if err != nil { return err } @@ -2306,12 +2344,12 @@ func (o *OrganizationTemplate) insertOptRels(ctx context.Context, exec bob.Execu if r.o.alreadyPersisted { m.R.User = append(m.R.User, r.o.Build()) } else { - rel56, err := r.o.CreateMany(ctx, exec, r.number) + rel57, err := r.o.CreateMany(ctx, exec, r.number) if err != nil { return err } - err = m.AttachUser(ctx, exec, rel56...) + err = m.AttachUser(ctx, exec, rel57...) if err != nil { return err } @@ -2671,6 +2709,54 @@ func (m organizationMods) WithParentsCascading() OrganizationMod { }) } +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) WithFieldseekerSyncs(number int, related *FieldseekerSyncTemplate) OrganizationMod { return OrganizationModFunc(func(ctx context.Context, o *OrganizationTemplate) { o.r.FieldseekerSyncs = []*organizationRFieldseekerSyncsR{{ diff --git a/db/factory/raster_columns.bob.go b/db/factory/raster_columns.bob.go index ff298896..a8ad209e 100644 --- a/db/factory/raster_columns.bob.go +++ b/db/factory/raster_columns.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/raster_overviews.bob.go b/db/factory/raster_overviews.bob.go index 5cff50dc..b2d44703 100644 --- a/db/factory/raster_overviews.bob.go +++ b/db/factory/raster_overviews.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/sessions.bob.go b/db/factory/sessions.bob.go index 9bac8630..fb459f1d 100644 --- a/db/factory/sessions.bob.go +++ b/db/factory/sessions.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/spatial_ref_sys.bob.go b/db/factory/spatial_ref_sys.bob.go index 56c6f496..73ce16e4 100644 --- a/db/factory/spatial_ref_sys.bob.go +++ b/db/factory/spatial_ref_sys.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/factory/user_.bob.go b/db/factory/user_.bob.go index 0d5a3c06..3705bf03 100644 --- a/db/factory/user_.bob.go +++ b/db/factory/user_.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package factory diff --git a/db/models/bob_joins.bob.go b/db/models/bob_joins.bob.go index 52918376..dc751bdf 100644 --- a/db/models/bob_joins.bob.go +++ b/db/models/bob_joins.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -32,6 +32,7 @@ func (j joinSet[Q]) AliasedAs(alias string) joinSet[Q] { } type joins[Q dialect.Joinable] struct { + FieldseekerRodentlocations joinSet[fieldseekerRodentlocationJoins[Q]] FieldseekerSyncs joinSet[fieldseekerSyncJoins[Q]] FSContainerrelates joinSet[fsContainerrelateJoins[Q]] FSFieldscoutinglogs joinSet[fsFieldscoutinglogJoins[Q]] @@ -104,6 +105,7 @@ func buildJoinSet[Q interface{ aliasedAs(string) Q }, C any, F func(C, string) Q func getJoins[Q dialect.Joinable]() joins[Q] { return joins[Q]{ + FieldseekerRodentlocations: buildJoinSet[fieldseekerRodentlocationJoins[Q]](FieldseekerRodentlocations.Columns, buildFieldseekerRodentlocationJoins), FieldseekerSyncs: buildJoinSet[fieldseekerSyncJoins[Q]](FieldseekerSyncs.Columns, buildFieldseekerSyncJoins), FSContainerrelates: buildJoinSet[fsContainerrelateJoins[Q]](FSContainerrelates.Columns, buildFSContainerrelateJoins), FSFieldscoutinglogs: buildJoinSet[fsFieldscoutinglogJoins[Q]](FSFieldscoutinglogs.Columns, buildFSFieldscoutinglogJoins), diff --git a/db/models/bob_loaders.bob.go b/db/models/bob_loaders.bob.go index 7710b5b1..b35690dc 100644 --- a/db/models/bob_loaders.bob.go +++ b/db/models/bob_loaders.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -17,6 +17,7 @@ import ( var Preload = getPreloaders() type preloaders struct { + FieldseekerRodentlocation fieldseekerRodentlocationPreloader FieldseekerSync fieldseekerSyncPreloader FSContainerrelate fsContainerrelatePreloader FSFieldscoutinglog fsFieldscoutinglogPreloader @@ -81,6 +82,7 @@ type preloaders struct { func getPreloaders() preloaders { return preloaders{ + FieldseekerRodentlocation: buildFieldseekerRodentlocationPreloader(), FieldseekerSync: buildFieldseekerSyncPreloader(), FSContainerrelate: buildFSContainerrelatePreloader(), FSFieldscoutinglog: buildFSFieldscoutinglogPreloader(), @@ -151,6 +153,7 @@ var ( ) type thenLoaders[Q orm.Loadable] struct { + FieldseekerRodentlocation fieldseekerRodentlocationThenLoader[Q] FieldseekerSync fieldseekerSyncThenLoader[Q] FSContainerrelate fsContainerrelateThenLoader[Q] FSFieldscoutinglog fsFieldscoutinglogThenLoader[Q] @@ -215,6 +218,7 @@ type thenLoaders[Q orm.Loadable] struct { func getThenLoaders[Q orm.Loadable]() thenLoaders[Q] { return thenLoaders[Q]{ + FieldseekerRodentlocation: buildFieldseekerRodentlocationThenLoader[Q](), FieldseekerSync: buildFieldseekerSyncThenLoader[Q](), FSContainerrelate: buildFSContainerrelateThenLoader[Q](), FSFieldscoutinglog: buildFSFieldscoutinglogThenLoader[Q](), diff --git a/db/models/bob_types.bob_test.go b/db/models/bob_types.bob_test.go index 41ea84d8..142533a6 100644 --- a/db/models/bob_types.bob_test.go +++ b/db/models/bob_types.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -8,6 +8,7 @@ import ( "database/sql/driver" enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/gofrs/uuid/v5" "github.com/lib/pq" "github.com/stephenafamo/bob" ) @@ -15,6 +16,126 @@ import ( // Set the testDB to enable tests that use the database var testDB bob.Transactor[bob.Tx] +// Make sure the type FieldseekerAerialsprayline runs hooks after queries +var _ bob.HookableType = &FieldseekerAerialsprayline{} + +// Make sure the type FieldseekerAerialspraysession runs hooks after queries +var _ bob.HookableType = &FieldseekerAerialspraysession{} + +// Make sure the type FieldseekerBarrierspray runs hooks after queries +var _ bob.HookableType = &FieldseekerBarrierspray{} + +// Make sure the type FieldseekerBarriersprayroute runs hooks after queries +var _ bob.HookableType = &FieldseekerBarriersprayroute{} + +// Make sure the type FieldseekerContainerrelate runs hooks after queries +var _ bob.HookableType = &FieldseekerContainerrelate{} + +// Make sure the type FieldseekerFieldscoutinglog runs hooks after queries +var _ bob.HookableType = &FieldseekerFieldscoutinglog{} + +// Make sure the type FieldseekerHabitatrelate runs hooks after queries +var _ bob.HookableType = &FieldseekerHabitatrelate{} + +// Make sure the type FieldseekerInspectionsample runs hooks after queries +var _ bob.HookableType = &FieldseekerInspectionsample{} + +// Make sure the type FieldseekerInspectionsampledetail runs hooks after queries +var _ bob.HookableType = &FieldseekerInspectionsampledetail{} + +// Make sure the type FieldseekerLandingcount runs hooks after queries +var _ bob.HookableType = &FieldseekerLandingcount{} + +// Make sure the type FieldseekerLandingcountlocation runs hooks after queries +var _ bob.HookableType = &FieldseekerLandingcountlocation{} + +// Make sure the type FieldseekerLinelocation runs hooks after queries +var _ bob.HookableType = &FieldseekerLinelocation{} + +// Make sure the type FieldseekerLocationtracking runs hooks after queries +var _ bob.HookableType = &FieldseekerLocationtracking{} + +// Make sure the type FieldseekerMosquitoinspection runs hooks after queries +var _ bob.HookableType = &FieldseekerMosquitoinspection{} + +// Make sure the type FieldseekerPointlocation runs hooks after queries +var _ bob.HookableType = &FieldseekerPointlocation{} + +// Make sure the type FieldseekerPolygonlocation runs hooks after queries +var _ bob.HookableType = &FieldseekerPolygonlocation{} + +// Make sure the type FieldseekerPool runs hooks after queries +var _ bob.HookableType = &FieldseekerPool{} + +// Make sure the type FieldseekerPoolbuffer runs hooks after queries +var _ bob.HookableType = &FieldseekerPoolbuffer{} + +// Make sure the type FieldseekerPooldetail runs hooks after queries +var _ bob.HookableType = &FieldseekerPooldetail{} + +// Make sure the type FieldseekerProposedtreatmentarea runs hooks after queries +var _ bob.HookableType = &FieldseekerProposedtreatmentarea{} + +// Make sure the type FieldseekerQalarvcount runs hooks after queries +var _ bob.HookableType = &FieldseekerQalarvcount{} + +// Make sure the type FieldseekerQamosquitoinspection runs hooks after queries +var _ bob.HookableType = &FieldseekerQamosquitoinspection{} + +// Make sure the type FieldseekerQaproductobservation runs hooks after queries +var _ bob.HookableType = &FieldseekerQaproductobservation{} + +// Make sure the type FieldseekerRestrictedarea runs hooks after queries +var _ bob.HookableType = &FieldseekerRestrictedarea{} + +// Make sure the type FieldseekerRodentinspection runs hooks after queries +var _ bob.HookableType = &FieldseekerRodentinspection{} + +// Make sure the type FieldseekerRodentlocation runs hooks after queries +var _ bob.HookableType = &FieldseekerRodentlocation{} + +// Make sure the type FieldseekerSamplecollection runs hooks after queries +var _ bob.HookableType = &FieldseekerSamplecollection{} + +// Make sure the type FieldseekerSamplelocation runs hooks after queries +var _ bob.HookableType = &FieldseekerSamplelocation{} + +// Make sure the type FieldseekerServicerequest runs hooks after queries +var _ bob.HookableType = &FieldseekerServicerequest{} + +// Make sure the type FieldseekerSpeciesabundance runs hooks after queries +var _ bob.HookableType = &FieldseekerSpeciesabundance{} + +// Make sure the type FieldseekerStormdrain runs hooks after queries +var _ bob.HookableType = &FieldseekerStormdrain{} + +// Make sure the type FieldseekerTimecard runs hooks after queries +var _ bob.HookableType = &FieldseekerTimecard{} + +// Make sure the type FieldseekerTracklog runs hooks after queries +var _ bob.HookableType = &FieldseekerTracklog{} + +// Make sure the type FieldseekerTrapdatum runs hooks after queries +var _ bob.HookableType = &FieldseekerTrapdatum{} + +// Make sure the type FieldseekerTraplocation runs hooks after queries +var _ bob.HookableType = &FieldseekerTraplocation{} + +// Make sure the type FieldseekerTreatment runs hooks after queries +var _ bob.HookableType = &FieldseekerTreatment{} + +// Make sure the type FieldseekerTreatmentarea runs hooks after queries +var _ bob.HookableType = &FieldseekerTreatmentarea{} + +// Make sure the type FieldseekerUlvsprayroute runs hooks after queries +var _ bob.HookableType = &FieldseekerUlvsprayroute{} + +// Make sure the type FieldseekerZone runs hooks after queries +var _ bob.HookableType = &FieldseekerZone{} + +// Make sure the type FieldseekerZones2 runs hooks after queries +var _ bob.HookableType = &FieldseekerZones2{} + // Make sure the type FieldseekerSync runs hooks after queries var _ bob.HookableType = &FieldseekerSync{} @@ -216,6 +337,732 @@ var _ bob.HookableType = &SpatialRefSy{} // Make sure the type User runs hooks after queries var _ bob.HookableType = &User{} +// Make sure the type uuid.UUID satisfies database/sql.Scanner +var _ sql.Scanner = (*uuid.UUID)(nil) + +// Make sure the type uuid.UUID satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(uuid.UUID) + +// Make sure the type enums.FieldseekerContainerrelateMosquitocontainertypeEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerContainerrelateMosquitocontainertypeEnum)(nil) + +// Make sure the type enums.FieldseekerContainerrelateMosquitocontainertypeEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerContainerrelateMosquitocontainertypeEnum) + +// Make sure the type enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum)(nil) + +// Make sure the type enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum) + +// Make sure the type enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284)(nil) + +// Make sure the type enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284) + +// Make sure the type enums.FieldseekerInspectionsampleNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerInspectionsampleNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerInspectionsampleNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerInspectionsampleNotinuitFEnum) + +// Make sure the type enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum)(nil) + +// Make sure the type enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum) + +// Make sure the type enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum)(nil) + +// Make sure the type enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum) + +// Make sure the type enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum)(nil) + +// Make sure the type enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum) + +// Make sure the type enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418)(nil) + +// Make sure the type enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418) + +// Make sure the type enums.FieldseekerLinelocationLocationpriorityEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerLinelocationLocationpriorityEnum)(nil) + +// Make sure the type enums.FieldseekerLinelocationLocationpriorityEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerLinelocationLocationpriorityEnum) + +// Make sure the type enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80)(nil) + +// Make sure the type enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80) + +// Make sure the type enums.FieldseekerLinelocationNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerLinelocationNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerLinelocationNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerLinelocationNotinuitFEnum) + +// Make sure the type enums.FieldseekerLinelocationLocationsymbologyEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerLinelocationLocationsymbologyEnum)(nil) + +// Make sure the type enums.FieldseekerLinelocationLocationsymbologyEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerLinelocationLocationsymbologyEnum) + +// Make sure the type enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16)(nil) + +// Make sure the type enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoactivityEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoactivityEnum)(nil) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoactivityEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoactivityEnum) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitobreedingEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitobreedingEnum)(nil) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitobreedingEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitobreedingEnum) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum)(nil) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2)(nil) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4)(nil) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4) + +// Make sure the type enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum)(nil) + +// Make sure the type enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum) + +// Make sure the type enums.FieldseekerMosquitoinspectionNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerMosquitoinspectionNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionNotinuitFEnum) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum)(nil) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540)(nil) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B)(nil) + +// Make sure the type enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B) + +// Make sure the type enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e)(nil) + +// Make sure the type enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e) + +// Make sure the type enums.FieldseekerPointlocationLocationpriorityEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPointlocationLocationpriorityEnum)(nil) + +// Make sure the type enums.FieldseekerPointlocationLocationpriorityEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPointlocationLocationpriorityEnum) + +// Make sure the type enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86)(nil) + +// Make sure the type enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86) + +// Make sure the type enums.FieldseekerPointlocationNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPointlocationNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerPointlocationNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPointlocationNotinuitFEnum) + +// Make sure the type enums.FieldseekerPointlocationLocationsymbologyEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPointlocationLocationsymbologyEnum)(nil) + +// Make sure the type enums.FieldseekerPointlocationLocationsymbologyEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPointlocationLocationsymbologyEnum) + +// Make sure the type enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899)(nil) + +// Make sure the type enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899) + +// Make sure the type enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B)(nil) + +// Make sure the type enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B) + +// Make sure the type enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489)(nil) + +// Make sure the type enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489) + +// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65)(nil) + +// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65) + +// Make sure the type enums.FieldseekerPolygonlocationLocationpriorityEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPolygonlocationLocationpriorityEnum)(nil) + +// Make sure the type enums.FieldseekerPolygonlocationLocationpriorityEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationLocationpriorityEnum) + +// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13)(nil) + +// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13) + +// Make sure the type enums.FieldseekerPolygonlocationNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPolygonlocationNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerPolygonlocationNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationNotinuitFEnum) + +// Make sure the type enums.FieldseekerPolygonlocationLocationsymbologyEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPolygonlocationLocationsymbologyEnum)(nil) + +// Make sure the type enums.FieldseekerPolygonlocationLocationsymbologyEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationLocationsymbologyEnum) + +// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9)(nil) + +// Make sure the type enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9) + +// Make sure the type enums.FieldseekerPoolNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPoolNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerPoolNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPoolNotinuitFEnum) + +// Make sure the type enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum)(nil) + +// Make sure the type enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum) + +// Make sure the type enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum)(nil) + +// Make sure the type enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum) + +// Make sure the type enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum)(nil) + +// Make sure the type enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum) + +// Make sure the type enums.FieldseekerPoolMosquitolabnameEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerPoolMosquitolabnameEnum)(nil) + +// Make sure the type enums.FieldseekerPoolMosquitolabnameEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerPoolMosquitolabnameEnum) + +// Make sure the type enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum)(nil) + +// Make sure the type enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum) + +// Make sure the type enums.FieldseekerProposedtreatmentareaNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerProposedtreatmentareaNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerProposedtreatmentareaNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerProposedtreatmentareaNotinuitFEnum) + +// Make sure the type enums.FieldseekerProposedtreatmentareaLocationpriorityEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerProposedtreatmentareaLocationpriorityEnum)(nil) + +// Make sure the type enums.FieldseekerProposedtreatmentareaLocationpriorityEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerProposedtreatmentareaLocationpriorityEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionMosquitoactionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionMosquitoactionEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionMosquitoactionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionMosquitoactionEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionNotinuitFEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQasitetypeEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQasitetypeEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQasitetypeEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQasitetypeEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQavegetationEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQavegetationEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQavegetationEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQavegetationEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQasourcereductionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQasourcereductionEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQasourcereductionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQasourcereductionEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQawatermovementEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQawatermovementEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQawatermovementEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQawatermovementEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQasoilconditionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQasoilconditionEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQasoilconditionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQasoilconditionEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQawaterdurationEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQawaterdurationEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQawaterdurationEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQawaterdurationEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQawatersourceEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQawatersourceEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQawatersourceEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQawatersourceEnum) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum)(nil) + +// Make sure the type enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum) + +// Make sure the type enums.FieldseekerRodentlocationRodentlocationhabitatEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerRodentlocationRodentlocationhabitatEnum)(nil) + +// Make sure the type enums.FieldseekerRodentlocationRodentlocationhabitatEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerRodentlocationRodentlocationhabitatEnum) + +// Make sure the type enums.FieldseekerRodentlocationLocationpriority1Enum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerRodentlocationLocationpriority1Enum)(nil) + +// Make sure the type enums.FieldseekerRodentlocationLocationpriority1Enum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerRodentlocationLocationpriority1Enum) + +// Make sure the type enums.FieldseekerRodentlocationLocationusetype1Enum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerRodentlocationLocationusetype1Enum)(nil) + +// Make sure the type enums.FieldseekerRodentlocationLocationusetype1Enum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerRodentlocationLocationusetype1Enum) + +// Make sure the type enums.FieldseekerRodentlocationNotinuitF1Enum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerRodentlocationNotinuitF1Enum)(nil) + +// Make sure the type enums.FieldseekerRodentlocationNotinuitF1Enum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerRodentlocationNotinuitF1Enum) + +// Make sure the type enums.FieldseekerRodentlocationRodentlocationSymbologyEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerRodentlocationRodentlocationSymbologyEnum)(nil) + +// Make sure the type enums.FieldseekerRodentlocationRodentlocationSymbologyEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerRodentlocationRodentlocationSymbologyEnum) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitositeconditionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitositeconditionEnum)(nil) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitositeconditionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitositeconditionEnum) + +// Make sure the type enums.FieldseekerSamplecollectionNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplecollectionNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerSamplecollectionNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionNotinuitFEnum) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitosampletypeEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitosampletypeEnum)(nil) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitosampletypeEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitosampletypeEnum) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitosampleconditionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitosampleconditionEnum)(nil) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitosampleconditionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitosampleconditionEnum) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum)(nil) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum) + +// Make sure the type enums.FieldseekerSamplecollectionNotinuisexEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplecollectionNotinuisexEnum)(nil) + +// Make sure the type enums.FieldseekerSamplecollectionNotinuisexEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionNotinuisexEnum) + +// Make sure the type enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum)(nil) + +// Make sure the type enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitoactivityEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitoactivityEnum)(nil) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitoactivityEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitoactivityEnum) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitotestmethodEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitotestmethodEnum)(nil) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitotestmethodEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitotestmethodEnum) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitodiseaseEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitodiseaseEnum)(nil) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitodiseaseEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitodiseaseEnum) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitolabnameEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplecollectionMosquitolabnameEnum)(nil) + +// Make sure the type enums.FieldseekerSamplecollectionMosquitolabnameEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplecollectionMosquitolabnameEnum) + +// Make sure the type enums.FieldseekerSamplelocationLocationhabitattypeEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplelocationLocationhabitattypeEnum)(nil) + +// Make sure the type enums.FieldseekerSamplelocationLocationhabitattypeEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplelocationLocationhabitattypeEnum) + +// Make sure the type enums.FieldseekerSamplelocationLocationpriorityEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplelocationLocationpriorityEnum)(nil) + +// Make sure the type enums.FieldseekerSamplelocationLocationpriorityEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplelocationLocationpriorityEnum) + +// Make sure the type enums.FieldseekerSamplelocationSamplelocationusetypeEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplelocationSamplelocationusetypeEnum)(nil) + +// Make sure the type enums.FieldseekerSamplelocationSamplelocationusetypeEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplelocationSamplelocationusetypeEnum) + +// Make sure the type enums.FieldseekerSamplelocationNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSamplelocationNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerSamplelocationNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSamplelocationNotinuitFEnum) + +// Make sure the type enums.FieldseekerServicerequestServicerequestsourceEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestsourceEnum)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestsourceEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestsourceEnum) + +// Make sure the type enums.FieldseekerServicerequestServicerequestpriorityEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestpriorityEnum)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestpriorityEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestpriorityEnum) + +// Make sure the type enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808) + +// Make sure the type enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8) + +// Make sure the type enums.FieldseekerServicerequestServicerequeststatusEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequeststatusEnum)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequeststatusEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequeststatusEnum) + +// Make sure the type enums.FieldseekerServicerequestNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerServicerequestNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestNotinuitFEnum) + +// Make sure the type enums.FieldseekerServicerequestServicerequestregionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestregionEnum)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestregionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestregionEnum) + +// Make sure the type enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum) + +// Make sure the type enums.FieldseekerServicerequestServicerequesttargetEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequesttargetEnum)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequesttargetEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequesttargetEnum) + +// Make sure the type enums.FieldseekerServicerequestServicerequestrejectedreasonEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestrejectedreasonEnum)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestrejectedreasonEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestrejectedreasonEnum) + +// Make sure the type enums.FieldseekerServicerequestServicerequestnextactionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestnextactionEnum)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestnextactionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestnextactionEnum) + +// Make sure the type enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31) + +// Make sure the type enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab) + +// Make sure the type enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC) + +// Make sure the type enums.FieldseekerServicerequestServicerequestissuesEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerServicerequestServicerequestissuesEnum)(nil) + +// Make sure the type enums.FieldseekerServicerequestServicerequestissuesEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerServicerequestServicerequestissuesEnum) + +// Make sure the type enums.FieldseekerSpeciesabundanceNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerSpeciesabundanceNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerSpeciesabundanceNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerSpeciesabundanceNotinuitFEnum) + +// Make sure the type enums.FieldseekerStormdrainStormdrainsymbologyEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerStormdrainStormdrainsymbologyEnum)(nil) + +// Make sure the type enums.FieldseekerStormdrainStormdrainsymbologyEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerStormdrainStormdrainsymbologyEnum) + +// Make sure the type enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu)(nil) + +// Make sure the type enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu) + +// Make sure the type enums.FieldseekerTimecardTimecardequipmenttypeEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTimecardTimecardequipmenttypeEnum)(nil) + +// Make sure the type enums.FieldseekerTimecardTimecardequipmenttypeEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTimecardTimecardequipmenttypeEnum) + +// Make sure the type enums.FieldseekerTrapdataMosquitotraptypeEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTrapdataMosquitotraptypeEnum)(nil) + +// Make sure the type enums.FieldseekerTrapdataMosquitotraptypeEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTrapdataMosquitotraptypeEnum) + +// Make sure the type enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum)(nil) + +// Make sure the type enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum) + +// Make sure the type enums.FieldseekerTrapdataNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTrapdataNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerTrapdataNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTrapdataNotinuitFEnum) + +// Make sure the type enums.FieldseekerTrapdataMosquitositeconditionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTrapdataMosquitositeconditionEnum)(nil) + +// Make sure the type enums.FieldseekerTrapdataMosquitositeconditionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTrapdataMosquitositeconditionEnum) + +// Make sure the type enums.FieldseekerTrapdataMosquitotrapconditionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTrapdataMosquitotrapconditionEnum)(nil) + +// Make sure the type enums.FieldseekerTrapdataMosquitotrapconditionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTrapdataMosquitotrapconditionEnum) + +// Make sure the type enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166)(nil) + +// Make sure the type enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166) + +// Make sure the type enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu)(nil) + +// Make sure the type enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu) + +// Make sure the type enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e)(nil) + +// Make sure the type enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e) + +// Make sure the type enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B)(nil) + +// Make sure the type enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B) + +// Make sure the type enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2)(nil) + +// Make sure the type enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2) + +// Make sure the type enums.FieldseekerTraplocationNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTraplocationNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerTraplocationNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTraplocationNotinuitFEnum) + +// Make sure the type enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0)(nil) + +// Make sure the type enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0) + +// Make sure the type enums.FieldseekerTreatmentMosquitoactivityEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTreatmentMosquitoactivityEnum)(nil) + +// Make sure the type enums.FieldseekerTreatmentMosquitoactivityEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTreatmentMosquitoactivityEnum) + +// Make sure the type enums.FieldseekerTreatmentMosquitoproductareaunitEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTreatmentMosquitoproductareaunitEnum)(nil) + +// Make sure the type enums.FieldseekerTreatmentMosquitoproductareaunitEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTreatmentMosquitoproductareaunitEnum) + +// Make sure the type enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum)(nil) + +// Make sure the type enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum) + +// Make sure the type enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu)(nil) + +// Make sure the type enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu) + +// Make sure the type enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f)(nil) + +// Make sure the type enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f) + +// Make sure the type enums.FieldseekerTreatmentNotinuiwinddirectionEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTreatmentNotinuiwinddirectionEnum)(nil) + +// Make sure the type enums.FieldseekerTreatmentNotinuiwinddirectionEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTreatmentNotinuiwinddirectionEnum) + +// Make sure the type enums.FieldseekerTreatmentNotinuitFEnum satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTreatmentNotinuitFEnum)(nil) + +// Make sure the type enums.FieldseekerTreatmentNotinuitFEnum satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTreatmentNotinuitFEnum) + +// Make sure the type enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1 satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1)(nil) + +// Make sure the type enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1 satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1) + +// Make sure the type enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E)(nil) + +// Make sure the type enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E) + +// Make sure the type enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E satisfies database/sql.Scanner +var _ sql.Scanner = (*enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E)(nil) + +// Make sure the type enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E satisfies database/sql/driver.Valuer +var _ driver.Valuer = *new(enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E) + // Make sure the type enums.H3aggregationtype satisfies database/sql.Scanner var _ sql.Scanner = (*enums.H3aggregationtype)(nil) diff --git a/db/models/bob_where.bob.go b/db/models/bob_where.bob.go index 626a664b..4517994d 100644 --- a/db/models/bob_where.bob.go +++ b/db/models/bob_where.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -17,209 +17,329 @@ var ( ) func Where[Q psql.Filterable]() struct { - FieldseekerSyncs fieldseekerSyncWhere[Q] - FSContainerrelates fsContainerrelateWhere[Q] - FSFieldscoutinglogs fsFieldscoutinglogWhere[Q] - FSHabitatrelates fsHabitatrelateWhere[Q] - FSInspectionsamples fsInspectionsampleWhere[Q] - FSInspectionsampledetails fsInspectionsampledetailWhere[Q] - FSLinelocations fsLinelocationWhere[Q] - FSLocationtrackings fsLocationtrackingWhere[Q] - FSMosquitoinspections fsMosquitoinspectionWhere[Q] - FSPointlocations fsPointlocationWhere[Q] - FSPolygonlocations fsPolygonlocationWhere[Q] - FSPools fsPoolWhere[Q] - FSPooldetails fsPooldetailWhere[Q] - FSProposedtreatmentareas fsProposedtreatmentareaWhere[Q] - FSQamosquitoinspections fsQamosquitoinspectionWhere[Q] - FSRodentlocations fsRodentlocationWhere[Q] - FSSamplecollections fsSamplecollectionWhere[Q] - FSSamplelocations fsSamplelocationWhere[Q] - FSServicerequests fsServicerequestWhere[Q] - FSSpeciesabundances fsSpeciesabundanceWhere[Q] - FSStormdrains fsStormdrainWhere[Q] - FSTimecards fsTimecardWhere[Q] - FSTrapdata fsTrapdatumWhere[Q] - FSTraplocations fsTraplocationWhere[Q] - FSTreatments fsTreatmentWhere[Q] - FSTreatmentareas fsTreatmentareaWhere[Q] - FSZones fsZoneWhere[Q] - FSZones2s fsZones2Where[Q] - GeographyColumns geographyColumnWhere[Q] - GeometryColumns geometryColumnWhere[Q] - GooseDBVersions gooseDBVersionWhere[Q] - H3Aggregations h3AggregationWhere[Q] - HistoryContainerrelates historyContainerrelateWhere[Q] - HistoryFieldscoutinglogs historyFieldscoutinglogWhere[Q] - HistoryHabitatrelates historyHabitatrelateWhere[Q] - HistoryInspectionsamples historyInspectionsampleWhere[Q] - HistoryInspectionsampledetails historyInspectionsampledetailWhere[Q] - HistoryLinelocations historyLinelocationWhere[Q] - HistoryLocationtrackings historyLocationtrackingWhere[Q] - HistoryMosquitoinspections historyMosquitoinspectionWhere[Q] - HistoryPointlocations historyPointlocationWhere[Q] - HistoryPolygonlocations historyPolygonlocationWhere[Q] - HistoryPools historyPoolWhere[Q] - HistoryPooldetails historyPooldetailWhere[Q] - HistoryProposedtreatmentareas historyProposedtreatmentareaWhere[Q] - HistoryQamosquitoinspections historyQamosquitoinspectionWhere[Q] - HistoryRodentlocations historyRodentlocationWhere[Q] - HistorySamplecollections historySamplecollectionWhere[Q] - HistorySamplelocations historySamplelocationWhere[Q] - HistoryServicerequests historyServicerequestWhere[Q] - HistorySpeciesabundances historySpeciesabundanceWhere[Q] - HistoryStormdrains historyStormdrainWhere[Q] - HistoryTimecards historyTimecardWhere[Q] - HistoryTrapdata historyTrapdatumWhere[Q] - HistoryTraplocations historyTraplocationWhere[Q] - HistoryTreatments historyTreatmentWhere[Q] - HistoryTreatmentareas historyTreatmentareaWhere[Q] - HistoryZones historyZoneWhere[Q] - HistoryZones2s historyZones2Where[Q] - Notifications notificationWhere[Q] - OauthTokens oauthTokenWhere[Q] - Organizations organizationWhere[Q] - RasterColumns rasterColumnWhere[Q] - RasterOverviews rasterOverviewWhere[Q] - Sessions sessionWhere[Q] - SpatialRefSys spatialRefSyWhere[Q] - Users userWhere[Q] + FieldseekerAerialspraylines fieldseekerAerialspraylineWhere[Q] + FieldseekerAerialspraysessions fieldseekerAerialspraysessionWhere[Q] + FieldseekerBarriersprays fieldseekerBarriersprayWhere[Q] + FieldseekerBarriersprayroutes fieldseekerBarriersprayrouteWhere[Q] + FieldseekerContainerrelates fieldseekerContainerrelateWhere[Q] + FieldseekerFieldscoutinglogs fieldseekerFieldscoutinglogWhere[Q] + FieldseekerHabitatrelates fieldseekerHabitatrelateWhere[Q] + FieldseekerInspectionsamples fieldseekerInspectionsampleWhere[Q] + FieldseekerInspectionsampledetails fieldseekerInspectionsampledetailWhere[Q] + FieldseekerLandingcounts fieldseekerLandingcountWhere[Q] + FieldseekerLandingcountlocations fieldseekerLandingcountlocationWhere[Q] + FieldseekerLinelocations fieldseekerLinelocationWhere[Q] + FieldseekerLocationtrackings fieldseekerLocationtrackingWhere[Q] + FieldseekerMosquitoinspections fieldseekerMosquitoinspectionWhere[Q] + FieldseekerPointlocations fieldseekerPointlocationWhere[Q] + FieldseekerPolygonlocations fieldseekerPolygonlocationWhere[Q] + FieldseekerPools fieldseekerPoolWhere[Q] + FieldseekerPoolbuffers fieldseekerPoolbufferWhere[Q] + FieldseekerPooldetails fieldseekerPooldetailWhere[Q] + FieldseekerProposedtreatmentareas fieldseekerProposedtreatmentareaWhere[Q] + FieldseekerQalarvcounts fieldseekerQalarvcountWhere[Q] + FieldseekerQamosquitoinspections fieldseekerQamosquitoinspectionWhere[Q] + FieldseekerQaproductobservations fieldseekerQaproductobservationWhere[Q] + FieldseekerRestrictedareas fieldseekerRestrictedareaWhere[Q] + FieldseekerRodentinspections fieldseekerRodentinspectionWhere[Q] + FieldseekerRodentlocations fieldseekerRodentlocationWhere[Q] + FieldseekerSamplecollections fieldseekerSamplecollectionWhere[Q] + FieldseekerSamplelocations fieldseekerSamplelocationWhere[Q] + FieldseekerServicerequests fieldseekerServicerequestWhere[Q] + FieldseekerSpeciesabundances fieldseekerSpeciesabundanceWhere[Q] + FieldseekerStormdrains fieldseekerStormdrainWhere[Q] + FieldseekerTimecards fieldseekerTimecardWhere[Q] + FieldseekerTracklogs fieldseekerTracklogWhere[Q] + FieldseekerTrapdata fieldseekerTrapdatumWhere[Q] + FieldseekerTraplocations fieldseekerTraplocationWhere[Q] + FieldseekerTreatments fieldseekerTreatmentWhere[Q] + FieldseekerTreatmentareas fieldseekerTreatmentareaWhere[Q] + FieldseekerUlvsprayroutes fieldseekerUlvsprayrouteWhere[Q] + FieldseekerZones fieldseekerZoneWhere[Q] + FieldseekerZones2s fieldseekerZones2Where[Q] + FieldseekerSyncs fieldseekerSyncWhere[Q] + FSContainerrelates fsContainerrelateWhere[Q] + FSFieldscoutinglogs fsFieldscoutinglogWhere[Q] + FSHabitatrelates fsHabitatrelateWhere[Q] + FSInspectionsamples fsInspectionsampleWhere[Q] + FSInspectionsampledetails fsInspectionsampledetailWhere[Q] + FSLinelocations fsLinelocationWhere[Q] + FSLocationtrackings fsLocationtrackingWhere[Q] + FSMosquitoinspections fsMosquitoinspectionWhere[Q] + FSPointlocations fsPointlocationWhere[Q] + FSPolygonlocations fsPolygonlocationWhere[Q] + FSPools fsPoolWhere[Q] + FSPooldetails fsPooldetailWhere[Q] + FSProposedtreatmentareas fsProposedtreatmentareaWhere[Q] + FSQamosquitoinspections fsQamosquitoinspectionWhere[Q] + FSRodentlocations fsRodentlocationWhere[Q] + FSSamplecollections fsSamplecollectionWhere[Q] + FSSamplelocations fsSamplelocationWhere[Q] + FSServicerequests fsServicerequestWhere[Q] + FSSpeciesabundances fsSpeciesabundanceWhere[Q] + FSStormdrains fsStormdrainWhere[Q] + FSTimecards fsTimecardWhere[Q] + FSTrapdata fsTrapdatumWhere[Q] + FSTraplocations fsTraplocationWhere[Q] + FSTreatments fsTreatmentWhere[Q] + FSTreatmentareas fsTreatmentareaWhere[Q] + FSZones fsZoneWhere[Q] + FSZones2s fsZones2Where[Q] + GeographyColumns geographyColumnWhere[Q] + GeometryColumns geometryColumnWhere[Q] + GooseDBVersions gooseDBVersionWhere[Q] + H3Aggregations h3AggregationWhere[Q] + HistoryContainerrelates historyContainerrelateWhere[Q] + HistoryFieldscoutinglogs historyFieldscoutinglogWhere[Q] + HistoryHabitatrelates historyHabitatrelateWhere[Q] + HistoryInspectionsamples historyInspectionsampleWhere[Q] + HistoryInspectionsampledetails historyInspectionsampledetailWhere[Q] + HistoryLinelocations historyLinelocationWhere[Q] + HistoryLocationtrackings historyLocationtrackingWhere[Q] + HistoryMosquitoinspections historyMosquitoinspectionWhere[Q] + HistoryPointlocations historyPointlocationWhere[Q] + HistoryPolygonlocations historyPolygonlocationWhere[Q] + HistoryPools historyPoolWhere[Q] + HistoryPooldetails historyPooldetailWhere[Q] + HistoryProposedtreatmentareas historyProposedtreatmentareaWhere[Q] + HistoryQamosquitoinspections historyQamosquitoinspectionWhere[Q] + HistoryRodentlocations historyRodentlocationWhere[Q] + HistorySamplecollections historySamplecollectionWhere[Q] + HistorySamplelocations historySamplelocationWhere[Q] + HistoryServicerequests historyServicerequestWhere[Q] + HistorySpeciesabundances historySpeciesabundanceWhere[Q] + HistoryStormdrains historyStormdrainWhere[Q] + HistoryTimecards historyTimecardWhere[Q] + HistoryTrapdata historyTrapdatumWhere[Q] + HistoryTraplocations historyTraplocationWhere[Q] + HistoryTreatments historyTreatmentWhere[Q] + HistoryTreatmentareas historyTreatmentareaWhere[Q] + HistoryZones historyZoneWhere[Q] + HistoryZones2s historyZones2Where[Q] + Notifications notificationWhere[Q] + OauthTokens oauthTokenWhere[Q] + Organizations organizationWhere[Q] + RasterColumns rasterColumnWhere[Q] + RasterOverviews rasterOverviewWhere[Q] + Sessions sessionWhere[Q] + SpatialRefSys spatialRefSyWhere[Q] + Users userWhere[Q] } { return struct { - FieldseekerSyncs fieldseekerSyncWhere[Q] - FSContainerrelates fsContainerrelateWhere[Q] - FSFieldscoutinglogs fsFieldscoutinglogWhere[Q] - FSHabitatrelates fsHabitatrelateWhere[Q] - FSInspectionsamples fsInspectionsampleWhere[Q] - FSInspectionsampledetails fsInspectionsampledetailWhere[Q] - FSLinelocations fsLinelocationWhere[Q] - FSLocationtrackings fsLocationtrackingWhere[Q] - FSMosquitoinspections fsMosquitoinspectionWhere[Q] - FSPointlocations fsPointlocationWhere[Q] - FSPolygonlocations fsPolygonlocationWhere[Q] - FSPools fsPoolWhere[Q] - FSPooldetails fsPooldetailWhere[Q] - FSProposedtreatmentareas fsProposedtreatmentareaWhere[Q] - FSQamosquitoinspections fsQamosquitoinspectionWhere[Q] - FSRodentlocations fsRodentlocationWhere[Q] - FSSamplecollections fsSamplecollectionWhere[Q] - FSSamplelocations fsSamplelocationWhere[Q] - FSServicerequests fsServicerequestWhere[Q] - FSSpeciesabundances fsSpeciesabundanceWhere[Q] - FSStormdrains fsStormdrainWhere[Q] - FSTimecards fsTimecardWhere[Q] - FSTrapdata fsTrapdatumWhere[Q] - FSTraplocations fsTraplocationWhere[Q] - FSTreatments fsTreatmentWhere[Q] - FSTreatmentareas fsTreatmentareaWhere[Q] - FSZones fsZoneWhere[Q] - FSZones2s fsZones2Where[Q] - GeographyColumns geographyColumnWhere[Q] - GeometryColumns geometryColumnWhere[Q] - GooseDBVersions gooseDBVersionWhere[Q] - H3Aggregations h3AggregationWhere[Q] - HistoryContainerrelates historyContainerrelateWhere[Q] - HistoryFieldscoutinglogs historyFieldscoutinglogWhere[Q] - HistoryHabitatrelates historyHabitatrelateWhere[Q] - HistoryInspectionsamples historyInspectionsampleWhere[Q] - HistoryInspectionsampledetails historyInspectionsampledetailWhere[Q] - HistoryLinelocations historyLinelocationWhere[Q] - HistoryLocationtrackings historyLocationtrackingWhere[Q] - HistoryMosquitoinspections historyMosquitoinspectionWhere[Q] - HistoryPointlocations historyPointlocationWhere[Q] - HistoryPolygonlocations historyPolygonlocationWhere[Q] - HistoryPools historyPoolWhere[Q] - HistoryPooldetails historyPooldetailWhere[Q] - HistoryProposedtreatmentareas historyProposedtreatmentareaWhere[Q] - HistoryQamosquitoinspections historyQamosquitoinspectionWhere[Q] - HistoryRodentlocations historyRodentlocationWhere[Q] - HistorySamplecollections historySamplecollectionWhere[Q] - HistorySamplelocations historySamplelocationWhere[Q] - HistoryServicerequests historyServicerequestWhere[Q] - HistorySpeciesabundances historySpeciesabundanceWhere[Q] - HistoryStormdrains historyStormdrainWhere[Q] - HistoryTimecards historyTimecardWhere[Q] - HistoryTrapdata historyTrapdatumWhere[Q] - HistoryTraplocations historyTraplocationWhere[Q] - HistoryTreatments historyTreatmentWhere[Q] - HistoryTreatmentareas historyTreatmentareaWhere[Q] - HistoryZones historyZoneWhere[Q] - HistoryZones2s historyZones2Where[Q] - Notifications notificationWhere[Q] - OauthTokens oauthTokenWhere[Q] - Organizations organizationWhere[Q] - RasterColumns rasterColumnWhere[Q] - RasterOverviews rasterOverviewWhere[Q] - Sessions sessionWhere[Q] - SpatialRefSys spatialRefSyWhere[Q] - Users userWhere[Q] + FieldseekerAerialspraylines fieldseekerAerialspraylineWhere[Q] + FieldseekerAerialspraysessions fieldseekerAerialspraysessionWhere[Q] + FieldseekerBarriersprays fieldseekerBarriersprayWhere[Q] + FieldseekerBarriersprayroutes fieldseekerBarriersprayrouteWhere[Q] + FieldseekerContainerrelates fieldseekerContainerrelateWhere[Q] + FieldseekerFieldscoutinglogs fieldseekerFieldscoutinglogWhere[Q] + FieldseekerHabitatrelates fieldseekerHabitatrelateWhere[Q] + FieldseekerInspectionsamples fieldseekerInspectionsampleWhere[Q] + FieldseekerInspectionsampledetails fieldseekerInspectionsampledetailWhere[Q] + FieldseekerLandingcounts fieldseekerLandingcountWhere[Q] + FieldseekerLandingcountlocations fieldseekerLandingcountlocationWhere[Q] + FieldseekerLinelocations fieldseekerLinelocationWhere[Q] + FieldseekerLocationtrackings fieldseekerLocationtrackingWhere[Q] + FieldseekerMosquitoinspections fieldseekerMosquitoinspectionWhere[Q] + FieldseekerPointlocations fieldseekerPointlocationWhere[Q] + FieldseekerPolygonlocations fieldseekerPolygonlocationWhere[Q] + FieldseekerPools fieldseekerPoolWhere[Q] + FieldseekerPoolbuffers fieldseekerPoolbufferWhere[Q] + FieldseekerPooldetails fieldseekerPooldetailWhere[Q] + FieldseekerProposedtreatmentareas fieldseekerProposedtreatmentareaWhere[Q] + FieldseekerQalarvcounts fieldseekerQalarvcountWhere[Q] + FieldseekerQamosquitoinspections fieldseekerQamosquitoinspectionWhere[Q] + FieldseekerQaproductobservations fieldseekerQaproductobservationWhere[Q] + FieldseekerRestrictedareas fieldseekerRestrictedareaWhere[Q] + FieldseekerRodentinspections fieldseekerRodentinspectionWhere[Q] + FieldseekerRodentlocations fieldseekerRodentlocationWhere[Q] + FieldseekerSamplecollections fieldseekerSamplecollectionWhere[Q] + FieldseekerSamplelocations fieldseekerSamplelocationWhere[Q] + FieldseekerServicerequests fieldseekerServicerequestWhere[Q] + FieldseekerSpeciesabundances fieldseekerSpeciesabundanceWhere[Q] + FieldseekerStormdrains fieldseekerStormdrainWhere[Q] + FieldseekerTimecards fieldseekerTimecardWhere[Q] + FieldseekerTracklogs fieldseekerTracklogWhere[Q] + FieldseekerTrapdata fieldseekerTrapdatumWhere[Q] + FieldseekerTraplocations fieldseekerTraplocationWhere[Q] + FieldseekerTreatments fieldseekerTreatmentWhere[Q] + FieldseekerTreatmentareas fieldseekerTreatmentareaWhere[Q] + FieldseekerUlvsprayroutes fieldseekerUlvsprayrouteWhere[Q] + FieldseekerZones fieldseekerZoneWhere[Q] + FieldseekerZones2s fieldseekerZones2Where[Q] + FieldseekerSyncs fieldseekerSyncWhere[Q] + FSContainerrelates fsContainerrelateWhere[Q] + FSFieldscoutinglogs fsFieldscoutinglogWhere[Q] + FSHabitatrelates fsHabitatrelateWhere[Q] + FSInspectionsamples fsInspectionsampleWhere[Q] + FSInspectionsampledetails fsInspectionsampledetailWhere[Q] + FSLinelocations fsLinelocationWhere[Q] + FSLocationtrackings fsLocationtrackingWhere[Q] + FSMosquitoinspections fsMosquitoinspectionWhere[Q] + FSPointlocations fsPointlocationWhere[Q] + FSPolygonlocations fsPolygonlocationWhere[Q] + FSPools fsPoolWhere[Q] + FSPooldetails fsPooldetailWhere[Q] + FSProposedtreatmentareas fsProposedtreatmentareaWhere[Q] + FSQamosquitoinspections fsQamosquitoinspectionWhere[Q] + FSRodentlocations fsRodentlocationWhere[Q] + FSSamplecollections fsSamplecollectionWhere[Q] + FSSamplelocations fsSamplelocationWhere[Q] + FSServicerequests fsServicerequestWhere[Q] + FSSpeciesabundances fsSpeciesabundanceWhere[Q] + FSStormdrains fsStormdrainWhere[Q] + FSTimecards fsTimecardWhere[Q] + FSTrapdata fsTrapdatumWhere[Q] + FSTraplocations fsTraplocationWhere[Q] + FSTreatments fsTreatmentWhere[Q] + FSTreatmentareas fsTreatmentareaWhere[Q] + FSZones fsZoneWhere[Q] + FSZones2s fsZones2Where[Q] + GeographyColumns geographyColumnWhere[Q] + GeometryColumns geometryColumnWhere[Q] + GooseDBVersions gooseDBVersionWhere[Q] + H3Aggregations h3AggregationWhere[Q] + HistoryContainerrelates historyContainerrelateWhere[Q] + HistoryFieldscoutinglogs historyFieldscoutinglogWhere[Q] + HistoryHabitatrelates historyHabitatrelateWhere[Q] + HistoryInspectionsamples historyInspectionsampleWhere[Q] + HistoryInspectionsampledetails historyInspectionsampledetailWhere[Q] + HistoryLinelocations historyLinelocationWhere[Q] + HistoryLocationtrackings historyLocationtrackingWhere[Q] + HistoryMosquitoinspections historyMosquitoinspectionWhere[Q] + HistoryPointlocations historyPointlocationWhere[Q] + HistoryPolygonlocations historyPolygonlocationWhere[Q] + HistoryPools historyPoolWhere[Q] + HistoryPooldetails historyPooldetailWhere[Q] + HistoryProposedtreatmentareas historyProposedtreatmentareaWhere[Q] + HistoryQamosquitoinspections historyQamosquitoinspectionWhere[Q] + HistoryRodentlocations historyRodentlocationWhere[Q] + HistorySamplecollections historySamplecollectionWhere[Q] + HistorySamplelocations historySamplelocationWhere[Q] + HistoryServicerequests historyServicerequestWhere[Q] + HistorySpeciesabundances historySpeciesabundanceWhere[Q] + HistoryStormdrains historyStormdrainWhere[Q] + HistoryTimecards historyTimecardWhere[Q] + HistoryTrapdata historyTrapdatumWhere[Q] + HistoryTraplocations historyTraplocationWhere[Q] + HistoryTreatments historyTreatmentWhere[Q] + HistoryTreatmentareas historyTreatmentareaWhere[Q] + HistoryZones historyZoneWhere[Q] + HistoryZones2s historyZones2Where[Q] + Notifications notificationWhere[Q] + OauthTokens oauthTokenWhere[Q] + Organizations organizationWhere[Q] + RasterColumns rasterColumnWhere[Q] + RasterOverviews rasterOverviewWhere[Q] + Sessions sessionWhere[Q] + SpatialRefSys spatialRefSyWhere[Q] + Users userWhere[Q] }{ - FieldseekerSyncs: buildFieldseekerSyncWhere[Q](FieldseekerSyncs.Columns), - FSContainerrelates: buildFSContainerrelateWhere[Q](FSContainerrelates.Columns), - FSFieldscoutinglogs: buildFSFieldscoutinglogWhere[Q](FSFieldscoutinglogs.Columns), - FSHabitatrelates: buildFSHabitatrelateWhere[Q](FSHabitatrelates.Columns), - FSInspectionsamples: buildFSInspectionsampleWhere[Q](FSInspectionsamples.Columns), - FSInspectionsampledetails: buildFSInspectionsampledetailWhere[Q](FSInspectionsampledetails.Columns), - FSLinelocations: buildFSLinelocationWhere[Q](FSLinelocations.Columns), - FSLocationtrackings: buildFSLocationtrackingWhere[Q](FSLocationtrackings.Columns), - FSMosquitoinspections: buildFSMosquitoinspectionWhere[Q](FSMosquitoinspections.Columns), - FSPointlocations: buildFSPointlocationWhere[Q](FSPointlocations.Columns), - FSPolygonlocations: buildFSPolygonlocationWhere[Q](FSPolygonlocations.Columns), - FSPools: buildFSPoolWhere[Q](FSPools.Columns), - FSPooldetails: buildFSPooldetailWhere[Q](FSPooldetails.Columns), - FSProposedtreatmentareas: buildFSProposedtreatmentareaWhere[Q](FSProposedtreatmentareas.Columns), - FSQamosquitoinspections: buildFSQamosquitoinspectionWhere[Q](FSQamosquitoinspections.Columns), - FSRodentlocations: buildFSRodentlocationWhere[Q](FSRodentlocations.Columns), - FSSamplecollections: buildFSSamplecollectionWhere[Q](FSSamplecollections.Columns), - FSSamplelocations: buildFSSamplelocationWhere[Q](FSSamplelocations.Columns), - FSServicerequests: buildFSServicerequestWhere[Q](FSServicerequests.Columns), - FSSpeciesabundances: buildFSSpeciesabundanceWhere[Q](FSSpeciesabundances.Columns), - FSStormdrains: buildFSStormdrainWhere[Q](FSStormdrains.Columns), - FSTimecards: buildFSTimecardWhere[Q](FSTimecards.Columns), - FSTrapdata: buildFSTrapdatumWhere[Q](FSTrapdata.Columns), - FSTraplocations: buildFSTraplocationWhere[Q](FSTraplocations.Columns), - FSTreatments: buildFSTreatmentWhere[Q](FSTreatments.Columns), - FSTreatmentareas: buildFSTreatmentareaWhere[Q](FSTreatmentareas.Columns), - FSZones: buildFSZoneWhere[Q](FSZones.Columns), - FSZones2s: buildFSZones2Where[Q](FSZones2s.Columns), - GeographyColumns: buildGeographyColumnWhere[Q](GeographyColumns.Columns), - GeometryColumns: buildGeometryColumnWhere[Q](GeometryColumns.Columns), - GooseDBVersions: buildGooseDBVersionWhere[Q](GooseDBVersions.Columns), - H3Aggregations: buildH3AggregationWhere[Q](H3Aggregations.Columns), - HistoryContainerrelates: buildHistoryContainerrelateWhere[Q](HistoryContainerrelates.Columns), - HistoryFieldscoutinglogs: buildHistoryFieldscoutinglogWhere[Q](HistoryFieldscoutinglogs.Columns), - HistoryHabitatrelates: buildHistoryHabitatrelateWhere[Q](HistoryHabitatrelates.Columns), - HistoryInspectionsamples: buildHistoryInspectionsampleWhere[Q](HistoryInspectionsamples.Columns), - HistoryInspectionsampledetails: buildHistoryInspectionsampledetailWhere[Q](HistoryInspectionsampledetails.Columns), - HistoryLinelocations: buildHistoryLinelocationWhere[Q](HistoryLinelocations.Columns), - HistoryLocationtrackings: buildHistoryLocationtrackingWhere[Q](HistoryLocationtrackings.Columns), - HistoryMosquitoinspections: buildHistoryMosquitoinspectionWhere[Q](HistoryMosquitoinspections.Columns), - HistoryPointlocations: buildHistoryPointlocationWhere[Q](HistoryPointlocations.Columns), - HistoryPolygonlocations: buildHistoryPolygonlocationWhere[Q](HistoryPolygonlocations.Columns), - HistoryPools: buildHistoryPoolWhere[Q](HistoryPools.Columns), - HistoryPooldetails: buildHistoryPooldetailWhere[Q](HistoryPooldetails.Columns), - HistoryProposedtreatmentareas: buildHistoryProposedtreatmentareaWhere[Q](HistoryProposedtreatmentareas.Columns), - HistoryQamosquitoinspections: buildHistoryQamosquitoinspectionWhere[Q](HistoryQamosquitoinspections.Columns), - HistoryRodentlocations: buildHistoryRodentlocationWhere[Q](HistoryRodentlocations.Columns), - HistorySamplecollections: buildHistorySamplecollectionWhere[Q](HistorySamplecollections.Columns), - HistorySamplelocations: buildHistorySamplelocationWhere[Q](HistorySamplelocations.Columns), - HistoryServicerequests: buildHistoryServicerequestWhere[Q](HistoryServicerequests.Columns), - HistorySpeciesabundances: buildHistorySpeciesabundanceWhere[Q](HistorySpeciesabundances.Columns), - HistoryStormdrains: buildHistoryStormdrainWhere[Q](HistoryStormdrains.Columns), - HistoryTimecards: buildHistoryTimecardWhere[Q](HistoryTimecards.Columns), - HistoryTrapdata: buildHistoryTrapdatumWhere[Q](HistoryTrapdata.Columns), - HistoryTraplocations: buildHistoryTraplocationWhere[Q](HistoryTraplocations.Columns), - HistoryTreatments: buildHistoryTreatmentWhere[Q](HistoryTreatments.Columns), - HistoryTreatmentareas: buildHistoryTreatmentareaWhere[Q](HistoryTreatmentareas.Columns), - HistoryZones: buildHistoryZoneWhere[Q](HistoryZones.Columns), - HistoryZones2s: buildHistoryZones2Where[Q](HistoryZones2s.Columns), - Notifications: buildNotificationWhere[Q](Notifications.Columns), - OauthTokens: buildOauthTokenWhere[Q](OauthTokens.Columns), - Organizations: buildOrganizationWhere[Q](Organizations.Columns), - RasterColumns: buildRasterColumnWhere[Q](RasterColumns.Columns), - RasterOverviews: buildRasterOverviewWhere[Q](RasterOverviews.Columns), - Sessions: buildSessionWhere[Q](Sessions.Columns), - SpatialRefSys: buildSpatialRefSyWhere[Q](SpatialRefSys.Columns), - Users: buildUserWhere[Q](Users.Columns), + FieldseekerAerialspraylines: buildFieldseekerAerialspraylineWhere[Q](FieldseekerAerialspraylines.Columns), + FieldseekerAerialspraysessions: buildFieldseekerAerialspraysessionWhere[Q](FieldseekerAerialspraysessions.Columns), + FieldseekerBarriersprays: buildFieldseekerBarriersprayWhere[Q](FieldseekerBarriersprays.Columns), + FieldseekerBarriersprayroutes: buildFieldseekerBarriersprayrouteWhere[Q](FieldseekerBarriersprayroutes.Columns), + FieldseekerContainerrelates: buildFieldseekerContainerrelateWhere[Q](FieldseekerContainerrelates.Columns), + FieldseekerFieldscoutinglogs: buildFieldseekerFieldscoutinglogWhere[Q](FieldseekerFieldscoutinglogs.Columns), + FieldseekerHabitatrelates: buildFieldseekerHabitatrelateWhere[Q](FieldseekerHabitatrelates.Columns), + FieldseekerInspectionsamples: buildFieldseekerInspectionsampleWhere[Q](FieldseekerInspectionsamples.Columns), + FieldseekerInspectionsampledetails: buildFieldseekerInspectionsampledetailWhere[Q](FieldseekerInspectionsampledetails.Columns), + FieldseekerLandingcounts: buildFieldseekerLandingcountWhere[Q](FieldseekerLandingcounts.Columns), + FieldseekerLandingcountlocations: buildFieldseekerLandingcountlocationWhere[Q](FieldseekerLandingcountlocations.Columns), + FieldseekerLinelocations: buildFieldseekerLinelocationWhere[Q](FieldseekerLinelocations.Columns), + FieldseekerLocationtrackings: buildFieldseekerLocationtrackingWhere[Q](FieldseekerLocationtrackings.Columns), + FieldseekerMosquitoinspections: buildFieldseekerMosquitoinspectionWhere[Q](FieldseekerMosquitoinspections.Columns), + FieldseekerPointlocations: buildFieldseekerPointlocationWhere[Q](FieldseekerPointlocations.Columns), + FieldseekerPolygonlocations: buildFieldseekerPolygonlocationWhere[Q](FieldseekerPolygonlocations.Columns), + FieldseekerPools: buildFieldseekerPoolWhere[Q](FieldseekerPools.Columns), + FieldseekerPoolbuffers: buildFieldseekerPoolbufferWhere[Q](FieldseekerPoolbuffers.Columns), + FieldseekerPooldetails: buildFieldseekerPooldetailWhere[Q](FieldseekerPooldetails.Columns), + FieldseekerProposedtreatmentareas: buildFieldseekerProposedtreatmentareaWhere[Q](FieldseekerProposedtreatmentareas.Columns), + FieldseekerQalarvcounts: buildFieldseekerQalarvcountWhere[Q](FieldseekerQalarvcounts.Columns), + FieldseekerQamosquitoinspections: buildFieldseekerQamosquitoinspectionWhere[Q](FieldseekerQamosquitoinspections.Columns), + FieldseekerQaproductobservations: buildFieldseekerQaproductobservationWhere[Q](FieldseekerQaproductobservations.Columns), + FieldseekerRestrictedareas: buildFieldseekerRestrictedareaWhere[Q](FieldseekerRestrictedareas.Columns), + FieldseekerRodentinspections: buildFieldseekerRodentinspectionWhere[Q](FieldseekerRodentinspections.Columns), + FieldseekerRodentlocations: buildFieldseekerRodentlocationWhere[Q](FieldseekerRodentlocations.Columns), + FieldseekerSamplecollections: buildFieldseekerSamplecollectionWhere[Q](FieldseekerSamplecollections.Columns), + FieldseekerSamplelocations: buildFieldseekerSamplelocationWhere[Q](FieldseekerSamplelocations.Columns), + FieldseekerServicerequests: buildFieldseekerServicerequestWhere[Q](FieldseekerServicerequests.Columns), + FieldseekerSpeciesabundances: buildFieldseekerSpeciesabundanceWhere[Q](FieldseekerSpeciesabundances.Columns), + FieldseekerStormdrains: buildFieldseekerStormdrainWhere[Q](FieldseekerStormdrains.Columns), + FieldseekerTimecards: buildFieldseekerTimecardWhere[Q](FieldseekerTimecards.Columns), + FieldseekerTracklogs: buildFieldseekerTracklogWhere[Q](FieldseekerTracklogs.Columns), + FieldseekerTrapdata: buildFieldseekerTrapdatumWhere[Q](FieldseekerTrapdata.Columns), + FieldseekerTraplocations: buildFieldseekerTraplocationWhere[Q](FieldseekerTraplocations.Columns), + FieldseekerTreatments: buildFieldseekerTreatmentWhere[Q](FieldseekerTreatments.Columns), + FieldseekerTreatmentareas: buildFieldseekerTreatmentareaWhere[Q](FieldseekerTreatmentareas.Columns), + FieldseekerUlvsprayroutes: buildFieldseekerUlvsprayrouteWhere[Q](FieldseekerUlvsprayroutes.Columns), + FieldseekerZones: buildFieldseekerZoneWhere[Q](FieldseekerZones.Columns), + FieldseekerZones2s: buildFieldseekerZones2Where[Q](FieldseekerZones2s.Columns), + FieldseekerSyncs: buildFieldseekerSyncWhere[Q](FieldseekerSyncs.Columns), + FSContainerrelates: buildFSContainerrelateWhere[Q](FSContainerrelates.Columns), + FSFieldscoutinglogs: buildFSFieldscoutinglogWhere[Q](FSFieldscoutinglogs.Columns), + FSHabitatrelates: buildFSHabitatrelateWhere[Q](FSHabitatrelates.Columns), + FSInspectionsamples: buildFSInspectionsampleWhere[Q](FSInspectionsamples.Columns), + FSInspectionsampledetails: buildFSInspectionsampledetailWhere[Q](FSInspectionsampledetails.Columns), + FSLinelocations: buildFSLinelocationWhere[Q](FSLinelocations.Columns), + FSLocationtrackings: buildFSLocationtrackingWhere[Q](FSLocationtrackings.Columns), + FSMosquitoinspections: buildFSMosquitoinspectionWhere[Q](FSMosquitoinspections.Columns), + FSPointlocations: buildFSPointlocationWhere[Q](FSPointlocations.Columns), + FSPolygonlocations: buildFSPolygonlocationWhere[Q](FSPolygonlocations.Columns), + FSPools: buildFSPoolWhere[Q](FSPools.Columns), + FSPooldetails: buildFSPooldetailWhere[Q](FSPooldetails.Columns), + FSProposedtreatmentareas: buildFSProposedtreatmentareaWhere[Q](FSProposedtreatmentareas.Columns), + FSQamosquitoinspections: buildFSQamosquitoinspectionWhere[Q](FSQamosquitoinspections.Columns), + FSRodentlocations: buildFSRodentlocationWhere[Q](FSRodentlocations.Columns), + FSSamplecollections: buildFSSamplecollectionWhere[Q](FSSamplecollections.Columns), + FSSamplelocations: buildFSSamplelocationWhere[Q](FSSamplelocations.Columns), + FSServicerequests: buildFSServicerequestWhere[Q](FSServicerequests.Columns), + FSSpeciesabundances: buildFSSpeciesabundanceWhere[Q](FSSpeciesabundances.Columns), + FSStormdrains: buildFSStormdrainWhere[Q](FSStormdrains.Columns), + FSTimecards: buildFSTimecardWhere[Q](FSTimecards.Columns), + FSTrapdata: buildFSTrapdatumWhere[Q](FSTrapdata.Columns), + FSTraplocations: buildFSTraplocationWhere[Q](FSTraplocations.Columns), + FSTreatments: buildFSTreatmentWhere[Q](FSTreatments.Columns), + FSTreatmentareas: buildFSTreatmentareaWhere[Q](FSTreatmentareas.Columns), + FSZones: buildFSZoneWhere[Q](FSZones.Columns), + FSZones2s: buildFSZones2Where[Q](FSZones2s.Columns), + GeographyColumns: buildGeographyColumnWhere[Q](GeographyColumns.Columns), + GeometryColumns: buildGeometryColumnWhere[Q](GeometryColumns.Columns), + GooseDBVersions: buildGooseDBVersionWhere[Q](GooseDBVersions.Columns), + H3Aggregations: buildH3AggregationWhere[Q](H3Aggregations.Columns), + HistoryContainerrelates: buildHistoryContainerrelateWhere[Q](HistoryContainerrelates.Columns), + HistoryFieldscoutinglogs: buildHistoryFieldscoutinglogWhere[Q](HistoryFieldscoutinglogs.Columns), + HistoryHabitatrelates: buildHistoryHabitatrelateWhere[Q](HistoryHabitatrelates.Columns), + HistoryInspectionsamples: buildHistoryInspectionsampleWhere[Q](HistoryInspectionsamples.Columns), + HistoryInspectionsampledetails: buildHistoryInspectionsampledetailWhere[Q](HistoryInspectionsampledetails.Columns), + HistoryLinelocations: buildHistoryLinelocationWhere[Q](HistoryLinelocations.Columns), + HistoryLocationtrackings: buildHistoryLocationtrackingWhere[Q](HistoryLocationtrackings.Columns), + HistoryMosquitoinspections: buildHistoryMosquitoinspectionWhere[Q](HistoryMosquitoinspections.Columns), + HistoryPointlocations: buildHistoryPointlocationWhere[Q](HistoryPointlocations.Columns), + HistoryPolygonlocations: buildHistoryPolygonlocationWhere[Q](HistoryPolygonlocations.Columns), + HistoryPools: buildHistoryPoolWhere[Q](HistoryPools.Columns), + HistoryPooldetails: buildHistoryPooldetailWhere[Q](HistoryPooldetails.Columns), + HistoryProposedtreatmentareas: buildHistoryProposedtreatmentareaWhere[Q](HistoryProposedtreatmentareas.Columns), + HistoryQamosquitoinspections: buildHistoryQamosquitoinspectionWhere[Q](HistoryQamosquitoinspections.Columns), + HistoryRodentlocations: buildHistoryRodentlocationWhere[Q](HistoryRodentlocations.Columns), + HistorySamplecollections: buildHistorySamplecollectionWhere[Q](HistorySamplecollections.Columns), + HistorySamplelocations: buildHistorySamplelocationWhere[Q](HistorySamplelocations.Columns), + HistoryServicerequests: buildHistoryServicerequestWhere[Q](HistoryServicerequests.Columns), + HistorySpeciesabundances: buildHistorySpeciesabundanceWhere[Q](HistorySpeciesabundances.Columns), + HistoryStormdrains: buildHistoryStormdrainWhere[Q](HistoryStormdrains.Columns), + HistoryTimecards: buildHistoryTimecardWhere[Q](HistoryTimecards.Columns), + HistoryTrapdata: buildHistoryTrapdatumWhere[Q](HistoryTrapdata.Columns), + HistoryTraplocations: buildHistoryTraplocationWhere[Q](HistoryTraplocations.Columns), + HistoryTreatments: buildHistoryTreatmentWhere[Q](HistoryTreatments.Columns), + HistoryTreatmentareas: buildHistoryTreatmentareaWhere[Q](HistoryTreatmentareas.Columns), + HistoryZones: buildHistoryZoneWhere[Q](HistoryZones.Columns), + HistoryZones2s: buildHistoryZones2Where[Q](HistoryZones2s.Columns), + Notifications: buildNotificationWhere[Q](Notifications.Columns), + OauthTokens: buildOauthTokenWhere[Q](OauthTokens.Columns), + Organizations: buildOrganizationWhere[Q](Organizations.Columns), + RasterColumns: buildRasterColumnWhere[Q](RasterColumns.Columns), + RasterOverviews: buildRasterOverviewWhere[Q](RasterOverviews.Columns), + Sessions: buildSessionWhere[Q](Sessions.Columns), + SpatialRefSys: buildSpatialRefSyWhere[Q](SpatialRefSys.Columns), + Users: buildUserWhere[Q](Users.Columns), } } diff --git a/db/models/fieldseeker.aerialsprayline.bob.go b/db/models/fieldseeker.aerialsprayline.bob.go new file mode 100644 index 00000000..bb7b402d --- /dev/null +++ b/db/models/fieldseeker.aerialsprayline.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerAerialsprayline is an object representing the database table. +type FieldseekerAerialsprayline struct{} + +// FieldseekerAerialspraylineSlice is an alias for a slice of pointers to FieldseekerAerialsprayline. +// This should almost always be used instead of []*FieldseekerAerialsprayline. +type FieldseekerAerialspraylineSlice []*FieldseekerAerialsprayline + +// FieldseekerAerialspraylines contains methods to work with the aerialsprayline view +var FieldseekerAerialspraylines = psql.NewViewx[*FieldseekerAerialsprayline, FieldseekerAerialspraylineSlice]("fieldseeker", "aerialsprayline", buildFieldseekerAerialspraylineColumns("fieldseeker.aerialsprayline")) + +// FieldseekerAerialspraylinesQuery is a query on the aerialsprayline view +type FieldseekerAerialspraylinesQuery = *psql.ViewQuery[*FieldseekerAerialsprayline, FieldseekerAerialspraylineSlice] + +func buildFieldseekerAerialspraylineColumns(alias string) fieldseekerAerialspraylineColumns { + return fieldseekerAerialspraylineColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.aerialsprayline"), + tableAlias: alias, + } +} + +type fieldseekerAerialspraylineColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerAerialspraylineColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerAerialspraylineColumns) AliasedAs(alias string) fieldseekerAerialspraylineColumns { + return buildFieldseekerAerialspraylineColumns(alias) +} + +// AfterQueryHook is called after FieldseekerAerialsprayline is retrieved from the database +func (o *FieldseekerAerialsprayline) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerAerialspraylines.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerAerialspraylineSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerAerialspraylineSlice is retrieved from the database +func (o FieldseekerAerialspraylineSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerAerialspraylines.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerAerialspraylineWhere[Q psql.Filterable] struct{} + +func (fieldseekerAerialspraylineWhere[Q]) AliasedAs(alias string) fieldseekerAerialspraylineWhere[Q] { + return buildFieldseekerAerialspraylineWhere[Q](buildFieldseekerAerialspraylineColumns(alias)) +} + +func buildFieldseekerAerialspraylineWhere[Q psql.Filterable](cols fieldseekerAerialspraylineColumns) fieldseekerAerialspraylineWhere[Q] { + return fieldseekerAerialspraylineWhere[Q]{} +} diff --git a/db/models/fieldseeker.aerialspraysession.bob.go b/db/models/fieldseeker.aerialspraysession.bob.go new file mode 100644 index 00000000..54dcc805 --- /dev/null +++ b/db/models/fieldseeker.aerialspraysession.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerAerialspraysession is an object representing the database table. +type FieldseekerAerialspraysession struct{} + +// FieldseekerAerialspraysessionSlice is an alias for a slice of pointers to FieldseekerAerialspraysession. +// This should almost always be used instead of []*FieldseekerAerialspraysession. +type FieldseekerAerialspraysessionSlice []*FieldseekerAerialspraysession + +// FieldseekerAerialspraysessions contains methods to work with the aerialspraysession view +var FieldseekerAerialspraysessions = psql.NewViewx[*FieldseekerAerialspraysession, FieldseekerAerialspraysessionSlice]("fieldseeker", "aerialspraysession", buildFieldseekerAerialspraysessionColumns("fieldseeker.aerialspraysession")) + +// FieldseekerAerialspraysessionsQuery is a query on the aerialspraysession view +type FieldseekerAerialspraysessionsQuery = *psql.ViewQuery[*FieldseekerAerialspraysession, FieldseekerAerialspraysessionSlice] + +func buildFieldseekerAerialspraysessionColumns(alias string) fieldseekerAerialspraysessionColumns { + return fieldseekerAerialspraysessionColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.aerialspraysession"), + tableAlias: alias, + } +} + +type fieldseekerAerialspraysessionColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerAerialspraysessionColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerAerialspraysessionColumns) AliasedAs(alias string) fieldseekerAerialspraysessionColumns { + return buildFieldseekerAerialspraysessionColumns(alias) +} + +// AfterQueryHook is called after FieldseekerAerialspraysession is retrieved from the database +func (o *FieldseekerAerialspraysession) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerAerialspraysessions.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerAerialspraysessionSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerAerialspraysessionSlice is retrieved from the database +func (o FieldseekerAerialspraysessionSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerAerialspraysessions.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerAerialspraysessionWhere[Q psql.Filterable] struct{} + +func (fieldseekerAerialspraysessionWhere[Q]) AliasedAs(alias string) fieldseekerAerialspraysessionWhere[Q] { + return buildFieldseekerAerialspraysessionWhere[Q](buildFieldseekerAerialspraysessionColumns(alias)) +} + +func buildFieldseekerAerialspraysessionWhere[Q psql.Filterable](cols fieldseekerAerialspraysessionColumns) fieldseekerAerialspraysessionWhere[Q] { + return fieldseekerAerialspraysessionWhere[Q]{} +} diff --git a/db/models/fieldseeker.barrierspray.bob.go b/db/models/fieldseeker.barrierspray.bob.go new file mode 100644 index 00000000..c4f56130 --- /dev/null +++ b/db/models/fieldseeker.barrierspray.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerBarrierspray is an object representing the database table. +type FieldseekerBarrierspray struct{} + +// FieldseekerBarrierspraySlice is an alias for a slice of pointers to FieldseekerBarrierspray. +// This should almost always be used instead of []*FieldseekerBarrierspray. +type FieldseekerBarrierspraySlice []*FieldseekerBarrierspray + +// FieldseekerBarriersprays contains methods to work with the barrierspray view +var FieldseekerBarriersprays = psql.NewViewx[*FieldseekerBarrierspray, FieldseekerBarrierspraySlice]("fieldseeker", "barrierspray", buildFieldseekerBarriersprayColumns("fieldseeker.barrierspray")) + +// FieldseekerBarrierspraysQuery is a query on the barrierspray view +type FieldseekerBarrierspraysQuery = *psql.ViewQuery[*FieldseekerBarrierspray, FieldseekerBarrierspraySlice] + +func buildFieldseekerBarriersprayColumns(alias string) fieldseekerBarriersprayColumns { + return fieldseekerBarriersprayColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.barrierspray"), + tableAlias: alias, + } +} + +type fieldseekerBarriersprayColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerBarriersprayColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerBarriersprayColumns) AliasedAs(alias string) fieldseekerBarriersprayColumns { + return buildFieldseekerBarriersprayColumns(alias) +} + +// AfterQueryHook is called after FieldseekerBarrierspray is retrieved from the database +func (o *FieldseekerBarrierspray) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerBarriersprays.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerBarrierspraySlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerBarrierspraySlice is retrieved from the database +func (o FieldseekerBarrierspraySlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerBarriersprays.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerBarriersprayWhere[Q psql.Filterable] struct{} + +func (fieldseekerBarriersprayWhere[Q]) AliasedAs(alias string) fieldseekerBarriersprayWhere[Q] { + return buildFieldseekerBarriersprayWhere[Q](buildFieldseekerBarriersprayColumns(alias)) +} + +func buildFieldseekerBarriersprayWhere[Q psql.Filterable](cols fieldseekerBarriersprayColumns) fieldseekerBarriersprayWhere[Q] { + return fieldseekerBarriersprayWhere[Q]{} +} diff --git a/db/models/fieldseeker.barriersprayroute.bob.go b/db/models/fieldseeker.barriersprayroute.bob.go new file mode 100644 index 00000000..9d2806a0 --- /dev/null +++ b/db/models/fieldseeker.barriersprayroute.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerBarriersprayroute is an object representing the database table. +type FieldseekerBarriersprayroute struct{} + +// FieldseekerBarriersprayrouteSlice is an alias for a slice of pointers to FieldseekerBarriersprayroute. +// This should almost always be used instead of []*FieldseekerBarriersprayroute. +type FieldseekerBarriersprayrouteSlice []*FieldseekerBarriersprayroute + +// FieldseekerBarriersprayroutes contains methods to work with the barriersprayroute view +var FieldseekerBarriersprayroutes = psql.NewViewx[*FieldseekerBarriersprayroute, FieldseekerBarriersprayrouteSlice]("fieldseeker", "barriersprayroute", buildFieldseekerBarriersprayrouteColumns("fieldseeker.barriersprayroute")) + +// FieldseekerBarriersprayroutesQuery is a query on the barriersprayroute view +type FieldseekerBarriersprayroutesQuery = *psql.ViewQuery[*FieldseekerBarriersprayroute, FieldseekerBarriersprayrouteSlice] + +func buildFieldseekerBarriersprayrouteColumns(alias string) fieldseekerBarriersprayrouteColumns { + return fieldseekerBarriersprayrouteColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.barriersprayroute"), + tableAlias: alias, + } +} + +type fieldseekerBarriersprayrouteColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerBarriersprayrouteColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerBarriersprayrouteColumns) AliasedAs(alias string) fieldseekerBarriersprayrouteColumns { + return buildFieldseekerBarriersprayrouteColumns(alias) +} + +// AfterQueryHook is called after FieldseekerBarriersprayroute is retrieved from the database +func (o *FieldseekerBarriersprayroute) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerBarriersprayroutes.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerBarriersprayrouteSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerBarriersprayrouteSlice is retrieved from the database +func (o FieldseekerBarriersprayrouteSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerBarriersprayroutes.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerBarriersprayrouteWhere[Q psql.Filterable] struct{} + +func (fieldseekerBarriersprayrouteWhere[Q]) AliasedAs(alias string) fieldseekerBarriersprayrouteWhere[Q] { + return buildFieldseekerBarriersprayrouteWhere[Q](buildFieldseekerBarriersprayrouteColumns(alias)) +} + +func buildFieldseekerBarriersprayrouteWhere[Q psql.Filterable](cols fieldseekerBarriersprayrouteColumns) fieldseekerBarriersprayrouteWhere[Q] { + return fieldseekerBarriersprayrouteWhere[Q]{} +} diff --git a/db/models/fieldseeker.containerrelate.bob.go b/db/models/fieldseeker.containerrelate.bob.go new file mode 100644 index 00000000..715e1bb9 --- /dev/null +++ b/db/models/fieldseeker.containerrelate.bob.go @@ -0,0 +1,679 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerContainerrelate is an object representing the database table. +type FieldseekerContainerrelate struct { + Objectid int64 `db:"objectid,pk" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Inspsampleid null.Val[uuid.UUID] `db:"inspsampleid" ` + Mosquitoinspid null.Val[uuid.UUID] `db:"mosquitoinspid" ` + Treatmentid null.Val[uuid.UUID] `db:"treatmentid" ` + // Container Type + Containertype null.Val[enums.FieldseekerContainerrelateMosquitocontainertypeEnum] `db:"containertype" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` +} + +// FieldseekerContainerrelateSlice is an alias for a slice of pointers to FieldseekerContainerrelate. +// This should almost always be used instead of []*FieldseekerContainerrelate. +type FieldseekerContainerrelateSlice []*FieldseekerContainerrelate + +// FieldseekerContainerrelates contains methods to work with the containerrelate table +var FieldseekerContainerrelates = psql.NewTablex[*FieldseekerContainerrelate, FieldseekerContainerrelateSlice, *FieldseekerContainerrelateSetter]("fieldseeker", "containerrelate", buildFieldseekerContainerrelateColumns("fieldseeker.containerrelate")) + +// FieldseekerContainerrelatesQuery is a query on the containerrelate table +type FieldseekerContainerrelatesQuery = *psql.ViewQuery[*FieldseekerContainerrelate, FieldseekerContainerrelateSlice] + +func buildFieldseekerContainerrelateColumns(alias string) fieldseekerContainerrelateColumns { + return fieldseekerContainerrelateColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "inspsampleid", "mosquitoinspid", "treatmentid", "containertype", "creationdate", "creator", "editdate", "editor", + ).WithParent("fieldseeker.containerrelate"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Inspsampleid: psql.Quote(alias, "inspsampleid"), + Mosquitoinspid: psql.Quote(alias, "mosquitoinspid"), + Treatmentid: psql.Quote(alias, "treatmentid"), + Containertype: psql.Quote(alias, "containertype"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + } +} + +type fieldseekerContainerrelateColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Inspsampleid psql.Expression + Mosquitoinspid psql.Expression + Treatmentid psql.Expression + Containertype psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression +} + +func (c fieldseekerContainerrelateColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerContainerrelateColumns) AliasedAs(alias string) fieldseekerContainerrelateColumns { + return buildFieldseekerContainerrelateColumns(alias) +} + +// FieldseekerContainerrelateSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerContainerrelateSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Inspsampleid omitnull.Val[uuid.UUID] `db:"inspsampleid" ` + Mosquitoinspid omitnull.Val[uuid.UUID] `db:"mosquitoinspid" ` + Treatmentid omitnull.Val[uuid.UUID] `db:"treatmentid" ` + Containertype omitnull.Val[enums.FieldseekerContainerrelateMosquitocontainertypeEnum] `db:"containertype" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` +} + +func (s FieldseekerContainerrelateSetter) SetColumns() []string { + vals := make([]string, 0, 14) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Inspsampleid.IsUnset() { + vals = append(vals, "inspsampleid") + } + if !s.Mosquitoinspid.IsUnset() { + vals = append(vals, "mosquitoinspid") + } + if !s.Treatmentid.IsUnset() { + vals = append(vals, "treatmentid") + } + if !s.Containertype.IsUnset() { + vals = append(vals, "containertype") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + return vals +} + +func (s FieldseekerContainerrelateSetter) Overwrite(t *FieldseekerContainerrelate) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Inspsampleid.IsUnset() { + t.Inspsampleid = s.Inspsampleid.MustGetNull() + } + if !s.Mosquitoinspid.IsUnset() { + t.Mosquitoinspid = s.Mosquitoinspid.MustGetNull() + } + if !s.Treatmentid.IsUnset() { + t.Treatmentid = s.Treatmentid.MustGetNull() + } + if !s.Containertype.IsUnset() { + t.Containertype = s.Containertype.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } +} + +func (s *FieldseekerContainerrelateSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerContainerrelates.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 14) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[1] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[2] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[3] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[4] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[5] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Inspsampleid.IsUnset() { + vals[6] = psql.Arg(s.Inspsampleid.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Mosquitoinspid.IsUnset() { + vals[7] = psql.Arg(s.Mosquitoinspid.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Treatmentid.IsUnset() { + vals[8] = psql.Arg(s.Treatmentid.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Containertype.IsUnset() { + vals[9] = psql.Arg(s.Containertype.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[10] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[11] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[12] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[13] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerContainerrelateSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerContainerrelateSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 14) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Inspsampleid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "inspsampleid")...), + psql.Arg(s.Inspsampleid), + }}) + } + + if !s.Mosquitoinspid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "mosquitoinspid")...), + psql.Arg(s.Mosquitoinspid), + }}) + } + + if !s.Treatmentid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "treatmentid")...), + psql.Arg(s.Treatmentid), + }}) + } + + if !s.Containertype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "containertype")...), + psql.Arg(s.Containertype), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + return exprs +} + +// FindFieldseekerContainerrelate retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerContainerrelate(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerContainerrelate, error) { + if len(cols) == 0 { + return FieldseekerContainerrelates.Query( + sm.Where(FieldseekerContainerrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerContainerrelates.Query( + sm.Where(FieldseekerContainerrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerContainerrelates.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerContainerrelateExists checks the presence of a single record by primary key +func FieldseekerContainerrelateExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerContainerrelates.Query( + sm.Where(FieldseekerContainerrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerContainerrelate is retrieved from the database +func (o *FieldseekerContainerrelate) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerContainerrelates.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerContainerrelateSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerContainerrelates.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerContainerrelateSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerContainerrelates.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerContainerrelateSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerContainerrelates.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerContainerrelateSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerContainerrelate +func (o *FieldseekerContainerrelate) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerContainerrelate) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.containerrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerContainerrelate +func (o *FieldseekerContainerrelate) Update(ctx context.Context, exec bob.Executor, s *FieldseekerContainerrelateSetter) error { + v, err := FieldseekerContainerrelates.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerContainerrelate record with an executor +func (o *FieldseekerContainerrelate) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerContainerrelates.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerContainerrelate using the executor +func (o *FieldseekerContainerrelate) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerContainerrelates.Query( + sm.Where(FieldseekerContainerrelates.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerContainerrelateSlice is retrieved from the database +func (o FieldseekerContainerrelateSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerContainerrelates.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerContainerrelates.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerContainerrelates.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerContainerrelates.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerContainerrelateSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.containerrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerContainerrelateSlice) copyMatchingRows(from ...*FieldseekerContainerrelate) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerContainerrelateSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerContainerrelates.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerContainerrelate: + o.copyMatchingRows(retrieved) + case []*FieldseekerContainerrelate: + o.copyMatchingRows(retrieved...) + case FieldseekerContainerrelateSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerContainerrelate or a slice of FieldseekerContainerrelate + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerContainerrelates.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerContainerrelateSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerContainerrelates.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerContainerrelate: + o.copyMatchingRows(retrieved) + case []*FieldseekerContainerrelate: + o.copyMatchingRows(retrieved...) + case FieldseekerContainerrelateSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerContainerrelate or a slice of FieldseekerContainerrelate + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerContainerrelates.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerContainerrelateSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerContainerrelateSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerContainerrelates.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerContainerrelateSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerContainerrelates.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerContainerrelateSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerContainerrelates.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerContainerrelateWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Inspsampleid psql.WhereNullMod[Q, uuid.UUID] + Mosquitoinspid psql.WhereNullMod[Q, uuid.UUID] + Treatmentid psql.WhereNullMod[Q, uuid.UUID] + Containertype psql.WhereNullMod[Q, enums.FieldseekerContainerrelateMosquitocontainertypeEnum] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] +} + +func (fieldseekerContainerrelateWhere[Q]) AliasedAs(alias string) fieldseekerContainerrelateWhere[Q] { + return buildFieldseekerContainerrelateWhere[Q](buildFieldseekerContainerrelateColumns(alias)) +} + +func buildFieldseekerContainerrelateWhere[Q psql.Filterable](cols fieldseekerContainerrelateColumns) fieldseekerContainerrelateWhere[Q] { + return fieldseekerContainerrelateWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Inspsampleid: psql.WhereNull[Q, uuid.UUID](cols.Inspsampleid), + Mosquitoinspid: psql.WhereNull[Q, uuid.UUID](cols.Mosquitoinspid), + Treatmentid: psql.WhereNull[Q, uuid.UUID](cols.Treatmentid), + Containertype: psql.WhereNull[Q, enums.FieldseekerContainerrelateMosquitocontainertypeEnum](cols.Containertype), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + } +} diff --git a/db/models/fieldseeker.fieldscoutinglog.bob.go b/db/models/fieldseeker.fieldscoutinglog.bob.go new file mode 100644 index 00000000..85e41656 --- /dev/null +++ b/db/models/fieldseeker.fieldscoutinglog.bob.go @@ -0,0 +1,604 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerFieldscoutinglog is an object representing the database table. +type FieldseekerFieldscoutinglog struct { + Objectid int64 `db:"objectid,pk" ` + // Status + Status null.Val[enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum] `db:"status" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` +} + +// FieldseekerFieldscoutinglogSlice is an alias for a slice of pointers to FieldseekerFieldscoutinglog. +// This should almost always be used instead of []*FieldseekerFieldscoutinglog. +type FieldseekerFieldscoutinglogSlice []*FieldseekerFieldscoutinglog + +// FieldseekerFieldscoutinglogs contains methods to work with the fieldscoutinglog table +var FieldseekerFieldscoutinglogs = psql.NewTablex[*FieldseekerFieldscoutinglog, FieldseekerFieldscoutinglogSlice, *FieldseekerFieldscoutinglogSetter]("fieldseeker", "fieldscoutinglog", buildFieldseekerFieldscoutinglogColumns("fieldseeker.fieldscoutinglog")) + +// FieldseekerFieldscoutinglogsQuery is a query on the fieldscoutinglog table +type FieldseekerFieldscoutinglogsQuery = *psql.ViewQuery[*FieldseekerFieldscoutinglog, FieldseekerFieldscoutinglogSlice] + +func buildFieldseekerFieldscoutinglogColumns(alias string) fieldseekerFieldscoutinglogColumns { + return fieldseekerFieldscoutinglogColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "status", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "creationdate", "creator", "editdate", "editor", + ).WithParent("fieldseeker.fieldscoutinglog"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Status: psql.Quote(alias, "status"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + } +} + +type fieldseekerFieldscoutinglogColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Status psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression +} + +func (c fieldseekerFieldscoutinglogColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerFieldscoutinglogColumns) AliasedAs(alias string) fieldseekerFieldscoutinglogColumns { + return buildFieldseekerFieldscoutinglogColumns(alias) +} + +// FieldseekerFieldscoutinglogSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerFieldscoutinglogSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Status omitnull.Val[enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum] `db:"status" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` +} + +func (s FieldseekerFieldscoutinglogSetter) SetColumns() []string { + vals := make([]string, 0, 11) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Status.IsUnset() { + vals = append(vals, "status") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + return vals +} + +func (s FieldseekerFieldscoutinglogSetter) Overwrite(t *FieldseekerFieldscoutinglog) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Status.IsUnset() { + t.Status = s.Status.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } +} + +func (s *FieldseekerFieldscoutinglogSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerFieldscoutinglogs.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 11) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Status.IsUnset() { + vals[1] = psql.Arg(s.Status.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[2] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[3] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[4] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[5] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[6] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[7] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[8] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[9] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[10] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerFieldscoutinglogSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerFieldscoutinglogSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 11) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Status.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "status")...), + psql.Arg(s.Status), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + return exprs +} + +// FindFieldseekerFieldscoutinglog retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerFieldscoutinglog(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerFieldscoutinglog, error) { + if len(cols) == 0 { + return FieldseekerFieldscoutinglogs.Query( + sm.Where(FieldseekerFieldscoutinglogs.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerFieldscoutinglogs.Query( + sm.Where(FieldseekerFieldscoutinglogs.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerFieldscoutinglogs.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerFieldscoutinglogExists checks the presence of a single record by primary key +func FieldseekerFieldscoutinglogExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerFieldscoutinglogs.Query( + sm.Where(FieldseekerFieldscoutinglogs.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerFieldscoutinglog is retrieved from the database +func (o *FieldseekerFieldscoutinglog) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerFieldscoutinglogs.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerFieldscoutinglogSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerFieldscoutinglogs.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerFieldscoutinglogSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerFieldscoutinglogs.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerFieldscoutinglogSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerFieldscoutinglogs.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerFieldscoutinglogSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerFieldscoutinglog +func (o *FieldseekerFieldscoutinglog) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerFieldscoutinglog) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.fieldscoutinglog", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerFieldscoutinglog +func (o *FieldseekerFieldscoutinglog) Update(ctx context.Context, exec bob.Executor, s *FieldseekerFieldscoutinglogSetter) error { + v, err := FieldseekerFieldscoutinglogs.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerFieldscoutinglog record with an executor +func (o *FieldseekerFieldscoutinglog) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerFieldscoutinglogs.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerFieldscoutinglog using the executor +func (o *FieldseekerFieldscoutinglog) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerFieldscoutinglogs.Query( + sm.Where(FieldseekerFieldscoutinglogs.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerFieldscoutinglogSlice is retrieved from the database +func (o FieldseekerFieldscoutinglogSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerFieldscoutinglogs.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerFieldscoutinglogs.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerFieldscoutinglogs.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerFieldscoutinglogs.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerFieldscoutinglogSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.fieldscoutinglog", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerFieldscoutinglogSlice) copyMatchingRows(from ...*FieldseekerFieldscoutinglog) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerFieldscoutinglogSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerFieldscoutinglogs.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerFieldscoutinglog: + o.copyMatchingRows(retrieved) + case []*FieldseekerFieldscoutinglog: + o.copyMatchingRows(retrieved...) + case FieldseekerFieldscoutinglogSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerFieldscoutinglog or a slice of FieldseekerFieldscoutinglog + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerFieldscoutinglogs.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerFieldscoutinglogSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerFieldscoutinglogs.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerFieldscoutinglog: + o.copyMatchingRows(retrieved) + case []*FieldseekerFieldscoutinglog: + o.copyMatchingRows(retrieved...) + case FieldseekerFieldscoutinglogSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerFieldscoutinglog or a slice of FieldseekerFieldscoutinglog + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerFieldscoutinglogs.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerFieldscoutinglogSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerFieldscoutinglogSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerFieldscoutinglogs.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerFieldscoutinglogSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerFieldscoutinglogs.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerFieldscoutinglogSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerFieldscoutinglogs.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerFieldscoutinglogWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Status psql.WhereNullMod[Q, enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] +} + +func (fieldseekerFieldscoutinglogWhere[Q]) AliasedAs(alias string) fieldseekerFieldscoutinglogWhere[Q] { + return buildFieldseekerFieldscoutinglogWhere[Q](buildFieldseekerFieldscoutinglogColumns(alias)) +} + +func buildFieldseekerFieldscoutinglogWhere[Q psql.Filterable](cols fieldseekerFieldscoutinglogColumns) fieldseekerFieldscoutinglogWhere[Q] { + return fieldseekerFieldscoutinglogWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Status: psql.WhereNull[Q, enums.FieldseekerFieldscoutinglogFieldscoutingsymbologyEnum](cols.Status), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + } +} diff --git a/db/models/fieldseeker.habitatrelate.bob.go b/db/models/fieldseeker.habitatrelate.bob.go new file mode 100644 index 00000000..89c91c0f --- /dev/null +++ b/db/models/fieldseeker.habitatrelate.bob.go @@ -0,0 +1,629 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerHabitatrelate is an object representing the database table. +type FieldseekerHabitatrelate struct { + Objectid int64 `db:"objectid,pk" ` + ForeignID null.Val[uuid.UUID] `db:"foreign_id" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + // Habitat Type + Habitattype null.Val[enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284] `db:"habitattype" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` +} + +// FieldseekerHabitatrelateSlice is an alias for a slice of pointers to FieldseekerHabitatrelate. +// This should almost always be used instead of []*FieldseekerHabitatrelate. +type FieldseekerHabitatrelateSlice []*FieldseekerHabitatrelate + +// FieldseekerHabitatrelates contains methods to work with the habitatrelate table +var FieldseekerHabitatrelates = psql.NewTablex[*FieldseekerHabitatrelate, FieldseekerHabitatrelateSlice, *FieldseekerHabitatrelateSetter]("fieldseeker", "habitatrelate", buildFieldseekerHabitatrelateColumns("fieldseeker.habitatrelate")) + +// FieldseekerHabitatrelatesQuery is a query on the habitatrelate table +type FieldseekerHabitatrelatesQuery = *psql.ViewQuery[*FieldseekerHabitatrelate, FieldseekerHabitatrelateSlice] + +func buildFieldseekerHabitatrelateColumns(alias string) fieldseekerHabitatrelateColumns { + return fieldseekerHabitatrelateColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "foreign_id", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "habitattype", "creationdate", "creator", "editdate", "editor", + ).WithParent("fieldseeker.habitatrelate"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + ForeignID: psql.Quote(alias, "foreign_id"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Habitattype: psql.Quote(alias, "habitattype"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + } +} + +type fieldseekerHabitatrelateColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + ForeignID psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Habitattype psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression +} + +func (c fieldseekerHabitatrelateColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerHabitatrelateColumns) AliasedAs(alias string) fieldseekerHabitatrelateColumns { + return buildFieldseekerHabitatrelateColumns(alias) +} + +// FieldseekerHabitatrelateSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerHabitatrelateSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + ForeignID omitnull.Val[uuid.UUID] `db:"foreign_id" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Habitattype omitnull.Val[enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284] `db:"habitattype" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` +} + +func (s FieldseekerHabitatrelateSetter) SetColumns() []string { + vals := make([]string, 0, 12) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.ForeignID.IsUnset() { + vals = append(vals, "foreign_id") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Habitattype.IsUnset() { + vals = append(vals, "habitattype") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + return vals +} + +func (s FieldseekerHabitatrelateSetter) Overwrite(t *FieldseekerHabitatrelate) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.ForeignID.IsUnset() { + t.ForeignID = s.ForeignID.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Habitattype.IsUnset() { + t.Habitattype = s.Habitattype.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } +} + +func (s *FieldseekerHabitatrelateSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerHabitatrelates.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 12) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.ForeignID.IsUnset() { + vals[1] = psql.Arg(s.ForeignID.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[2] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[3] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[4] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[5] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[6] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Habitattype.IsUnset() { + vals[7] = psql.Arg(s.Habitattype.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[8] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[9] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[10] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[11] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerHabitatrelateSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerHabitatrelateSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 12) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.ForeignID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "foreign_id")...), + psql.Arg(s.ForeignID), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Habitattype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habitattype")...), + psql.Arg(s.Habitattype), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + return exprs +} + +// FindFieldseekerHabitatrelate retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerHabitatrelate(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerHabitatrelate, error) { + if len(cols) == 0 { + return FieldseekerHabitatrelates.Query( + sm.Where(FieldseekerHabitatrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerHabitatrelates.Query( + sm.Where(FieldseekerHabitatrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerHabitatrelates.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerHabitatrelateExists checks the presence of a single record by primary key +func FieldseekerHabitatrelateExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerHabitatrelates.Query( + sm.Where(FieldseekerHabitatrelates.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerHabitatrelate is retrieved from the database +func (o *FieldseekerHabitatrelate) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerHabitatrelates.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerHabitatrelateSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerHabitatrelates.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerHabitatrelateSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerHabitatrelates.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerHabitatrelateSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerHabitatrelates.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerHabitatrelateSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerHabitatrelate +func (o *FieldseekerHabitatrelate) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerHabitatrelate) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.habitatrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerHabitatrelate +func (o *FieldseekerHabitatrelate) Update(ctx context.Context, exec bob.Executor, s *FieldseekerHabitatrelateSetter) error { + v, err := FieldseekerHabitatrelates.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerHabitatrelate record with an executor +func (o *FieldseekerHabitatrelate) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerHabitatrelates.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerHabitatrelate using the executor +func (o *FieldseekerHabitatrelate) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerHabitatrelates.Query( + sm.Where(FieldseekerHabitatrelates.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerHabitatrelateSlice is retrieved from the database +func (o FieldseekerHabitatrelateSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerHabitatrelates.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerHabitatrelates.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerHabitatrelates.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerHabitatrelates.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerHabitatrelateSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.habitatrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerHabitatrelateSlice) copyMatchingRows(from ...*FieldseekerHabitatrelate) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerHabitatrelateSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerHabitatrelates.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerHabitatrelate: + o.copyMatchingRows(retrieved) + case []*FieldseekerHabitatrelate: + o.copyMatchingRows(retrieved...) + case FieldseekerHabitatrelateSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerHabitatrelate or a slice of FieldseekerHabitatrelate + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerHabitatrelates.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerHabitatrelateSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerHabitatrelates.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerHabitatrelate: + o.copyMatchingRows(retrieved) + case []*FieldseekerHabitatrelate: + o.copyMatchingRows(retrieved...) + case FieldseekerHabitatrelateSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerHabitatrelate or a slice of FieldseekerHabitatrelate + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerHabitatrelates.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerHabitatrelateSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerHabitatrelateSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerHabitatrelates.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerHabitatrelateSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerHabitatrelates.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerHabitatrelateSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerHabitatrelates.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerHabitatrelateWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + ForeignID psql.WhereNullMod[Q, uuid.UUID] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Habitattype psql.WhereNullMod[Q, enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] +} + +func (fieldseekerHabitatrelateWhere[Q]) AliasedAs(alias string) fieldseekerHabitatrelateWhere[Q] { + return buildFieldseekerHabitatrelateWhere[Q](buildFieldseekerHabitatrelateColumns(alias)) +} + +func buildFieldseekerHabitatrelateWhere[Q psql.Filterable](cols fieldseekerHabitatrelateColumns) fieldseekerHabitatrelateWhere[Q] { + return fieldseekerHabitatrelateWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + ForeignID: psql.WhereNull[Q, uuid.UUID](cols.ForeignID), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Habitattype: psql.WhereNull[Q, enums.FieldseekerHabitatrelateHabitatrelateHabitattype2e81cf2f550e400783cf284](cols.Habitattype), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + } +} diff --git a/db/models/fieldseeker.inspectionsample.bob.go b/db/models/fieldseeker.inspectionsample.bob.go new file mode 100644 index 00000000..1641b5fb --- /dev/null +++ b/db/models/fieldseeker.inspectionsample.bob.go @@ -0,0 +1,681 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerInspectionsample is an object representing the database table. +type FieldseekerInspectionsample struct { + Objectid int64 `db:"objectid,pk" ` + InspID null.Val[uuid.UUID] `db:"insp_id" ` + // Sample ID + Sampleid null.Val[string] `db:"sampleid" ` + // Processed + Processed null.Val[enums.FieldseekerInspectionsampleNotinuitFEnum] `db:"processed" ` + // Tech Identifying Species in Lab + Idbytech null.Val[string] `db:"idbytech" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` +} + +// FieldseekerInspectionsampleSlice is an alias for a slice of pointers to FieldseekerInspectionsample. +// This should almost always be used instead of []*FieldseekerInspectionsample. +type FieldseekerInspectionsampleSlice []*FieldseekerInspectionsample + +// FieldseekerInspectionsamples contains methods to work with the inspectionsample table +var FieldseekerInspectionsamples = psql.NewTablex[*FieldseekerInspectionsample, FieldseekerInspectionsampleSlice, *FieldseekerInspectionsampleSetter]("fieldseeker", "inspectionsample", buildFieldseekerInspectionsampleColumns("fieldseeker.inspectionsample")) + +// FieldseekerInspectionsamplesQuery is a query on the inspectionsample table +type FieldseekerInspectionsamplesQuery = *psql.ViewQuery[*FieldseekerInspectionsample, FieldseekerInspectionsampleSlice] + +func buildFieldseekerInspectionsampleColumns(alias string) fieldseekerInspectionsampleColumns { + return fieldseekerInspectionsampleColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "insp_id", "sampleid", "processed", "idbytech", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "creationdate", "creator", "editdate", "editor", + ).WithParent("fieldseeker.inspectionsample"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + InspID: psql.Quote(alias, "insp_id"), + Sampleid: psql.Quote(alias, "sampleid"), + Processed: psql.Quote(alias, "processed"), + Idbytech: psql.Quote(alias, "idbytech"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + } +} + +type fieldseekerInspectionsampleColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + InspID psql.Expression + Sampleid psql.Expression + Processed psql.Expression + Idbytech psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression +} + +func (c fieldseekerInspectionsampleColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerInspectionsampleColumns) AliasedAs(alias string) fieldseekerInspectionsampleColumns { + return buildFieldseekerInspectionsampleColumns(alias) +} + +// FieldseekerInspectionsampleSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerInspectionsampleSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + InspID omitnull.Val[uuid.UUID] `db:"insp_id" ` + Sampleid omitnull.Val[string] `db:"sampleid" ` + Processed omitnull.Val[enums.FieldseekerInspectionsampleNotinuitFEnum] `db:"processed" ` + Idbytech omitnull.Val[string] `db:"idbytech" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` +} + +func (s FieldseekerInspectionsampleSetter) SetColumns() []string { + vals := make([]string, 0, 14) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.InspID.IsUnset() { + vals = append(vals, "insp_id") + } + if !s.Sampleid.IsUnset() { + vals = append(vals, "sampleid") + } + if !s.Processed.IsUnset() { + vals = append(vals, "processed") + } + if !s.Idbytech.IsUnset() { + vals = append(vals, "idbytech") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + return vals +} + +func (s FieldseekerInspectionsampleSetter) Overwrite(t *FieldseekerInspectionsample) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.InspID.IsUnset() { + t.InspID = s.InspID.MustGetNull() + } + if !s.Sampleid.IsUnset() { + t.Sampleid = s.Sampleid.MustGetNull() + } + if !s.Processed.IsUnset() { + t.Processed = s.Processed.MustGetNull() + } + if !s.Idbytech.IsUnset() { + t.Idbytech = s.Idbytech.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } +} + +func (s *FieldseekerInspectionsampleSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerInspectionsamples.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 14) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.InspID.IsUnset() { + vals[1] = psql.Arg(s.InspID.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Sampleid.IsUnset() { + vals[2] = psql.Arg(s.Sampleid.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Processed.IsUnset() { + vals[3] = psql.Arg(s.Processed.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Idbytech.IsUnset() { + vals[4] = psql.Arg(s.Idbytech.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[5] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[6] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[7] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[8] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[9] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[10] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[11] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[12] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[13] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerInspectionsampleSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerInspectionsampleSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 14) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.InspID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "insp_id")...), + psql.Arg(s.InspID), + }}) + } + + if !s.Sampleid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sampleid")...), + psql.Arg(s.Sampleid), + }}) + } + + if !s.Processed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "processed")...), + psql.Arg(s.Processed), + }}) + } + + if !s.Idbytech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "idbytech")...), + psql.Arg(s.Idbytech), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + return exprs +} + +// FindFieldseekerInspectionsample retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerInspectionsample(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerInspectionsample, error) { + if len(cols) == 0 { + return FieldseekerInspectionsamples.Query( + sm.Where(FieldseekerInspectionsamples.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerInspectionsamples.Query( + sm.Where(FieldseekerInspectionsamples.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerInspectionsamples.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerInspectionsampleExists checks the presence of a single record by primary key +func FieldseekerInspectionsampleExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerInspectionsamples.Query( + sm.Where(FieldseekerInspectionsamples.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerInspectionsample is retrieved from the database +func (o *FieldseekerInspectionsample) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerInspectionsamples.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerInspectionsampleSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerInspectionsamples.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerInspectionsampleSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerInspectionsamples.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerInspectionsampleSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerInspectionsamples.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerInspectionsampleSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerInspectionsample +func (o *FieldseekerInspectionsample) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerInspectionsample) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.inspectionsample", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerInspectionsample +func (o *FieldseekerInspectionsample) Update(ctx context.Context, exec bob.Executor, s *FieldseekerInspectionsampleSetter) error { + v, err := FieldseekerInspectionsamples.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerInspectionsample record with an executor +func (o *FieldseekerInspectionsample) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerInspectionsamples.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerInspectionsample using the executor +func (o *FieldseekerInspectionsample) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerInspectionsamples.Query( + sm.Where(FieldseekerInspectionsamples.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerInspectionsampleSlice is retrieved from the database +func (o FieldseekerInspectionsampleSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerInspectionsamples.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerInspectionsamples.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerInspectionsamples.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerInspectionsamples.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerInspectionsampleSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.inspectionsample", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerInspectionsampleSlice) copyMatchingRows(from ...*FieldseekerInspectionsample) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerInspectionsampleSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerInspectionsamples.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerInspectionsample: + o.copyMatchingRows(retrieved) + case []*FieldseekerInspectionsample: + o.copyMatchingRows(retrieved...) + case FieldseekerInspectionsampleSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerInspectionsample or a slice of FieldseekerInspectionsample + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerInspectionsamples.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerInspectionsampleSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerInspectionsamples.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerInspectionsample: + o.copyMatchingRows(retrieved) + case []*FieldseekerInspectionsample: + o.copyMatchingRows(retrieved...) + case FieldseekerInspectionsampleSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerInspectionsample or a slice of FieldseekerInspectionsample + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerInspectionsamples.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerInspectionsampleSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerInspectionsampleSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerInspectionsamples.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerInspectionsampleSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerInspectionsamples.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerInspectionsampleSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerInspectionsamples.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerInspectionsampleWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + InspID psql.WhereNullMod[Q, uuid.UUID] + Sampleid psql.WhereNullMod[Q, string] + Processed psql.WhereNullMod[Q, enums.FieldseekerInspectionsampleNotinuitFEnum] + Idbytech psql.WhereNullMod[Q, string] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] +} + +func (fieldseekerInspectionsampleWhere[Q]) AliasedAs(alias string) fieldseekerInspectionsampleWhere[Q] { + return buildFieldseekerInspectionsampleWhere[Q](buildFieldseekerInspectionsampleColumns(alias)) +} + +func buildFieldseekerInspectionsampleWhere[Q psql.Filterable](cols fieldseekerInspectionsampleColumns) fieldseekerInspectionsampleWhere[Q] { + return fieldseekerInspectionsampleWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + InspID: psql.WhereNull[Q, uuid.UUID](cols.InspID), + Sampleid: psql.WhereNull[Q, string](cols.Sampleid), + Processed: psql.WhereNull[Q, enums.FieldseekerInspectionsampleNotinuitFEnum](cols.Processed), + Idbytech: psql.WhereNull[Q, string](cols.Idbytech), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + } +} diff --git a/db/models/fieldseeker.inspectionsampledetail.bob.go b/db/models/fieldseeker.inspectionsampledetail.bob.go new file mode 100644 index 00000000..3b592de5 --- /dev/null +++ b/db/models/fieldseeker.inspectionsampledetail.bob.go @@ -0,0 +1,966 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerInspectionsampledetail is an object representing the database table. +type FieldseekerInspectionsampledetail struct { + Objectid int64 `db:"objectid,pk" ` + InspsampleID null.Val[uuid.UUID] `db:"inspsample_id" ` + // Field Species + Fieldspecies null.Val[enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum] `db:"fieldspecies" ` + // Field Larva Count + Flarvcount null.Val[int16] `db:"flarvcount" ` + // Field Pupa Count + Fpupcount null.Val[int16] `db:"fpupcount" ` + // Field Egg Count + Feggcount null.Val[int16] `db:"feggcount" ` + // Field Larval Stages + Flstages null.Val[string] `db:"flstages" ` + // Field Dominant Stage + Fdomstage null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] `db:"fdomstage" ` + // Field Adult Activity + Fadultact null.Val[enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum] `db:"fadultact" ` + // Lab Species + Labspecies null.Val[string] `db:"labspecies" ` + // Lab Larva Count + Llarvcount null.Val[int16] `db:"llarvcount" ` + // Lab Pupa Count + Lpupcount null.Val[int16] `db:"lpupcount" ` + // Lab Egg Count + Leggcount null.Val[int16] `db:"leggcount" ` + // Lab Dominant Stage + Ldomstage null.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] `db:"ldomstage" ` + // Comments + Comments null.Val[string] `db:"comments" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Processed null.Val[int16] `db:"processed" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` +} + +// FieldseekerInspectionsampledetailSlice is an alias for a slice of pointers to FieldseekerInspectionsampledetail. +// This should almost always be used instead of []*FieldseekerInspectionsampledetail. +type FieldseekerInspectionsampledetailSlice []*FieldseekerInspectionsampledetail + +// FieldseekerInspectionsampledetails contains methods to work with the inspectionsampledetail table +var FieldseekerInspectionsampledetails = psql.NewTablex[*FieldseekerInspectionsampledetail, FieldseekerInspectionsampledetailSlice, *FieldseekerInspectionsampledetailSetter]("fieldseeker", "inspectionsampledetail", buildFieldseekerInspectionsampledetailColumns("fieldseeker.inspectionsampledetail")) + +// FieldseekerInspectionsampledetailsQuery is a query on the inspectionsampledetail table +type FieldseekerInspectionsampledetailsQuery = *psql.ViewQuery[*FieldseekerInspectionsampledetail, FieldseekerInspectionsampledetailSlice] + +func buildFieldseekerInspectionsampledetailColumns(alias string) fieldseekerInspectionsampledetailColumns { + return fieldseekerInspectionsampledetailColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "inspsample_id", "fieldspecies", "flarvcount", "fpupcount", "feggcount", "flstages", "fdomstage", "fadultact", "labspecies", "llarvcount", "lpupcount", "leggcount", "ldomstage", "comments", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "processed", "creationdate", "creator", "editdate", "editor", + ).WithParent("fieldseeker.inspectionsampledetail"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + InspsampleID: psql.Quote(alias, "inspsample_id"), + Fieldspecies: psql.Quote(alias, "fieldspecies"), + Flarvcount: psql.Quote(alias, "flarvcount"), + Fpupcount: psql.Quote(alias, "fpupcount"), + Feggcount: psql.Quote(alias, "feggcount"), + Flstages: psql.Quote(alias, "flstages"), + Fdomstage: psql.Quote(alias, "fdomstage"), + Fadultact: psql.Quote(alias, "fadultact"), + Labspecies: psql.Quote(alias, "labspecies"), + Llarvcount: psql.Quote(alias, "llarvcount"), + Lpupcount: psql.Quote(alias, "lpupcount"), + Leggcount: psql.Quote(alias, "leggcount"), + Ldomstage: psql.Quote(alias, "ldomstage"), + Comments: psql.Quote(alias, "comments"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Processed: psql.Quote(alias, "processed"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + } +} + +type fieldseekerInspectionsampledetailColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + InspsampleID psql.Expression + Fieldspecies psql.Expression + Flarvcount psql.Expression + Fpupcount psql.Expression + Feggcount psql.Expression + Flstages psql.Expression + Fdomstage psql.Expression + Fadultact psql.Expression + Labspecies psql.Expression + Llarvcount psql.Expression + Lpupcount psql.Expression + Leggcount psql.Expression + Ldomstage psql.Expression + Comments psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Processed psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression +} + +func (c fieldseekerInspectionsampledetailColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerInspectionsampledetailColumns) AliasedAs(alias string) fieldseekerInspectionsampledetailColumns { + return buildFieldseekerInspectionsampledetailColumns(alias) +} + +// FieldseekerInspectionsampledetailSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerInspectionsampledetailSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + InspsampleID omitnull.Val[uuid.UUID] `db:"inspsample_id" ` + Fieldspecies omitnull.Val[enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum] `db:"fieldspecies" ` + Flarvcount omitnull.Val[int16] `db:"flarvcount" ` + Fpupcount omitnull.Val[int16] `db:"fpupcount" ` + Feggcount omitnull.Val[int16] `db:"feggcount" ` + Flstages omitnull.Val[string] `db:"flstages" ` + Fdomstage omitnull.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] `db:"fdomstage" ` + Fadultact omitnull.Val[enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum] `db:"fadultact" ` + Labspecies omitnull.Val[string] `db:"labspecies" ` + Llarvcount omitnull.Val[int16] `db:"llarvcount" ` + Lpupcount omitnull.Val[int16] `db:"lpupcount" ` + Leggcount omitnull.Val[int16] `db:"leggcount" ` + Ldomstage omitnull.Val[enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] `db:"ldomstage" ` + Comments omitnull.Val[string] `db:"comments" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Processed omitnull.Val[int16] `db:"processed" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` +} + +func (s FieldseekerInspectionsampledetailSetter) SetColumns() []string { + vals := make([]string, 0, 25) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.InspsampleID.IsUnset() { + vals = append(vals, "inspsample_id") + } + if !s.Fieldspecies.IsUnset() { + vals = append(vals, "fieldspecies") + } + if !s.Flarvcount.IsUnset() { + vals = append(vals, "flarvcount") + } + if !s.Fpupcount.IsUnset() { + vals = append(vals, "fpupcount") + } + if !s.Feggcount.IsUnset() { + vals = append(vals, "feggcount") + } + if !s.Flstages.IsUnset() { + vals = append(vals, "flstages") + } + if !s.Fdomstage.IsUnset() { + vals = append(vals, "fdomstage") + } + if !s.Fadultact.IsUnset() { + vals = append(vals, "fadultact") + } + if !s.Labspecies.IsUnset() { + vals = append(vals, "labspecies") + } + if !s.Llarvcount.IsUnset() { + vals = append(vals, "llarvcount") + } + if !s.Lpupcount.IsUnset() { + vals = append(vals, "lpupcount") + } + if !s.Leggcount.IsUnset() { + vals = append(vals, "leggcount") + } + if !s.Ldomstage.IsUnset() { + vals = append(vals, "ldomstage") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Processed.IsUnset() { + vals = append(vals, "processed") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + return vals +} + +func (s FieldseekerInspectionsampledetailSetter) Overwrite(t *FieldseekerInspectionsampledetail) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.InspsampleID.IsUnset() { + t.InspsampleID = s.InspsampleID.MustGetNull() + } + if !s.Fieldspecies.IsUnset() { + t.Fieldspecies = s.Fieldspecies.MustGetNull() + } + if !s.Flarvcount.IsUnset() { + t.Flarvcount = s.Flarvcount.MustGetNull() + } + if !s.Fpupcount.IsUnset() { + t.Fpupcount = s.Fpupcount.MustGetNull() + } + if !s.Feggcount.IsUnset() { + t.Feggcount = s.Feggcount.MustGetNull() + } + if !s.Flstages.IsUnset() { + t.Flstages = s.Flstages.MustGetNull() + } + if !s.Fdomstage.IsUnset() { + t.Fdomstage = s.Fdomstage.MustGetNull() + } + if !s.Fadultact.IsUnset() { + t.Fadultact = s.Fadultact.MustGetNull() + } + if !s.Labspecies.IsUnset() { + t.Labspecies = s.Labspecies.MustGetNull() + } + if !s.Llarvcount.IsUnset() { + t.Llarvcount = s.Llarvcount.MustGetNull() + } + if !s.Lpupcount.IsUnset() { + t.Lpupcount = s.Lpupcount.MustGetNull() + } + if !s.Leggcount.IsUnset() { + t.Leggcount = s.Leggcount.MustGetNull() + } + if !s.Ldomstage.IsUnset() { + t.Ldomstage = s.Ldomstage.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Processed.IsUnset() { + t.Processed = s.Processed.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } +} + +func (s *FieldseekerInspectionsampledetailSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerInspectionsampledetails.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 25) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.InspsampleID.IsUnset() { + vals[1] = psql.Arg(s.InspsampleID.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Fieldspecies.IsUnset() { + vals[2] = psql.Arg(s.Fieldspecies.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Flarvcount.IsUnset() { + vals[3] = psql.Arg(s.Flarvcount.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Fpupcount.IsUnset() { + vals[4] = psql.Arg(s.Fpupcount.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Feggcount.IsUnset() { + vals[5] = psql.Arg(s.Feggcount.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Flstages.IsUnset() { + vals[6] = psql.Arg(s.Flstages.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Fdomstage.IsUnset() { + vals[7] = psql.Arg(s.Fdomstage.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Fadultact.IsUnset() { + vals[8] = psql.Arg(s.Fadultact.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Labspecies.IsUnset() { + vals[9] = psql.Arg(s.Labspecies.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Llarvcount.IsUnset() { + vals[10] = psql.Arg(s.Llarvcount.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Lpupcount.IsUnset() { + vals[11] = psql.Arg(s.Lpupcount.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Leggcount.IsUnset() { + vals[12] = psql.Arg(s.Leggcount.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Ldomstage.IsUnset() { + vals[13] = psql.Arg(s.Ldomstage.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[14] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[15] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[16] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[17] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[18] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[19] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Processed.IsUnset() { + vals[20] = psql.Arg(s.Processed.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[21] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[22] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[23] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[24] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerInspectionsampledetailSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerInspectionsampledetailSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 25) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.InspsampleID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "inspsample_id")...), + psql.Arg(s.InspsampleID), + }}) + } + + if !s.Fieldspecies.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fieldspecies")...), + psql.Arg(s.Fieldspecies), + }}) + } + + if !s.Flarvcount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "flarvcount")...), + psql.Arg(s.Flarvcount), + }}) + } + + if !s.Fpupcount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fpupcount")...), + psql.Arg(s.Fpupcount), + }}) + } + + if !s.Feggcount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "feggcount")...), + psql.Arg(s.Feggcount), + }}) + } + + if !s.Flstages.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "flstages")...), + psql.Arg(s.Flstages), + }}) + } + + if !s.Fdomstage.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fdomstage")...), + psql.Arg(s.Fdomstage), + }}) + } + + if !s.Fadultact.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fadultact")...), + psql.Arg(s.Fadultact), + }}) + } + + if !s.Labspecies.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "labspecies")...), + psql.Arg(s.Labspecies), + }}) + } + + if !s.Llarvcount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "llarvcount")...), + psql.Arg(s.Llarvcount), + }}) + } + + if !s.Lpupcount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lpupcount")...), + psql.Arg(s.Lpupcount), + }}) + } + + if !s.Leggcount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "leggcount")...), + psql.Arg(s.Leggcount), + }}) + } + + if !s.Ldomstage.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "ldomstage")...), + psql.Arg(s.Ldomstage), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Processed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "processed")...), + psql.Arg(s.Processed), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + return exprs +} + +// FindFieldseekerInspectionsampledetail retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerInspectionsampledetail(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerInspectionsampledetail, error) { + if len(cols) == 0 { + return FieldseekerInspectionsampledetails.Query( + sm.Where(FieldseekerInspectionsampledetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerInspectionsampledetails.Query( + sm.Where(FieldseekerInspectionsampledetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerInspectionsampledetails.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerInspectionsampledetailExists checks the presence of a single record by primary key +func FieldseekerInspectionsampledetailExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerInspectionsampledetails.Query( + sm.Where(FieldseekerInspectionsampledetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerInspectionsampledetail is retrieved from the database +func (o *FieldseekerInspectionsampledetail) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerInspectionsampledetails.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerInspectionsampledetailSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerInspectionsampledetails.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerInspectionsampledetailSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerInspectionsampledetails.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerInspectionsampledetailSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerInspectionsampledetails.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerInspectionsampledetailSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerInspectionsampledetail +func (o *FieldseekerInspectionsampledetail) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerInspectionsampledetail) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.inspectionsampledetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerInspectionsampledetail +func (o *FieldseekerInspectionsampledetail) Update(ctx context.Context, exec bob.Executor, s *FieldseekerInspectionsampledetailSetter) error { + v, err := FieldseekerInspectionsampledetails.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerInspectionsampledetail record with an executor +func (o *FieldseekerInspectionsampledetail) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerInspectionsampledetails.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerInspectionsampledetail using the executor +func (o *FieldseekerInspectionsampledetail) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerInspectionsampledetails.Query( + sm.Where(FieldseekerInspectionsampledetails.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerInspectionsampledetailSlice is retrieved from the database +func (o FieldseekerInspectionsampledetailSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerInspectionsampledetails.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerInspectionsampledetails.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerInspectionsampledetails.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerInspectionsampledetails.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerInspectionsampledetailSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.inspectionsampledetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerInspectionsampledetailSlice) copyMatchingRows(from ...*FieldseekerInspectionsampledetail) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerInspectionsampledetailSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerInspectionsampledetails.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerInspectionsampledetail: + o.copyMatchingRows(retrieved) + case []*FieldseekerInspectionsampledetail: + o.copyMatchingRows(retrieved...) + case FieldseekerInspectionsampledetailSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerInspectionsampledetail or a slice of FieldseekerInspectionsampledetail + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerInspectionsampledetails.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerInspectionsampledetailSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerInspectionsampledetails.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerInspectionsampledetail: + o.copyMatchingRows(retrieved) + case []*FieldseekerInspectionsampledetail: + o.copyMatchingRows(retrieved...) + case FieldseekerInspectionsampledetailSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerInspectionsampledetail or a slice of FieldseekerInspectionsampledetail + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerInspectionsampledetails.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerInspectionsampledetailSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerInspectionsampledetailSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerInspectionsampledetails.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerInspectionsampledetailSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerInspectionsampledetails.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerInspectionsampledetailSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerInspectionsampledetails.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerInspectionsampledetailWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + InspsampleID psql.WhereNullMod[Q, uuid.UUID] + Fieldspecies psql.WhereNullMod[Q, enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum] + Flarvcount psql.WhereNullMod[Q, int16] + Fpupcount psql.WhereNullMod[Q, int16] + Feggcount psql.WhereNullMod[Q, int16] + Flstages psql.WhereNullMod[Q, string] + Fdomstage psql.WhereNullMod[Q, enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] + Fadultact psql.WhereNullMod[Q, enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum] + Labspecies psql.WhereNullMod[Q, string] + Llarvcount psql.WhereNullMod[Q, int16] + Lpupcount psql.WhereNullMod[Q, int16] + Leggcount psql.WhereNullMod[Q, int16] + Ldomstage psql.WhereNullMod[Q, enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum] + Comments psql.WhereNullMod[Q, string] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Processed psql.WhereNullMod[Q, int16] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] +} + +func (fieldseekerInspectionsampledetailWhere[Q]) AliasedAs(alias string) fieldseekerInspectionsampledetailWhere[Q] { + return buildFieldseekerInspectionsampledetailWhere[Q](buildFieldseekerInspectionsampledetailColumns(alias)) +} + +func buildFieldseekerInspectionsampledetailWhere[Q psql.Filterable](cols fieldseekerInspectionsampledetailColumns) fieldseekerInspectionsampledetailWhere[Q] { + return fieldseekerInspectionsampledetailWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + InspsampleID: psql.WhereNull[Q, uuid.UUID](cols.InspsampleID), + Fieldspecies: psql.WhereNull[Q, enums.FieldseekerInspectionsampledetailMosquitofieldspeciesEnum](cols.Fieldspecies), + Flarvcount: psql.WhereNull[Q, int16](cols.Flarvcount), + Fpupcount: psql.WhereNull[Q, int16](cols.Fpupcount), + Feggcount: psql.WhereNull[Q, int16](cols.Feggcount), + Flstages: psql.WhereNull[Q, string](cols.Flstages), + Fdomstage: psql.WhereNull[Q, enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum](cols.Fdomstage), + Fadultact: psql.WhereNull[Q, enums.FieldseekerInspectionsampledetailMosquitoadultactivityEnum](cols.Fadultact), + Labspecies: psql.WhereNull[Q, string](cols.Labspecies), + Llarvcount: psql.WhereNull[Q, int16](cols.Llarvcount), + Lpupcount: psql.WhereNull[Q, int16](cols.Lpupcount), + Leggcount: psql.WhereNull[Q, int16](cols.Leggcount), + Ldomstage: psql.WhereNull[Q, enums.FieldseekerInspectionsampledetailMosquitodominantstageEnum](cols.Ldomstage), + Comments: psql.WhereNull[Q, string](cols.Comments), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Processed: psql.WhereNull[Q, int16](cols.Processed), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + } +} diff --git a/db/models/fieldseeker.landingcount.bob.go b/db/models/fieldseeker.landingcount.bob.go new file mode 100644 index 00000000..9d2a3afe --- /dev/null +++ b/db/models/fieldseeker.landingcount.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerLandingcount is an object representing the database table. +type FieldseekerLandingcount struct{} + +// FieldseekerLandingcountSlice is an alias for a slice of pointers to FieldseekerLandingcount. +// This should almost always be used instead of []*FieldseekerLandingcount. +type FieldseekerLandingcountSlice []*FieldseekerLandingcount + +// FieldseekerLandingcounts contains methods to work with the landingcount view +var FieldseekerLandingcounts = psql.NewViewx[*FieldseekerLandingcount, FieldseekerLandingcountSlice]("fieldseeker", "landingcount", buildFieldseekerLandingcountColumns("fieldseeker.landingcount")) + +// FieldseekerLandingcountsQuery is a query on the landingcount view +type FieldseekerLandingcountsQuery = *psql.ViewQuery[*FieldseekerLandingcount, FieldseekerLandingcountSlice] + +func buildFieldseekerLandingcountColumns(alias string) fieldseekerLandingcountColumns { + return fieldseekerLandingcountColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.landingcount"), + tableAlias: alias, + } +} + +type fieldseekerLandingcountColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerLandingcountColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerLandingcountColumns) AliasedAs(alias string) fieldseekerLandingcountColumns { + return buildFieldseekerLandingcountColumns(alias) +} + +// AfterQueryHook is called after FieldseekerLandingcount is retrieved from the database +func (o *FieldseekerLandingcount) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerLandingcounts.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerLandingcountSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerLandingcountSlice is retrieved from the database +func (o FieldseekerLandingcountSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerLandingcounts.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerLandingcountWhere[Q psql.Filterable] struct{} + +func (fieldseekerLandingcountWhere[Q]) AliasedAs(alias string) fieldseekerLandingcountWhere[Q] { + return buildFieldseekerLandingcountWhere[Q](buildFieldseekerLandingcountColumns(alias)) +} + +func buildFieldseekerLandingcountWhere[Q psql.Filterable](cols fieldseekerLandingcountColumns) fieldseekerLandingcountWhere[Q] { + return fieldseekerLandingcountWhere[Q]{} +} diff --git a/db/models/fieldseeker.landingcountlocation.bob.go b/db/models/fieldseeker.landingcountlocation.bob.go new file mode 100644 index 00000000..4ad1b61b --- /dev/null +++ b/db/models/fieldseeker.landingcountlocation.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerLandingcountlocation is an object representing the database table. +type FieldseekerLandingcountlocation struct{} + +// FieldseekerLandingcountlocationSlice is an alias for a slice of pointers to FieldseekerLandingcountlocation. +// This should almost always be used instead of []*FieldseekerLandingcountlocation. +type FieldseekerLandingcountlocationSlice []*FieldseekerLandingcountlocation + +// FieldseekerLandingcountlocations contains methods to work with the landingcountlocation view +var FieldseekerLandingcountlocations = psql.NewViewx[*FieldseekerLandingcountlocation, FieldseekerLandingcountlocationSlice]("fieldseeker", "landingcountlocation", buildFieldseekerLandingcountlocationColumns("fieldseeker.landingcountlocation")) + +// FieldseekerLandingcountlocationsQuery is a query on the landingcountlocation view +type FieldseekerLandingcountlocationsQuery = *psql.ViewQuery[*FieldseekerLandingcountlocation, FieldseekerLandingcountlocationSlice] + +func buildFieldseekerLandingcountlocationColumns(alias string) fieldseekerLandingcountlocationColumns { + return fieldseekerLandingcountlocationColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.landingcountlocation"), + tableAlias: alias, + } +} + +type fieldseekerLandingcountlocationColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerLandingcountlocationColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerLandingcountlocationColumns) AliasedAs(alias string) fieldseekerLandingcountlocationColumns { + return buildFieldseekerLandingcountlocationColumns(alias) +} + +// AfterQueryHook is called after FieldseekerLandingcountlocation is retrieved from the database +func (o *FieldseekerLandingcountlocation) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerLandingcountlocations.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerLandingcountlocationSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerLandingcountlocationSlice is retrieved from the database +func (o FieldseekerLandingcountlocationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerLandingcountlocations.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerLandingcountlocationWhere[Q psql.Filterable] struct{} + +func (fieldseekerLandingcountlocationWhere[Q]) AliasedAs(alias string) fieldseekerLandingcountlocationWhere[Q] { + return buildFieldseekerLandingcountlocationWhere[Q](buildFieldseekerLandingcountlocationColumns(alias)) +} + +func buildFieldseekerLandingcountlocationWhere[Q psql.Filterable](cols fieldseekerLandingcountlocationColumns) fieldseekerLandingcountlocationWhere[Q] { + return fieldseekerLandingcountlocationWhere[Q]{} +} diff --git a/db/models/fieldseeker.linelocation.bob.go b/db/models/fieldseeker.linelocation.bob.go new file mode 100644 index 00000000..55dd21a2 --- /dev/null +++ b/db/models/fieldseeker.linelocation.bob.go @@ -0,0 +1,1564 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerLinelocation is an object representing the database table. +type FieldseekerLinelocation struct { + Objectid int64 `db:"objectid,pk" ` + // Name + Name null.Val[string] `db:"name" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // Habitat + Habitat null.Val[enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418] `db:"habitat" ` + // Priority + Priority null.Val[enums.FieldseekerLinelocationLocationpriorityEnum] `db:"priority" ` + // Use Type + Usetype null.Val[enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80] `db:"usetype" ` + // Active + Active null.Val[enums.FieldseekerLinelocationNotinuitFEnum] `db:"active" ` + // Description + Description null.Val[string] `db:"description" ` + // Access Description + Accessdesc null.Val[string] `db:"accessdesc" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // Symbology + Symbology null.Val[enums.FieldseekerLinelocationLocationsymbologyEnum] `db:"symbology" ` + // External ID + Externalid null.Val[string] `db:"externalid" ` + // Acres + Acres null.Val[float64] `db:"acres" ` + // Next Scheduled Action + Nextactiondatescheduled null.Val[time.Time] `db:"nextactiondatescheduled" ` + // Larval Inspection Interval + Larvinspectinterval null.Val[int16] `db:"larvinspectinterval" ` + // Length + LengthFT null.Val[float64] `db:"length_ft" ` + // Width + WidthFT null.Val[float64] `db:"width_ft" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + Locationnumber null.Val[int32] `db:"locationnumber" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + // Last Inspection Date + Lastinspectdate null.Val[time.Time] `db:"lastinspectdate" ` + // Last Inspection Breeding + Lastinspectbreeding null.Val[string] `db:"lastinspectbreeding" ` + // Last Inspection Average Larvae + Lastinspectavglarvae null.Val[float64] `db:"lastinspectavglarvae" ` + // Last Inspection Average Pupae + Lastinspectavgpupae null.Val[float64] `db:"lastinspectavgpupae" ` + // Last Inspection Larval Stages + Lastinspectlstages null.Val[string] `db:"lastinspectlstages" ` + // Last Inspection Action + Lastinspectactiontaken null.Val[string] `db:"lastinspectactiontaken" ` + // Last Inspection Field Species + Lastinspectfieldspecies null.Val[string] `db:"lastinspectfieldspecies" ` + // Last Treatment Date + Lasttreatdate null.Val[time.Time] `db:"lasttreatdate" ` + // Last Treatment Product + Lasttreatproduct null.Val[string] `db:"lasttreatproduct" ` + // Last Treatment Quantity + Lasttreatqty null.Val[float64] `db:"lasttreatqty" ` + // Last Treatment Quantity Unit + Lasttreatqtyunit null.Val[string] `db:"lasttreatqtyunit" ` + // Hectares + Hectares null.Val[float64] `db:"hectares" ` + // Last Inspection Activity + Lastinspectactivity null.Val[string] `db:"lastinspectactivity" ` + // Last Treatment Activity + Lasttreatactivity null.Val[string] `db:"lasttreatactivity" ` + // Length Meters + LengthMeters null.Val[float64] `db:"length_meters" ` + // Width Meters + WidthMeters null.Val[float64] `db:"width_meters" ` + // Last Inspection Conditions + Lastinspectconditions null.Val[string] `db:"lastinspectconditions" ` + // Water Origin + Waterorigin null.Val[enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16] `db:"waterorigin" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + // Jurisdiction + Jurisdiction null.Val[string] `db:"jurisdiction" ` + ShapeLength null.Val[float64] `db:"shape__length" ` +} + +// FieldseekerLinelocationSlice is an alias for a slice of pointers to FieldseekerLinelocation. +// This should almost always be used instead of []*FieldseekerLinelocation. +type FieldseekerLinelocationSlice []*FieldseekerLinelocation + +// FieldseekerLinelocations contains methods to work with the linelocation table +var FieldseekerLinelocations = psql.NewTablex[*FieldseekerLinelocation, FieldseekerLinelocationSlice, *FieldseekerLinelocationSetter]("fieldseeker", "linelocation", buildFieldseekerLinelocationColumns("fieldseeker.linelocation")) + +// FieldseekerLinelocationsQuery is a query on the linelocation table +type FieldseekerLinelocationsQuery = *psql.ViewQuery[*FieldseekerLinelocation, FieldseekerLinelocationSlice] + +func buildFieldseekerLinelocationColumns(alias string) fieldseekerLinelocationColumns { + return fieldseekerLinelocationColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "name", "zone", "habitat", "priority", "usetype", "active", "description", "accessdesc", "comments", "symbology", "externalid", "acres", "nextactiondatescheduled", "larvinspectinterval", "length_ft", "width_ft", "zone2", "locationnumber", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "lastinspectdate", "lastinspectbreeding", "lastinspectavglarvae", "lastinspectavgpupae", "lastinspectlstages", "lastinspectactiontaken", "lastinspectfieldspecies", "lasttreatdate", "lasttreatproduct", "lasttreatqty", "lasttreatqtyunit", "hectares", "lastinspectactivity", "lasttreatactivity", "length_meters", "width_meters", "lastinspectconditions", "waterorigin", "creationdate", "creator", "editdate", "editor", "jurisdiction", "shape__length", + ).WithParent("fieldseeker.linelocation"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Name: psql.Quote(alias, "name"), + Zone: psql.Quote(alias, "zone"), + Habitat: psql.Quote(alias, "habitat"), + Priority: psql.Quote(alias, "priority"), + Usetype: psql.Quote(alias, "usetype"), + Active: psql.Quote(alias, "active"), + Description: psql.Quote(alias, "description"), + Accessdesc: psql.Quote(alias, "accessdesc"), + Comments: psql.Quote(alias, "comments"), + Symbology: psql.Quote(alias, "symbology"), + Externalid: psql.Quote(alias, "externalid"), + Acres: psql.Quote(alias, "acres"), + Nextactiondatescheduled: psql.Quote(alias, "nextactiondatescheduled"), + Larvinspectinterval: psql.Quote(alias, "larvinspectinterval"), + LengthFT: psql.Quote(alias, "length_ft"), + WidthFT: psql.Quote(alias, "width_ft"), + Zone2: psql.Quote(alias, "zone2"), + Locationnumber: psql.Quote(alias, "locationnumber"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Lastinspectdate: psql.Quote(alias, "lastinspectdate"), + Lastinspectbreeding: psql.Quote(alias, "lastinspectbreeding"), + Lastinspectavglarvae: psql.Quote(alias, "lastinspectavglarvae"), + Lastinspectavgpupae: psql.Quote(alias, "lastinspectavgpupae"), + Lastinspectlstages: psql.Quote(alias, "lastinspectlstages"), + Lastinspectactiontaken: psql.Quote(alias, "lastinspectactiontaken"), + Lastinspectfieldspecies: psql.Quote(alias, "lastinspectfieldspecies"), + Lasttreatdate: psql.Quote(alias, "lasttreatdate"), + Lasttreatproduct: psql.Quote(alias, "lasttreatproduct"), + Lasttreatqty: psql.Quote(alias, "lasttreatqty"), + Lasttreatqtyunit: psql.Quote(alias, "lasttreatqtyunit"), + Hectares: psql.Quote(alias, "hectares"), + Lastinspectactivity: psql.Quote(alias, "lastinspectactivity"), + Lasttreatactivity: psql.Quote(alias, "lasttreatactivity"), + LengthMeters: psql.Quote(alias, "length_meters"), + WidthMeters: psql.Quote(alias, "width_meters"), + Lastinspectconditions: psql.Quote(alias, "lastinspectconditions"), + Waterorigin: psql.Quote(alias, "waterorigin"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Jurisdiction: psql.Quote(alias, "jurisdiction"), + ShapeLength: psql.Quote(alias, "shape__length"), + } +} + +type fieldseekerLinelocationColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Name psql.Expression + Zone psql.Expression + Habitat psql.Expression + Priority psql.Expression + Usetype psql.Expression + Active psql.Expression + Description psql.Expression + Accessdesc psql.Expression + Comments psql.Expression + Symbology psql.Expression + Externalid psql.Expression + Acres psql.Expression + Nextactiondatescheduled psql.Expression + Larvinspectinterval psql.Expression + LengthFT psql.Expression + WidthFT psql.Expression + Zone2 psql.Expression + Locationnumber psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Lastinspectdate psql.Expression + Lastinspectbreeding psql.Expression + Lastinspectavglarvae psql.Expression + Lastinspectavgpupae psql.Expression + Lastinspectlstages psql.Expression + Lastinspectactiontaken psql.Expression + Lastinspectfieldspecies psql.Expression + Lasttreatdate psql.Expression + Lasttreatproduct psql.Expression + Lasttreatqty psql.Expression + Lasttreatqtyunit psql.Expression + Hectares psql.Expression + Lastinspectactivity psql.Expression + Lasttreatactivity psql.Expression + LengthMeters psql.Expression + WidthMeters psql.Expression + Lastinspectconditions psql.Expression + Waterorigin psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Jurisdiction psql.Expression + ShapeLength psql.Expression +} + +func (c fieldseekerLinelocationColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerLinelocationColumns) AliasedAs(alias string) fieldseekerLinelocationColumns { + return buildFieldseekerLinelocationColumns(alias) +} + +// FieldseekerLinelocationSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerLinelocationSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Name omitnull.Val[string] `db:"name" ` + Zone omitnull.Val[string] `db:"zone" ` + Habitat omitnull.Val[enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418] `db:"habitat" ` + Priority omitnull.Val[enums.FieldseekerLinelocationLocationpriorityEnum] `db:"priority" ` + Usetype omitnull.Val[enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80] `db:"usetype" ` + Active omitnull.Val[enums.FieldseekerLinelocationNotinuitFEnum] `db:"active" ` + Description omitnull.Val[string] `db:"description" ` + Accessdesc omitnull.Val[string] `db:"accessdesc" ` + Comments omitnull.Val[string] `db:"comments" ` + Symbology omitnull.Val[enums.FieldseekerLinelocationLocationsymbologyEnum] `db:"symbology" ` + Externalid omitnull.Val[string] `db:"externalid" ` + Acres omitnull.Val[float64] `db:"acres" ` + Nextactiondatescheduled omitnull.Val[time.Time] `db:"nextactiondatescheduled" ` + Larvinspectinterval omitnull.Val[int16] `db:"larvinspectinterval" ` + LengthFT omitnull.Val[float64] `db:"length_ft" ` + WidthFT omitnull.Val[float64] `db:"width_ft" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Locationnumber omitnull.Val[int32] `db:"locationnumber" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Lastinspectdate omitnull.Val[time.Time] `db:"lastinspectdate" ` + Lastinspectbreeding omitnull.Val[string] `db:"lastinspectbreeding" ` + Lastinspectavglarvae omitnull.Val[float64] `db:"lastinspectavglarvae" ` + Lastinspectavgpupae omitnull.Val[float64] `db:"lastinspectavgpupae" ` + Lastinspectlstages omitnull.Val[string] `db:"lastinspectlstages" ` + Lastinspectactiontaken omitnull.Val[string] `db:"lastinspectactiontaken" ` + Lastinspectfieldspecies omitnull.Val[string] `db:"lastinspectfieldspecies" ` + Lasttreatdate omitnull.Val[time.Time] `db:"lasttreatdate" ` + Lasttreatproduct omitnull.Val[string] `db:"lasttreatproduct" ` + Lasttreatqty omitnull.Val[float64] `db:"lasttreatqty" ` + Lasttreatqtyunit omitnull.Val[string] `db:"lasttreatqtyunit" ` + Hectares omitnull.Val[float64] `db:"hectares" ` + Lastinspectactivity omitnull.Val[string] `db:"lastinspectactivity" ` + Lasttreatactivity omitnull.Val[string] `db:"lasttreatactivity" ` + LengthMeters omitnull.Val[float64] `db:"length_meters" ` + WidthMeters omitnull.Val[float64] `db:"width_meters" ` + Lastinspectconditions omitnull.Val[string] `db:"lastinspectconditions" ` + Waterorigin omitnull.Val[enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16] `db:"waterorigin" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Jurisdiction omitnull.Val[string] `db:"jurisdiction" ` + ShapeLength omitnull.Val[float64] `db:"shape__length" ` +} + +func (s FieldseekerLinelocationSetter) SetColumns() []string { + vals := make([]string, 0, 48) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Name.IsUnset() { + vals = append(vals, "name") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Habitat.IsUnset() { + vals = append(vals, "habitat") + } + if !s.Priority.IsUnset() { + vals = append(vals, "priority") + } + if !s.Usetype.IsUnset() { + vals = append(vals, "usetype") + } + if !s.Active.IsUnset() { + vals = append(vals, "active") + } + if !s.Description.IsUnset() { + vals = append(vals, "description") + } + if !s.Accessdesc.IsUnset() { + vals = append(vals, "accessdesc") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Symbology.IsUnset() { + vals = append(vals, "symbology") + } + if !s.Externalid.IsUnset() { + vals = append(vals, "externalid") + } + if !s.Acres.IsUnset() { + vals = append(vals, "acres") + } + if !s.Nextactiondatescheduled.IsUnset() { + vals = append(vals, "nextactiondatescheduled") + } + if !s.Larvinspectinterval.IsUnset() { + vals = append(vals, "larvinspectinterval") + } + if !s.LengthFT.IsUnset() { + vals = append(vals, "length_ft") + } + if !s.WidthFT.IsUnset() { + vals = append(vals, "width_ft") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Locationnumber.IsUnset() { + vals = append(vals, "locationnumber") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Lastinspectdate.IsUnset() { + vals = append(vals, "lastinspectdate") + } + if !s.Lastinspectbreeding.IsUnset() { + vals = append(vals, "lastinspectbreeding") + } + if !s.Lastinspectavglarvae.IsUnset() { + vals = append(vals, "lastinspectavglarvae") + } + if !s.Lastinspectavgpupae.IsUnset() { + vals = append(vals, "lastinspectavgpupae") + } + if !s.Lastinspectlstages.IsUnset() { + vals = append(vals, "lastinspectlstages") + } + if !s.Lastinspectactiontaken.IsUnset() { + vals = append(vals, "lastinspectactiontaken") + } + if !s.Lastinspectfieldspecies.IsUnset() { + vals = append(vals, "lastinspectfieldspecies") + } + if !s.Lasttreatdate.IsUnset() { + vals = append(vals, "lasttreatdate") + } + if !s.Lasttreatproduct.IsUnset() { + vals = append(vals, "lasttreatproduct") + } + if !s.Lasttreatqty.IsUnset() { + vals = append(vals, "lasttreatqty") + } + if !s.Lasttreatqtyunit.IsUnset() { + vals = append(vals, "lasttreatqtyunit") + } + if !s.Hectares.IsUnset() { + vals = append(vals, "hectares") + } + if !s.Lastinspectactivity.IsUnset() { + vals = append(vals, "lastinspectactivity") + } + if !s.Lasttreatactivity.IsUnset() { + vals = append(vals, "lasttreatactivity") + } + if !s.LengthMeters.IsUnset() { + vals = append(vals, "length_meters") + } + if !s.WidthMeters.IsUnset() { + vals = append(vals, "width_meters") + } + if !s.Lastinspectconditions.IsUnset() { + vals = append(vals, "lastinspectconditions") + } + if !s.Waterorigin.IsUnset() { + vals = append(vals, "waterorigin") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Jurisdiction.IsUnset() { + vals = append(vals, "jurisdiction") + } + if !s.ShapeLength.IsUnset() { + vals = append(vals, "shape__length") + } + return vals +} + +func (s FieldseekerLinelocationSetter) Overwrite(t *FieldseekerLinelocation) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Name.IsUnset() { + t.Name = s.Name.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Habitat.IsUnset() { + t.Habitat = s.Habitat.MustGetNull() + } + if !s.Priority.IsUnset() { + t.Priority = s.Priority.MustGetNull() + } + if !s.Usetype.IsUnset() { + t.Usetype = s.Usetype.MustGetNull() + } + if !s.Active.IsUnset() { + t.Active = s.Active.MustGetNull() + } + if !s.Description.IsUnset() { + t.Description = s.Description.MustGetNull() + } + if !s.Accessdesc.IsUnset() { + t.Accessdesc = s.Accessdesc.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Symbology.IsUnset() { + t.Symbology = s.Symbology.MustGetNull() + } + if !s.Externalid.IsUnset() { + t.Externalid = s.Externalid.MustGetNull() + } + if !s.Acres.IsUnset() { + t.Acres = s.Acres.MustGetNull() + } + if !s.Nextactiondatescheduled.IsUnset() { + t.Nextactiondatescheduled = s.Nextactiondatescheduled.MustGetNull() + } + if !s.Larvinspectinterval.IsUnset() { + t.Larvinspectinterval = s.Larvinspectinterval.MustGetNull() + } + if !s.LengthFT.IsUnset() { + t.LengthFT = s.LengthFT.MustGetNull() + } + if !s.WidthFT.IsUnset() { + t.WidthFT = s.WidthFT.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Locationnumber.IsUnset() { + t.Locationnumber = s.Locationnumber.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Lastinspectdate.IsUnset() { + t.Lastinspectdate = s.Lastinspectdate.MustGetNull() + } + if !s.Lastinspectbreeding.IsUnset() { + t.Lastinspectbreeding = s.Lastinspectbreeding.MustGetNull() + } + if !s.Lastinspectavglarvae.IsUnset() { + t.Lastinspectavglarvae = s.Lastinspectavglarvae.MustGetNull() + } + if !s.Lastinspectavgpupae.IsUnset() { + t.Lastinspectavgpupae = s.Lastinspectavgpupae.MustGetNull() + } + if !s.Lastinspectlstages.IsUnset() { + t.Lastinspectlstages = s.Lastinspectlstages.MustGetNull() + } + if !s.Lastinspectactiontaken.IsUnset() { + t.Lastinspectactiontaken = s.Lastinspectactiontaken.MustGetNull() + } + if !s.Lastinspectfieldspecies.IsUnset() { + t.Lastinspectfieldspecies = s.Lastinspectfieldspecies.MustGetNull() + } + if !s.Lasttreatdate.IsUnset() { + t.Lasttreatdate = s.Lasttreatdate.MustGetNull() + } + if !s.Lasttreatproduct.IsUnset() { + t.Lasttreatproduct = s.Lasttreatproduct.MustGetNull() + } + if !s.Lasttreatqty.IsUnset() { + t.Lasttreatqty = s.Lasttreatqty.MustGetNull() + } + if !s.Lasttreatqtyunit.IsUnset() { + t.Lasttreatqtyunit = s.Lasttreatqtyunit.MustGetNull() + } + if !s.Hectares.IsUnset() { + t.Hectares = s.Hectares.MustGetNull() + } + if !s.Lastinspectactivity.IsUnset() { + t.Lastinspectactivity = s.Lastinspectactivity.MustGetNull() + } + if !s.Lasttreatactivity.IsUnset() { + t.Lasttreatactivity = s.Lasttreatactivity.MustGetNull() + } + if !s.LengthMeters.IsUnset() { + t.LengthMeters = s.LengthMeters.MustGetNull() + } + if !s.WidthMeters.IsUnset() { + t.WidthMeters = s.WidthMeters.MustGetNull() + } + if !s.Lastinspectconditions.IsUnset() { + t.Lastinspectconditions = s.Lastinspectconditions.MustGetNull() + } + if !s.Waterorigin.IsUnset() { + t.Waterorigin = s.Waterorigin.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Jurisdiction.IsUnset() { + t.Jurisdiction = s.Jurisdiction.MustGetNull() + } + if !s.ShapeLength.IsUnset() { + t.ShapeLength = s.ShapeLength.MustGetNull() + } +} + +func (s *FieldseekerLinelocationSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerLinelocations.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 48) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Name.IsUnset() { + vals[1] = psql.Arg(s.Name.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[2] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Habitat.IsUnset() { + vals[3] = psql.Arg(s.Habitat.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Priority.IsUnset() { + vals[4] = psql.Arg(s.Priority.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Usetype.IsUnset() { + vals[5] = psql.Arg(s.Usetype.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Active.IsUnset() { + vals[6] = psql.Arg(s.Active.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Description.IsUnset() { + vals[7] = psql.Arg(s.Description.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Accessdesc.IsUnset() { + vals[8] = psql.Arg(s.Accessdesc.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[9] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Symbology.IsUnset() { + vals[10] = psql.Arg(s.Symbology.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Externalid.IsUnset() { + vals[11] = psql.Arg(s.Externalid.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Acres.IsUnset() { + vals[12] = psql.Arg(s.Acres.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Nextactiondatescheduled.IsUnset() { + vals[13] = psql.Arg(s.Nextactiondatescheduled.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Larvinspectinterval.IsUnset() { + vals[14] = psql.Arg(s.Larvinspectinterval.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.LengthFT.IsUnset() { + vals[15] = psql.Arg(s.LengthFT.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.WidthFT.IsUnset() { + vals[16] = psql.Arg(s.WidthFT.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[17] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Locationnumber.IsUnset() { + vals[18] = psql.Arg(s.Locationnumber.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[19] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[20] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[21] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[22] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[23] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectdate.IsUnset() { + vals[24] = psql.Arg(s.Lastinspectdate.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectbreeding.IsUnset() { + vals[25] = psql.Arg(s.Lastinspectbreeding.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectavglarvae.IsUnset() { + vals[26] = psql.Arg(s.Lastinspectavglarvae.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectavgpupae.IsUnset() { + vals[27] = psql.Arg(s.Lastinspectavgpupae.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectlstages.IsUnset() { + vals[28] = psql.Arg(s.Lastinspectlstages.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectactiontaken.IsUnset() { + vals[29] = psql.Arg(s.Lastinspectactiontaken.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectfieldspecies.IsUnset() { + vals[30] = psql.Arg(s.Lastinspectfieldspecies.MustGetNull()) + } else { + vals[30] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatdate.IsUnset() { + vals[31] = psql.Arg(s.Lasttreatdate.MustGetNull()) + } else { + vals[31] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatproduct.IsUnset() { + vals[32] = psql.Arg(s.Lasttreatproduct.MustGetNull()) + } else { + vals[32] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatqty.IsUnset() { + vals[33] = psql.Arg(s.Lasttreatqty.MustGetNull()) + } else { + vals[33] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatqtyunit.IsUnset() { + vals[34] = psql.Arg(s.Lasttreatqtyunit.MustGetNull()) + } else { + vals[34] = psql.Raw("DEFAULT") + } + + if !s.Hectares.IsUnset() { + vals[35] = psql.Arg(s.Hectares.MustGetNull()) + } else { + vals[35] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectactivity.IsUnset() { + vals[36] = psql.Arg(s.Lastinspectactivity.MustGetNull()) + } else { + vals[36] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatactivity.IsUnset() { + vals[37] = psql.Arg(s.Lasttreatactivity.MustGetNull()) + } else { + vals[37] = psql.Raw("DEFAULT") + } + + if !s.LengthMeters.IsUnset() { + vals[38] = psql.Arg(s.LengthMeters.MustGetNull()) + } else { + vals[38] = psql.Raw("DEFAULT") + } + + if !s.WidthMeters.IsUnset() { + vals[39] = psql.Arg(s.WidthMeters.MustGetNull()) + } else { + vals[39] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectconditions.IsUnset() { + vals[40] = psql.Arg(s.Lastinspectconditions.MustGetNull()) + } else { + vals[40] = psql.Raw("DEFAULT") + } + + if !s.Waterorigin.IsUnset() { + vals[41] = psql.Arg(s.Waterorigin.MustGetNull()) + } else { + vals[41] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[42] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[42] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[43] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[43] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[44] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[44] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[45] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[45] = psql.Raw("DEFAULT") + } + + if !s.Jurisdiction.IsUnset() { + vals[46] = psql.Arg(s.Jurisdiction.MustGetNull()) + } else { + vals[46] = psql.Raw("DEFAULT") + } + + if !s.ShapeLength.IsUnset() { + vals[47] = psql.Arg(s.ShapeLength.MustGetNull()) + } else { + vals[47] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerLinelocationSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerLinelocationSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 48) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Name.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "name")...), + psql.Arg(s.Name), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Habitat.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habitat")...), + psql.Arg(s.Habitat), + }}) + } + + if !s.Priority.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "priority")...), + psql.Arg(s.Priority), + }}) + } + + if !s.Usetype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "usetype")...), + psql.Arg(s.Usetype), + }}) + } + + if !s.Active.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "active")...), + psql.Arg(s.Active), + }}) + } + + if !s.Description.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "description")...), + psql.Arg(s.Description), + }}) + } + + if !s.Accessdesc.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "accessdesc")...), + psql.Arg(s.Accessdesc), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Symbology.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "symbology")...), + psql.Arg(s.Symbology), + }}) + } + + if !s.Externalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "externalid")...), + psql.Arg(s.Externalid), + }}) + } + + if !s.Acres.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "acres")...), + psql.Arg(s.Acres), + }}) + } + + if !s.Nextactiondatescheduled.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "nextactiondatescheduled")...), + psql.Arg(s.Nextactiondatescheduled), + }}) + } + + if !s.Larvinspectinterval.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "larvinspectinterval")...), + psql.Arg(s.Larvinspectinterval), + }}) + } + + if !s.LengthFT.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "length_ft")...), + psql.Arg(s.LengthFT), + }}) + } + + if !s.WidthFT.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "width_ft")...), + psql.Arg(s.WidthFT), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Locationnumber.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationnumber")...), + psql.Arg(s.Locationnumber), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Lastinspectdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectdate")...), + psql.Arg(s.Lastinspectdate), + }}) + } + + if !s.Lastinspectbreeding.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectbreeding")...), + psql.Arg(s.Lastinspectbreeding), + }}) + } + + if !s.Lastinspectavglarvae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectavglarvae")...), + psql.Arg(s.Lastinspectavglarvae), + }}) + } + + if !s.Lastinspectavgpupae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectavgpupae")...), + psql.Arg(s.Lastinspectavgpupae), + }}) + } + + if !s.Lastinspectlstages.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectlstages")...), + psql.Arg(s.Lastinspectlstages), + }}) + } + + if !s.Lastinspectactiontaken.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectactiontaken")...), + psql.Arg(s.Lastinspectactiontaken), + }}) + } + + if !s.Lastinspectfieldspecies.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectfieldspecies")...), + psql.Arg(s.Lastinspectfieldspecies), + }}) + } + + if !s.Lasttreatdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatdate")...), + psql.Arg(s.Lasttreatdate), + }}) + } + + if !s.Lasttreatproduct.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatproduct")...), + psql.Arg(s.Lasttreatproduct), + }}) + } + + if !s.Lasttreatqty.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatqty")...), + psql.Arg(s.Lasttreatqty), + }}) + } + + if !s.Lasttreatqtyunit.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatqtyunit")...), + psql.Arg(s.Lasttreatqtyunit), + }}) + } + + if !s.Hectares.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "hectares")...), + psql.Arg(s.Hectares), + }}) + } + + if !s.Lastinspectactivity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectactivity")...), + psql.Arg(s.Lastinspectactivity), + }}) + } + + if !s.Lasttreatactivity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatactivity")...), + psql.Arg(s.Lasttreatactivity), + }}) + } + + if !s.LengthMeters.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "length_meters")...), + psql.Arg(s.LengthMeters), + }}) + } + + if !s.WidthMeters.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "width_meters")...), + psql.Arg(s.WidthMeters), + }}) + } + + if !s.Lastinspectconditions.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectconditions")...), + psql.Arg(s.Lastinspectconditions), + }}) + } + + if !s.Waterorigin.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "waterorigin")...), + psql.Arg(s.Waterorigin), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Jurisdiction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "jurisdiction")...), + psql.Arg(s.Jurisdiction), + }}) + } + + if !s.ShapeLength.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "shape__length")...), + psql.Arg(s.ShapeLength), + }}) + } + + return exprs +} + +// FindFieldseekerLinelocation retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerLinelocation(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerLinelocation, error) { + if len(cols) == 0 { + return FieldseekerLinelocations.Query( + sm.Where(FieldseekerLinelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerLinelocations.Query( + sm.Where(FieldseekerLinelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerLinelocations.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerLinelocationExists checks the presence of a single record by primary key +func FieldseekerLinelocationExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerLinelocations.Query( + sm.Where(FieldseekerLinelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerLinelocation is retrieved from the database +func (o *FieldseekerLinelocation) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerLinelocations.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerLinelocationSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerLinelocations.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerLinelocationSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerLinelocations.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerLinelocationSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerLinelocations.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerLinelocationSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerLinelocation +func (o *FieldseekerLinelocation) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerLinelocation) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.linelocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerLinelocation +func (o *FieldseekerLinelocation) Update(ctx context.Context, exec bob.Executor, s *FieldseekerLinelocationSetter) error { + v, err := FieldseekerLinelocations.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerLinelocation record with an executor +func (o *FieldseekerLinelocation) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerLinelocations.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerLinelocation using the executor +func (o *FieldseekerLinelocation) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerLinelocations.Query( + sm.Where(FieldseekerLinelocations.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerLinelocationSlice is retrieved from the database +func (o FieldseekerLinelocationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerLinelocations.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerLinelocations.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerLinelocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerLinelocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerLinelocationSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.linelocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerLinelocationSlice) copyMatchingRows(from ...*FieldseekerLinelocation) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerLinelocationSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerLinelocations.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerLinelocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerLinelocation: + o.copyMatchingRows(retrieved...) + case FieldseekerLinelocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerLinelocation or a slice of FieldseekerLinelocation + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerLinelocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerLinelocationSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerLinelocations.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerLinelocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerLinelocation: + o.copyMatchingRows(retrieved...) + case FieldseekerLinelocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerLinelocation or a slice of FieldseekerLinelocation + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerLinelocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerLinelocationSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerLinelocationSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerLinelocations.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerLinelocationSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerLinelocations.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerLinelocationSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerLinelocations.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerLinelocationWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Name psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Habitat psql.WhereNullMod[Q, enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418] + Priority psql.WhereNullMod[Q, enums.FieldseekerLinelocationLocationpriorityEnum] + Usetype psql.WhereNullMod[Q, enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80] + Active psql.WhereNullMod[Q, enums.FieldseekerLinelocationNotinuitFEnum] + Description psql.WhereNullMod[Q, string] + Accessdesc psql.WhereNullMod[Q, string] + Comments psql.WhereNullMod[Q, string] + Symbology psql.WhereNullMod[Q, enums.FieldseekerLinelocationLocationsymbologyEnum] + Externalid psql.WhereNullMod[Q, string] + Acres psql.WhereNullMod[Q, float64] + Nextactiondatescheduled psql.WhereNullMod[Q, time.Time] + Larvinspectinterval psql.WhereNullMod[Q, int16] + LengthFT psql.WhereNullMod[Q, float64] + WidthFT psql.WhereNullMod[Q, float64] + Zone2 psql.WhereNullMod[Q, string] + Locationnumber psql.WhereNullMod[Q, int32] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Lastinspectdate psql.WhereNullMod[Q, time.Time] + Lastinspectbreeding psql.WhereNullMod[Q, string] + Lastinspectavglarvae psql.WhereNullMod[Q, float64] + Lastinspectavgpupae psql.WhereNullMod[Q, float64] + Lastinspectlstages psql.WhereNullMod[Q, string] + Lastinspectactiontaken psql.WhereNullMod[Q, string] + Lastinspectfieldspecies psql.WhereNullMod[Q, string] + Lasttreatdate psql.WhereNullMod[Q, time.Time] + Lasttreatproduct psql.WhereNullMod[Q, string] + Lasttreatqty psql.WhereNullMod[Q, float64] + Lasttreatqtyunit psql.WhereNullMod[Q, string] + Hectares psql.WhereNullMod[Q, float64] + Lastinspectactivity psql.WhereNullMod[Q, string] + Lasttreatactivity psql.WhereNullMod[Q, string] + LengthMeters psql.WhereNullMod[Q, float64] + WidthMeters psql.WhereNullMod[Q, float64] + Lastinspectconditions psql.WhereNullMod[Q, string] + Waterorigin psql.WhereNullMod[Q, enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Jurisdiction psql.WhereNullMod[Q, string] + ShapeLength psql.WhereNullMod[Q, float64] +} + +func (fieldseekerLinelocationWhere[Q]) AliasedAs(alias string) fieldseekerLinelocationWhere[Q] { + return buildFieldseekerLinelocationWhere[Q](buildFieldseekerLinelocationColumns(alias)) +} + +func buildFieldseekerLinelocationWhere[Q psql.Filterable](cols fieldseekerLinelocationColumns) fieldseekerLinelocationWhere[Q] { + return fieldseekerLinelocationWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Name: psql.WhereNull[Q, string](cols.Name), + Zone: psql.WhereNull[Q, string](cols.Zone), + Habitat: psql.WhereNull[Q, enums.FieldseekerLinelocationLinelocationHabitatFc51bdc4f1954df58206d69ce1418](cols.Habitat), + Priority: psql.WhereNull[Q, enums.FieldseekerLinelocationLocationpriorityEnum](cols.Priority), + Usetype: psql.WhereNull[Q, enums.FieldseekerLinelocationLinelocationUsetype2aeca2e60d2f455c86fc34895dc80](cols.Usetype), + Active: psql.WhereNull[Q, enums.FieldseekerLinelocationNotinuitFEnum](cols.Active), + Description: psql.WhereNull[Q, string](cols.Description), + Accessdesc: psql.WhereNull[Q, string](cols.Accessdesc), + Comments: psql.WhereNull[Q, string](cols.Comments), + Symbology: psql.WhereNull[Q, enums.FieldseekerLinelocationLocationsymbologyEnum](cols.Symbology), + Externalid: psql.WhereNull[Q, string](cols.Externalid), + Acres: psql.WhereNull[Q, float64](cols.Acres), + Nextactiondatescheduled: psql.WhereNull[Q, time.Time](cols.Nextactiondatescheduled), + Larvinspectinterval: psql.WhereNull[Q, int16](cols.Larvinspectinterval), + LengthFT: psql.WhereNull[Q, float64](cols.LengthFT), + WidthFT: psql.WhereNull[Q, float64](cols.WidthFT), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Locationnumber: psql.WhereNull[Q, int32](cols.Locationnumber), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Lastinspectdate: psql.WhereNull[Q, time.Time](cols.Lastinspectdate), + Lastinspectbreeding: psql.WhereNull[Q, string](cols.Lastinspectbreeding), + Lastinspectavglarvae: psql.WhereNull[Q, float64](cols.Lastinspectavglarvae), + Lastinspectavgpupae: psql.WhereNull[Q, float64](cols.Lastinspectavgpupae), + Lastinspectlstages: psql.WhereNull[Q, string](cols.Lastinspectlstages), + Lastinspectactiontaken: psql.WhereNull[Q, string](cols.Lastinspectactiontaken), + Lastinspectfieldspecies: psql.WhereNull[Q, string](cols.Lastinspectfieldspecies), + Lasttreatdate: psql.WhereNull[Q, time.Time](cols.Lasttreatdate), + Lasttreatproduct: psql.WhereNull[Q, string](cols.Lasttreatproduct), + Lasttreatqty: psql.WhereNull[Q, float64](cols.Lasttreatqty), + Lasttreatqtyunit: psql.WhereNull[Q, string](cols.Lasttreatqtyunit), + Hectares: psql.WhereNull[Q, float64](cols.Hectares), + Lastinspectactivity: psql.WhereNull[Q, string](cols.Lastinspectactivity), + Lasttreatactivity: psql.WhereNull[Q, string](cols.Lasttreatactivity), + LengthMeters: psql.WhereNull[Q, float64](cols.LengthMeters), + WidthMeters: psql.WhereNull[Q, float64](cols.WidthMeters), + Lastinspectconditions: psql.WhereNull[Q, string](cols.Lastinspectconditions), + Waterorigin: psql.WhereNull[Q, enums.FieldseekerLinelocationLinelocationWaterorigin84723D92306a46F48ef16](cols.Waterorigin), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Jurisdiction: psql.WhereNull[Q, string](cols.Jurisdiction), + ShapeLength: psql.WhereNull[Q, float64](cols.ShapeLength), + } +} diff --git a/db/models/fieldseeker.locationtracking.bob.go b/db/models/fieldseeker.locationtracking.bob.go new file mode 100644 index 00000000..47b17975 --- /dev/null +++ b/db/models/fieldseeker.locationtracking.bob.go @@ -0,0 +1,629 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerLocationtracking is an object representing the database table. +type FieldseekerLocationtracking struct { + Objectid int64 `db:"objectid,pk" ` + // Accuracy(m) + Accuracy null.Val[float64] `db:"accuracy" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + // Field Tech + Fieldtech null.Val[string] `db:"fieldtech" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` +} + +// FieldseekerLocationtrackingSlice is an alias for a slice of pointers to FieldseekerLocationtracking. +// This should almost always be used instead of []*FieldseekerLocationtracking. +type FieldseekerLocationtrackingSlice []*FieldseekerLocationtracking + +// FieldseekerLocationtrackings contains methods to work with the locationtracking table +var FieldseekerLocationtrackings = psql.NewTablex[*FieldseekerLocationtracking, FieldseekerLocationtrackingSlice, *FieldseekerLocationtrackingSetter]("fieldseeker", "locationtracking", buildFieldseekerLocationtrackingColumns("fieldseeker.locationtracking")) + +// FieldseekerLocationtrackingsQuery is a query on the locationtracking table +type FieldseekerLocationtrackingsQuery = *psql.ViewQuery[*FieldseekerLocationtracking, FieldseekerLocationtrackingSlice] + +func buildFieldseekerLocationtrackingColumns(alias string) fieldseekerLocationtrackingColumns { + return fieldseekerLocationtrackingColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "accuracy", "created_user", "created_date", "last_edited_user", "last_edited_date", "globalid", "fieldtech", "creationdate", "creator", "editdate", "editor", + ).WithParent("fieldseeker.locationtracking"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Accuracy: psql.Quote(alias, "accuracy"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Globalid: psql.Quote(alias, "globalid"), + Fieldtech: psql.Quote(alias, "fieldtech"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + } +} + +type fieldseekerLocationtrackingColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Accuracy psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Globalid psql.Expression + Fieldtech psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression +} + +func (c fieldseekerLocationtrackingColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerLocationtrackingColumns) AliasedAs(alias string) fieldseekerLocationtrackingColumns { + return buildFieldseekerLocationtrackingColumns(alias) +} + +// FieldseekerLocationtrackingSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerLocationtrackingSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Accuracy omitnull.Val[float64] `db:"accuracy" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + Fieldtech omitnull.Val[string] `db:"fieldtech" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` +} + +func (s FieldseekerLocationtrackingSetter) SetColumns() []string { + vals := make([]string, 0, 12) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Accuracy.IsUnset() { + vals = append(vals, "accuracy") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.Fieldtech.IsUnset() { + vals = append(vals, "fieldtech") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + return vals +} + +func (s FieldseekerLocationtrackingSetter) Overwrite(t *FieldseekerLocationtracking) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Accuracy.IsUnset() { + t.Accuracy = s.Accuracy.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.Fieldtech.IsUnset() { + t.Fieldtech = s.Fieldtech.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } +} + +func (s *FieldseekerLocationtrackingSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerLocationtrackings.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 12) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Accuracy.IsUnset() { + vals[1] = psql.Arg(s.Accuracy.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[2] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[3] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[4] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[5] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[6] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Fieldtech.IsUnset() { + vals[7] = psql.Arg(s.Fieldtech.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[8] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[9] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[10] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[11] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerLocationtrackingSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerLocationtrackingSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 12) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Accuracy.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "accuracy")...), + psql.Arg(s.Accuracy), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.Fieldtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fieldtech")...), + psql.Arg(s.Fieldtech), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + return exprs +} + +// FindFieldseekerLocationtracking retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerLocationtracking(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerLocationtracking, error) { + if len(cols) == 0 { + return FieldseekerLocationtrackings.Query( + sm.Where(FieldseekerLocationtrackings.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerLocationtrackings.Query( + sm.Where(FieldseekerLocationtrackings.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerLocationtrackings.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerLocationtrackingExists checks the presence of a single record by primary key +func FieldseekerLocationtrackingExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerLocationtrackings.Query( + sm.Where(FieldseekerLocationtrackings.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerLocationtracking is retrieved from the database +func (o *FieldseekerLocationtracking) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerLocationtrackings.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerLocationtrackingSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerLocationtrackings.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerLocationtrackingSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerLocationtrackings.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerLocationtrackingSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerLocationtrackings.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerLocationtrackingSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerLocationtracking +func (o *FieldseekerLocationtracking) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerLocationtracking) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.locationtracking", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerLocationtracking +func (o *FieldseekerLocationtracking) Update(ctx context.Context, exec bob.Executor, s *FieldseekerLocationtrackingSetter) error { + v, err := FieldseekerLocationtrackings.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerLocationtracking record with an executor +func (o *FieldseekerLocationtracking) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerLocationtrackings.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerLocationtracking using the executor +func (o *FieldseekerLocationtracking) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerLocationtrackings.Query( + sm.Where(FieldseekerLocationtrackings.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerLocationtrackingSlice is retrieved from the database +func (o FieldseekerLocationtrackingSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerLocationtrackings.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerLocationtrackings.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerLocationtrackings.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerLocationtrackings.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerLocationtrackingSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.locationtracking", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerLocationtrackingSlice) copyMatchingRows(from ...*FieldseekerLocationtracking) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerLocationtrackingSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerLocationtrackings.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerLocationtracking: + o.copyMatchingRows(retrieved) + case []*FieldseekerLocationtracking: + o.copyMatchingRows(retrieved...) + case FieldseekerLocationtrackingSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerLocationtracking or a slice of FieldseekerLocationtracking + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerLocationtrackings.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerLocationtrackingSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerLocationtrackings.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerLocationtracking: + o.copyMatchingRows(retrieved) + case []*FieldseekerLocationtracking: + o.copyMatchingRows(retrieved...) + case FieldseekerLocationtrackingSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerLocationtracking or a slice of FieldseekerLocationtracking + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerLocationtrackings.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerLocationtrackingSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerLocationtrackingSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerLocationtrackings.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerLocationtrackingSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerLocationtrackings.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerLocationtrackingSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerLocationtrackings.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerLocationtrackingWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Accuracy psql.WhereNullMod[Q, float64] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Globalid psql.WhereNullMod[Q, uuid.UUID] + Fieldtech psql.WhereNullMod[Q, string] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] +} + +func (fieldseekerLocationtrackingWhere[Q]) AliasedAs(alias string) fieldseekerLocationtrackingWhere[Q] { + return buildFieldseekerLocationtrackingWhere[Q](buildFieldseekerLocationtrackingColumns(alias)) +} + +func buildFieldseekerLocationtrackingWhere[Q psql.Filterable](cols fieldseekerLocationtrackingColumns) fieldseekerLocationtrackingWhere[Q] { + return fieldseekerLocationtrackingWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Accuracy: psql.WhereNull[Q, float64](cols.Accuracy), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + Fieldtech: psql.WhereNull[Q, string](cols.Fieldtech), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + } +} diff --git a/db/models/fieldseeker.mosquitoinspection.bob.go b/db/models/fieldseeker.mosquitoinspection.bob.go new file mode 100644 index 00000000..d05bed61 --- /dev/null +++ b/db/models/fieldseeker.mosquitoinspection.bob.go @@ -0,0 +1,1794 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerMosquitoinspection is an object representing the database table. +type FieldseekerMosquitoinspection struct { + Objectid int64 `db:"objectid,pk" ` + // # Dips + Numdips null.Val[int16] `db:"numdips" ` + // Activity + Activity null.Val[enums.FieldseekerMosquitoinspectionMosquitoactivityEnum] `db:"activity" ` + // Breeding + Breeding null.Val[enums.FieldseekerMosquitoinspectionMosquitobreedingEnum] `db:"breeding" ` + // Total Larvae + Totlarvae null.Val[int16] `db:"totlarvae" ` + // Total Pupae + Totpupae null.Val[int16] `db:"totpupae" ` + // Eggs + Eggs null.Val[int16] `db:"eggs" ` + // Positive Dips + Posdips null.Val[int16] `db:"posdips" ` + // Adult Activity + Adultact null.Val[enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum] `db:"adultact" ` + // Larval Stages + Lstages null.Val[string] `db:"lstages" ` + // Dominant Stage + Domstage null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2] `db:"domstage" ` + // Action + Actiontaken null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4] `db:"actiontaken" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // Average Temperature + Avetemp null.Val[float64] `db:"avetemp" ` + // Wind Speed + Windspeed null.Val[float64] `db:"windspeed" ` + // Rain Gauge + Raingauge null.Val[float64] `db:"raingauge" ` + // Start + Startdatetime null.Val[time.Time] `db:"startdatetime" ` + // Finish + Enddatetime null.Val[time.Time] `db:"enddatetime" ` + // Wind Direction + Winddir null.Val[enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum] `db:"winddir" ` + // Average Larvae + Avglarvae null.Val[float64] `db:"avglarvae" ` + // Average Pupae + Avgpupae null.Val[float64] `db:"avgpupae" ` + // Reviewed + Reviewed null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] `db:"reviewed" ` + // Reviewed By + Reviewedby null.Val[string] `db:"reviewedby" ` + // Reviewed Date + Revieweddate null.Val[time.Time] `db:"revieweddate" ` + // Location Name + Locationname null.Val[string] `db:"locationname" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // RecordStatus + Recordstatus null.Val[int16] `db:"recordstatus" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + // Personal Contact + Personalcontact null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] `db:"personalcontact" ` + // Tire Count + Tirecount null.Val[int16] `db:"tirecount" ` + // Catch Basin Count + Cbcount null.Val[int16] `db:"cbcount" ` + // Container Count + Containercount null.Val[int16] `db:"containercount" ` + // Field Species + Fieldspecies null.Val[enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum] `db:"fieldspecies" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Linelocid null.Val[uuid.UUID] `db:"linelocid" ` + Pointlocid null.Val[uuid.UUID] `db:"pointlocid" ` + Polygonlocid null.Val[uuid.UUID] `db:"polygonlocid" ` + Srid null.Val[uuid.UUID] `db:"srid" ` + // Field Tech + Fieldtech null.Val[string] `db:"fieldtech" ` + // Larvae Present + Larvaepresent null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] `db:"larvaepresent" ` + // Pupae Present + Pupaepresent null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] `db:"pupaepresent" ` + // Storm Drain ID + Sdid null.Val[uuid.UUID] `db:"sdid" ` + // Conditions + Sitecond null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540] `db:"sitecond" ` + // Positive Container Count + Positivecontainercount null.Val[int16] `db:"positivecontainercount" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + // Jurisdiction + Jurisdiction null.Val[string] `db:"jurisdiction" ` + // Visual Monitoring + Visualmonitoring null.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] `db:"visualmonitoring" ` + // VM Comments + Vmcomments null.Val[string] `db:"vmcomments" ` + Adminaction null.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B] `db:"adminaction" ` + Ptaid null.Val[uuid.UUID] `db:"ptaid" ` +} + +// FieldseekerMosquitoinspectionSlice is an alias for a slice of pointers to FieldseekerMosquitoinspection. +// This should almost always be used instead of []*FieldseekerMosquitoinspection. +type FieldseekerMosquitoinspectionSlice []*FieldseekerMosquitoinspection + +// FieldseekerMosquitoinspections contains methods to work with the mosquitoinspection table +var FieldseekerMosquitoinspections = psql.NewTablex[*FieldseekerMosquitoinspection, FieldseekerMosquitoinspectionSlice, *FieldseekerMosquitoinspectionSetter]("fieldseeker", "mosquitoinspection", buildFieldseekerMosquitoinspectionColumns("fieldseeker.mosquitoinspection")) + +// FieldseekerMosquitoinspectionsQuery is a query on the mosquitoinspection table +type FieldseekerMosquitoinspectionsQuery = *psql.ViewQuery[*FieldseekerMosquitoinspection, FieldseekerMosquitoinspectionSlice] + +func buildFieldseekerMosquitoinspectionColumns(alias string) fieldseekerMosquitoinspectionColumns { + return fieldseekerMosquitoinspectionColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "numdips", "activity", "breeding", "totlarvae", "totpupae", "eggs", "posdips", "adultact", "lstages", "domstage", "actiontaken", "comments", "avetemp", "windspeed", "raingauge", "startdatetime", "enddatetime", "winddir", "avglarvae", "avgpupae", "reviewed", "reviewedby", "revieweddate", "locationname", "zone", "recordstatus", "zone2", "personalcontact", "tirecount", "cbcount", "containercount", "fieldspecies", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "linelocid", "pointlocid", "polygonlocid", "srid", "fieldtech", "larvaepresent", "pupaepresent", "sdid", "sitecond", "positivecontainercount", "creationdate", "creator", "editdate", "editor", "jurisdiction", "visualmonitoring", "vmcomments", "adminaction", "ptaid", + ).WithParent("fieldseeker.mosquitoinspection"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Numdips: psql.Quote(alias, "numdips"), + Activity: psql.Quote(alias, "activity"), + Breeding: psql.Quote(alias, "breeding"), + Totlarvae: psql.Quote(alias, "totlarvae"), + Totpupae: psql.Quote(alias, "totpupae"), + Eggs: psql.Quote(alias, "eggs"), + Posdips: psql.Quote(alias, "posdips"), + Adultact: psql.Quote(alias, "adultact"), + Lstages: psql.Quote(alias, "lstages"), + Domstage: psql.Quote(alias, "domstage"), + Actiontaken: psql.Quote(alias, "actiontaken"), + Comments: psql.Quote(alias, "comments"), + Avetemp: psql.Quote(alias, "avetemp"), + Windspeed: psql.Quote(alias, "windspeed"), + Raingauge: psql.Quote(alias, "raingauge"), + Startdatetime: psql.Quote(alias, "startdatetime"), + Enddatetime: psql.Quote(alias, "enddatetime"), + Winddir: psql.Quote(alias, "winddir"), + Avglarvae: psql.Quote(alias, "avglarvae"), + Avgpupae: psql.Quote(alias, "avgpupae"), + Reviewed: psql.Quote(alias, "reviewed"), + Reviewedby: psql.Quote(alias, "reviewedby"), + Revieweddate: psql.Quote(alias, "revieweddate"), + Locationname: psql.Quote(alias, "locationname"), + Zone: psql.Quote(alias, "zone"), + Recordstatus: psql.Quote(alias, "recordstatus"), + Zone2: psql.Quote(alias, "zone2"), + Personalcontact: psql.Quote(alias, "personalcontact"), + Tirecount: psql.Quote(alias, "tirecount"), + Cbcount: psql.Quote(alias, "cbcount"), + Containercount: psql.Quote(alias, "containercount"), + Fieldspecies: psql.Quote(alias, "fieldspecies"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Linelocid: psql.Quote(alias, "linelocid"), + Pointlocid: psql.Quote(alias, "pointlocid"), + Polygonlocid: psql.Quote(alias, "polygonlocid"), + Srid: psql.Quote(alias, "srid"), + Fieldtech: psql.Quote(alias, "fieldtech"), + Larvaepresent: psql.Quote(alias, "larvaepresent"), + Pupaepresent: psql.Quote(alias, "pupaepresent"), + Sdid: psql.Quote(alias, "sdid"), + Sitecond: psql.Quote(alias, "sitecond"), + Positivecontainercount: psql.Quote(alias, "positivecontainercount"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Jurisdiction: psql.Quote(alias, "jurisdiction"), + Visualmonitoring: psql.Quote(alias, "visualmonitoring"), + Vmcomments: psql.Quote(alias, "vmcomments"), + Adminaction: psql.Quote(alias, "adminaction"), + Ptaid: psql.Quote(alias, "ptaid"), + } +} + +type fieldseekerMosquitoinspectionColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Numdips psql.Expression + Activity psql.Expression + Breeding psql.Expression + Totlarvae psql.Expression + Totpupae psql.Expression + Eggs psql.Expression + Posdips psql.Expression + Adultact psql.Expression + Lstages psql.Expression + Domstage psql.Expression + Actiontaken psql.Expression + Comments psql.Expression + Avetemp psql.Expression + Windspeed psql.Expression + Raingauge psql.Expression + Startdatetime psql.Expression + Enddatetime psql.Expression + Winddir psql.Expression + Avglarvae psql.Expression + Avgpupae psql.Expression + Reviewed psql.Expression + Reviewedby psql.Expression + Revieweddate psql.Expression + Locationname psql.Expression + Zone psql.Expression + Recordstatus psql.Expression + Zone2 psql.Expression + Personalcontact psql.Expression + Tirecount psql.Expression + Cbcount psql.Expression + Containercount psql.Expression + Fieldspecies psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Linelocid psql.Expression + Pointlocid psql.Expression + Polygonlocid psql.Expression + Srid psql.Expression + Fieldtech psql.Expression + Larvaepresent psql.Expression + Pupaepresent psql.Expression + Sdid psql.Expression + Sitecond psql.Expression + Positivecontainercount psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Jurisdiction psql.Expression + Visualmonitoring psql.Expression + Vmcomments psql.Expression + Adminaction psql.Expression + Ptaid psql.Expression +} + +func (c fieldseekerMosquitoinspectionColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerMosquitoinspectionColumns) AliasedAs(alias string) fieldseekerMosquitoinspectionColumns { + return buildFieldseekerMosquitoinspectionColumns(alias) +} + +// FieldseekerMosquitoinspectionSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerMosquitoinspectionSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Numdips omitnull.Val[int16] `db:"numdips" ` + Activity omitnull.Val[enums.FieldseekerMosquitoinspectionMosquitoactivityEnum] `db:"activity" ` + Breeding omitnull.Val[enums.FieldseekerMosquitoinspectionMosquitobreedingEnum] `db:"breeding" ` + Totlarvae omitnull.Val[int16] `db:"totlarvae" ` + Totpupae omitnull.Val[int16] `db:"totpupae" ` + Eggs omitnull.Val[int16] `db:"eggs" ` + Posdips omitnull.Val[int16] `db:"posdips" ` + Adultact omitnull.Val[enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum] `db:"adultact" ` + Lstages omitnull.Val[string] `db:"lstages" ` + Domstage omitnull.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2] `db:"domstage" ` + Actiontaken omitnull.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4] `db:"actiontaken" ` + Comments omitnull.Val[string] `db:"comments" ` + Avetemp omitnull.Val[float64] `db:"avetemp" ` + Windspeed omitnull.Val[float64] `db:"windspeed" ` + Raingauge omitnull.Val[float64] `db:"raingauge" ` + Startdatetime omitnull.Val[time.Time] `db:"startdatetime" ` + Enddatetime omitnull.Val[time.Time] `db:"enddatetime" ` + Winddir omitnull.Val[enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum] `db:"winddir" ` + Avglarvae omitnull.Val[float64] `db:"avglarvae" ` + Avgpupae omitnull.Val[float64] `db:"avgpupae" ` + Reviewed omitnull.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] `db:"reviewed" ` + Reviewedby omitnull.Val[string] `db:"reviewedby" ` + Revieweddate omitnull.Val[time.Time] `db:"revieweddate" ` + Locationname omitnull.Val[string] `db:"locationname" ` + Zone omitnull.Val[string] `db:"zone" ` + Recordstatus omitnull.Val[int16] `db:"recordstatus" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Personalcontact omitnull.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] `db:"personalcontact" ` + Tirecount omitnull.Val[int16] `db:"tirecount" ` + Cbcount omitnull.Val[int16] `db:"cbcount" ` + Containercount omitnull.Val[int16] `db:"containercount" ` + Fieldspecies omitnull.Val[enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum] `db:"fieldspecies" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Linelocid omitnull.Val[uuid.UUID] `db:"linelocid" ` + Pointlocid omitnull.Val[uuid.UUID] `db:"pointlocid" ` + Polygonlocid omitnull.Val[uuid.UUID] `db:"polygonlocid" ` + Srid omitnull.Val[uuid.UUID] `db:"srid" ` + Fieldtech omitnull.Val[string] `db:"fieldtech" ` + Larvaepresent omitnull.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] `db:"larvaepresent" ` + Pupaepresent omitnull.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] `db:"pupaepresent" ` + Sdid omitnull.Val[uuid.UUID] `db:"sdid" ` + Sitecond omitnull.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540] `db:"sitecond" ` + Positivecontainercount omitnull.Val[int16] `db:"positivecontainercount" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Jurisdiction omitnull.Val[string] `db:"jurisdiction" ` + Visualmonitoring omitnull.Val[enums.FieldseekerMosquitoinspectionNotinuitFEnum] `db:"visualmonitoring" ` + Vmcomments omitnull.Val[string] `db:"vmcomments" ` + Adminaction omitnull.Val[enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B] `db:"adminaction" ` + Ptaid omitnull.Val[uuid.UUID] `db:"ptaid" ` +} + +func (s FieldseekerMosquitoinspectionSetter) SetColumns() []string { + vals := make([]string, 0, 57) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Numdips.IsUnset() { + vals = append(vals, "numdips") + } + if !s.Activity.IsUnset() { + vals = append(vals, "activity") + } + if !s.Breeding.IsUnset() { + vals = append(vals, "breeding") + } + if !s.Totlarvae.IsUnset() { + vals = append(vals, "totlarvae") + } + if !s.Totpupae.IsUnset() { + vals = append(vals, "totpupae") + } + if !s.Eggs.IsUnset() { + vals = append(vals, "eggs") + } + if !s.Posdips.IsUnset() { + vals = append(vals, "posdips") + } + if !s.Adultact.IsUnset() { + vals = append(vals, "adultact") + } + if !s.Lstages.IsUnset() { + vals = append(vals, "lstages") + } + if !s.Domstage.IsUnset() { + vals = append(vals, "domstage") + } + if !s.Actiontaken.IsUnset() { + vals = append(vals, "actiontaken") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Avetemp.IsUnset() { + vals = append(vals, "avetemp") + } + if !s.Windspeed.IsUnset() { + vals = append(vals, "windspeed") + } + if !s.Raingauge.IsUnset() { + vals = append(vals, "raingauge") + } + if !s.Startdatetime.IsUnset() { + vals = append(vals, "startdatetime") + } + if !s.Enddatetime.IsUnset() { + vals = append(vals, "enddatetime") + } + if !s.Winddir.IsUnset() { + vals = append(vals, "winddir") + } + if !s.Avglarvae.IsUnset() { + vals = append(vals, "avglarvae") + } + if !s.Avgpupae.IsUnset() { + vals = append(vals, "avgpupae") + } + if !s.Reviewed.IsUnset() { + vals = append(vals, "reviewed") + } + if !s.Reviewedby.IsUnset() { + vals = append(vals, "reviewedby") + } + if !s.Revieweddate.IsUnset() { + vals = append(vals, "revieweddate") + } + if !s.Locationname.IsUnset() { + vals = append(vals, "locationname") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Recordstatus.IsUnset() { + vals = append(vals, "recordstatus") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Personalcontact.IsUnset() { + vals = append(vals, "personalcontact") + } + if !s.Tirecount.IsUnset() { + vals = append(vals, "tirecount") + } + if !s.Cbcount.IsUnset() { + vals = append(vals, "cbcount") + } + if !s.Containercount.IsUnset() { + vals = append(vals, "containercount") + } + if !s.Fieldspecies.IsUnset() { + vals = append(vals, "fieldspecies") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Linelocid.IsUnset() { + vals = append(vals, "linelocid") + } + if !s.Pointlocid.IsUnset() { + vals = append(vals, "pointlocid") + } + if !s.Polygonlocid.IsUnset() { + vals = append(vals, "polygonlocid") + } + if !s.Srid.IsUnset() { + vals = append(vals, "srid") + } + if !s.Fieldtech.IsUnset() { + vals = append(vals, "fieldtech") + } + if !s.Larvaepresent.IsUnset() { + vals = append(vals, "larvaepresent") + } + if !s.Pupaepresent.IsUnset() { + vals = append(vals, "pupaepresent") + } + if !s.Sdid.IsUnset() { + vals = append(vals, "sdid") + } + if !s.Sitecond.IsUnset() { + vals = append(vals, "sitecond") + } + if !s.Positivecontainercount.IsUnset() { + vals = append(vals, "positivecontainercount") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Jurisdiction.IsUnset() { + vals = append(vals, "jurisdiction") + } + if !s.Visualmonitoring.IsUnset() { + vals = append(vals, "visualmonitoring") + } + if !s.Vmcomments.IsUnset() { + vals = append(vals, "vmcomments") + } + if !s.Adminaction.IsUnset() { + vals = append(vals, "adminaction") + } + if !s.Ptaid.IsUnset() { + vals = append(vals, "ptaid") + } + return vals +} + +func (s FieldseekerMosquitoinspectionSetter) Overwrite(t *FieldseekerMosquitoinspection) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Numdips.IsUnset() { + t.Numdips = s.Numdips.MustGetNull() + } + if !s.Activity.IsUnset() { + t.Activity = s.Activity.MustGetNull() + } + if !s.Breeding.IsUnset() { + t.Breeding = s.Breeding.MustGetNull() + } + if !s.Totlarvae.IsUnset() { + t.Totlarvae = s.Totlarvae.MustGetNull() + } + if !s.Totpupae.IsUnset() { + t.Totpupae = s.Totpupae.MustGetNull() + } + if !s.Eggs.IsUnset() { + t.Eggs = s.Eggs.MustGetNull() + } + if !s.Posdips.IsUnset() { + t.Posdips = s.Posdips.MustGetNull() + } + if !s.Adultact.IsUnset() { + t.Adultact = s.Adultact.MustGetNull() + } + if !s.Lstages.IsUnset() { + t.Lstages = s.Lstages.MustGetNull() + } + if !s.Domstage.IsUnset() { + t.Domstage = s.Domstage.MustGetNull() + } + if !s.Actiontaken.IsUnset() { + t.Actiontaken = s.Actiontaken.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Avetemp.IsUnset() { + t.Avetemp = s.Avetemp.MustGetNull() + } + if !s.Windspeed.IsUnset() { + t.Windspeed = s.Windspeed.MustGetNull() + } + if !s.Raingauge.IsUnset() { + t.Raingauge = s.Raingauge.MustGetNull() + } + if !s.Startdatetime.IsUnset() { + t.Startdatetime = s.Startdatetime.MustGetNull() + } + if !s.Enddatetime.IsUnset() { + t.Enddatetime = s.Enddatetime.MustGetNull() + } + if !s.Winddir.IsUnset() { + t.Winddir = s.Winddir.MustGetNull() + } + if !s.Avglarvae.IsUnset() { + t.Avglarvae = s.Avglarvae.MustGetNull() + } + if !s.Avgpupae.IsUnset() { + t.Avgpupae = s.Avgpupae.MustGetNull() + } + if !s.Reviewed.IsUnset() { + t.Reviewed = s.Reviewed.MustGetNull() + } + if !s.Reviewedby.IsUnset() { + t.Reviewedby = s.Reviewedby.MustGetNull() + } + if !s.Revieweddate.IsUnset() { + t.Revieweddate = s.Revieweddate.MustGetNull() + } + if !s.Locationname.IsUnset() { + t.Locationname = s.Locationname.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Recordstatus.IsUnset() { + t.Recordstatus = s.Recordstatus.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Personalcontact.IsUnset() { + t.Personalcontact = s.Personalcontact.MustGetNull() + } + if !s.Tirecount.IsUnset() { + t.Tirecount = s.Tirecount.MustGetNull() + } + if !s.Cbcount.IsUnset() { + t.Cbcount = s.Cbcount.MustGetNull() + } + if !s.Containercount.IsUnset() { + t.Containercount = s.Containercount.MustGetNull() + } + if !s.Fieldspecies.IsUnset() { + t.Fieldspecies = s.Fieldspecies.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Linelocid.IsUnset() { + t.Linelocid = s.Linelocid.MustGetNull() + } + if !s.Pointlocid.IsUnset() { + t.Pointlocid = s.Pointlocid.MustGetNull() + } + if !s.Polygonlocid.IsUnset() { + t.Polygonlocid = s.Polygonlocid.MustGetNull() + } + if !s.Srid.IsUnset() { + t.Srid = s.Srid.MustGetNull() + } + if !s.Fieldtech.IsUnset() { + t.Fieldtech = s.Fieldtech.MustGetNull() + } + if !s.Larvaepresent.IsUnset() { + t.Larvaepresent = s.Larvaepresent.MustGetNull() + } + if !s.Pupaepresent.IsUnset() { + t.Pupaepresent = s.Pupaepresent.MustGetNull() + } + if !s.Sdid.IsUnset() { + t.Sdid = s.Sdid.MustGetNull() + } + if !s.Sitecond.IsUnset() { + t.Sitecond = s.Sitecond.MustGetNull() + } + if !s.Positivecontainercount.IsUnset() { + t.Positivecontainercount = s.Positivecontainercount.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Jurisdiction.IsUnset() { + t.Jurisdiction = s.Jurisdiction.MustGetNull() + } + if !s.Visualmonitoring.IsUnset() { + t.Visualmonitoring = s.Visualmonitoring.MustGetNull() + } + if !s.Vmcomments.IsUnset() { + t.Vmcomments = s.Vmcomments.MustGetNull() + } + if !s.Adminaction.IsUnset() { + t.Adminaction = s.Adminaction.MustGetNull() + } + if !s.Ptaid.IsUnset() { + t.Ptaid = s.Ptaid.MustGetNull() + } +} + +func (s *FieldseekerMosquitoinspectionSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerMosquitoinspections.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 57) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Numdips.IsUnset() { + vals[1] = psql.Arg(s.Numdips.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Activity.IsUnset() { + vals[2] = psql.Arg(s.Activity.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Breeding.IsUnset() { + vals[3] = psql.Arg(s.Breeding.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Totlarvae.IsUnset() { + vals[4] = psql.Arg(s.Totlarvae.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Totpupae.IsUnset() { + vals[5] = psql.Arg(s.Totpupae.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Eggs.IsUnset() { + vals[6] = psql.Arg(s.Eggs.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Posdips.IsUnset() { + vals[7] = psql.Arg(s.Posdips.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Adultact.IsUnset() { + vals[8] = psql.Arg(s.Adultact.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Lstages.IsUnset() { + vals[9] = psql.Arg(s.Lstages.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Domstage.IsUnset() { + vals[10] = psql.Arg(s.Domstage.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Actiontaken.IsUnset() { + vals[11] = psql.Arg(s.Actiontaken.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[12] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Avetemp.IsUnset() { + vals[13] = psql.Arg(s.Avetemp.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Windspeed.IsUnset() { + vals[14] = psql.Arg(s.Windspeed.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Raingauge.IsUnset() { + vals[15] = psql.Arg(s.Raingauge.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Startdatetime.IsUnset() { + vals[16] = psql.Arg(s.Startdatetime.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Enddatetime.IsUnset() { + vals[17] = psql.Arg(s.Enddatetime.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Winddir.IsUnset() { + vals[18] = psql.Arg(s.Winddir.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Avglarvae.IsUnset() { + vals[19] = psql.Arg(s.Avglarvae.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Avgpupae.IsUnset() { + vals[20] = psql.Arg(s.Avgpupae.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Reviewed.IsUnset() { + vals[21] = psql.Arg(s.Reviewed.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Reviewedby.IsUnset() { + vals[22] = psql.Arg(s.Reviewedby.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Revieweddate.IsUnset() { + vals[23] = psql.Arg(s.Revieweddate.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Locationname.IsUnset() { + vals[24] = psql.Arg(s.Locationname.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[25] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Recordstatus.IsUnset() { + vals[26] = psql.Arg(s.Recordstatus.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[27] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.Personalcontact.IsUnset() { + vals[28] = psql.Arg(s.Personalcontact.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.Tirecount.IsUnset() { + vals[29] = psql.Arg(s.Tirecount.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + if !s.Cbcount.IsUnset() { + vals[30] = psql.Arg(s.Cbcount.MustGetNull()) + } else { + vals[30] = psql.Raw("DEFAULT") + } + + if !s.Containercount.IsUnset() { + vals[31] = psql.Arg(s.Containercount.MustGetNull()) + } else { + vals[31] = psql.Raw("DEFAULT") + } + + if !s.Fieldspecies.IsUnset() { + vals[32] = psql.Arg(s.Fieldspecies.MustGetNull()) + } else { + vals[32] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[33] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[33] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[34] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[34] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[35] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[35] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[36] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[36] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[37] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[37] = psql.Raw("DEFAULT") + } + + if !s.Linelocid.IsUnset() { + vals[38] = psql.Arg(s.Linelocid.MustGetNull()) + } else { + vals[38] = psql.Raw("DEFAULT") + } + + if !s.Pointlocid.IsUnset() { + vals[39] = psql.Arg(s.Pointlocid.MustGetNull()) + } else { + vals[39] = psql.Raw("DEFAULT") + } + + if !s.Polygonlocid.IsUnset() { + vals[40] = psql.Arg(s.Polygonlocid.MustGetNull()) + } else { + vals[40] = psql.Raw("DEFAULT") + } + + if !s.Srid.IsUnset() { + vals[41] = psql.Arg(s.Srid.MustGetNull()) + } else { + vals[41] = psql.Raw("DEFAULT") + } + + if !s.Fieldtech.IsUnset() { + vals[42] = psql.Arg(s.Fieldtech.MustGetNull()) + } else { + vals[42] = psql.Raw("DEFAULT") + } + + if !s.Larvaepresent.IsUnset() { + vals[43] = psql.Arg(s.Larvaepresent.MustGetNull()) + } else { + vals[43] = psql.Raw("DEFAULT") + } + + if !s.Pupaepresent.IsUnset() { + vals[44] = psql.Arg(s.Pupaepresent.MustGetNull()) + } else { + vals[44] = psql.Raw("DEFAULT") + } + + if !s.Sdid.IsUnset() { + vals[45] = psql.Arg(s.Sdid.MustGetNull()) + } else { + vals[45] = psql.Raw("DEFAULT") + } + + if !s.Sitecond.IsUnset() { + vals[46] = psql.Arg(s.Sitecond.MustGetNull()) + } else { + vals[46] = psql.Raw("DEFAULT") + } + + if !s.Positivecontainercount.IsUnset() { + vals[47] = psql.Arg(s.Positivecontainercount.MustGetNull()) + } else { + vals[47] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[48] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[48] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[49] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[49] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[50] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[50] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[51] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[51] = psql.Raw("DEFAULT") + } + + if !s.Jurisdiction.IsUnset() { + vals[52] = psql.Arg(s.Jurisdiction.MustGetNull()) + } else { + vals[52] = psql.Raw("DEFAULT") + } + + if !s.Visualmonitoring.IsUnset() { + vals[53] = psql.Arg(s.Visualmonitoring.MustGetNull()) + } else { + vals[53] = psql.Raw("DEFAULT") + } + + if !s.Vmcomments.IsUnset() { + vals[54] = psql.Arg(s.Vmcomments.MustGetNull()) + } else { + vals[54] = psql.Raw("DEFAULT") + } + + if !s.Adminaction.IsUnset() { + vals[55] = psql.Arg(s.Adminaction.MustGetNull()) + } else { + vals[55] = psql.Raw("DEFAULT") + } + + if !s.Ptaid.IsUnset() { + vals[56] = psql.Arg(s.Ptaid.MustGetNull()) + } else { + vals[56] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerMosquitoinspectionSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerMosquitoinspectionSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 57) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Numdips.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "numdips")...), + psql.Arg(s.Numdips), + }}) + } + + if !s.Activity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "activity")...), + psql.Arg(s.Activity), + }}) + } + + if !s.Breeding.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "breeding")...), + psql.Arg(s.Breeding), + }}) + } + + if !s.Totlarvae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "totlarvae")...), + psql.Arg(s.Totlarvae), + }}) + } + + if !s.Totpupae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "totpupae")...), + psql.Arg(s.Totpupae), + }}) + } + + if !s.Eggs.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "eggs")...), + psql.Arg(s.Eggs), + }}) + } + + if !s.Posdips.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "posdips")...), + psql.Arg(s.Posdips), + }}) + } + + if !s.Adultact.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "adultact")...), + psql.Arg(s.Adultact), + }}) + } + + if !s.Lstages.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lstages")...), + psql.Arg(s.Lstages), + }}) + } + + if !s.Domstage.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "domstage")...), + psql.Arg(s.Domstage), + }}) + } + + if !s.Actiontaken.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "actiontaken")...), + psql.Arg(s.Actiontaken), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Avetemp.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "avetemp")...), + psql.Arg(s.Avetemp), + }}) + } + + if !s.Windspeed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "windspeed")...), + psql.Arg(s.Windspeed), + }}) + } + + if !s.Raingauge.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "raingauge")...), + psql.Arg(s.Raingauge), + }}) + } + + if !s.Startdatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "startdatetime")...), + psql.Arg(s.Startdatetime), + }}) + } + + if !s.Enddatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "enddatetime")...), + psql.Arg(s.Enddatetime), + }}) + } + + if !s.Winddir.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "winddir")...), + psql.Arg(s.Winddir), + }}) + } + + if !s.Avglarvae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "avglarvae")...), + psql.Arg(s.Avglarvae), + }}) + } + + if !s.Avgpupae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "avgpupae")...), + psql.Arg(s.Avgpupae), + }}) + } + + if !s.Reviewed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewed")...), + psql.Arg(s.Reviewed), + }}) + } + + if !s.Reviewedby.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewedby")...), + psql.Arg(s.Reviewedby), + }}) + } + + if !s.Revieweddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "revieweddate")...), + psql.Arg(s.Revieweddate), + }}) + } + + if !s.Locationname.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationname")...), + psql.Arg(s.Locationname), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Recordstatus.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "recordstatus")...), + psql.Arg(s.Recordstatus), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Personalcontact.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "personalcontact")...), + psql.Arg(s.Personalcontact), + }}) + } + + if !s.Tirecount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "tirecount")...), + psql.Arg(s.Tirecount), + }}) + } + + if !s.Cbcount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "cbcount")...), + psql.Arg(s.Cbcount), + }}) + } + + if !s.Containercount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "containercount")...), + psql.Arg(s.Containercount), + }}) + } + + if !s.Fieldspecies.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fieldspecies")...), + psql.Arg(s.Fieldspecies), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Linelocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "linelocid")...), + psql.Arg(s.Linelocid), + }}) + } + + if !s.Pointlocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "pointlocid")...), + psql.Arg(s.Pointlocid), + }}) + } + + if !s.Polygonlocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "polygonlocid")...), + psql.Arg(s.Polygonlocid), + }}) + } + + if !s.Srid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "srid")...), + psql.Arg(s.Srid), + }}) + } + + if !s.Fieldtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fieldtech")...), + psql.Arg(s.Fieldtech), + }}) + } + + if !s.Larvaepresent.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "larvaepresent")...), + psql.Arg(s.Larvaepresent), + }}) + } + + if !s.Pupaepresent.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "pupaepresent")...), + psql.Arg(s.Pupaepresent), + }}) + } + + if !s.Sdid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sdid")...), + psql.Arg(s.Sdid), + }}) + } + + if !s.Sitecond.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sitecond")...), + psql.Arg(s.Sitecond), + }}) + } + + if !s.Positivecontainercount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "positivecontainercount")...), + psql.Arg(s.Positivecontainercount), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Jurisdiction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "jurisdiction")...), + psql.Arg(s.Jurisdiction), + }}) + } + + if !s.Visualmonitoring.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "visualmonitoring")...), + psql.Arg(s.Visualmonitoring), + }}) + } + + if !s.Vmcomments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "vmcomments")...), + psql.Arg(s.Vmcomments), + }}) + } + + if !s.Adminaction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "adminaction")...), + psql.Arg(s.Adminaction), + }}) + } + + if !s.Ptaid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "ptaid")...), + psql.Arg(s.Ptaid), + }}) + } + + return exprs +} + +// FindFieldseekerMosquitoinspection retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerMosquitoinspection(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerMosquitoinspection, error) { + if len(cols) == 0 { + return FieldseekerMosquitoinspections.Query( + sm.Where(FieldseekerMosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerMosquitoinspections.Query( + sm.Where(FieldseekerMosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerMosquitoinspections.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerMosquitoinspectionExists checks the presence of a single record by primary key +func FieldseekerMosquitoinspectionExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerMosquitoinspections.Query( + sm.Where(FieldseekerMosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerMosquitoinspection is retrieved from the database +func (o *FieldseekerMosquitoinspection) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerMosquitoinspections.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerMosquitoinspectionSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerMosquitoinspections.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerMosquitoinspectionSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerMosquitoinspections.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerMosquitoinspectionSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerMosquitoinspections.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerMosquitoinspectionSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerMosquitoinspection +func (o *FieldseekerMosquitoinspection) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerMosquitoinspection) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.mosquitoinspection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerMosquitoinspection +func (o *FieldseekerMosquitoinspection) Update(ctx context.Context, exec bob.Executor, s *FieldseekerMosquitoinspectionSetter) error { + v, err := FieldseekerMosquitoinspections.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerMosquitoinspection record with an executor +func (o *FieldseekerMosquitoinspection) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerMosquitoinspections.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerMosquitoinspection using the executor +func (o *FieldseekerMosquitoinspection) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerMosquitoinspections.Query( + sm.Where(FieldseekerMosquitoinspections.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerMosquitoinspectionSlice is retrieved from the database +func (o FieldseekerMosquitoinspectionSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerMosquitoinspections.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerMosquitoinspections.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerMosquitoinspections.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerMosquitoinspections.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerMosquitoinspectionSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.mosquitoinspection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerMosquitoinspectionSlice) copyMatchingRows(from ...*FieldseekerMosquitoinspection) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerMosquitoinspectionSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerMosquitoinspections.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerMosquitoinspection: + o.copyMatchingRows(retrieved) + case []*FieldseekerMosquitoinspection: + o.copyMatchingRows(retrieved...) + case FieldseekerMosquitoinspectionSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerMosquitoinspection or a slice of FieldseekerMosquitoinspection + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerMosquitoinspections.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerMosquitoinspectionSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerMosquitoinspections.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerMosquitoinspection: + o.copyMatchingRows(retrieved) + case []*FieldseekerMosquitoinspection: + o.copyMatchingRows(retrieved...) + case FieldseekerMosquitoinspectionSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerMosquitoinspection or a slice of FieldseekerMosquitoinspection + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerMosquitoinspections.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerMosquitoinspectionSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerMosquitoinspectionSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerMosquitoinspections.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerMosquitoinspectionSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerMosquitoinspections.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerMosquitoinspectionSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerMosquitoinspections.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerMosquitoinspectionWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Numdips psql.WhereNullMod[Q, int16] + Activity psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionMosquitoactivityEnum] + Breeding psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionMosquitobreedingEnum] + Totlarvae psql.WhereNullMod[Q, int16] + Totpupae psql.WhereNullMod[Q, int16] + Eggs psql.WhereNullMod[Q, int16] + Posdips psql.WhereNullMod[Q, int16] + Adultact psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum] + Lstages psql.WhereNullMod[Q, string] + Domstage psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2] + Actiontaken psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4] + Comments psql.WhereNullMod[Q, string] + Avetemp psql.WhereNullMod[Q, float64] + Windspeed psql.WhereNullMod[Q, float64] + Raingauge psql.WhereNullMod[Q, float64] + Startdatetime psql.WhereNullMod[Q, time.Time] + Enddatetime psql.WhereNullMod[Q, time.Time] + Winddir psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum] + Avglarvae psql.WhereNullMod[Q, float64] + Avgpupae psql.WhereNullMod[Q, float64] + Reviewed psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionNotinuitFEnum] + Reviewedby psql.WhereNullMod[Q, string] + Revieweddate psql.WhereNullMod[Q, time.Time] + Locationname psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Recordstatus psql.WhereNullMod[Q, int16] + Zone2 psql.WhereNullMod[Q, string] + Personalcontact psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionNotinuitFEnum] + Tirecount psql.WhereNullMod[Q, int16] + Cbcount psql.WhereNullMod[Q, int16] + Containercount psql.WhereNullMod[Q, int16] + Fieldspecies psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Linelocid psql.WhereNullMod[Q, uuid.UUID] + Pointlocid psql.WhereNullMod[Q, uuid.UUID] + Polygonlocid psql.WhereNullMod[Q, uuid.UUID] + Srid psql.WhereNullMod[Q, uuid.UUID] + Fieldtech psql.WhereNullMod[Q, string] + Larvaepresent psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionNotinuitFEnum] + Pupaepresent psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionNotinuitFEnum] + Sdid psql.WhereNullMod[Q, uuid.UUID] + Sitecond psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540] + Positivecontainercount psql.WhereNullMod[Q, int16] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Jurisdiction psql.WhereNullMod[Q, string] + Visualmonitoring psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionNotinuitFEnum] + Vmcomments psql.WhereNullMod[Q, string] + Adminaction psql.WhereNullMod[Q, enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B] + Ptaid psql.WhereNullMod[Q, uuid.UUID] +} + +func (fieldseekerMosquitoinspectionWhere[Q]) AliasedAs(alias string) fieldseekerMosquitoinspectionWhere[Q] { + return buildFieldseekerMosquitoinspectionWhere[Q](buildFieldseekerMosquitoinspectionColumns(alias)) +} + +func buildFieldseekerMosquitoinspectionWhere[Q psql.Filterable](cols fieldseekerMosquitoinspectionColumns) fieldseekerMosquitoinspectionWhere[Q] { + return fieldseekerMosquitoinspectionWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Numdips: psql.WhereNull[Q, int16](cols.Numdips), + Activity: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionMosquitoactivityEnum](cols.Activity), + Breeding: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionMosquitobreedingEnum](cols.Breeding), + Totlarvae: psql.WhereNull[Q, int16](cols.Totlarvae), + Totpupae: psql.WhereNull[Q, int16](cols.Totpupae), + Eggs: psql.WhereNull[Q, int16](cols.Eggs), + Posdips: psql.WhereNull[Q, int16](cols.Posdips), + Adultact: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionMosquitoadultactivityEnum](cols.Adultact), + Lstages: psql.WhereNull[Q, string](cols.Lstages), + Domstage: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionMosquitoinspectionDomstageB7a6c36bccde49a2](cols.Domstage), + Actiontaken: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionMosquitoinspectionActiontaken252243D69B0B4](cols.Actiontaken), + Comments: psql.WhereNull[Q, string](cols.Comments), + Avetemp: psql.WhereNull[Q, float64](cols.Avetemp), + Windspeed: psql.WhereNull[Q, float64](cols.Windspeed), + Raingauge: psql.WhereNull[Q, float64](cols.Raingauge), + Startdatetime: psql.WhereNull[Q, time.Time](cols.Startdatetime), + Enddatetime: psql.WhereNull[Q, time.Time](cols.Enddatetime), + Winddir: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionNotinuiwinddirectionEnum](cols.Winddir), + Avglarvae: psql.WhereNull[Q, float64](cols.Avglarvae), + Avgpupae: psql.WhereNull[Q, float64](cols.Avgpupae), + Reviewed: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionNotinuitFEnum](cols.Reviewed), + Reviewedby: psql.WhereNull[Q, string](cols.Reviewedby), + Revieweddate: psql.WhereNull[Q, time.Time](cols.Revieweddate), + Locationname: psql.WhereNull[Q, string](cols.Locationname), + Zone: psql.WhereNull[Q, string](cols.Zone), + Recordstatus: psql.WhereNull[Q, int16](cols.Recordstatus), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Personalcontact: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionNotinuitFEnum](cols.Personalcontact), + Tirecount: psql.WhereNull[Q, int16](cols.Tirecount), + Cbcount: psql.WhereNull[Q, int16](cols.Cbcount), + Containercount: psql.WhereNull[Q, int16](cols.Containercount), + Fieldspecies: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionMosquitofieldspeciesEnum](cols.Fieldspecies), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Linelocid: psql.WhereNull[Q, uuid.UUID](cols.Linelocid), + Pointlocid: psql.WhereNull[Q, uuid.UUID](cols.Pointlocid), + Polygonlocid: psql.WhereNull[Q, uuid.UUID](cols.Polygonlocid), + Srid: psql.WhereNull[Q, uuid.UUID](cols.Srid), + Fieldtech: psql.WhereNull[Q, string](cols.Fieldtech), + Larvaepresent: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionNotinuitFEnum](cols.Larvaepresent), + Pupaepresent: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionNotinuitFEnum](cols.Pupaepresent), + Sdid: psql.WhereNull[Q, uuid.UUID](cols.Sdid), + Sitecond: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionMosquitoinspectionSitecondDB7350BC81e540](cols.Sitecond), + Positivecontainercount: psql.WhereNull[Q, int16](cols.Positivecontainercount), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Jurisdiction: psql.WhereNull[Q, string](cols.Jurisdiction), + Visualmonitoring: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionNotinuitFEnum](cols.Visualmonitoring), + Vmcomments: psql.WhereNull[Q, string](cols.Vmcomments), + Adminaction: psql.WhereNull[Q, enums.FieldseekerMosquitoinspectionMosquitoinspectionAdminactionB74ae1bbC98B](cols.Adminaction), + Ptaid: psql.WhereNull[Q, uuid.UUID](cols.Ptaid), + } +} diff --git a/db/models/fieldseeker.pointlocation.bob.go b/db/models/fieldseeker.pointlocation.bob.go new file mode 100644 index 00000000..b4d1e0ea --- /dev/null +++ b/db/models/fieldseeker.pointlocation.bob.go @@ -0,0 +1,1461 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerPointlocation is an object representing the database table. +type FieldseekerPointlocation struct { + Objectid int64 `db:"objectid,pk" ` + // Name + Name null.Val[string] `db:"name" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // Habitat + Habitat null.Val[enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e] `db:"habitat" ` + // Priority + Priority null.Val[enums.FieldseekerPointlocationLocationpriorityEnum] `db:"priority" ` + // Use Type + Usetype null.Val[enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86] `db:"usetype" ` + // Active + Active null.Val[enums.FieldseekerPointlocationNotinuitFEnum] `db:"active" ` + // Description + Description null.Val[string] `db:"description" ` + // Access Description + Accessdesc null.Val[string] `db:"accessdesc" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // Symbology + Symbology null.Val[enums.FieldseekerPointlocationLocationsymbologyEnum] `db:"symbology" ` + // External ID + Externalid null.Val[string] `db:"externalid" ` + // Next Scheduled Action + Nextactiondatescheduled null.Val[time.Time] `db:"nextactiondatescheduled" ` + // Larval Inspection Interval + Larvinspectinterval null.Val[int16] `db:"larvinspectinterval" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + Locationnumber null.Val[int32] `db:"locationnumber" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + // SourceType + Stype null.Val[string] `db:"stype" ` + // Last Inspection Date + Lastinspectdate null.Val[time.Time] `db:"lastinspectdate" ` + // Last Inspection Breeding + Lastinspectbreeding null.Val[string] `db:"lastinspectbreeding" ` + // Last Inspection Average Larvae + Lastinspectavglarvae null.Val[float64] `db:"lastinspectavglarvae" ` + // Last Inspection Average Pupae + Lastinspectavgpupae null.Val[float64] `db:"lastinspectavgpupae" ` + // Last Inspection Larval Stages + Lastinspectlstages null.Val[string] `db:"lastinspectlstages" ` + // Last Inspection Action + Lastinspectactiontaken null.Val[string] `db:"lastinspectactiontaken" ` + // Last Inspection Field Species + Lastinspectfieldspecies null.Val[string] `db:"lastinspectfieldspecies" ` + // Last Treatment Date + Lasttreatdate null.Val[time.Time] `db:"lasttreatdate" ` + // Last Treatment Product + Lasttreatproduct null.Val[string] `db:"lasttreatproduct" ` + // Last Treatment Quantity + Lasttreatqty null.Val[float64] `db:"lasttreatqty" ` + // Last Treatment Quantity Unit + Lasttreatqtyunit null.Val[string] `db:"lasttreatqtyunit" ` + // Last Inspection Activity + Lastinspectactivity null.Val[string] `db:"lastinspectactivity" ` + // Last Treatment Activity + Lasttreatactivity null.Val[string] `db:"lasttreatactivity" ` + // Last Inspection Conditions + Lastinspectconditions null.Val[string] `db:"lastinspectconditions" ` + // Water Origin + Waterorigin null.Val[enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899] `db:"waterorigin" ` + X null.Val[float64] `db:"x" ` + Y null.Val[float64] `db:"y" ` + // Assigned Tech + Assignedtech null.Val[enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B] `db:"assignedtech" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + // Jurisdiction + Jurisdiction null.Val[string] `db:"jurisdiction" ` + // Reason for Deactivation + DeactivateReason null.Val[enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489] `db:"deactivate_reason" ` + Scalarpriority null.Val[int32] `db:"scalarpriority" ` + Sourcestatus null.Val[string] `db:"sourcestatus" ` +} + +// FieldseekerPointlocationSlice is an alias for a slice of pointers to FieldseekerPointlocation. +// This should almost always be used instead of []*FieldseekerPointlocation. +type FieldseekerPointlocationSlice []*FieldseekerPointlocation + +// FieldseekerPointlocations contains methods to work with the pointlocation table +var FieldseekerPointlocations = psql.NewTablex[*FieldseekerPointlocation, FieldseekerPointlocationSlice, *FieldseekerPointlocationSetter]("fieldseeker", "pointlocation", buildFieldseekerPointlocationColumns("fieldseeker.pointlocation")) + +// FieldseekerPointlocationsQuery is a query on the pointlocation table +type FieldseekerPointlocationsQuery = *psql.ViewQuery[*FieldseekerPointlocation, FieldseekerPointlocationSlice] + +func buildFieldseekerPointlocationColumns(alias string) fieldseekerPointlocationColumns { + return fieldseekerPointlocationColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "name", "zone", "habitat", "priority", "usetype", "active", "description", "accessdesc", "comments", "symbology", "externalid", "nextactiondatescheduled", "larvinspectinterval", "zone2", "locationnumber", "globalid", "stype", "lastinspectdate", "lastinspectbreeding", "lastinspectavglarvae", "lastinspectavgpupae", "lastinspectlstages", "lastinspectactiontaken", "lastinspectfieldspecies", "lasttreatdate", "lasttreatproduct", "lasttreatqty", "lasttreatqtyunit", "lastinspectactivity", "lasttreatactivity", "lastinspectconditions", "waterorigin", "x", "y", "assignedtech", "creationdate", "creator", "editdate", "editor", "jurisdiction", "deactivate_reason", "scalarpriority", "sourcestatus", + ).WithParent("fieldseeker.pointlocation"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Name: psql.Quote(alias, "name"), + Zone: psql.Quote(alias, "zone"), + Habitat: psql.Quote(alias, "habitat"), + Priority: psql.Quote(alias, "priority"), + Usetype: psql.Quote(alias, "usetype"), + Active: psql.Quote(alias, "active"), + Description: psql.Quote(alias, "description"), + Accessdesc: psql.Quote(alias, "accessdesc"), + Comments: psql.Quote(alias, "comments"), + Symbology: psql.Quote(alias, "symbology"), + Externalid: psql.Quote(alias, "externalid"), + Nextactiondatescheduled: psql.Quote(alias, "nextactiondatescheduled"), + Larvinspectinterval: psql.Quote(alias, "larvinspectinterval"), + Zone2: psql.Quote(alias, "zone2"), + Locationnumber: psql.Quote(alias, "locationnumber"), + Globalid: psql.Quote(alias, "globalid"), + Stype: psql.Quote(alias, "stype"), + Lastinspectdate: psql.Quote(alias, "lastinspectdate"), + Lastinspectbreeding: psql.Quote(alias, "lastinspectbreeding"), + Lastinspectavglarvae: psql.Quote(alias, "lastinspectavglarvae"), + Lastinspectavgpupae: psql.Quote(alias, "lastinspectavgpupae"), + Lastinspectlstages: psql.Quote(alias, "lastinspectlstages"), + Lastinspectactiontaken: psql.Quote(alias, "lastinspectactiontaken"), + Lastinspectfieldspecies: psql.Quote(alias, "lastinspectfieldspecies"), + Lasttreatdate: psql.Quote(alias, "lasttreatdate"), + Lasttreatproduct: psql.Quote(alias, "lasttreatproduct"), + Lasttreatqty: psql.Quote(alias, "lasttreatqty"), + Lasttreatqtyunit: psql.Quote(alias, "lasttreatqtyunit"), + Lastinspectactivity: psql.Quote(alias, "lastinspectactivity"), + Lasttreatactivity: psql.Quote(alias, "lasttreatactivity"), + Lastinspectconditions: psql.Quote(alias, "lastinspectconditions"), + Waterorigin: psql.Quote(alias, "waterorigin"), + X: psql.Quote(alias, "x"), + Y: psql.Quote(alias, "y"), + Assignedtech: psql.Quote(alias, "assignedtech"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Jurisdiction: psql.Quote(alias, "jurisdiction"), + DeactivateReason: psql.Quote(alias, "deactivate_reason"), + Scalarpriority: psql.Quote(alias, "scalarpriority"), + Sourcestatus: psql.Quote(alias, "sourcestatus"), + } +} + +type fieldseekerPointlocationColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Name psql.Expression + Zone psql.Expression + Habitat psql.Expression + Priority psql.Expression + Usetype psql.Expression + Active psql.Expression + Description psql.Expression + Accessdesc psql.Expression + Comments psql.Expression + Symbology psql.Expression + Externalid psql.Expression + Nextactiondatescheduled psql.Expression + Larvinspectinterval psql.Expression + Zone2 psql.Expression + Locationnumber psql.Expression + Globalid psql.Expression + Stype psql.Expression + Lastinspectdate psql.Expression + Lastinspectbreeding psql.Expression + Lastinspectavglarvae psql.Expression + Lastinspectavgpupae psql.Expression + Lastinspectlstages psql.Expression + Lastinspectactiontaken psql.Expression + Lastinspectfieldspecies psql.Expression + Lasttreatdate psql.Expression + Lasttreatproduct psql.Expression + Lasttreatqty psql.Expression + Lasttreatqtyunit psql.Expression + Lastinspectactivity psql.Expression + Lasttreatactivity psql.Expression + Lastinspectconditions psql.Expression + Waterorigin psql.Expression + X psql.Expression + Y psql.Expression + Assignedtech psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Jurisdiction psql.Expression + DeactivateReason psql.Expression + Scalarpriority psql.Expression + Sourcestatus psql.Expression +} + +func (c fieldseekerPointlocationColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerPointlocationColumns) AliasedAs(alias string) fieldseekerPointlocationColumns { + return buildFieldseekerPointlocationColumns(alias) +} + +// FieldseekerPointlocationSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerPointlocationSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Name omitnull.Val[string] `db:"name" ` + Zone omitnull.Val[string] `db:"zone" ` + Habitat omitnull.Val[enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e] `db:"habitat" ` + Priority omitnull.Val[enums.FieldseekerPointlocationLocationpriorityEnum] `db:"priority" ` + Usetype omitnull.Val[enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86] `db:"usetype" ` + Active omitnull.Val[enums.FieldseekerPointlocationNotinuitFEnum] `db:"active" ` + Description omitnull.Val[string] `db:"description" ` + Accessdesc omitnull.Val[string] `db:"accessdesc" ` + Comments omitnull.Val[string] `db:"comments" ` + Symbology omitnull.Val[enums.FieldseekerPointlocationLocationsymbologyEnum] `db:"symbology" ` + Externalid omitnull.Val[string] `db:"externalid" ` + Nextactiondatescheduled omitnull.Val[time.Time] `db:"nextactiondatescheduled" ` + Larvinspectinterval omitnull.Val[int16] `db:"larvinspectinterval" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Locationnumber omitnull.Val[int32] `db:"locationnumber" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + Stype omitnull.Val[string] `db:"stype" ` + Lastinspectdate omitnull.Val[time.Time] `db:"lastinspectdate" ` + Lastinspectbreeding omitnull.Val[string] `db:"lastinspectbreeding" ` + Lastinspectavglarvae omitnull.Val[float64] `db:"lastinspectavglarvae" ` + Lastinspectavgpupae omitnull.Val[float64] `db:"lastinspectavgpupae" ` + Lastinspectlstages omitnull.Val[string] `db:"lastinspectlstages" ` + Lastinspectactiontaken omitnull.Val[string] `db:"lastinspectactiontaken" ` + Lastinspectfieldspecies omitnull.Val[string] `db:"lastinspectfieldspecies" ` + Lasttreatdate omitnull.Val[time.Time] `db:"lasttreatdate" ` + Lasttreatproduct omitnull.Val[string] `db:"lasttreatproduct" ` + Lasttreatqty omitnull.Val[float64] `db:"lasttreatqty" ` + Lasttreatqtyunit omitnull.Val[string] `db:"lasttreatqtyunit" ` + Lastinspectactivity omitnull.Val[string] `db:"lastinspectactivity" ` + Lasttreatactivity omitnull.Val[string] `db:"lasttreatactivity" ` + Lastinspectconditions omitnull.Val[string] `db:"lastinspectconditions" ` + Waterorigin omitnull.Val[enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899] `db:"waterorigin" ` + X omitnull.Val[float64] `db:"x" ` + Y omitnull.Val[float64] `db:"y" ` + Assignedtech omitnull.Val[enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B] `db:"assignedtech" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Jurisdiction omitnull.Val[string] `db:"jurisdiction" ` + DeactivateReason omitnull.Val[enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489] `db:"deactivate_reason" ` + Scalarpriority omitnull.Val[int32] `db:"scalarpriority" ` + Sourcestatus omitnull.Val[string] `db:"sourcestatus" ` +} + +func (s FieldseekerPointlocationSetter) SetColumns() []string { + vals := make([]string, 0, 44) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Name.IsUnset() { + vals = append(vals, "name") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Habitat.IsUnset() { + vals = append(vals, "habitat") + } + if !s.Priority.IsUnset() { + vals = append(vals, "priority") + } + if !s.Usetype.IsUnset() { + vals = append(vals, "usetype") + } + if !s.Active.IsUnset() { + vals = append(vals, "active") + } + if !s.Description.IsUnset() { + vals = append(vals, "description") + } + if !s.Accessdesc.IsUnset() { + vals = append(vals, "accessdesc") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Symbology.IsUnset() { + vals = append(vals, "symbology") + } + if !s.Externalid.IsUnset() { + vals = append(vals, "externalid") + } + if !s.Nextactiondatescheduled.IsUnset() { + vals = append(vals, "nextactiondatescheduled") + } + if !s.Larvinspectinterval.IsUnset() { + vals = append(vals, "larvinspectinterval") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Locationnumber.IsUnset() { + vals = append(vals, "locationnumber") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.Stype.IsUnset() { + vals = append(vals, "stype") + } + if !s.Lastinspectdate.IsUnset() { + vals = append(vals, "lastinspectdate") + } + if !s.Lastinspectbreeding.IsUnset() { + vals = append(vals, "lastinspectbreeding") + } + if !s.Lastinspectavglarvae.IsUnset() { + vals = append(vals, "lastinspectavglarvae") + } + if !s.Lastinspectavgpupae.IsUnset() { + vals = append(vals, "lastinspectavgpupae") + } + if !s.Lastinspectlstages.IsUnset() { + vals = append(vals, "lastinspectlstages") + } + if !s.Lastinspectactiontaken.IsUnset() { + vals = append(vals, "lastinspectactiontaken") + } + if !s.Lastinspectfieldspecies.IsUnset() { + vals = append(vals, "lastinspectfieldspecies") + } + if !s.Lasttreatdate.IsUnset() { + vals = append(vals, "lasttreatdate") + } + if !s.Lasttreatproduct.IsUnset() { + vals = append(vals, "lasttreatproduct") + } + if !s.Lasttreatqty.IsUnset() { + vals = append(vals, "lasttreatqty") + } + if !s.Lasttreatqtyunit.IsUnset() { + vals = append(vals, "lasttreatqtyunit") + } + if !s.Lastinspectactivity.IsUnset() { + vals = append(vals, "lastinspectactivity") + } + if !s.Lasttreatactivity.IsUnset() { + vals = append(vals, "lasttreatactivity") + } + if !s.Lastinspectconditions.IsUnset() { + vals = append(vals, "lastinspectconditions") + } + if !s.Waterorigin.IsUnset() { + vals = append(vals, "waterorigin") + } + if !s.X.IsUnset() { + vals = append(vals, "x") + } + if !s.Y.IsUnset() { + vals = append(vals, "y") + } + if !s.Assignedtech.IsUnset() { + vals = append(vals, "assignedtech") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Jurisdiction.IsUnset() { + vals = append(vals, "jurisdiction") + } + if !s.DeactivateReason.IsUnset() { + vals = append(vals, "deactivate_reason") + } + if !s.Scalarpriority.IsUnset() { + vals = append(vals, "scalarpriority") + } + if !s.Sourcestatus.IsUnset() { + vals = append(vals, "sourcestatus") + } + return vals +} + +func (s FieldseekerPointlocationSetter) Overwrite(t *FieldseekerPointlocation) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Name.IsUnset() { + t.Name = s.Name.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Habitat.IsUnset() { + t.Habitat = s.Habitat.MustGetNull() + } + if !s.Priority.IsUnset() { + t.Priority = s.Priority.MustGetNull() + } + if !s.Usetype.IsUnset() { + t.Usetype = s.Usetype.MustGetNull() + } + if !s.Active.IsUnset() { + t.Active = s.Active.MustGetNull() + } + if !s.Description.IsUnset() { + t.Description = s.Description.MustGetNull() + } + if !s.Accessdesc.IsUnset() { + t.Accessdesc = s.Accessdesc.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Symbology.IsUnset() { + t.Symbology = s.Symbology.MustGetNull() + } + if !s.Externalid.IsUnset() { + t.Externalid = s.Externalid.MustGetNull() + } + if !s.Nextactiondatescheduled.IsUnset() { + t.Nextactiondatescheduled = s.Nextactiondatescheduled.MustGetNull() + } + if !s.Larvinspectinterval.IsUnset() { + t.Larvinspectinterval = s.Larvinspectinterval.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Locationnumber.IsUnset() { + t.Locationnumber = s.Locationnumber.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.Stype.IsUnset() { + t.Stype = s.Stype.MustGetNull() + } + if !s.Lastinspectdate.IsUnset() { + t.Lastinspectdate = s.Lastinspectdate.MustGetNull() + } + if !s.Lastinspectbreeding.IsUnset() { + t.Lastinspectbreeding = s.Lastinspectbreeding.MustGetNull() + } + if !s.Lastinspectavglarvae.IsUnset() { + t.Lastinspectavglarvae = s.Lastinspectavglarvae.MustGetNull() + } + if !s.Lastinspectavgpupae.IsUnset() { + t.Lastinspectavgpupae = s.Lastinspectavgpupae.MustGetNull() + } + if !s.Lastinspectlstages.IsUnset() { + t.Lastinspectlstages = s.Lastinspectlstages.MustGetNull() + } + if !s.Lastinspectactiontaken.IsUnset() { + t.Lastinspectactiontaken = s.Lastinspectactiontaken.MustGetNull() + } + if !s.Lastinspectfieldspecies.IsUnset() { + t.Lastinspectfieldspecies = s.Lastinspectfieldspecies.MustGetNull() + } + if !s.Lasttreatdate.IsUnset() { + t.Lasttreatdate = s.Lasttreatdate.MustGetNull() + } + if !s.Lasttreatproduct.IsUnset() { + t.Lasttreatproduct = s.Lasttreatproduct.MustGetNull() + } + if !s.Lasttreatqty.IsUnset() { + t.Lasttreatqty = s.Lasttreatqty.MustGetNull() + } + if !s.Lasttreatqtyunit.IsUnset() { + t.Lasttreatqtyunit = s.Lasttreatqtyunit.MustGetNull() + } + if !s.Lastinspectactivity.IsUnset() { + t.Lastinspectactivity = s.Lastinspectactivity.MustGetNull() + } + if !s.Lasttreatactivity.IsUnset() { + t.Lasttreatactivity = s.Lasttreatactivity.MustGetNull() + } + if !s.Lastinspectconditions.IsUnset() { + t.Lastinspectconditions = s.Lastinspectconditions.MustGetNull() + } + if !s.Waterorigin.IsUnset() { + t.Waterorigin = s.Waterorigin.MustGetNull() + } + if !s.X.IsUnset() { + t.X = s.X.MustGetNull() + } + if !s.Y.IsUnset() { + t.Y = s.Y.MustGetNull() + } + if !s.Assignedtech.IsUnset() { + t.Assignedtech = s.Assignedtech.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Jurisdiction.IsUnset() { + t.Jurisdiction = s.Jurisdiction.MustGetNull() + } + if !s.DeactivateReason.IsUnset() { + t.DeactivateReason = s.DeactivateReason.MustGetNull() + } + if !s.Scalarpriority.IsUnset() { + t.Scalarpriority = s.Scalarpriority.MustGetNull() + } + if !s.Sourcestatus.IsUnset() { + t.Sourcestatus = s.Sourcestatus.MustGetNull() + } +} + +func (s *FieldseekerPointlocationSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPointlocations.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 44) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Name.IsUnset() { + vals[1] = psql.Arg(s.Name.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[2] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Habitat.IsUnset() { + vals[3] = psql.Arg(s.Habitat.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Priority.IsUnset() { + vals[4] = psql.Arg(s.Priority.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Usetype.IsUnset() { + vals[5] = psql.Arg(s.Usetype.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Active.IsUnset() { + vals[6] = psql.Arg(s.Active.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Description.IsUnset() { + vals[7] = psql.Arg(s.Description.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Accessdesc.IsUnset() { + vals[8] = psql.Arg(s.Accessdesc.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[9] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Symbology.IsUnset() { + vals[10] = psql.Arg(s.Symbology.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Externalid.IsUnset() { + vals[11] = psql.Arg(s.Externalid.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Nextactiondatescheduled.IsUnset() { + vals[12] = psql.Arg(s.Nextactiondatescheduled.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Larvinspectinterval.IsUnset() { + vals[13] = psql.Arg(s.Larvinspectinterval.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[14] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Locationnumber.IsUnset() { + vals[15] = psql.Arg(s.Locationnumber.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[16] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Stype.IsUnset() { + vals[17] = psql.Arg(s.Stype.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectdate.IsUnset() { + vals[18] = psql.Arg(s.Lastinspectdate.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectbreeding.IsUnset() { + vals[19] = psql.Arg(s.Lastinspectbreeding.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectavglarvae.IsUnset() { + vals[20] = psql.Arg(s.Lastinspectavglarvae.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectavgpupae.IsUnset() { + vals[21] = psql.Arg(s.Lastinspectavgpupae.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectlstages.IsUnset() { + vals[22] = psql.Arg(s.Lastinspectlstages.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectactiontaken.IsUnset() { + vals[23] = psql.Arg(s.Lastinspectactiontaken.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectfieldspecies.IsUnset() { + vals[24] = psql.Arg(s.Lastinspectfieldspecies.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatdate.IsUnset() { + vals[25] = psql.Arg(s.Lasttreatdate.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatproduct.IsUnset() { + vals[26] = psql.Arg(s.Lasttreatproduct.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatqty.IsUnset() { + vals[27] = psql.Arg(s.Lasttreatqty.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatqtyunit.IsUnset() { + vals[28] = psql.Arg(s.Lasttreatqtyunit.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectactivity.IsUnset() { + vals[29] = psql.Arg(s.Lastinspectactivity.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatactivity.IsUnset() { + vals[30] = psql.Arg(s.Lasttreatactivity.MustGetNull()) + } else { + vals[30] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectconditions.IsUnset() { + vals[31] = psql.Arg(s.Lastinspectconditions.MustGetNull()) + } else { + vals[31] = psql.Raw("DEFAULT") + } + + if !s.Waterorigin.IsUnset() { + vals[32] = psql.Arg(s.Waterorigin.MustGetNull()) + } else { + vals[32] = psql.Raw("DEFAULT") + } + + if !s.X.IsUnset() { + vals[33] = psql.Arg(s.X.MustGetNull()) + } else { + vals[33] = psql.Raw("DEFAULT") + } + + if !s.Y.IsUnset() { + vals[34] = psql.Arg(s.Y.MustGetNull()) + } else { + vals[34] = psql.Raw("DEFAULT") + } + + if !s.Assignedtech.IsUnset() { + vals[35] = psql.Arg(s.Assignedtech.MustGetNull()) + } else { + vals[35] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[36] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[36] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[37] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[37] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[38] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[38] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[39] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[39] = psql.Raw("DEFAULT") + } + + if !s.Jurisdiction.IsUnset() { + vals[40] = psql.Arg(s.Jurisdiction.MustGetNull()) + } else { + vals[40] = psql.Raw("DEFAULT") + } + + if !s.DeactivateReason.IsUnset() { + vals[41] = psql.Arg(s.DeactivateReason.MustGetNull()) + } else { + vals[41] = psql.Raw("DEFAULT") + } + + if !s.Scalarpriority.IsUnset() { + vals[42] = psql.Arg(s.Scalarpriority.MustGetNull()) + } else { + vals[42] = psql.Raw("DEFAULT") + } + + if !s.Sourcestatus.IsUnset() { + vals[43] = psql.Arg(s.Sourcestatus.MustGetNull()) + } else { + vals[43] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerPointlocationSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerPointlocationSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 44) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Name.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "name")...), + psql.Arg(s.Name), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Habitat.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habitat")...), + psql.Arg(s.Habitat), + }}) + } + + if !s.Priority.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "priority")...), + psql.Arg(s.Priority), + }}) + } + + if !s.Usetype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "usetype")...), + psql.Arg(s.Usetype), + }}) + } + + if !s.Active.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "active")...), + psql.Arg(s.Active), + }}) + } + + if !s.Description.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "description")...), + psql.Arg(s.Description), + }}) + } + + if !s.Accessdesc.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "accessdesc")...), + psql.Arg(s.Accessdesc), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Symbology.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "symbology")...), + psql.Arg(s.Symbology), + }}) + } + + if !s.Externalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "externalid")...), + psql.Arg(s.Externalid), + }}) + } + + if !s.Nextactiondatescheduled.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "nextactiondatescheduled")...), + psql.Arg(s.Nextactiondatescheduled), + }}) + } + + if !s.Larvinspectinterval.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "larvinspectinterval")...), + psql.Arg(s.Larvinspectinterval), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Locationnumber.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationnumber")...), + psql.Arg(s.Locationnumber), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.Stype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "stype")...), + psql.Arg(s.Stype), + }}) + } + + if !s.Lastinspectdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectdate")...), + psql.Arg(s.Lastinspectdate), + }}) + } + + if !s.Lastinspectbreeding.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectbreeding")...), + psql.Arg(s.Lastinspectbreeding), + }}) + } + + if !s.Lastinspectavglarvae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectavglarvae")...), + psql.Arg(s.Lastinspectavglarvae), + }}) + } + + if !s.Lastinspectavgpupae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectavgpupae")...), + psql.Arg(s.Lastinspectavgpupae), + }}) + } + + if !s.Lastinspectlstages.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectlstages")...), + psql.Arg(s.Lastinspectlstages), + }}) + } + + if !s.Lastinspectactiontaken.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectactiontaken")...), + psql.Arg(s.Lastinspectactiontaken), + }}) + } + + if !s.Lastinspectfieldspecies.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectfieldspecies")...), + psql.Arg(s.Lastinspectfieldspecies), + }}) + } + + if !s.Lasttreatdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatdate")...), + psql.Arg(s.Lasttreatdate), + }}) + } + + if !s.Lasttreatproduct.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatproduct")...), + psql.Arg(s.Lasttreatproduct), + }}) + } + + if !s.Lasttreatqty.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatqty")...), + psql.Arg(s.Lasttreatqty), + }}) + } + + if !s.Lasttreatqtyunit.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatqtyunit")...), + psql.Arg(s.Lasttreatqtyunit), + }}) + } + + if !s.Lastinspectactivity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectactivity")...), + psql.Arg(s.Lastinspectactivity), + }}) + } + + if !s.Lasttreatactivity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatactivity")...), + psql.Arg(s.Lasttreatactivity), + }}) + } + + if !s.Lastinspectconditions.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectconditions")...), + psql.Arg(s.Lastinspectconditions), + }}) + } + + if !s.Waterorigin.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "waterorigin")...), + psql.Arg(s.Waterorigin), + }}) + } + + if !s.X.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "x")...), + psql.Arg(s.X), + }}) + } + + if !s.Y.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "y")...), + psql.Arg(s.Y), + }}) + } + + if !s.Assignedtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "assignedtech")...), + psql.Arg(s.Assignedtech), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Jurisdiction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "jurisdiction")...), + psql.Arg(s.Jurisdiction), + }}) + } + + if !s.DeactivateReason.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "deactivate_reason")...), + psql.Arg(s.DeactivateReason), + }}) + } + + if !s.Scalarpriority.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "scalarpriority")...), + psql.Arg(s.Scalarpriority), + }}) + } + + if !s.Sourcestatus.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sourcestatus")...), + psql.Arg(s.Sourcestatus), + }}) + } + + return exprs +} + +// FindFieldseekerPointlocation retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerPointlocation(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerPointlocation, error) { + if len(cols) == 0 { + return FieldseekerPointlocations.Query( + sm.Where(FieldseekerPointlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerPointlocations.Query( + sm.Where(FieldseekerPointlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerPointlocations.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerPointlocationExists checks the presence of a single record by primary key +func FieldseekerPointlocationExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerPointlocations.Query( + sm.Where(FieldseekerPointlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerPointlocation is retrieved from the database +func (o *FieldseekerPointlocation) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerPointlocations.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerPointlocationSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerPointlocations.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerPointlocationSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerPointlocations.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerPointlocationSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerPointlocations.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerPointlocationSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerPointlocation +func (o *FieldseekerPointlocation) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerPointlocation) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.pointlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerPointlocation +func (o *FieldseekerPointlocation) Update(ctx context.Context, exec bob.Executor, s *FieldseekerPointlocationSetter) error { + v, err := FieldseekerPointlocations.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerPointlocation record with an executor +func (o *FieldseekerPointlocation) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerPointlocations.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerPointlocation using the executor +func (o *FieldseekerPointlocation) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerPointlocations.Query( + sm.Where(FieldseekerPointlocations.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerPointlocationSlice is retrieved from the database +func (o FieldseekerPointlocationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerPointlocations.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerPointlocations.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerPointlocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerPointlocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerPointlocationSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.pointlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerPointlocationSlice) copyMatchingRows(from ...*FieldseekerPointlocation) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerPointlocationSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPointlocations.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerPointlocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerPointlocation: + o.copyMatchingRows(retrieved...) + case FieldseekerPointlocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerPointlocation or a slice of FieldseekerPointlocation + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerPointlocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerPointlocationSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPointlocations.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerPointlocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerPointlocation: + o.copyMatchingRows(retrieved...) + case FieldseekerPointlocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerPointlocation or a slice of FieldseekerPointlocation + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerPointlocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerPointlocationSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerPointlocationSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerPointlocations.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerPointlocationSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerPointlocations.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerPointlocationSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerPointlocations.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerPointlocationWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Name psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Habitat psql.WhereNullMod[Q, enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e] + Priority psql.WhereNullMod[Q, enums.FieldseekerPointlocationLocationpriorityEnum] + Usetype psql.WhereNullMod[Q, enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86] + Active psql.WhereNullMod[Q, enums.FieldseekerPointlocationNotinuitFEnum] + Description psql.WhereNullMod[Q, string] + Accessdesc psql.WhereNullMod[Q, string] + Comments psql.WhereNullMod[Q, string] + Symbology psql.WhereNullMod[Q, enums.FieldseekerPointlocationLocationsymbologyEnum] + Externalid psql.WhereNullMod[Q, string] + Nextactiondatescheduled psql.WhereNullMod[Q, time.Time] + Larvinspectinterval psql.WhereNullMod[Q, int16] + Zone2 psql.WhereNullMod[Q, string] + Locationnumber psql.WhereNullMod[Q, int32] + Globalid psql.WhereNullMod[Q, uuid.UUID] + Stype psql.WhereNullMod[Q, string] + Lastinspectdate psql.WhereNullMod[Q, time.Time] + Lastinspectbreeding psql.WhereNullMod[Q, string] + Lastinspectavglarvae psql.WhereNullMod[Q, float64] + Lastinspectavgpupae psql.WhereNullMod[Q, float64] + Lastinspectlstages psql.WhereNullMod[Q, string] + Lastinspectactiontaken psql.WhereNullMod[Q, string] + Lastinspectfieldspecies psql.WhereNullMod[Q, string] + Lasttreatdate psql.WhereNullMod[Q, time.Time] + Lasttreatproduct psql.WhereNullMod[Q, string] + Lasttreatqty psql.WhereNullMod[Q, float64] + Lasttreatqtyunit psql.WhereNullMod[Q, string] + Lastinspectactivity psql.WhereNullMod[Q, string] + Lasttreatactivity psql.WhereNullMod[Q, string] + Lastinspectconditions psql.WhereNullMod[Q, string] + Waterorigin psql.WhereNullMod[Q, enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899] + X psql.WhereNullMod[Q, float64] + Y psql.WhereNullMod[Q, float64] + Assignedtech psql.WhereNullMod[Q, enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Jurisdiction psql.WhereNullMod[Q, string] + DeactivateReason psql.WhereNullMod[Q, enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489] + Scalarpriority psql.WhereNullMod[Q, int32] + Sourcestatus psql.WhereNullMod[Q, string] +} + +func (fieldseekerPointlocationWhere[Q]) AliasedAs(alias string) fieldseekerPointlocationWhere[Q] { + return buildFieldseekerPointlocationWhere[Q](buildFieldseekerPointlocationColumns(alias)) +} + +func buildFieldseekerPointlocationWhere[Q psql.Filterable](cols fieldseekerPointlocationColumns) fieldseekerPointlocationWhere[Q] { + return fieldseekerPointlocationWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Name: psql.WhereNull[Q, string](cols.Name), + Zone: psql.WhereNull[Q, string](cols.Zone), + Habitat: psql.WhereNull[Q, enums.FieldseekerPointlocationPointlocationHabitatB4d8135a497949C88BB367e](cols.Habitat), + Priority: psql.WhereNull[Q, enums.FieldseekerPointlocationLocationpriorityEnum](cols.Priority), + Usetype: psql.WhereNull[Q, enums.FieldseekerPointlocationPointlocationUsetype58d62d18ef4f47fc8cb9874df86](cols.Usetype), + Active: psql.WhereNull[Q, enums.FieldseekerPointlocationNotinuitFEnum](cols.Active), + Description: psql.WhereNull[Q, string](cols.Description), + Accessdesc: psql.WhereNull[Q, string](cols.Accessdesc), + Comments: psql.WhereNull[Q, string](cols.Comments), + Symbology: psql.WhereNull[Q, enums.FieldseekerPointlocationLocationsymbologyEnum](cols.Symbology), + Externalid: psql.WhereNull[Q, string](cols.Externalid), + Nextactiondatescheduled: psql.WhereNull[Q, time.Time](cols.Nextactiondatescheduled), + Larvinspectinterval: psql.WhereNull[Q, int16](cols.Larvinspectinterval), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Locationnumber: psql.WhereNull[Q, int32](cols.Locationnumber), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + Stype: psql.WhereNull[Q, string](cols.Stype), + Lastinspectdate: psql.WhereNull[Q, time.Time](cols.Lastinspectdate), + Lastinspectbreeding: psql.WhereNull[Q, string](cols.Lastinspectbreeding), + Lastinspectavglarvae: psql.WhereNull[Q, float64](cols.Lastinspectavglarvae), + Lastinspectavgpupae: psql.WhereNull[Q, float64](cols.Lastinspectavgpupae), + Lastinspectlstages: psql.WhereNull[Q, string](cols.Lastinspectlstages), + Lastinspectactiontaken: psql.WhereNull[Q, string](cols.Lastinspectactiontaken), + Lastinspectfieldspecies: psql.WhereNull[Q, string](cols.Lastinspectfieldspecies), + Lasttreatdate: psql.WhereNull[Q, time.Time](cols.Lasttreatdate), + Lasttreatproduct: psql.WhereNull[Q, string](cols.Lasttreatproduct), + Lasttreatqty: psql.WhereNull[Q, float64](cols.Lasttreatqty), + Lasttreatqtyunit: psql.WhereNull[Q, string](cols.Lasttreatqtyunit), + Lastinspectactivity: psql.WhereNull[Q, string](cols.Lastinspectactivity), + Lasttreatactivity: psql.WhereNull[Q, string](cols.Lasttreatactivity), + Lastinspectconditions: psql.WhereNull[Q, string](cols.Lastinspectconditions), + Waterorigin: psql.WhereNull[Q, enums.FieldseekerPointlocationPointlocationWaterorigin197B22BFF3eb4dad8899](cols.Waterorigin), + X: psql.WhereNull[Q, float64](cols.X), + Y: psql.WhereNull[Q, float64](cols.Y), + Assignedtech: psql.WhereNull[Q, enums.FieldseekerPointlocationPointlocationAssignedtech9393a1622474429D85B](cols.Assignedtech), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Jurisdiction: psql.WhereNull[Q, string](cols.Jurisdiction), + DeactivateReason: psql.WhereNull[Q, enums.FieldseekerPointlocationPointlocationDeactivateReasonDD303085B33C489](cols.DeactivateReason), + Scalarpriority: psql.WhereNull[Q, int32](cols.Scalarpriority), + Sourcestatus: psql.WhereNull[Q, string](cols.Sourcestatus), + } +} diff --git a/db/models/fieldseeker.polygonlocation.bob.go b/db/models/fieldseeker.polygonlocation.bob.go new file mode 100644 index 00000000..18b83c12 --- /dev/null +++ b/db/models/fieldseeker.polygonlocation.bob.go @@ -0,0 +1,1410 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerPolygonlocation is an object representing the database table. +type FieldseekerPolygonlocation struct { + Objectid int64 `db:"objectid,pk" ` + // Name + Name null.Val[string] `db:"name" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // Habitat + Habitat null.Val[enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65] `db:"habitat" ` + // Priority + Priority null.Val[enums.FieldseekerPolygonlocationLocationpriorityEnum] `db:"priority" ` + // Use Type + Usetype null.Val[enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13] `db:"usetype" ` + // Active + Active null.Val[enums.FieldseekerPolygonlocationNotinuitFEnum] `db:"active" ` + // Description + Description null.Val[string] `db:"description" ` + // Access Description + Accessdesc null.Val[string] `db:"accessdesc" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // Symbology + Symbology null.Val[enums.FieldseekerPolygonlocationLocationsymbologyEnum] `db:"symbology" ` + // External ID + Externalid null.Val[string] `db:"externalid" ` + // Acres + Acres null.Val[float64] `db:"acres" ` + // Next Scheduled Action + Nextactiondatescheduled null.Val[time.Time] `db:"nextactiondatescheduled" ` + // Larval Inspection Interval + Larvinspectinterval null.Val[int16] `db:"larvinspectinterval" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + Locationnumber null.Val[int32] `db:"locationnumber" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + // Last Inspection Date + Lastinspectdate null.Val[time.Time] `db:"lastinspectdate" ` + // Last Inspection Breeding + Lastinspectbreeding null.Val[string] `db:"lastinspectbreeding" ` + // Last Inspection Average Larvae + Lastinspectavglarvae null.Val[float64] `db:"lastinspectavglarvae" ` + // Last Inspection Average Pupae + Lastinspectavgpupae null.Val[float64] `db:"lastinspectavgpupae" ` + // Last Inspection Larval Stages + Lastinspectlstages null.Val[string] `db:"lastinspectlstages" ` + // Last Inspection Action + Lastinspectactiontaken null.Val[string] `db:"lastinspectactiontaken" ` + // Last Inspection Field Species + Lastinspectfieldspecies null.Val[string] `db:"lastinspectfieldspecies" ` + // Last Treatment Date + Lasttreatdate null.Val[time.Time] `db:"lasttreatdate" ` + // Last Treatment Product + Lasttreatproduct null.Val[string] `db:"lasttreatproduct" ` + // Last Treatment Quantity + Lasttreatqty null.Val[float64] `db:"lasttreatqty" ` + // Last Treatment Quantity Unit + Lasttreatqtyunit null.Val[string] `db:"lasttreatqtyunit" ` + // Hectares + Hectares null.Val[float64] `db:"hectares" ` + // Last Inspection Activity + Lastinspectactivity null.Val[string] `db:"lastinspectactivity" ` + // Last Treatment Activity + Lasttreatactivity null.Val[string] `db:"lasttreatactivity" ` + // Last Inspection Conditions + Lastinspectconditions null.Val[string] `db:"lastinspectconditions" ` + // Water Origin + Waterorigin null.Val[enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9] `db:"waterorigin" ` + Filter null.Val[string] `db:"filter" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + // Jurisdiction + Jurisdiction null.Val[string] `db:"jurisdiction" ` + ShapeArea null.Val[float64] `db:"shape__area" ` + ShapeLength null.Val[float64] `db:"shape__length" ` +} + +// FieldseekerPolygonlocationSlice is an alias for a slice of pointers to FieldseekerPolygonlocation. +// This should almost always be used instead of []*FieldseekerPolygonlocation. +type FieldseekerPolygonlocationSlice []*FieldseekerPolygonlocation + +// FieldseekerPolygonlocations contains methods to work with the polygonlocation table +var FieldseekerPolygonlocations = psql.NewTablex[*FieldseekerPolygonlocation, FieldseekerPolygonlocationSlice, *FieldseekerPolygonlocationSetter]("fieldseeker", "polygonlocation", buildFieldseekerPolygonlocationColumns("fieldseeker.polygonlocation")) + +// FieldseekerPolygonlocationsQuery is a query on the polygonlocation table +type FieldseekerPolygonlocationsQuery = *psql.ViewQuery[*FieldseekerPolygonlocation, FieldseekerPolygonlocationSlice] + +func buildFieldseekerPolygonlocationColumns(alias string) fieldseekerPolygonlocationColumns { + return fieldseekerPolygonlocationColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "name", "zone", "habitat", "priority", "usetype", "active", "description", "accessdesc", "comments", "symbology", "externalid", "acres", "nextactiondatescheduled", "larvinspectinterval", "zone2", "locationnumber", "globalid", "lastinspectdate", "lastinspectbreeding", "lastinspectavglarvae", "lastinspectavgpupae", "lastinspectlstages", "lastinspectactiontaken", "lastinspectfieldspecies", "lasttreatdate", "lasttreatproduct", "lasttreatqty", "lasttreatqtyunit", "hectares", "lastinspectactivity", "lasttreatactivity", "lastinspectconditions", "waterorigin", "filter", "creationdate", "creator", "editdate", "editor", "jurisdiction", "shape__area", "shape__length", + ).WithParent("fieldseeker.polygonlocation"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Name: psql.Quote(alias, "name"), + Zone: psql.Quote(alias, "zone"), + Habitat: psql.Quote(alias, "habitat"), + Priority: psql.Quote(alias, "priority"), + Usetype: psql.Quote(alias, "usetype"), + Active: psql.Quote(alias, "active"), + Description: psql.Quote(alias, "description"), + Accessdesc: psql.Quote(alias, "accessdesc"), + Comments: psql.Quote(alias, "comments"), + Symbology: psql.Quote(alias, "symbology"), + Externalid: psql.Quote(alias, "externalid"), + Acres: psql.Quote(alias, "acres"), + Nextactiondatescheduled: psql.Quote(alias, "nextactiondatescheduled"), + Larvinspectinterval: psql.Quote(alias, "larvinspectinterval"), + Zone2: psql.Quote(alias, "zone2"), + Locationnumber: psql.Quote(alias, "locationnumber"), + Globalid: psql.Quote(alias, "globalid"), + Lastinspectdate: psql.Quote(alias, "lastinspectdate"), + Lastinspectbreeding: psql.Quote(alias, "lastinspectbreeding"), + Lastinspectavglarvae: psql.Quote(alias, "lastinspectavglarvae"), + Lastinspectavgpupae: psql.Quote(alias, "lastinspectavgpupae"), + Lastinspectlstages: psql.Quote(alias, "lastinspectlstages"), + Lastinspectactiontaken: psql.Quote(alias, "lastinspectactiontaken"), + Lastinspectfieldspecies: psql.Quote(alias, "lastinspectfieldspecies"), + Lasttreatdate: psql.Quote(alias, "lasttreatdate"), + Lasttreatproduct: psql.Quote(alias, "lasttreatproduct"), + Lasttreatqty: psql.Quote(alias, "lasttreatqty"), + Lasttreatqtyunit: psql.Quote(alias, "lasttreatqtyunit"), + Hectares: psql.Quote(alias, "hectares"), + Lastinspectactivity: psql.Quote(alias, "lastinspectactivity"), + Lasttreatactivity: psql.Quote(alias, "lasttreatactivity"), + Lastinspectconditions: psql.Quote(alias, "lastinspectconditions"), + Waterorigin: psql.Quote(alias, "waterorigin"), + Filter: psql.Quote(alias, "filter"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Jurisdiction: psql.Quote(alias, "jurisdiction"), + ShapeArea: psql.Quote(alias, "shape__area"), + ShapeLength: psql.Quote(alias, "shape__length"), + } +} + +type fieldseekerPolygonlocationColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Name psql.Expression + Zone psql.Expression + Habitat psql.Expression + Priority psql.Expression + Usetype psql.Expression + Active psql.Expression + Description psql.Expression + Accessdesc psql.Expression + Comments psql.Expression + Symbology psql.Expression + Externalid psql.Expression + Acres psql.Expression + Nextactiondatescheduled psql.Expression + Larvinspectinterval psql.Expression + Zone2 psql.Expression + Locationnumber psql.Expression + Globalid psql.Expression + Lastinspectdate psql.Expression + Lastinspectbreeding psql.Expression + Lastinspectavglarvae psql.Expression + Lastinspectavgpupae psql.Expression + Lastinspectlstages psql.Expression + Lastinspectactiontaken psql.Expression + Lastinspectfieldspecies psql.Expression + Lasttreatdate psql.Expression + Lasttreatproduct psql.Expression + Lasttreatqty psql.Expression + Lasttreatqtyunit psql.Expression + Hectares psql.Expression + Lastinspectactivity psql.Expression + Lasttreatactivity psql.Expression + Lastinspectconditions psql.Expression + Waterorigin psql.Expression + Filter psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Jurisdiction psql.Expression + ShapeArea psql.Expression + ShapeLength psql.Expression +} + +func (c fieldseekerPolygonlocationColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerPolygonlocationColumns) AliasedAs(alias string) fieldseekerPolygonlocationColumns { + return buildFieldseekerPolygonlocationColumns(alias) +} + +// FieldseekerPolygonlocationSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerPolygonlocationSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Name omitnull.Val[string] `db:"name" ` + Zone omitnull.Val[string] `db:"zone" ` + Habitat omitnull.Val[enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65] `db:"habitat" ` + Priority omitnull.Val[enums.FieldseekerPolygonlocationLocationpriorityEnum] `db:"priority" ` + Usetype omitnull.Val[enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13] `db:"usetype" ` + Active omitnull.Val[enums.FieldseekerPolygonlocationNotinuitFEnum] `db:"active" ` + Description omitnull.Val[string] `db:"description" ` + Accessdesc omitnull.Val[string] `db:"accessdesc" ` + Comments omitnull.Val[string] `db:"comments" ` + Symbology omitnull.Val[enums.FieldseekerPolygonlocationLocationsymbologyEnum] `db:"symbology" ` + Externalid omitnull.Val[string] `db:"externalid" ` + Acres omitnull.Val[float64] `db:"acres" ` + Nextactiondatescheduled omitnull.Val[time.Time] `db:"nextactiondatescheduled" ` + Larvinspectinterval omitnull.Val[int16] `db:"larvinspectinterval" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Locationnumber omitnull.Val[int32] `db:"locationnumber" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + Lastinspectdate omitnull.Val[time.Time] `db:"lastinspectdate" ` + Lastinspectbreeding omitnull.Val[string] `db:"lastinspectbreeding" ` + Lastinspectavglarvae omitnull.Val[float64] `db:"lastinspectavglarvae" ` + Lastinspectavgpupae omitnull.Val[float64] `db:"lastinspectavgpupae" ` + Lastinspectlstages omitnull.Val[string] `db:"lastinspectlstages" ` + Lastinspectactiontaken omitnull.Val[string] `db:"lastinspectactiontaken" ` + Lastinspectfieldspecies omitnull.Val[string] `db:"lastinspectfieldspecies" ` + Lasttreatdate omitnull.Val[time.Time] `db:"lasttreatdate" ` + Lasttreatproduct omitnull.Val[string] `db:"lasttreatproduct" ` + Lasttreatqty omitnull.Val[float64] `db:"lasttreatqty" ` + Lasttreatqtyunit omitnull.Val[string] `db:"lasttreatqtyunit" ` + Hectares omitnull.Val[float64] `db:"hectares" ` + Lastinspectactivity omitnull.Val[string] `db:"lastinspectactivity" ` + Lasttreatactivity omitnull.Val[string] `db:"lasttreatactivity" ` + Lastinspectconditions omitnull.Val[string] `db:"lastinspectconditions" ` + Waterorigin omitnull.Val[enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9] `db:"waterorigin" ` + Filter omitnull.Val[string] `db:"filter" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Jurisdiction omitnull.Val[string] `db:"jurisdiction" ` + ShapeArea omitnull.Val[float64] `db:"shape__area" ` + ShapeLength omitnull.Val[float64] `db:"shape__length" ` +} + +func (s FieldseekerPolygonlocationSetter) SetColumns() []string { + vals := make([]string, 0, 42) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Name.IsUnset() { + vals = append(vals, "name") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Habitat.IsUnset() { + vals = append(vals, "habitat") + } + if !s.Priority.IsUnset() { + vals = append(vals, "priority") + } + if !s.Usetype.IsUnset() { + vals = append(vals, "usetype") + } + if !s.Active.IsUnset() { + vals = append(vals, "active") + } + if !s.Description.IsUnset() { + vals = append(vals, "description") + } + if !s.Accessdesc.IsUnset() { + vals = append(vals, "accessdesc") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Symbology.IsUnset() { + vals = append(vals, "symbology") + } + if !s.Externalid.IsUnset() { + vals = append(vals, "externalid") + } + if !s.Acres.IsUnset() { + vals = append(vals, "acres") + } + if !s.Nextactiondatescheduled.IsUnset() { + vals = append(vals, "nextactiondatescheduled") + } + if !s.Larvinspectinterval.IsUnset() { + vals = append(vals, "larvinspectinterval") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Locationnumber.IsUnset() { + vals = append(vals, "locationnumber") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.Lastinspectdate.IsUnset() { + vals = append(vals, "lastinspectdate") + } + if !s.Lastinspectbreeding.IsUnset() { + vals = append(vals, "lastinspectbreeding") + } + if !s.Lastinspectavglarvae.IsUnset() { + vals = append(vals, "lastinspectavglarvae") + } + if !s.Lastinspectavgpupae.IsUnset() { + vals = append(vals, "lastinspectavgpupae") + } + if !s.Lastinspectlstages.IsUnset() { + vals = append(vals, "lastinspectlstages") + } + if !s.Lastinspectactiontaken.IsUnset() { + vals = append(vals, "lastinspectactiontaken") + } + if !s.Lastinspectfieldspecies.IsUnset() { + vals = append(vals, "lastinspectfieldspecies") + } + if !s.Lasttreatdate.IsUnset() { + vals = append(vals, "lasttreatdate") + } + if !s.Lasttreatproduct.IsUnset() { + vals = append(vals, "lasttreatproduct") + } + if !s.Lasttreatqty.IsUnset() { + vals = append(vals, "lasttreatqty") + } + if !s.Lasttreatqtyunit.IsUnset() { + vals = append(vals, "lasttreatqtyunit") + } + if !s.Hectares.IsUnset() { + vals = append(vals, "hectares") + } + if !s.Lastinspectactivity.IsUnset() { + vals = append(vals, "lastinspectactivity") + } + if !s.Lasttreatactivity.IsUnset() { + vals = append(vals, "lasttreatactivity") + } + if !s.Lastinspectconditions.IsUnset() { + vals = append(vals, "lastinspectconditions") + } + if !s.Waterorigin.IsUnset() { + vals = append(vals, "waterorigin") + } + if !s.Filter.IsUnset() { + vals = append(vals, "filter") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Jurisdiction.IsUnset() { + vals = append(vals, "jurisdiction") + } + if !s.ShapeArea.IsUnset() { + vals = append(vals, "shape__area") + } + if !s.ShapeLength.IsUnset() { + vals = append(vals, "shape__length") + } + return vals +} + +func (s FieldseekerPolygonlocationSetter) Overwrite(t *FieldseekerPolygonlocation) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Name.IsUnset() { + t.Name = s.Name.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Habitat.IsUnset() { + t.Habitat = s.Habitat.MustGetNull() + } + if !s.Priority.IsUnset() { + t.Priority = s.Priority.MustGetNull() + } + if !s.Usetype.IsUnset() { + t.Usetype = s.Usetype.MustGetNull() + } + if !s.Active.IsUnset() { + t.Active = s.Active.MustGetNull() + } + if !s.Description.IsUnset() { + t.Description = s.Description.MustGetNull() + } + if !s.Accessdesc.IsUnset() { + t.Accessdesc = s.Accessdesc.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Symbology.IsUnset() { + t.Symbology = s.Symbology.MustGetNull() + } + if !s.Externalid.IsUnset() { + t.Externalid = s.Externalid.MustGetNull() + } + if !s.Acres.IsUnset() { + t.Acres = s.Acres.MustGetNull() + } + if !s.Nextactiondatescheduled.IsUnset() { + t.Nextactiondatescheduled = s.Nextactiondatescheduled.MustGetNull() + } + if !s.Larvinspectinterval.IsUnset() { + t.Larvinspectinterval = s.Larvinspectinterval.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Locationnumber.IsUnset() { + t.Locationnumber = s.Locationnumber.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.Lastinspectdate.IsUnset() { + t.Lastinspectdate = s.Lastinspectdate.MustGetNull() + } + if !s.Lastinspectbreeding.IsUnset() { + t.Lastinspectbreeding = s.Lastinspectbreeding.MustGetNull() + } + if !s.Lastinspectavglarvae.IsUnset() { + t.Lastinspectavglarvae = s.Lastinspectavglarvae.MustGetNull() + } + if !s.Lastinspectavgpupae.IsUnset() { + t.Lastinspectavgpupae = s.Lastinspectavgpupae.MustGetNull() + } + if !s.Lastinspectlstages.IsUnset() { + t.Lastinspectlstages = s.Lastinspectlstages.MustGetNull() + } + if !s.Lastinspectactiontaken.IsUnset() { + t.Lastinspectactiontaken = s.Lastinspectactiontaken.MustGetNull() + } + if !s.Lastinspectfieldspecies.IsUnset() { + t.Lastinspectfieldspecies = s.Lastinspectfieldspecies.MustGetNull() + } + if !s.Lasttreatdate.IsUnset() { + t.Lasttreatdate = s.Lasttreatdate.MustGetNull() + } + if !s.Lasttreatproduct.IsUnset() { + t.Lasttreatproduct = s.Lasttreatproduct.MustGetNull() + } + if !s.Lasttreatqty.IsUnset() { + t.Lasttreatqty = s.Lasttreatqty.MustGetNull() + } + if !s.Lasttreatqtyunit.IsUnset() { + t.Lasttreatqtyunit = s.Lasttreatqtyunit.MustGetNull() + } + if !s.Hectares.IsUnset() { + t.Hectares = s.Hectares.MustGetNull() + } + if !s.Lastinspectactivity.IsUnset() { + t.Lastinspectactivity = s.Lastinspectactivity.MustGetNull() + } + if !s.Lasttreatactivity.IsUnset() { + t.Lasttreatactivity = s.Lasttreatactivity.MustGetNull() + } + if !s.Lastinspectconditions.IsUnset() { + t.Lastinspectconditions = s.Lastinspectconditions.MustGetNull() + } + if !s.Waterorigin.IsUnset() { + t.Waterorigin = s.Waterorigin.MustGetNull() + } + if !s.Filter.IsUnset() { + t.Filter = s.Filter.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Jurisdiction.IsUnset() { + t.Jurisdiction = s.Jurisdiction.MustGetNull() + } + if !s.ShapeArea.IsUnset() { + t.ShapeArea = s.ShapeArea.MustGetNull() + } + if !s.ShapeLength.IsUnset() { + t.ShapeLength = s.ShapeLength.MustGetNull() + } +} + +func (s *FieldseekerPolygonlocationSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPolygonlocations.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 42) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Name.IsUnset() { + vals[1] = psql.Arg(s.Name.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[2] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Habitat.IsUnset() { + vals[3] = psql.Arg(s.Habitat.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Priority.IsUnset() { + vals[4] = psql.Arg(s.Priority.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Usetype.IsUnset() { + vals[5] = psql.Arg(s.Usetype.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Active.IsUnset() { + vals[6] = psql.Arg(s.Active.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Description.IsUnset() { + vals[7] = psql.Arg(s.Description.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Accessdesc.IsUnset() { + vals[8] = psql.Arg(s.Accessdesc.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[9] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Symbology.IsUnset() { + vals[10] = psql.Arg(s.Symbology.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Externalid.IsUnset() { + vals[11] = psql.Arg(s.Externalid.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Acres.IsUnset() { + vals[12] = psql.Arg(s.Acres.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Nextactiondatescheduled.IsUnset() { + vals[13] = psql.Arg(s.Nextactiondatescheduled.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Larvinspectinterval.IsUnset() { + vals[14] = psql.Arg(s.Larvinspectinterval.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[15] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Locationnumber.IsUnset() { + vals[16] = psql.Arg(s.Locationnumber.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[17] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectdate.IsUnset() { + vals[18] = psql.Arg(s.Lastinspectdate.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectbreeding.IsUnset() { + vals[19] = psql.Arg(s.Lastinspectbreeding.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectavglarvae.IsUnset() { + vals[20] = psql.Arg(s.Lastinspectavglarvae.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectavgpupae.IsUnset() { + vals[21] = psql.Arg(s.Lastinspectavgpupae.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectlstages.IsUnset() { + vals[22] = psql.Arg(s.Lastinspectlstages.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectactiontaken.IsUnset() { + vals[23] = psql.Arg(s.Lastinspectactiontaken.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectfieldspecies.IsUnset() { + vals[24] = psql.Arg(s.Lastinspectfieldspecies.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatdate.IsUnset() { + vals[25] = psql.Arg(s.Lasttreatdate.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatproduct.IsUnset() { + vals[26] = psql.Arg(s.Lasttreatproduct.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatqty.IsUnset() { + vals[27] = psql.Arg(s.Lasttreatqty.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatqtyunit.IsUnset() { + vals[28] = psql.Arg(s.Lasttreatqtyunit.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.Hectares.IsUnset() { + vals[29] = psql.Arg(s.Hectares.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectactivity.IsUnset() { + vals[30] = psql.Arg(s.Lastinspectactivity.MustGetNull()) + } else { + vals[30] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatactivity.IsUnset() { + vals[31] = psql.Arg(s.Lasttreatactivity.MustGetNull()) + } else { + vals[31] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectconditions.IsUnset() { + vals[32] = psql.Arg(s.Lastinspectconditions.MustGetNull()) + } else { + vals[32] = psql.Raw("DEFAULT") + } + + if !s.Waterorigin.IsUnset() { + vals[33] = psql.Arg(s.Waterorigin.MustGetNull()) + } else { + vals[33] = psql.Raw("DEFAULT") + } + + if !s.Filter.IsUnset() { + vals[34] = psql.Arg(s.Filter.MustGetNull()) + } else { + vals[34] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[35] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[35] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[36] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[36] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[37] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[37] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[38] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[38] = psql.Raw("DEFAULT") + } + + if !s.Jurisdiction.IsUnset() { + vals[39] = psql.Arg(s.Jurisdiction.MustGetNull()) + } else { + vals[39] = psql.Raw("DEFAULT") + } + + if !s.ShapeArea.IsUnset() { + vals[40] = psql.Arg(s.ShapeArea.MustGetNull()) + } else { + vals[40] = psql.Raw("DEFAULT") + } + + if !s.ShapeLength.IsUnset() { + vals[41] = psql.Arg(s.ShapeLength.MustGetNull()) + } else { + vals[41] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerPolygonlocationSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerPolygonlocationSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 42) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Name.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "name")...), + psql.Arg(s.Name), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Habitat.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habitat")...), + psql.Arg(s.Habitat), + }}) + } + + if !s.Priority.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "priority")...), + psql.Arg(s.Priority), + }}) + } + + if !s.Usetype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "usetype")...), + psql.Arg(s.Usetype), + }}) + } + + if !s.Active.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "active")...), + psql.Arg(s.Active), + }}) + } + + if !s.Description.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "description")...), + psql.Arg(s.Description), + }}) + } + + if !s.Accessdesc.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "accessdesc")...), + psql.Arg(s.Accessdesc), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Symbology.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "symbology")...), + psql.Arg(s.Symbology), + }}) + } + + if !s.Externalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "externalid")...), + psql.Arg(s.Externalid), + }}) + } + + if !s.Acres.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "acres")...), + psql.Arg(s.Acres), + }}) + } + + if !s.Nextactiondatescheduled.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "nextactiondatescheduled")...), + psql.Arg(s.Nextactiondatescheduled), + }}) + } + + if !s.Larvinspectinterval.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "larvinspectinterval")...), + psql.Arg(s.Larvinspectinterval), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Locationnumber.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationnumber")...), + psql.Arg(s.Locationnumber), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.Lastinspectdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectdate")...), + psql.Arg(s.Lastinspectdate), + }}) + } + + if !s.Lastinspectbreeding.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectbreeding")...), + psql.Arg(s.Lastinspectbreeding), + }}) + } + + if !s.Lastinspectavglarvae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectavglarvae")...), + psql.Arg(s.Lastinspectavglarvae), + }}) + } + + if !s.Lastinspectavgpupae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectavgpupae")...), + psql.Arg(s.Lastinspectavgpupae), + }}) + } + + if !s.Lastinspectlstages.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectlstages")...), + psql.Arg(s.Lastinspectlstages), + }}) + } + + if !s.Lastinspectactiontaken.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectactiontaken")...), + psql.Arg(s.Lastinspectactiontaken), + }}) + } + + if !s.Lastinspectfieldspecies.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectfieldspecies")...), + psql.Arg(s.Lastinspectfieldspecies), + }}) + } + + if !s.Lasttreatdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatdate")...), + psql.Arg(s.Lasttreatdate), + }}) + } + + if !s.Lasttreatproduct.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatproduct")...), + psql.Arg(s.Lasttreatproduct), + }}) + } + + if !s.Lasttreatqty.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatqty")...), + psql.Arg(s.Lasttreatqty), + }}) + } + + if !s.Lasttreatqtyunit.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatqtyunit")...), + psql.Arg(s.Lasttreatqtyunit), + }}) + } + + if !s.Hectares.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "hectares")...), + psql.Arg(s.Hectares), + }}) + } + + if !s.Lastinspectactivity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectactivity")...), + psql.Arg(s.Lastinspectactivity), + }}) + } + + if !s.Lasttreatactivity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatactivity")...), + psql.Arg(s.Lasttreatactivity), + }}) + } + + if !s.Lastinspectconditions.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectconditions")...), + psql.Arg(s.Lastinspectconditions), + }}) + } + + if !s.Waterorigin.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "waterorigin")...), + psql.Arg(s.Waterorigin), + }}) + } + + if !s.Filter.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "filter")...), + psql.Arg(s.Filter), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Jurisdiction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "jurisdiction")...), + psql.Arg(s.Jurisdiction), + }}) + } + + if !s.ShapeArea.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "shape__area")...), + psql.Arg(s.ShapeArea), + }}) + } + + if !s.ShapeLength.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "shape__length")...), + psql.Arg(s.ShapeLength), + }}) + } + + return exprs +} + +// FindFieldseekerPolygonlocation retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerPolygonlocation(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerPolygonlocation, error) { + if len(cols) == 0 { + return FieldseekerPolygonlocations.Query( + sm.Where(FieldseekerPolygonlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerPolygonlocations.Query( + sm.Where(FieldseekerPolygonlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerPolygonlocations.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerPolygonlocationExists checks the presence of a single record by primary key +func FieldseekerPolygonlocationExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerPolygonlocations.Query( + sm.Where(FieldseekerPolygonlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerPolygonlocation is retrieved from the database +func (o *FieldseekerPolygonlocation) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerPolygonlocations.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerPolygonlocationSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerPolygonlocations.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerPolygonlocationSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerPolygonlocations.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerPolygonlocationSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerPolygonlocations.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerPolygonlocationSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerPolygonlocation +func (o *FieldseekerPolygonlocation) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerPolygonlocation) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.polygonlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerPolygonlocation +func (o *FieldseekerPolygonlocation) Update(ctx context.Context, exec bob.Executor, s *FieldseekerPolygonlocationSetter) error { + v, err := FieldseekerPolygonlocations.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerPolygonlocation record with an executor +func (o *FieldseekerPolygonlocation) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerPolygonlocations.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerPolygonlocation using the executor +func (o *FieldseekerPolygonlocation) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerPolygonlocations.Query( + sm.Where(FieldseekerPolygonlocations.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerPolygonlocationSlice is retrieved from the database +func (o FieldseekerPolygonlocationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerPolygonlocations.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerPolygonlocations.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerPolygonlocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerPolygonlocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerPolygonlocationSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.polygonlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerPolygonlocationSlice) copyMatchingRows(from ...*FieldseekerPolygonlocation) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerPolygonlocationSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPolygonlocations.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerPolygonlocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerPolygonlocation: + o.copyMatchingRows(retrieved...) + case FieldseekerPolygonlocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerPolygonlocation or a slice of FieldseekerPolygonlocation + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerPolygonlocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerPolygonlocationSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPolygonlocations.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerPolygonlocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerPolygonlocation: + o.copyMatchingRows(retrieved...) + case FieldseekerPolygonlocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerPolygonlocation or a slice of FieldseekerPolygonlocation + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerPolygonlocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerPolygonlocationSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerPolygonlocationSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerPolygonlocations.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerPolygonlocationSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerPolygonlocations.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerPolygonlocationSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerPolygonlocations.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerPolygonlocationWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Name psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Habitat psql.WhereNullMod[Q, enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65] + Priority psql.WhereNullMod[Q, enums.FieldseekerPolygonlocationLocationpriorityEnum] + Usetype psql.WhereNullMod[Q, enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13] + Active psql.WhereNullMod[Q, enums.FieldseekerPolygonlocationNotinuitFEnum] + Description psql.WhereNullMod[Q, string] + Accessdesc psql.WhereNullMod[Q, string] + Comments psql.WhereNullMod[Q, string] + Symbology psql.WhereNullMod[Q, enums.FieldseekerPolygonlocationLocationsymbologyEnum] + Externalid psql.WhereNullMod[Q, string] + Acres psql.WhereNullMod[Q, float64] + Nextactiondatescheduled psql.WhereNullMod[Q, time.Time] + Larvinspectinterval psql.WhereNullMod[Q, int16] + Zone2 psql.WhereNullMod[Q, string] + Locationnumber psql.WhereNullMod[Q, int32] + Globalid psql.WhereNullMod[Q, uuid.UUID] + Lastinspectdate psql.WhereNullMod[Q, time.Time] + Lastinspectbreeding psql.WhereNullMod[Q, string] + Lastinspectavglarvae psql.WhereNullMod[Q, float64] + Lastinspectavgpupae psql.WhereNullMod[Q, float64] + Lastinspectlstages psql.WhereNullMod[Q, string] + Lastinspectactiontaken psql.WhereNullMod[Q, string] + Lastinspectfieldspecies psql.WhereNullMod[Q, string] + Lasttreatdate psql.WhereNullMod[Q, time.Time] + Lasttreatproduct psql.WhereNullMod[Q, string] + Lasttreatqty psql.WhereNullMod[Q, float64] + Lasttreatqtyunit psql.WhereNullMod[Q, string] + Hectares psql.WhereNullMod[Q, float64] + Lastinspectactivity psql.WhereNullMod[Q, string] + Lasttreatactivity psql.WhereNullMod[Q, string] + Lastinspectconditions psql.WhereNullMod[Q, string] + Waterorigin psql.WhereNullMod[Q, enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9] + Filter psql.WhereNullMod[Q, string] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Jurisdiction psql.WhereNullMod[Q, string] + ShapeArea psql.WhereNullMod[Q, float64] + ShapeLength psql.WhereNullMod[Q, float64] +} + +func (fieldseekerPolygonlocationWhere[Q]) AliasedAs(alias string) fieldseekerPolygonlocationWhere[Q] { + return buildFieldseekerPolygonlocationWhere[Q](buildFieldseekerPolygonlocationColumns(alias)) +} + +func buildFieldseekerPolygonlocationWhere[Q psql.Filterable](cols fieldseekerPolygonlocationColumns) fieldseekerPolygonlocationWhere[Q] { + return fieldseekerPolygonlocationWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Name: psql.WhereNull[Q, string](cols.Name), + Zone: psql.WhereNull[Q, string](cols.Zone), + Habitat: psql.WhereNull[Q, enums.FieldseekerPolygonlocationPolygonlocationHabitat45e9dde79ac84d959df8b65](cols.Habitat), + Priority: psql.WhereNull[Q, enums.FieldseekerPolygonlocationLocationpriorityEnum](cols.Priority), + Usetype: psql.WhereNull[Q, enums.FieldseekerPolygonlocationPolygonlocationUsetypeE546154cb9544b9aa8e7b13](cols.Usetype), + Active: psql.WhereNull[Q, enums.FieldseekerPolygonlocationNotinuitFEnum](cols.Active), + Description: psql.WhereNull[Q, string](cols.Description), + Accessdesc: psql.WhereNull[Q, string](cols.Accessdesc), + Comments: psql.WhereNull[Q, string](cols.Comments), + Symbology: psql.WhereNull[Q, enums.FieldseekerPolygonlocationLocationsymbologyEnum](cols.Symbology), + Externalid: psql.WhereNull[Q, string](cols.Externalid), + Acres: psql.WhereNull[Q, float64](cols.Acres), + Nextactiondatescheduled: psql.WhereNull[Q, time.Time](cols.Nextactiondatescheduled), + Larvinspectinterval: psql.WhereNull[Q, int16](cols.Larvinspectinterval), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Locationnumber: psql.WhereNull[Q, int32](cols.Locationnumber), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + Lastinspectdate: psql.WhereNull[Q, time.Time](cols.Lastinspectdate), + Lastinspectbreeding: psql.WhereNull[Q, string](cols.Lastinspectbreeding), + Lastinspectavglarvae: psql.WhereNull[Q, float64](cols.Lastinspectavglarvae), + Lastinspectavgpupae: psql.WhereNull[Q, float64](cols.Lastinspectavgpupae), + Lastinspectlstages: psql.WhereNull[Q, string](cols.Lastinspectlstages), + Lastinspectactiontaken: psql.WhereNull[Q, string](cols.Lastinspectactiontaken), + Lastinspectfieldspecies: psql.WhereNull[Q, string](cols.Lastinspectfieldspecies), + Lasttreatdate: psql.WhereNull[Q, time.Time](cols.Lasttreatdate), + Lasttreatproduct: psql.WhereNull[Q, string](cols.Lasttreatproduct), + Lasttreatqty: psql.WhereNull[Q, float64](cols.Lasttreatqty), + Lasttreatqtyunit: psql.WhereNull[Q, string](cols.Lasttreatqtyunit), + Hectares: psql.WhereNull[Q, float64](cols.Hectares), + Lastinspectactivity: psql.WhereNull[Q, string](cols.Lastinspectactivity), + Lasttreatactivity: psql.WhereNull[Q, string](cols.Lasttreatactivity), + Lastinspectconditions: psql.WhereNull[Q, string](cols.Lastinspectconditions), + Waterorigin: psql.WhereNull[Q, enums.FieldseekerPolygonlocationPolygonlocationWateroriginE9018e925F474FF9](cols.Waterorigin), + Filter: psql.WhereNull[Q, string](cols.Filter), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Jurisdiction: psql.WhereNull[Q, string](cols.Jurisdiction), + ShapeArea: psql.WhereNull[Q, float64](cols.ShapeArea), + ShapeLength: psql.WhereNull[Q, float64](cols.ShapeLength), + } +} diff --git a/db/models/fieldseeker.pool.bob.go b/db/models/fieldseeker.pool.bob.go new file mode 100644 index 00000000..b2f7f469 --- /dev/null +++ b/db/models/fieldseeker.pool.bob.go @@ -0,0 +1,1041 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerPool is an object representing the database table. +type FieldseekerPool struct { + Objectid int64 `db:"objectid,pk" ` + // Trap Data ID + TrapdataID null.Val[uuid.UUID] `db:"trapdata_id" ` + // Date Sent + Datesent null.Val[time.Time] `db:"datesent" ` + // Survey Tech + Survtech null.Val[string] `db:"survtech" ` + // Date Tested + Datetested null.Val[time.Time] `db:"datetested" ` + // Test Tech + Testtech null.Val[string] `db:"testtech" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // Sample ID + Sampleid null.Val[string] `db:"sampleid" ` + // Processed + Processed null.Val[enums.FieldseekerPoolNotinuitFEnum] `db:"processed" ` + LabID null.Val[uuid.UUID] `db:"lab_id" ` + // Test Methods + Testmethod null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum] `db:"testmethod" ` + // Diseases Tested + Diseasetested null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum] `db:"diseasetested" ` + // Diseases Positive + Diseasepos null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum] `db:"diseasepos" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Lab null.Val[enums.FieldseekerPoolMosquitolabnameEnum] `db:"lab" ` + // Pool Year + Poolyear null.Val[int16] `db:"poolyear" ` + // Gateway Sync + Gatewaysync null.Val[int16] `db:"gatewaysync" ` + Vectorsurvcollectionid null.Val[string] `db:"vectorsurvcollectionid" ` + Vectorsurvpoolid null.Val[string] `db:"vectorsurvpoolid" ` + Vectorsurvtrapdataid null.Val[string] `db:"vectorsurvtrapdataid" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` +} + +// FieldseekerPoolSlice is an alias for a slice of pointers to FieldseekerPool. +// This should almost always be used instead of []*FieldseekerPool. +type FieldseekerPoolSlice []*FieldseekerPool + +// FieldseekerPools contains methods to work with the pool table +var FieldseekerPools = psql.NewTablex[*FieldseekerPool, FieldseekerPoolSlice, *FieldseekerPoolSetter]("fieldseeker", "pool", buildFieldseekerPoolColumns("fieldseeker.pool")) + +// FieldseekerPoolsQuery is a query on the pool table +type FieldseekerPoolsQuery = *psql.ViewQuery[*FieldseekerPool, FieldseekerPoolSlice] + +func buildFieldseekerPoolColumns(alias string) fieldseekerPoolColumns { + return fieldseekerPoolColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "trapdata_id", "datesent", "survtech", "datetested", "testtech", "comments", "sampleid", "processed", "lab_id", "testmethod", "diseasetested", "diseasepos", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "lab", "poolyear", "gatewaysync", "vectorsurvcollectionid", "vectorsurvpoolid", "vectorsurvtrapdataid", "creationdate", "creator", "editdate", "editor", + ).WithParent("fieldseeker.pool"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + TrapdataID: psql.Quote(alias, "trapdata_id"), + Datesent: psql.Quote(alias, "datesent"), + Survtech: psql.Quote(alias, "survtech"), + Datetested: psql.Quote(alias, "datetested"), + Testtech: psql.Quote(alias, "testtech"), + Comments: psql.Quote(alias, "comments"), + Sampleid: psql.Quote(alias, "sampleid"), + Processed: psql.Quote(alias, "processed"), + LabID: psql.Quote(alias, "lab_id"), + Testmethod: psql.Quote(alias, "testmethod"), + Diseasetested: psql.Quote(alias, "diseasetested"), + Diseasepos: psql.Quote(alias, "diseasepos"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Lab: psql.Quote(alias, "lab"), + Poolyear: psql.Quote(alias, "poolyear"), + Gatewaysync: psql.Quote(alias, "gatewaysync"), + Vectorsurvcollectionid: psql.Quote(alias, "vectorsurvcollectionid"), + Vectorsurvpoolid: psql.Quote(alias, "vectorsurvpoolid"), + Vectorsurvtrapdataid: psql.Quote(alias, "vectorsurvtrapdataid"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + } +} + +type fieldseekerPoolColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + TrapdataID psql.Expression + Datesent psql.Expression + Survtech psql.Expression + Datetested psql.Expression + Testtech psql.Expression + Comments psql.Expression + Sampleid psql.Expression + Processed psql.Expression + LabID psql.Expression + Testmethod psql.Expression + Diseasetested psql.Expression + Diseasepos psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Lab psql.Expression + Poolyear psql.Expression + Gatewaysync psql.Expression + Vectorsurvcollectionid psql.Expression + Vectorsurvpoolid psql.Expression + Vectorsurvtrapdataid psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression +} + +func (c fieldseekerPoolColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerPoolColumns) AliasedAs(alias string) fieldseekerPoolColumns { + return buildFieldseekerPoolColumns(alias) +} + +// FieldseekerPoolSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerPoolSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + TrapdataID omitnull.Val[uuid.UUID] `db:"trapdata_id" ` + Datesent omitnull.Val[time.Time] `db:"datesent" ` + Survtech omitnull.Val[string] `db:"survtech" ` + Datetested omitnull.Val[time.Time] `db:"datetested" ` + Testtech omitnull.Val[string] `db:"testtech" ` + Comments omitnull.Val[string] `db:"comments" ` + Sampleid omitnull.Val[string] `db:"sampleid" ` + Processed omitnull.Val[enums.FieldseekerPoolNotinuitFEnum] `db:"processed" ` + LabID omitnull.Val[uuid.UUID] `db:"lab_id" ` + Testmethod omitnull.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum] `db:"testmethod" ` + Diseasetested omitnull.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum] `db:"diseasetested" ` + Diseasepos omitnull.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum] `db:"diseasepos" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Lab omitnull.Val[enums.FieldseekerPoolMosquitolabnameEnum] `db:"lab" ` + Poolyear omitnull.Val[int16] `db:"poolyear" ` + Gatewaysync omitnull.Val[int16] `db:"gatewaysync" ` + Vectorsurvcollectionid omitnull.Val[string] `db:"vectorsurvcollectionid" ` + Vectorsurvpoolid omitnull.Val[string] `db:"vectorsurvpoolid" ` + Vectorsurvtrapdataid omitnull.Val[string] `db:"vectorsurvtrapdataid" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` +} + +func (s FieldseekerPoolSetter) SetColumns() []string { + vals := make([]string, 0, 28) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.TrapdataID.IsUnset() { + vals = append(vals, "trapdata_id") + } + if !s.Datesent.IsUnset() { + vals = append(vals, "datesent") + } + if !s.Survtech.IsUnset() { + vals = append(vals, "survtech") + } + if !s.Datetested.IsUnset() { + vals = append(vals, "datetested") + } + if !s.Testtech.IsUnset() { + vals = append(vals, "testtech") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Sampleid.IsUnset() { + vals = append(vals, "sampleid") + } + if !s.Processed.IsUnset() { + vals = append(vals, "processed") + } + if !s.LabID.IsUnset() { + vals = append(vals, "lab_id") + } + if !s.Testmethod.IsUnset() { + vals = append(vals, "testmethod") + } + if !s.Diseasetested.IsUnset() { + vals = append(vals, "diseasetested") + } + if !s.Diseasepos.IsUnset() { + vals = append(vals, "diseasepos") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Lab.IsUnset() { + vals = append(vals, "lab") + } + if !s.Poolyear.IsUnset() { + vals = append(vals, "poolyear") + } + if !s.Gatewaysync.IsUnset() { + vals = append(vals, "gatewaysync") + } + if !s.Vectorsurvcollectionid.IsUnset() { + vals = append(vals, "vectorsurvcollectionid") + } + if !s.Vectorsurvpoolid.IsUnset() { + vals = append(vals, "vectorsurvpoolid") + } + if !s.Vectorsurvtrapdataid.IsUnset() { + vals = append(vals, "vectorsurvtrapdataid") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + return vals +} + +func (s FieldseekerPoolSetter) Overwrite(t *FieldseekerPool) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.TrapdataID.IsUnset() { + t.TrapdataID = s.TrapdataID.MustGetNull() + } + if !s.Datesent.IsUnset() { + t.Datesent = s.Datesent.MustGetNull() + } + if !s.Survtech.IsUnset() { + t.Survtech = s.Survtech.MustGetNull() + } + if !s.Datetested.IsUnset() { + t.Datetested = s.Datetested.MustGetNull() + } + if !s.Testtech.IsUnset() { + t.Testtech = s.Testtech.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Sampleid.IsUnset() { + t.Sampleid = s.Sampleid.MustGetNull() + } + if !s.Processed.IsUnset() { + t.Processed = s.Processed.MustGetNull() + } + if !s.LabID.IsUnset() { + t.LabID = s.LabID.MustGetNull() + } + if !s.Testmethod.IsUnset() { + t.Testmethod = s.Testmethod.MustGetNull() + } + if !s.Diseasetested.IsUnset() { + t.Diseasetested = s.Diseasetested.MustGetNull() + } + if !s.Diseasepos.IsUnset() { + t.Diseasepos = s.Diseasepos.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Lab.IsUnset() { + t.Lab = s.Lab.MustGetNull() + } + if !s.Poolyear.IsUnset() { + t.Poolyear = s.Poolyear.MustGetNull() + } + if !s.Gatewaysync.IsUnset() { + t.Gatewaysync = s.Gatewaysync.MustGetNull() + } + if !s.Vectorsurvcollectionid.IsUnset() { + t.Vectorsurvcollectionid = s.Vectorsurvcollectionid.MustGetNull() + } + if !s.Vectorsurvpoolid.IsUnset() { + t.Vectorsurvpoolid = s.Vectorsurvpoolid.MustGetNull() + } + if !s.Vectorsurvtrapdataid.IsUnset() { + t.Vectorsurvtrapdataid = s.Vectorsurvtrapdataid.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } +} + +func (s *FieldseekerPoolSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPools.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 28) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.TrapdataID.IsUnset() { + vals[1] = psql.Arg(s.TrapdataID.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Datesent.IsUnset() { + vals[2] = psql.Arg(s.Datesent.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Survtech.IsUnset() { + vals[3] = psql.Arg(s.Survtech.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Datetested.IsUnset() { + vals[4] = psql.Arg(s.Datetested.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Testtech.IsUnset() { + vals[5] = psql.Arg(s.Testtech.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[6] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Sampleid.IsUnset() { + vals[7] = psql.Arg(s.Sampleid.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Processed.IsUnset() { + vals[8] = psql.Arg(s.Processed.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.LabID.IsUnset() { + vals[9] = psql.Arg(s.LabID.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Testmethod.IsUnset() { + vals[10] = psql.Arg(s.Testmethod.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Diseasetested.IsUnset() { + vals[11] = psql.Arg(s.Diseasetested.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Diseasepos.IsUnset() { + vals[12] = psql.Arg(s.Diseasepos.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[13] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[14] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[15] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[16] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[17] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Lab.IsUnset() { + vals[18] = psql.Arg(s.Lab.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Poolyear.IsUnset() { + vals[19] = psql.Arg(s.Poolyear.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Gatewaysync.IsUnset() { + vals[20] = psql.Arg(s.Gatewaysync.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Vectorsurvcollectionid.IsUnset() { + vals[21] = psql.Arg(s.Vectorsurvcollectionid.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Vectorsurvpoolid.IsUnset() { + vals[22] = psql.Arg(s.Vectorsurvpoolid.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Vectorsurvtrapdataid.IsUnset() { + vals[23] = psql.Arg(s.Vectorsurvtrapdataid.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[24] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[25] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[26] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[27] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerPoolSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerPoolSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 28) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.TrapdataID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "trapdata_id")...), + psql.Arg(s.TrapdataID), + }}) + } + + if !s.Datesent.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "datesent")...), + psql.Arg(s.Datesent), + }}) + } + + if !s.Survtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "survtech")...), + psql.Arg(s.Survtech), + }}) + } + + if !s.Datetested.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "datetested")...), + psql.Arg(s.Datetested), + }}) + } + + if !s.Testtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "testtech")...), + psql.Arg(s.Testtech), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Sampleid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sampleid")...), + psql.Arg(s.Sampleid), + }}) + } + + if !s.Processed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "processed")...), + psql.Arg(s.Processed), + }}) + } + + if !s.LabID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lab_id")...), + psql.Arg(s.LabID), + }}) + } + + if !s.Testmethod.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "testmethod")...), + psql.Arg(s.Testmethod), + }}) + } + + if !s.Diseasetested.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "diseasetested")...), + psql.Arg(s.Diseasetested), + }}) + } + + if !s.Diseasepos.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "diseasepos")...), + psql.Arg(s.Diseasepos), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Lab.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lab")...), + psql.Arg(s.Lab), + }}) + } + + if !s.Poolyear.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "poolyear")...), + psql.Arg(s.Poolyear), + }}) + } + + if !s.Gatewaysync.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "gatewaysync")...), + psql.Arg(s.Gatewaysync), + }}) + } + + if !s.Vectorsurvcollectionid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "vectorsurvcollectionid")...), + psql.Arg(s.Vectorsurvcollectionid), + }}) + } + + if !s.Vectorsurvpoolid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "vectorsurvpoolid")...), + psql.Arg(s.Vectorsurvpoolid), + }}) + } + + if !s.Vectorsurvtrapdataid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "vectorsurvtrapdataid")...), + psql.Arg(s.Vectorsurvtrapdataid), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + return exprs +} + +// FindFieldseekerPool retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerPool(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerPool, error) { + if len(cols) == 0 { + return FieldseekerPools.Query( + sm.Where(FieldseekerPools.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerPools.Query( + sm.Where(FieldseekerPools.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerPools.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerPoolExists checks the presence of a single record by primary key +func FieldseekerPoolExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerPools.Query( + sm.Where(FieldseekerPools.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerPool is retrieved from the database +func (o *FieldseekerPool) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerPools.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerPoolSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerPools.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerPoolSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerPools.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerPoolSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerPools.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerPoolSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerPool +func (o *FieldseekerPool) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerPool) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.pool", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerPool +func (o *FieldseekerPool) Update(ctx context.Context, exec bob.Executor, s *FieldseekerPoolSetter) error { + v, err := FieldseekerPools.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerPool record with an executor +func (o *FieldseekerPool) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerPools.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerPool using the executor +func (o *FieldseekerPool) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerPools.Query( + sm.Where(FieldseekerPools.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerPoolSlice is retrieved from the database +func (o FieldseekerPoolSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerPools.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerPools.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerPools.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerPools.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerPoolSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.pool", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerPoolSlice) copyMatchingRows(from ...*FieldseekerPool) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerPoolSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPools.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerPool: + o.copyMatchingRows(retrieved) + case []*FieldseekerPool: + o.copyMatchingRows(retrieved...) + case FieldseekerPoolSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerPool or a slice of FieldseekerPool + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerPools.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerPoolSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPools.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerPool: + o.copyMatchingRows(retrieved) + case []*FieldseekerPool: + o.copyMatchingRows(retrieved...) + case FieldseekerPoolSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerPool or a slice of FieldseekerPool + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerPools.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerPoolSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerPoolSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerPools.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerPoolSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerPools.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerPoolSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerPools.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerPoolWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + TrapdataID psql.WhereNullMod[Q, uuid.UUID] + Datesent psql.WhereNullMod[Q, time.Time] + Survtech psql.WhereNullMod[Q, string] + Datetested psql.WhereNullMod[Q, time.Time] + Testtech psql.WhereNullMod[Q, string] + Comments psql.WhereNullMod[Q, string] + Sampleid psql.WhereNullMod[Q, string] + Processed psql.WhereNullMod[Q, enums.FieldseekerPoolNotinuitFEnum] + LabID psql.WhereNullMod[Q, uuid.UUID] + Testmethod psql.WhereNullMod[Q, enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum] + Diseasetested psql.WhereNullMod[Q, enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum] + Diseasepos psql.WhereNullMod[Q, enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Lab psql.WhereNullMod[Q, enums.FieldseekerPoolMosquitolabnameEnum] + Poolyear psql.WhereNullMod[Q, int16] + Gatewaysync psql.WhereNullMod[Q, int16] + Vectorsurvcollectionid psql.WhereNullMod[Q, string] + Vectorsurvpoolid psql.WhereNullMod[Q, string] + Vectorsurvtrapdataid psql.WhereNullMod[Q, string] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] +} + +func (fieldseekerPoolWhere[Q]) AliasedAs(alias string) fieldseekerPoolWhere[Q] { + return buildFieldseekerPoolWhere[Q](buildFieldseekerPoolColumns(alias)) +} + +func buildFieldseekerPoolWhere[Q psql.Filterable](cols fieldseekerPoolColumns) fieldseekerPoolWhere[Q] { + return fieldseekerPoolWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + TrapdataID: psql.WhereNull[Q, uuid.UUID](cols.TrapdataID), + Datesent: psql.WhereNull[Q, time.Time](cols.Datesent), + Survtech: psql.WhereNull[Q, string](cols.Survtech), + Datetested: psql.WhereNull[Q, time.Time](cols.Datetested), + Testtech: psql.WhereNull[Q, string](cols.Testtech), + Comments: psql.WhereNull[Q, string](cols.Comments), + Sampleid: psql.WhereNull[Q, string](cols.Sampleid), + Processed: psql.WhereNull[Q, enums.FieldseekerPoolNotinuitFEnum](cols.Processed), + LabID: psql.WhereNull[Q, uuid.UUID](cols.LabID), + Testmethod: psql.WhereNull[Q, enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum](cols.Testmethod), + Diseasetested: psql.WhereNull[Q, enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum](cols.Diseasetested), + Diseasepos: psql.WhereNull[Q, enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum](cols.Diseasepos), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Lab: psql.WhereNull[Q, enums.FieldseekerPoolMosquitolabnameEnum](cols.Lab), + Poolyear: psql.WhereNull[Q, int16](cols.Poolyear), + Gatewaysync: psql.WhereNull[Q, int16](cols.Gatewaysync), + Vectorsurvcollectionid: psql.WhereNull[Q, string](cols.Vectorsurvcollectionid), + Vectorsurvpoolid: psql.WhereNull[Q, string](cols.Vectorsurvpoolid), + Vectorsurvtrapdataid: psql.WhereNull[Q, string](cols.Vectorsurvtrapdataid), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + } +} diff --git a/db/models/fieldseeker.poolbuffer.bob.go b/db/models/fieldseeker.poolbuffer.bob.go new file mode 100644 index 00000000..b6ba6236 --- /dev/null +++ b/db/models/fieldseeker.poolbuffer.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerPoolbuffer is an object representing the database table. +type FieldseekerPoolbuffer struct{} + +// FieldseekerPoolbufferSlice is an alias for a slice of pointers to FieldseekerPoolbuffer. +// This should almost always be used instead of []*FieldseekerPoolbuffer. +type FieldseekerPoolbufferSlice []*FieldseekerPoolbuffer + +// FieldseekerPoolbuffers contains methods to work with the poolbuffer view +var FieldseekerPoolbuffers = psql.NewViewx[*FieldseekerPoolbuffer, FieldseekerPoolbufferSlice]("fieldseeker", "poolbuffer", buildFieldseekerPoolbufferColumns("fieldseeker.poolbuffer")) + +// FieldseekerPoolbuffersQuery is a query on the poolbuffer view +type FieldseekerPoolbuffersQuery = *psql.ViewQuery[*FieldseekerPoolbuffer, FieldseekerPoolbufferSlice] + +func buildFieldseekerPoolbufferColumns(alias string) fieldseekerPoolbufferColumns { + return fieldseekerPoolbufferColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.poolbuffer"), + tableAlias: alias, + } +} + +type fieldseekerPoolbufferColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerPoolbufferColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerPoolbufferColumns) AliasedAs(alias string) fieldseekerPoolbufferColumns { + return buildFieldseekerPoolbufferColumns(alias) +} + +// AfterQueryHook is called after FieldseekerPoolbuffer is retrieved from the database +func (o *FieldseekerPoolbuffer) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerPoolbuffers.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerPoolbufferSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerPoolbufferSlice is retrieved from the database +func (o FieldseekerPoolbufferSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerPoolbuffers.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerPoolbufferWhere[Q psql.Filterable] struct{} + +func (fieldseekerPoolbufferWhere[Q]) AliasedAs(alias string) fieldseekerPoolbufferWhere[Q] { + return buildFieldseekerPoolbufferWhere[Q](buildFieldseekerPoolbufferColumns(alias)) +} + +func buildFieldseekerPoolbufferWhere[Q psql.Filterable](cols fieldseekerPoolbufferColumns) fieldseekerPoolbufferWhere[Q] { + return fieldseekerPoolbufferWhere[Q]{} +} diff --git a/db/models/fieldseeker.pooldetail.bob.go b/db/models/fieldseeker.pooldetail.bob.go new file mode 100644 index 00000000..6559c763 --- /dev/null +++ b/db/models/fieldseeker.pooldetail.bob.go @@ -0,0 +1,681 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerPooldetail is an object representing the database table. +type FieldseekerPooldetail struct { + Objectid int64 `db:"objectid,pk" ` + // Trap Data ID + TrapdataID null.Val[uuid.UUID] `db:"trapdata_id" ` + // Pool ID + PoolID null.Val[uuid.UUID] `db:"pool_id" ` + // Species + Species null.Val[string] `db:"species" ` + // Females + Females null.Val[int16] `db:"females" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` +} + +// FieldseekerPooldetailSlice is an alias for a slice of pointers to FieldseekerPooldetail. +// This should almost always be used instead of []*FieldseekerPooldetail. +type FieldseekerPooldetailSlice []*FieldseekerPooldetail + +// FieldseekerPooldetails contains methods to work with the pooldetail table +var FieldseekerPooldetails = psql.NewTablex[*FieldseekerPooldetail, FieldseekerPooldetailSlice, *FieldseekerPooldetailSetter]("fieldseeker", "pooldetail", buildFieldseekerPooldetailColumns("fieldseeker.pooldetail")) + +// FieldseekerPooldetailsQuery is a query on the pooldetail table +type FieldseekerPooldetailsQuery = *psql.ViewQuery[*FieldseekerPooldetail, FieldseekerPooldetailSlice] + +func buildFieldseekerPooldetailColumns(alias string) fieldseekerPooldetailColumns { + return fieldseekerPooldetailColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "trapdata_id", "pool_id", "species", "females", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "creationdate", "creator", "editdate", "editor", + ).WithParent("fieldseeker.pooldetail"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + TrapdataID: psql.Quote(alias, "trapdata_id"), + PoolID: psql.Quote(alias, "pool_id"), + Species: psql.Quote(alias, "species"), + Females: psql.Quote(alias, "females"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + } +} + +type fieldseekerPooldetailColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + TrapdataID psql.Expression + PoolID psql.Expression + Species psql.Expression + Females psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression +} + +func (c fieldseekerPooldetailColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerPooldetailColumns) AliasedAs(alias string) fieldseekerPooldetailColumns { + return buildFieldseekerPooldetailColumns(alias) +} + +// FieldseekerPooldetailSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerPooldetailSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + TrapdataID omitnull.Val[uuid.UUID] `db:"trapdata_id" ` + PoolID omitnull.Val[uuid.UUID] `db:"pool_id" ` + Species omitnull.Val[string] `db:"species" ` + Females omitnull.Val[int16] `db:"females" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` +} + +func (s FieldseekerPooldetailSetter) SetColumns() []string { + vals := make([]string, 0, 14) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.TrapdataID.IsUnset() { + vals = append(vals, "trapdata_id") + } + if !s.PoolID.IsUnset() { + vals = append(vals, "pool_id") + } + if !s.Species.IsUnset() { + vals = append(vals, "species") + } + if !s.Females.IsUnset() { + vals = append(vals, "females") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + return vals +} + +func (s FieldseekerPooldetailSetter) Overwrite(t *FieldseekerPooldetail) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.TrapdataID.IsUnset() { + t.TrapdataID = s.TrapdataID.MustGetNull() + } + if !s.PoolID.IsUnset() { + t.PoolID = s.PoolID.MustGetNull() + } + if !s.Species.IsUnset() { + t.Species = s.Species.MustGetNull() + } + if !s.Females.IsUnset() { + t.Females = s.Females.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } +} + +func (s *FieldseekerPooldetailSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPooldetails.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 14) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.TrapdataID.IsUnset() { + vals[1] = psql.Arg(s.TrapdataID.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.PoolID.IsUnset() { + vals[2] = psql.Arg(s.PoolID.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Species.IsUnset() { + vals[3] = psql.Arg(s.Species.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Females.IsUnset() { + vals[4] = psql.Arg(s.Females.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[5] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[6] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[7] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[8] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[9] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[10] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[11] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[12] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[13] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerPooldetailSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerPooldetailSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 14) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.TrapdataID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "trapdata_id")...), + psql.Arg(s.TrapdataID), + }}) + } + + if !s.PoolID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "pool_id")...), + psql.Arg(s.PoolID), + }}) + } + + if !s.Species.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "species")...), + psql.Arg(s.Species), + }}) + } + + if !s.Females.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "females")...), + psql.Arg(s.Females), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + return exprs +} + +// FindFieldseekerPooldetail retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerPooldetail(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerPooldetail, error) { + if len(cols) == 0 { + return FieldseekerPooldetails.Query( + sm.Where(FieldseekerPooldetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerPooldetails.Query( + sm.Where(FieldseekerPooldetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerPooldetails.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerPooldetailExists checks the presence of a single record by primary key +func FieldseekerPooldetailExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerPooldetails.Query( + sm.Where(FieldseekerPooldetails.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerPooldetail is retrieved from the database +func (o *FieldseekerPooldetail) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerPooldetails.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerPooldetailSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerPooldetails.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerPooldetailSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerPooldetails.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerPooldetailSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerPooldetails.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerPooldetailSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerPooldetail +func (o *FieldseekerPooldetail) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerPooldetail) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.pooldetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerPooldetail +func (o *FieldseekerPooldetail) Update(ctx context.Context, exec bob.Executor, s *FieldseekerPooldetailSetter) error { + v, err := FieldseekerPooldetails.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerPooldetail record with an executor +func (o *FieldseekerPooldetail) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerPooldetails.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerPooldetail using the executor +func (o *FieldseekerPooldetail) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerPooldetails.Query( + sm.Where(FieldseekerPooldetails.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerPooldetailSlice is retrieved from the database +func (o FieldseekerPooldetailSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerPooldetails.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerPooldetails.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerPooldetails.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerPooldetails.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerPooldetailSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.pooldetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerPooldetailSlice) copyMatchingRows(from ...*FieldseekerPooldetail) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerPooldetailSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPooldetails.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerPooldetail: + o.copyMatchingRows(retrieved) + case []*FieldseekerPooldetail: + o.copyMatchingRows(retrieved...) + case FieldseekerPooldetailSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerPooldetail or a slice of FieldseekerPooldetail + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerPooldetails.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerPooldetailSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerPooldetails.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerPooldetail: + o.copyMatchingRows(retrieved) + case []*FieldseekerPooldetail: + o.copyMatchingRows(retrieved...) + case FieldseekerPooldetailSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerPooldetail or a slice of FieldseekerPooldetail + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerPooldetails.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerPooldetailSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerPooldetailSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerPooldetails.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerPooldetailSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerPooldetails.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerPooldetailSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerPooldetails.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerPooldetailWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + TrapdataID psql.WhereNullMod[Q, uuid.UUID] + PoolID psql.WhereNullMod[Q, uuid.UUID] + Species psql.WhereNullMod[Q, string] + Females psql.WhereNullMod[Q, int16] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] +} + +func (fieldseekerPooldetailWhere[Q]) AliasedAs(alias string) fieldseekerPooldetailWhere[Q] { + return buildFieldseekerPooldetailWhere[Q](buildFieldseekerPooldetailColumns(alias)) +} + +func buildFieldseekerPooldetailWhere[Q psql.Filterable](cols fieldseekerPooldetailColumns) fieldseekerPooldetailWhere[Q] { + return fieldseekerPooldetailWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + TrapdataID: psql.WhereNull[Q, uuid.UUID](cols.TrapdataID), + PoolID: psql.WhereNull[Q, uuid.UUID](cols.PoolID), + Species: psql.WhereNull[Q, string](cols.Species), + Females: psql.WhereNull[Q, int16](cols.Females), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + } +} diff --git a/db/models/fieldseeker.proposedtreatmentarea.bob.go b/db/models/fieldseeker.proposedtreatmentarea.bob.go new file mode 100644 index 00000000..59dc8033 --- /dev/null +++ b/db/models/fieldseeker.proposedtreatmentarea.bob.go @@ -0,0 +1,1177 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerProposedtreatmentarea is an object representing the database table. +type FieldseekerProposedtreatmentarea struct { + Objectid int64 `db:"objectid,pk" ` + // Method + Method null.Val[enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum] `db:"method" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // Reviewed + Reviewed null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] `db:"reviewed" ` + // Reviewed By + Reviewedby null.Val[string] `db:"reviewedby" ` + // Reviewed Date + Revieweddate null.Val[time.Time] `db:"revieweddate" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + // Completed Date + Completeddate null.Val[time.Time] `db:"completeddate" ` + // Completed By + Completedby null.Val[string] `db:"completedby" ` + // Completed + Completed null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] `db:"completed" ` + // Is Spray Route + Issprayroute null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] `db:"issprayroute" ` + // Name + Name null.Val[string] `db:"name" ` + // Acres + Acres null.Val[float64] `db:"acres" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + Exported null.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] `db:"exported" ` + // Target Product + Targetproduct null.Val[string] `db:"targetproduct" ` + // Target App Rate + Targetapprate null.Val[float64] `db:"targetapprate" ` + // Hectares + Hectares null.Val[float64] `db:"hectares" ` + // Last Treatment Activity + Lasttreatactivity null.Val[string] `db:"lasttreatactivity" ` + // Last Treatment Date + Lasttreatdate null.Val[time.Time] `db:"lasttreatdate" ` + // Last Treatment Product + Lasttreatproduct null.Val[string] `db:"lasttreatproduct" ` + // Last Treatment Quantity + Lasttreatqty null.Val[float64] `db:"lasttreatqty" ` + // Last Treatment Quantity Unit + Lasttreatqtyunit null.Val[string] `db:"lasttreatqtyunit" ` + // Priority + Priority null.Val[enums.FieldseekerProposedtreatmentareaLocationpriorityEnum] `db:"priority" ` + // Due Date + Duedate null.Val[time.Time] `db:"duedate" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + // Target Species + Targetspecies null.Val[string] `db:"targetspecies" ` + ShapeArea null.Val[float64] `db:"shape__area" ` + ShapeLength null.Val[float64] `db:"shape__length" ` +} + +// FieldseekerProposedtreatmentareaSlice is an alias for a slice of pointers to FieldseekerProposedtreatmentarea. +// This should almost always be used instead of []*FieldseekerProposedtreatmentarea. +type FieldseekerProposedtreatmentareaSlice []*FieldseekerProposedtreatmentarea + +// FieldseekerProposedtreatmentareas contains methods to work with the proposedtreatmentarea table +var FieldseekerProposedtreatmentareas = psql.NewTablex[*FieldseekerProposedtreatmentarea, FieldseekerProposedtreatmentareaSlice, *FieldseekerProposedtreatmentareaSetter]("fieldseeker", "proposedtreatmentarea", buildFieldseekerProposedtreatmentareaColumns("fieldseeker.proposedtreatmentarea")) + +// FieldseekerProposedtreatmentareasQuery is a query on the proposedtreatmentarea table +type FieldseekerProposedtreatmentareasQuery = *psql.ViewQuery[*FieldseekerProposedtreatmentarea, FieldseekerProposedtreatmentareaSlice] + +func buildFieldseekerProposedtreatmentareaColumns(alias string) fieldseekerProposedtreatmentareaColumns { + return fieldseekerProposedtreatmentareaColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "method", "comments", "zone", "reviewed", "reviewedby", "revieweddate", "zone2", "completeddate", "completedby", "completed", "issprayroute", "name", "acres", "globalid", "exported", "targetproduct", "targetapprate", "hectares", "lasttreatactivity", "lasttreatdate", "lasttreatproduct", "lasttreatqty", "lasttreatqtyunit", "priority", "duedate", "creationdate", "creator", "editdate", "editor", "targetspecies", "shape__area", "shape__length", + ).WithParent("fieldseeker.proposedtreatmentarea"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Method: psql.Quote(alias, "method"), + Comments: psql.Quote(alias, "comments"), + Zone: psql.Quote(alias, "zone"), + Reviewed: psql.Quote(alias, "reviewed"), + Reviewedby: psql.Quote(alias, "reviewedby"), + Revieweddate: psql.Quote(alias, "revieweddate"), + Zone2: psql.Quote(alias, "zone2"), + Completeddate: psql.Quote(alias, "completeddate"), + Completedby: psql.Quote(alias, "completedby"), + Completed: psql.Quote(alias, "completed"), + Issprayroute: psql.Quote(alias, "issprayroute"), + Name: psql.Quote(alias, "name"), + Acres: psql.Quote(alias, "acres"), + Globalid: psql.Quote(alias, "globalid"), + Exported: psql.Quote(alias, "exported"), + Targetproduct: psql.Quote(alias, "targetproduct"), + Targetapprate: psql.Quote(alias, "targetapprate"), + Hectares: psql.Quote(alias, "hectares"), + Lasttreatactivity: psql.Quote(alias, "lasttreatactivity"), + Lasttreatdate: psql.Quote(alias, "lasttreatdate"), + Lasttreatproduct: psql.Quote(alias, "lasttreatproduct"), + Lasttreatqty: psql.Quote(alias, "lasttreatqty"), + Lasttreatqtyunit: psql.Quote(alias, "lasttreatqtyunit"), + Priority: psql.Quote(alias, "priority"), + Duedate: psql.Quote(alias, "duedate"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Targetspecies: psql.Quote(alias, "targetspecies"), + ShapeArea: psql.Quote(alias, "shape__area"), + ShapeLength: psql.Quote(alias, "shape__length"), + } +} + +type fieldseekerProposedtreatmentareaColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Method psql.Expression + Comments psql.Expression + Zone psql.Expression + Reviewed psql.Expression + Reviewedby psql.Expression + Revieweddate psql.Expression + Zone2 psql.Expression + Completeddate psql.Expression + Completedby psql.Expression + Completed psql.Expression + Issprayroute psql.Expression + Name psql.Expression + Acres psql.Expression + Globalid psql.Expression + Exported psql.Expression + Targetproduct psql.Expression + Targetapprate psql.Expression + Hectares psql.Expression + Lasttreatactivity psql.Expression + Lasttreatdate psql.Expression + Lasttreatproduct psql.Expression + Lasttreatqty psql.Expression + Lasttreatqtyunit psql.Expression + Priority psql.Expression + Duedate psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Targetspecies psql.Expression + ShapeArea psql.Expression + ShapeLength psql.Expression +} + +func (c fieldseekerProposedtreatmentareaColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerProposedtreatmentareaColumns) AliasedAs(alias string) fieldseekerProposedtreatmentareaColumns { + return buildFieldseekerProposedtreatmentareaColumns(alias) +} + +// FieldseekerProposedtreatmentareaSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerProposedtreatmentareaSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Method omitnull.Val[enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum] `db:"method" ` + Comments omitnull.Val[string] `db:"comments" ` + Zone omitnull.Val[string] `db:"zone" ` + Reviewed omitnull.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] `db:"reviewed" ` + Reviewedby omitnull.Val[string] `db:"reviewedby" ` + Revieweddate omitnull.Val[time.Time] `db:"revieweddate" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Completeddate omitnull.Val[time.Time] `db:"completeddate" ` + Completedby omitnull.Val[string] `db:"completedby" ` + Completed omitnull.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] `db:"completed" ` + Issprayroute omitnull.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] `db:"issprayroute" ` + Name omitnull.Val[string] `db:"name" ` + Acres omitnull.Val[float64] `db:"acres" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + Exported omitnull.Val[enums.FieldseekerProposedtreatmentareaNotinuitFEnum] `db:"exported" ` + Targetproduct omitnull.Val[string] `db:"targetproduct" ` + Targetapprate omitnull.Val[float64] `db:"targetapprate" ` + Hectares omitnull.Val[float64] `db:"hectares" ` + Lasttreatactivity omitnull.Val[string] `db:"lasttreatactivity" ` + Lasttreatdate omitnull.Val[time.Time] `db:"lasttreatdate" ` + Lasttreatproduct omitnull.Val[string] `db:"lasttreatproduct" ` + Lasttreatqty omitnull.Val[float64] `db:"lasttreatqty" ` + Lasttreatqtyunit omitnull.Val[string] `db:"lasttreatqtyunit" ` + Priority omitnull.Val[enums.FieldseekerProposedtreatmentareaLocationpriorityEnum] `db:"priority" ` + Duedate omitnull.Val[time.Time] `db:"duedate" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Targetspecies omitnull.Val[string] `db:"targetspecies" ` + ShapeArea omitnull.Val[float64] `db:"shape__area" ` + ShapeLength omitnull.Val[float64] `db:"shape__length" ` +} + +func (s FieldseekerProposedtreatmentareaSetter) SetColumns() []string { + vals := make([]string, 0, 33) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Method.IsUnset() { + vals = append(vals, "method") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Reviewed.IsUnset() { + vals = append(vals, "reviewed") + } + if !s.Reviewedby.IsUnset() { + vals = append(vals, "reviewedby") + } + if !s.Revieweddate.IsUnset() { + vals = append(vals, "revieweddate") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Completeddate.IsUnset() { + vals = append(vals, "completeddate") + } + if !s.Completedby.IsUnset() { + vals = append(vals, "completedby") + } + if !s.Completed.IsUnset() { + vals = append(vals, "completed") + } + if !s.Issprayroute.IsUnset() { + vals = append(vals, "issprayroute") + } + if !s.Name.IsUnset() { + vals = append(vals, "name") + } + if !s.Acres.IsUnset() { + vals = append(vals, "acres") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.Exported.IsUnset() { + vals = append(vals, "exported") + } + if !s.Targetproduct.IsUnset() { + vals = append(vals, "targetproduct") + } + if !s.Targetapprate.IsUnset() { + vals = append(vals, "targetapprate") + } + if !s.Hectares.IsUnset() { + vals = append(vals, "hectares") + } + if !s.Lasttreatactivity.IsUnset() { + vals = append(vals, "lasttreatactivity") + } + if !s.Lasttreatdate.IsUnset() { + vals = append(vals, "lasttreatdate") + } + if !s.Lasttreatproduct.IsUnset() { + vals = append(vals, "lasttreatproduct") + } + if !s.Lasttreatqty.IsUnset() { + vals = append(vals, "lasttreatqty") + } + if !s.Lasttreatqtyunit.IsUnset() { + vals = append(vals, "lasttreatqtyunit") + } + if !s.Priority.IsUnset() { + vals = append(vals, "priority") + } + if !s.Duedate.IsUnset() { + vals = append(vals, "duedate") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Targetspecies.IsUnset() { + vals = append(vals, "targetspecies") + } + if !s.ShapeArea.IsUnset() { + vals = append(vals, "shape__area") + } + if !s.ShapeLength.IsUnset() { + vals = append(vals, "shape__length") + } + return vals +} + +func (s FieldseekerProposedtreatmentareaSetter) Overwrite(t *FieldseekerProposedtreatmentarea) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Method.IsUnset() { + t.Method = s.Method.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Reviewed.IsUnset() { + t.Reviewed = s.Reviewed.MustGetNull() + } + if !s.Reviewedby.IsUnset() { + t.Reviewedby = s.Reviewedby.MustGetNull() + } + if !s.Revieweddate.IsUnset() { + t.Revieweddate = s.Revieweddate.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Completeddate.IsUnset() { + t.Completeddate = s.Completeddate.MustGetNull() + } + if !s.Completedby.IsUnset() { + t.Completedby = s.Completedby.MustGetNull() + } + if !s.Completed.IsUnset() { + t.Completed = s.Completed.MustGetNull() + } + if !s.Issprayroute.IsUnset() { + t.Issprayroute = s.Issprayroute.MustGetNull() + } + if !s.Name.IsUnset() { + t.Name = s.Name.MustGetNull() + } + if !s.Acres.IsUnset() { + t.Acres = s.Acres.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.Exported.IsUnset() { + t.Exported = s.Exported.MustGetNull() + } + if !s.Targetproduct.IsUnset() { + t.Targetproduct = s.Targetproduct.MustGetNull() + } + if !s.Targetapprate.IsUnset() { + t.Targetapprate = s.Targetapprate.MustGetNull() + } + if !s.Hectares.IsUnset() { + t.Hectares = s.Hectares.MustGetNull() + } + if !s.Lasttreatactivity.IsUnset() { + t.Lasttreatactivity = s.Lasttreatactivity.MustGetNull() + } + if !s.Lasttreatdate.IsUnset() { + t.Lasttreatdate = s.Lasttreatdate.MustGetNull() + } + if !s.Lasttreatproduct.IsUnset() { + t.Lasttreatproduct = s.Lasttreatproduct.MustGetNull() + } + if !s.Lasttreatqty.IsUnset() { + t.Lasttreatqty = s.Lasttreatqty.MustGetNull() + } + if !s.Lasttreatqtyunit.IsUnset() { + t.Lasttreatqtyunit = s.Lasttreatqtyunit.MustGetNull() + } + if !s.Priority.IsUnset() { + t.Priority = s.Priority.MustGetNull() + } + if !s.Duedate.IsUnset() { + t.Duedate = s.Duedate.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Targetspecies.IsUnset() { + t.Targetspecies = s.Targetspecies.MustGetNull() + } + if !s.ShapeArea.IsUnset() { + t.ShapeArea = s.ShapeArea.MustGetNull() + } + if !s.ShapeLength.IsUnset() { + t.ShapeLength = s.ShapeLength.MustGetNull() + } +} + +func (s *FieldseekerProposedtreatmentareaSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerProposedtreatmentareas.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 33) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Method.IsUnset() { + vals[1] = psql.Arg(s.Method.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[2] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[3] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Reviewed.IsUnset() { + vals[4] = psql.Arg(s.Reviewed.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Reviewedby.IsUnset() { + vals[5] = psql.Arg(s.Reviewedby.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Revieweddate.IsUnset() { + vals[6] = psql.Arg(s.Revieweddate.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[7] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Completeddate.IsUnset() { + vals[8] = psql.Arg(s.Completeddate.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Completedby.IsUnset() { + vals[9] = psql.Arg(s.Completedby.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Completed.IsUnset() { + vals[10] = psql.Arg(s.Completed.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Issprayroute.IsUnset() { + vals[11] = psql.Arg(s.Issprayroute.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Name.IsUnset() { + vals[12] = psql.Arg(s.Name.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Acres.IsUnset() { + vals[13] = psql.Arg(s.Acres.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[14] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Exported.IsUnset() { + vals[15] = psql.Arg(s.Exported.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Targetproduct.IsUnset() { + vals[16] = psql.Arg(s.Targetproduct.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Targetapprate.IsUnset() { + vals[17] = psql.Arg(s.Targetapprate.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Hectares.IsUnset() { + vals[18] = psql.Arg(s.Hectares.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatactivity.IsUnset() { + vals[19] = psql.Arg(s.Lasttreatactivity.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatdate.IsUnset() { + vals[20] = psql.Arg(s.Lasttreatdate.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatproduct.IsUnset() { + vals[21] = psql.Arg(s.Lasttreatproduct.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatqty.IsUnset() { + vals[22] = psql.Arg(s.Lasttreatqty.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatqtyunit.IsUnset() { + vals[23] = psql.Arg(s.Lasttreatqtyunit.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Priority.IsUnset() { + vals[24] = psql.Arg(s.Priority.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Duedate.IsUnset() { + vals[25] = psql.Arg(s.Duedate.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[26] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[27] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[28] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[29] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + if !s.Targetspecies.IsUnset() { + vals[30] = psql.Arg(s.Targetspecies.MustGetNull()) + } else { + vals[30] = psql.Raw("DEFAULT") + } + + if !s.ShapeArea.IsUnset() { + vals[31] = psql.Arg(s.ShapeArea.MustGetNull()) + } else { + vals[31] = psql.Raw("DEFAULT") + } + + if !s.ShapeLength.IsUnset() { + vals[32] = psql.Arg(s.ShapeLength.MustGetNull()) + } else { + vals[32] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerProposedtreatmentareaSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerProposedtreatmentareaSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 33) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Method.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "method")...), + psql.Arg(s.Method), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Reviewed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewed")...), + psql.Arg(s.Reviewed), + }}) + } + + if !s.Reviewedby.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewedby")...), + psql.Arg(s.Reviewedby), + }}) + } + + if !s.Revieweddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "revieweddate")...), + psql.Arg(s.Revieweddate), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Completeddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "completeddate")...), + psql.Arg(s.Completeddate), + }}) + } + + if !s.Completedby.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "completedby")...), + psql.Arg(s.Completedby), + }}) + } + + if !s.Completed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "completed")...), + psql.Arg(s.Completed), + }}) + } + + if !s.Issprayroute.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "issprayroute")...), + psql.Arg(s.Issprayroute), + }}) + } + + if !s.Name.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "name")...), + psql.Arg(s.Name), + }}) + } + + if !s.Acres.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "acres")...), + psql.Arg(s.Acres), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.Exported.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "exported")...), + psql.Arg(s.Exported), + }}) + } + + if !s.Targetproduct.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "targetproduct")...), + psql.Arg(s.Targetproduct), + }}) + } + + if !s.Targetapprate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "targetapprate")...), + psql.Arg(s.Targetapprate), + }}) + } + + if !s.Hectares.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "hectares")...), + psql.Arg(s.Hectares), + }}) + } + + if !s.Lasttreatactivity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatactivity")...), + psql.Arg(s.Lasttreatactivity), + }}) + } + + if !s.Lasttreatdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatdate")...), + psql.Arg(s.Lasttreatdate), + }}) + } + + if !s.Lasttreatproduct.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatproduct")...), + psql.Arg(s.Lasttreatproduct), + }}) + } + + if !s.Lasttreatqty.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatqty")...), + psql.Arg(s.Lasttreatqty), + }}) + } + + if !s.Lasttreatqtyunit.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatqtyunit")...), + psql.Arg(s.Lasttreatqtyunit), + }}) + } + + if !s.Priority.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "priority")...), + psql.Arg(s.Priority), + }}) + } + + if !s.Duedate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "duedate")...), + psql.Arg(s.Duedate), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Targetspecies.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "targetspecies")...), + psql.Arg(s.Targetspecies), + }}) + } + + if !s.ShapeArea.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "shape__area")...), + psql.Arg(s.ShapeArea), + }}) + } + + if !s.ShapeLength.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "shape__length")...), + psql.Arg(s.ShapeLength), + }}) + } + + return exprs +} + +// FindFieldseekerProposedtreatmentarea retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerProposedtreatmentarea(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerProposedtreatmentarea, error) { + if len(cols) == 0 { + return FieldseekerProposedtreatmentareas.Query( + sm.Where(FieldseekerProposedtreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerProposedtreatmentareas.Query( + sm.Where(FieldseekerProposedtreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerProposedtreatmentareas.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerProposedtreatmentareaExists checks the presence of a single record by primary key +func FieldseekerProposedtreatmentareaExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerProposedtreatmentareas.Query( + sm.Where(FieldseekerProposedtreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerProposedtreatmentarea is retrieved from the database +func (o *FieldseekerProposedtreatmentarea) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerProposedtreatmentareas.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerProposedtreatmentareaSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerProposedtreatmentareas.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerProposedtreatmentareaSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerProposedtreatmentareas.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerProposedtreatmentareaSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerProposedtreatmentareas.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerProposedtreatmentareaSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerProposedtreatmentarea +func (o *FieldseekerProposedtreatmentarea) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerProposedtreatmentarea) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.proposedtreatmentarea", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerProposedtreatmentarea +func (o *FieldseekerProposedtreatmentarea) Update(ctx context.Context, exec bob.Executor, s *FieldseekerProposedtreatmentareaSetter) error { + v, err := FieldseekerProposedtreatmentareas.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerProposedtreatmentarea record with an executor +func (o *FieldseekerProposedtreatmentarea) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerProposedtreatmentareas.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerProposedtreatmentarea using the executor +func (o *FieldseekerProposedtreatmentarea) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerProposedtreatmentareas.Query( + sm.Where(FieldseekerProposedtreatmentareas.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerProposedtreatmentareaSlice is retrieved from the database +func (o FieldseekerProposedtreatmentareaSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerProposedtreatmentareas.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerProposedtreatmentareas.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerProposedtreatmentareas.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerProposedtreatmentareas.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerProposedtreatmentareaSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.proposedtreatmentarea", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerProposedtreatmentareaSlice) copyMatchingRows(from ...*FieldseekerProposedtreatmentarea) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerProposedtreatmentareaSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerProposedtreatmentareas.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerProposedtreatmentarea: + o.copyMatchingRows(retrieved) + case []*FieldseekerProposedtreatmentarea: + o.copyMatchingRows(retrieved...) + case FieldseekerProposedtreatmentareaSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerProposedtreatmentarea or a slice of FieldseekerProposedtreatmentarea + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerProposedtreatmentareas.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerProposedtreatmentareaSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerProposedtreatmentareas.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerProposedtreatmentarea: + o.copyMatchingRows(retrieved) + case []*FieldseekerProposedtreatmentarea: + o.copyMatchingRows(retrieved...) + case FieldseekerProposedtreatmentareaSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerProposedtreatmentarea or a slice of FieldseekerProposedtreatmentarea + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerProposedtreatmentareas.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerProposedtreatmentareaSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerProposedtreatmentareaSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerProposedtreatmentareas.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerProposedtreatmentareaSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerProposedtreatmentareas.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerProposedtreatmentareaSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerProposedtreatmentareas.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerProposedtreatmentareaWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Method psql.WhereNullMod[Q, enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum] + Comments psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Reviewed psql.WhereNullMod[Q, enums.FieldseekerProposedtreatmentareaNotinuitFEnum] + Reviewedby psql.WhereNullMod[Q, string] + Revieweddate psql.WhereNullMod[Q, time.Time] + Zone2 psql.WhereNullMod[Q, string] + Completeddate psql.WhereNullMod[Q, time.Time] + Completedby psql.WhereNullMod[Q, string] + Completed psql.WhereNullMod[Q, enums.FieldseekerProposedtreatmentareaNotinuitFEnum] + Issprayroute psql.WhereNullMod[Q, enums.FieldseekerProposedtreatmentareaNotinuitFEnum] + Name psql.WhereNullMod[Q, string] + Acres psql.WhereNullMod[Q, float64] + Globalid psql.WhereNullMod[Q, uuid.UUID] + Exported psql.WhereNullMod[Q, enums.FieldseekerProposedtreatmentareaNotinuitFEnum] + Targetproduct psql.WhereNullMod[Q, string] + Targetapprate psql.WhereNullMod[Q, float64] + Hectares psql.WhereNullMod[Q, float64] + Lasttreatactivity psql.WhereNullMod[Q, string] + Lasttreatdate psql.WhereNullMod[Q, time.Time] + Lasttreatproduct psql.WhereNullMod[Q, string] + Lasttreatqty psql.WhereNullMod[Q, float64] + Lasttreatqtyunit psql.WhereNullMod[Q, string] + Priority psql.WhereNullMod[Q, enums.FieldseekerProposedtreatmentareaLocationpriorityEnum] + Duedate psql.WhereNullMod[Q, time.Time] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Targetspecies psql.WhereNullMod[Q, string] + ShapeArea psql.WhereNullMod[Q, float64] + ShapeLength psql.WhereNullMod[Q, float64] +} + +func (fieldseekerProposedtreatmentareaWhere[Q]) AliasedAs(alias string) fieldseekerProposedtreatmentareaWhere[Q] { + return buildFieldseekerProposedtreatmentareaWhere[Q](buildFieldseekerProposedtreatmentareaColumns(alias)) +} + +func buildFieldseekerProposedtreatmentareaWhere[Q psql.Filterable](cols fieldseekerProposedtreatmentareaColumns) fieldseekerProposedtreatmentareaWhere[Q] { + return fieldseekerProposedtreatmentareaWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Method: psql.WhereNull[Q, enums.FieldseekerProposedtreatmentareaMosquitotreatmentmethodEnum](cols.Method), + Comments: psql.WhereNull[Q, string](cols.Comments), + Zone: psql.WhereNull[Q, string](cols.Zone), + Reviewed: psql.WhereNull[Q, enums.FieldseekerProposedtreatmentareaNotinuitFEnum](cols.Reviewed), + Reviewedby: psql.WhereNull[Q, string](cols.Reviewedby), + Revieweddate: psql.WhereNull[Q, time.Time](cols.Revieweddate), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Completeddate: psql.WhereNull[Q, time.Time](cols.Completeddate), + Completedby: psql.WhereNull[Q, string](cols.Completedby), + Completed: psql.WhereNull[Q, enums.FieldseekerProposedtreatmentareaNotinuitFEnum](cols.Completed), + Issprayroute: psql.WhereNull[Q, enums.FieldseekerProposedtreatmentareaNotinuitFEnum](cols.Issprayroute), + Name: psql.WhereNull[Q, string](cols.Name), + Acres: psql.WhereNull[Q, float64](cols.Acres), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + Exported: psql.WhereNull[Q, enums.FieldseekerProposedtreatmentareaNotinuitFEnum](cols.Exported), + Targetproduct: psql.WhereNull[Q, string](cols.Targetproduct), + Targetapprate: psql.WhereNull[Q, float64](cols.Targetapprate), + Hectares: psql.WhereNull[Q, float64](cols.Hectares), + Lasttreatactivity: psql.WhereNull[Q, string](cols.Lasttreatactivity), + Lasttreatdate: psql.WhereNull[Q, time.Time](cols.Lasttreatdate), + Lasttreatproduct: psql.WhereNull[Q, string](cols.Lasttreatproduct), + Lasttreatqty: psql.WhereNull[Q, float64](cols.Lasttreatqty), + Lasttreatqtyunit: psql.WhereNull[Q, string](cols.Lasttreatqtyunit), + Priority: psql.WhereNull[Q, enums.FieldseekerProposedtreatmentareaLocationpriorityEnum](cols.Priority), + Duedate: psql.WhereNull[Q, time.Time](cols.Duedate), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Targetspecies: psql.WhereNull[Q, string](cols.Targetspecies), + ShapeArea: psql.WhereNull[Q, float64](cols.ShapeArea), + ShapeLength: psql.WhereNull[Q, float64](cols.ShapeLength), + } +} diff --git a/db/models/fieldseeker.qalarvcount.bob.go b/db/models/fieldseeker.qalarvcount.bob.go new file mode 100644 index 00000000..5e27b04b --- /dev/null +++ b/db/models/fieldseeker.qalarvcount.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerQalarvcount is an object representing the database table. +type FieldseekerQalarvcount struct{} + +// FieldseekerQalarvcountSlice is an alias for a slice of pointers to FieldseekerQalarvcount. +// This should almost always be used instead of []*FieldseekerQalarvcount. +type FieldseekerQalarvcountSlice []*FieldseekerQalarvcount + +// FieldseekerQalarvcounts contains methods to work with the qalarvcount view +var FieldseekerQalarvcounts = psql.NewViewx[*FieldseekerQalarvcount, FieldseekerQalarvcountSlice]("fieldseeker", "qalarvcount", buildFieldseekerQalarvcountColumns("fieldseeker.qalarvcount")) + +// FieldseekerQalarvcountsQuery is a query on the qalarvcount view +type FieldseekerQalarvcountsQuery = *psql.ViewQuery[*FieldseekerQalarvcount, FieldseekerQalarvcountSlice] + +func buildFieldseekerQalarvcountColumns(alias string) fieldseekerQalarvcountColumns { + return fieldseekerQalarvcountColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.qalarvcount"), + tableAlias: alias, + } +} + +type fieldseekerQalarvcountColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerQalarvcountColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerQalarvcountColumns) AliasedAs(alias string) fieldseekerQalarvcountColumns { + return buildFieldseekerQalarvcountColumns(alias) +} + +// AfterQueryHook is called after FieldseekerQalarvcount is retrieved from the database +func (o *FieldseekerQalarvcount) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerQalarvcounts.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerQalarvcountSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerQalarvcountSlice is retrieved from the database +func (o FieldseekerQalarvcountSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerQalarvcounts.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerQalarvcountWhere[Q psql.Filterable] struct{} + +func (fieldseekerQalarvcountWhere[Q]) AliasedAs(alias string) fieldseekerQalarvcountWhere[Q] { + return buildFieldseekerQalarvcountWhere[Q](buildFieldseekerQalarvcountColumns(alias)) +} + +func buildFieldseekerQalarvcountWhere[Q psql.Filterable](cols fieldseekerQalarvcountColumns) fieldseekerQalarvcountWhere[Q] { + return fieldseekerQalarvcountWhere[Q]{} +} diff --git a/db/models/fieldseeker.qamosquitoinspection.bob.go b/db/models/fieldseeker.qamosquitoinspection.bob.go new file mode 100644 index 00000000..a8b85c44 --- /dev/null +++ b/db/models/fieldseeker.qamosquitoinspection.bob.go @@ -0,0 +1,1920 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerQamosquitoinspection is an object representing the database table. +type FieldseekerQamosquitoinspection struct { + Objectid int64 `db:"objectid,pk" ` + // Positive Dips + Posdips null.Val[int16] `db:"posdips" ` + // Action + Actiontaken null.Val[enums.FieldseekerQamosquitoinspectionMosquitoactionEnum] `db:"actiontaken" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // Average Temperature + Avetemp null.Val[float64] `db:"avetemp" ` + // Wind Speed + Windspeed null.Val[float64] `db:"windspeed" ` + // Rain Gauge + Raingauge null.Val[float64] `db:"raingauge" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + // Start + Startdatetime null.Val[time.Time] `db:"startdatetime" ` + // Finish + Enddatetime null.Val[time.Time] `db:"enddatetime" ` + // Wind Direction + Winddir null.Val[string] `db:"winddir" ` + Reviewed null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"reviewed" ` + Reviewedby null.Val[string] `db:"reviewedby" ` + Revieweddate null.Val[time.Time] `db:"revieweddate" ` + Locationname null.Val[string] `db:"locationname" ` + Zone null.Val[string] `db:"zone" ` + Recordstatus null.Val[int16] `db:"recordstatus" ` + Zone2 null.Val[string] `db:"zone2" ` + // Landing Rate + LR null.Val[int16] `db:"lr" ` + // Negative Dips + Negdips null.Val[int16] `db:"negdips" ` + // Total Acres + Totalacres null.Val[float64] `db:"totalacres" ` + // Acres Breeding + Acresbreeding null.Val[float64] `db:"acresbreeding" ` + // Fish Present? + Fish null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"fish" ` + // Site Type + Sitetype null.Val[enums.FieldseekerQamosquitoinspectionQasitetypeEnum] `db:"sitetype" ` + // Breeding Potential + Breedingpotential null.Val[enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum] `db:"breedingpotential" ` + // Moving Water + Movingwater null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"movingwater" ` + // No Evidence of Water Ever + Nowaterever null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"nowaterever" ` + // Mosquito Habitat Indicators + Mosquitohabitat null.Val[enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum] `db:"mosquitohabitat" ` + // Habitat Value + Habvalue1 null.Val[int16] `db:"habvalue1" ` + // % + Habvalue1percent null.Val[int16] `db:"habvalue1percent" ` + // Habitat Value + Habvalue2 null.Val[int16] `db:"habvalue2" ` + // % + Habvalue2percent null.Val[int16] `db:"habvalue2percent" ` + // Potential + Potential null.Val[int16] `db:"potential" ` + // Larvae Present + Larvaepresent null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"larvaepresent" ` + // Larvae Inside Treated Area? + Larvaeinsidetreatedarea null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"larvaeinsidetreatedarea" ` + // Larvae Outside Treated Area? + Larvaeoutsidetreatedarea null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"larvaeoutsidetreatedarea" ` + // Reason Larvae Present + Larvaereason null.Val[enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum] `db:"larvaereason" ` + // Aquatic Organisms + Aquaticorganisms null.Val[enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum] `db:"aquaticorganisms" ` + // Vegetation + Vegetation null.Val[enums.FieldseekerQamosquitoinspectionQavegetationEnum] `db:"vegetation" ` + // Source Reduction + Sourcereduction null.Val[enums.FieldseekerQamosquitoinspectionQasourcereductionEnum] `db:"sourcereduction" ` + // Water Present? + Waterpresent null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"waterpresent" ` + // Water Movement + Watermovement1 null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] `db:"watermovement1" ` + // % + Watermovement1percent null.Val[int16] `db:"watermovement1percent" ` + // Water Movement + Watermovement2 null.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] `db:"watermovement2" ` + // % + Watermovement2percent null.Val[int16] `db:"watermovement2percent" ` + // Soil Conditions + Soilconditions null.Val[enums.FieldseekerQamosquitoinspectionQasoilconditionEnum] `db:"soilconditions" ` + // How Long Water Present? + Waterduration null.Val[enums.FieldseekerQamosquitoinspectionQawaterdurationEnum] `db:"waterduration" ` + // Water Source + Watersource null.Val[enums.FieldseekerQamosquitoinspectionQawatersourceEnum] `db:"watersource" ` + // Water Conditions + Waterconditions null.Val[enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum] `db:"waterconditions" ` + // Adult Activity + Adultactivity null.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"adultactivity" ` + Linelocid null.Val[uuid.UUID] `db:"linelocid" ` + Pointlocid null.Val[uuid.UUID] `db:"pointlocid" ` + Polygonlocid null.Val[uuid.UUID] `db:"polygonlocid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + // Field Tech + Fieldtech null.Val[string] `db:"fieldtech" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` +} + +// FieldseekerQamosquitoinspectionSlice is an alias for a slice of pointers to FieldseekerQamosquitoinspection. +// This should almost always be used instead of []*FieldseekerQamosquitoinspection. +type FieldseekerQamosquitoinspectionSlice []*FieldseekerQamosquitoinspection + +// FieldseekerQamosquitoinspections contains methods to work with the qamosquitoinspection table +var FieldseekerQamosquitoinspections = psql.NewTablex[*FieldseekerQamosquitoinspection, FieldseekerQamosquitoinspectionSlice, *FieldseekerQamosquitoinspectionSetter]("fieldseeker", "qamosquitoinspection", buildFieldseekerQamosquitoinspectionColumns("fieldseeker.qamosquitoinspection")) + +// FieldseekerQamosquitoinspectionsQuery is a query on the qamosquitoinspection table +type FieldseekerQamosquitoinspectionsQuery = *psql.ViewQuery[*FieldseekerQamosquitoinspection, FieldseekerQamosquitoinspectionSlice] + +func buildFieldseekerQamosquitoinspectionColumns(alias string) fieldseekerQamosquitoinspectionColumns { + return fieldseekerQamosquitoinspectionColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "posdips", "actiontaken", "comments", "avetemp", "windspeed", "raingauge", "globalid", "startdatetime", "enddatetime", "winddir", "reviewed", "reviewedby", "revieweddate", "locationname", "zone", "recordstatus", "zone2", "lr", "negdips", "totalacres", "acresbreeding", "fish", "sitetype", "breedingpotential", "movingwater", "nowaterever", "mosquitohabitat", "habvalue1", "habvalue1percent", "habvalue2", "habvalue2percent", "potential", "larvaepresent", "larvaeinsidetreatedarea", "larvaeoutsidetreatedarea", "larvaereason", "aquaticorganisms", "vegetation", "sourcereduction", "waterpresent", "watermovement1", "watermovement1percent", "watermovement2", "watermovement2percent", "soilconditions", "waterduration", "watersource", "waterconditions", "adultactivity", "linelocid", "pointlocid", "polygonlocid", "created_user", "created_date", "last_edited_user", "last_edited_date", "fieldtech", "creationdate", "creator", "editdate", "editor", + ).WithParent("fieldseeker.qamosquitoinspection"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Posdips: psql.Quote(alias, "posdips"), + Actiontaken: psql.Quote(alias, "actiontaken"), + Comments: psql.Quote(alias, "comments"), + Avetemp: psql.Quote(alias, "avetemp"), + Windspeed: psql.Quote(alias, "windspeed"), + Raingauge: psql.Quote(alias, "raingauge"), + Globalid: psql.Quote(alias, "globalid"), + Startdatetime: psql.Quote(alias, "startdatetime"), + Enddatetime: psql.Quote(alias, "enddatetime"), + Winddir: psql.Quote(alias, "winddir"), + Reviewed: psql.Quote(alias, "reviewed"), + Reviewedby: psql.Quote(alias, "reviewedby"), + Revieweddate: psql.Quote(alias, "revieweddate"), + Locationname: psql.Quote(alias, "locationname"), + Zone: psql.Quote(alias, "zone"), + Recordstatus: psql.Quote(alias, "recordstatus"), + Zone2: psql.Quote(alias, "zone2"), + LR: psql.Quote(alias, "lr"), + Negdips: psql.Quote(alias, "negdips"), + Totalacres: psql.Quote(alias, "totalacres"), + Acresbreeding: psql.Quote(alias, "acresbreeding"), + Fish: psql.Quote(alias, "fish"), + Sitetype: psql.Quote(alias, "sitetype"), + Breedingpotential: psql.Quote(alias, "breedingpotential"), + Movingwater: psql.Quote(alias, "movingwater"), + Nowaterever: psql.Quote(alias, "nowaterever"), + Mosquitohabitat: psql.Quote(alias, "mosquitohabitat"), + Habvalue1: psql.Quote(alias, "habvalue1"), + Habvalue1percent: psql.Quote(alias, "habvalue1percent"), + Habvalue2: psql.Quote(alias, "habvalue2"), + Habvalue2percent: psql.Quote(alias, "habvalue2percent"), + Potential: psql.Quote(alias, "potential"), + Larvaepresent: psql.Quote(alias, "larvaepresent"), + Larvaeinsidetreatedarea: psql.Quote(alias, "larvaeinsidetreatedarea"), + Larvaeoutsidetreatedarea: psql.Quote(alias, "larvaeoutsidetreatedarea"), + Larvaereason: psql.Quote(alias, "larvaereason"), + Aquaticorganisms: psql.Quote(alias, "aquaticorganisms"), + Vegetation: psql.Quote(alias, "vegetation"), + Sourcereduction: psql.Quote(alias, "sourcereduction"), + Waterpresent: psql.Quote(alias, "waterpresent"), + Watermovement1: psql.Quote(alias, "watermovement1"), + Watermovement1percent: psql.Quote(alias, "watermovement1percent"), + Watermovement2: psql.Quote(alias, "watermovement2"), + Watermovement2percent: psql.Quote(alias, "watermovement2percent"), + Soilconditions: psql.Quote(alias, "soilconditions"), + Waterduration: psql.Quote(alias, "waterduration"), + Watersource: psql.Quote(alias, "watersource"), + Waterconditions: psql.Quote(alias, "waterconditions"), + Adultactivity: psql.Quote(alias, "adultactivity"), + Linelocid: psql.Quote(alias, "linelocid"), + Pointlocid: psql.Quote(alias, "pointlocid"), + Polygonlocid: psql.Quote(alias, "polygonlocid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Fieldtech: psql.Quote(alias, "fieldtech"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + } +} + +type fieldseekerQamosquitoinspectionColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Posdips psql.Expression + Actiontaken psql.Expression + Comments psql.Expression + Avetemp psql.Expression + Windspeed psql.Expression + Raingauge psql.Expression + Globalid psql.Expression + Startdatetime psql.Expression + Enddatetime psql.Expression + Winddir psql.Expression + Reviewed psql.Expression + Reviewedby psql.Expression + Revieweddate psql.Expression + Locationname psql.Expression + Zone psql.Expression + Recordstatus psql.Expression + Zone2 psql.Expression + LR psql.Expression + Negdips psql.Expression + Totalacres psql.Expression + Acresbreeding psql.Expression + Fish psql.Expression + Sitetype psql.Expression + Breedingpotential psql.Expression + Movingwater psql.Expression + Nowaterever psql.Expression + Mosquitohabitat psql.Expression + Habvalue1 psql.Expression + Habvalue1percent psql.Expression + Habvalue2 psql.Expression + Habvalue2percent psql.Expression + Potential psql.Expression + Larvaepresent psql.Expression + Larvaeinsidetreatedarea psql.Expression + Larvaeoutsidetreatedarea psql.Expression + Larvaereason psql.Expression + Aquaticorganisms psql.Expression + Vegetation psql.Expression + Sourcereduction psql.Expression + Waterpresent psql.Expression + Watermovement1 psql.Expression + Watermovement1percent psql.Expression + Watermovement2 psql.Expression + Watermovement2percent psql.Expression + Soilconditions psql.Expression + Waterduration psql.Expression + Watersource psql.Expression + Waterconditions psql.Expression + Adultactivity psql.Expression + Linelocid psql.Expression + Pointlocid psql.Expression + Polygonlocid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Fieldtech psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression +} + +func (c fieldseekerQamosquitoinspectionColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerQamosquitoinspectionColumns) AliasedAs(alias string) fieldseekerQamosquitoinspectionColumns { + return buildFieldseekerQamosquitoinspectionColumns(alias) +} + +// FieldseekerQamosquitoinspectionSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerQamosquitoinspectionSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Posdips omitnull.Val[int16] `db:"posdips" ` + Actiontaken omitnull.Val[enums.FieldseekerQamosquitoinspectionMosquitoactionEnum] `db:"actiontaken" ` + Comments omitnull.Val[string] `db:"comments" ` + Avetemp omitnull.Val[float64] `db:"avetemp" ` + Windspeed omitnull.Val[float64] `db:"windspeed" ` + Raingauge omitnull.Val[float64] `db:"raingauge" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + Startdatetime omitnull.Val[time.Time] `db:"startdatetime" ` + Enddatetime omitnull.Val[time.Time] `db:"enddatetime" ` + Winddir omitnull.Val[string] `db:"winddir" ` + Reviewed omitnull.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"reviewed" ` + Reviewedby omitnull.Val[string] `db:"reviewedby" ` + Revieweddate omitnull.Val[time.Time] `db:"revieweddate" ` + Locationname omitnull.Val[string] `db:"locationname" ` + Zone omitnull.Val[string] `db:"zone" ` + Recordstatus omitnull.Val[int16] `db:"recordstatus" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + LR omitnull.Val[int16] `db:"lr" ` + Negdips omitnull.Val[int16] `db:"negdips" ` + Totalacres omitnull.Val[float64] `db:"totalacres" ` + Acresbreeding omitnull.Val[float64] `db:"acresbreeding" ` + Fish omitnull.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"fish" ` + Sitetype omitnull.Val[enums.FieldseekerQamosquitoinspectionQasitetypeEnum] `db:"sitetype" ` + Breedingpotential omitnull.Val[enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum] `db:"breedingpotential" ` + Movingwater omitnull.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"movingwater" ` + Nowaterever omitnull.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"nowaterever" ` + Mosquitohabitat omitnull.Val[enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum] `db:"mosquitohabitat" ` + Habvalue1 omitnull.Val[int16] `db:"habvalue1" ` + Habvalue1percent omitnull.Val[int16] `db:"habvalue1percent" ` + Habvalue2 omitnull.Val[int16] `db:"habvalue2" ` + Habvalue2percent omitnull.Val[int16] `db:"habvalue2percent" ` + Potential omitnull.Val[int16] `db:"potential" ` + Larvaepresent omitnull.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"larvaepresent" ` + Larvaeinsidetreatedarea omitnull.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"larvaeinsidetreatedarea" ` + Larvaeoutsidetreatedarea omitnull.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"larvaeoutsidetreatedarea" ` + Larvaereason omitnull.Val[enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum] `db:"larvaereason" ` + Aquaticorganisms omitnull.Val[enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum] `db:"aquaticorganisms" ` + Vegetation omitnull.Val[enums.FieldseekerQamosquitoinspectionQavegetationEnum] `db:"vegetation" ` + Sourcereduction omitnull.Val[enums.FieldseekerQamosquitoinspectionQasourcereductionEnum] `db:"sourcereduction" ` + Waterpresent omitnull.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"waterpresent" ` + Watermovement1 omitnull.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] `db:"watermovement1" ` + Watermovement1percent omitnull.Val[int16] `db:"watermovement1percent" ` + Watermovement2 omitnull.Val[enums.FieldseekerQamosquitoinspectionQawatermovementEnum] `db:"watermovement2" ` + Watermovement2percent omitnull.Val[int16] `db:"watermovement2percent" ` + Soilconditions omitnull.Val[enums.FieldseekerQamosquitoinspectionQasoilconditionEnum] `db:"soilconditions" ` + Waterduration omitnull.Val[enums.FieldseekerQamosquitoinspectionQawaterdurationEnum] `db:"waterduration" ` + Watersource omitnull.Val[enums.FieldseekerQamosquitoinspectionQawatersourceEnum] `db:"watersource" ` + Waterconditions omitnull.Val[enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum] `db:"waterconditions" ` + Adultactivity omitnull.Val[enums.FieldseekerQamosquitoinspectionNotinuitFEnum] `db:"adultactivity" ` + Linelocid omitnull.Val[uuid.UUID] `db:"linelocid" ` + Pointlocid omitnull.Val[uuid.UUID] `db:"pointlocid" ` + Polygonlocid omitnull.Val[uuid.UUID] `db:"polygonlocid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Fieldtech omitnull.Val[string] `db:"fieldtech" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` +} + +func (s FieldseekerQamosquitoinspectionSetter) SetColumns() []string { + vals := make([]string, 0, 62) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Posdips.IsUnset() { + vals = append(vals, "posdips") + } + if !s.Actiontaken.IsUnset() { + vals = append(vals, "actiontaken") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Avetemp.IsUnset() { + vals = append(vals, "avetemp") + } + if !s.Windspeed.IsUnset() { + vals = append(vals, "windspeed") + } + if !s.Raingauge.IsUnset() { + vals = append(vals, "raingauge") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.Startdatetime.IsUnset() { + vals = append(vals, "startdatetime") + } + if !s.Enddatetime.IsUnset() { + vals = append(vals, "enddatetime") + } + if !s.Winddir.IsUnset() { + vals = append(vals, "winddir") + } + if !s.Reviewed.IsUnset() { + vals = append(vals, "reviewed") + } + if !s.Reviewedby.IsUnset() { + vals = append(vals, "reviewedby") + } + if !s.Revieweddate.IsUnset() { + vals = append(vals, "revieweddate") + } + if !s.Locationname.IsUnset() { + vals = append(vals, "locationname") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Recordstatus.IsUnset() { + vals = append(vals, "recordstatus") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.LR.IsUnset() { + vals = append(vals, "lr") + } + if !s.Negdips.IsUnset() { + vals = append(vals, "negdips") + } + if !s.Totalacres.IsUnset() { + vals = append(vals, "totalacres") + } + if !s.Acresbreeding.IsUnset() { + vals = append(vals, "acresbreeding") + } + if !s.Fish.IsUnset() { + vals = append(vals, "fish") + } + if !s.Sitetype.IsUnset() { + vals = append(vals, "sitetype") + } + if !s.Breedingpotential.IsUnset() { + vals = append(vals, "breedingpotential") + } + if !s.Movingwater.IsUnset() { + vals = append(vals, "movingwater") + } + if !s.Nowaterever.IsUnset() { + vals = append(vals, "nowaterever") + } + if !s.Mosquitohabitat.IsUnset() { + vals = append(vals, "mosquitohabitat") + } + if !s.Habvalue1.IsUnset() { + vals = append(vals, "habvalue1") + } + if !s.Habvalue1percent.IsUnset() { + vals = append(vals, "habvalue1percent") + } + if !s.Habvalue2.IsUnset() { + vals = append(vals, "habvalue2") + } + if !s.Habvalue2percent.IsUnset() { + vals = append(vals, "habvalue2percent") + } + if !s.Potential.IsUnset() { + vals = append(vals, "potential") + } + if !s.Larvaepresent.IsUnset() { + vals = append(vals, "larvaepresent") + } + if !s.Larvaeinsidetreatedarea.IsUnset() { + vals = append(vals, "larvaeinsidetreatedarea") + } + if !s.Larvaeoutsidetreatedarea.IsUnset() { + vals = append(vals, "larvaeoutsidetreatedarea") + } + if !s.Larvaereason.IsUnset() { + vals = append(vals, "larvaereason") + } + if !s.Aquaticorganisms.IsUnset() { + vals = append(vals, "aquaticorganisms") + } + if !s.Vegetation.IsUnset() { + vals = append(vals, "vegetation") + } + if !s.Sourcereduction.IsUnset() { + vals = append(vals, "sourcereduction") + } + if !s.Waterpresent.IsUnset() { + vals = append(vals, "waterpresent") + } + if !s.Watermovement1.IsUnset() { + vals = append(vals, "watermovement1") + } + if !s.Watermovement1percent.IsUnset() { + vals = append(vals, "watermovement1percent") + } + if !s.Watermovement2.IsUnset() { + vals = append(vals, "watermovement2") + } + if !s.Watermovement2percent.IsUnset() { + vals = append(vals, "watermovement2percent") + } + if !s.Soilconditions.IsUnset() { + vals = append(vals, "soilconditions") + } + if !s.Waterduration.IsUnset() { + vals = append(vals, "waterduration") + } + if !s.Watersource.IsUnset() { + vals = append(vals, "watersource") + } + if !s.Waterconditions.IsUnset() { + vals = append(vals, "waterconditions") + } + if !s.Adultactivity.IsUnset() { + vals = append(vals, "adultactivity") + } + if !s.Linelocid.IsUnset() { + vals = append(vals, "linelocid") + } + if !s.Pointlocid.IsUnset() { + vals = append(vals, "pointlocid") + } + if !s.Polygonlocid.IsUnset() { + vals = append(vals, "polygonlocid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Fieldtech.IsUnset() { + vals = append(vals, "fieldtech") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + return vals +} + +func (s FieldseekerQamosquitoinspectionSetter) Overwrite(t *FieldseekerQamosquitoinspection) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Posdips.IsUnset() { + t.Posdips = s.Posdips.MustGetNull() + } + if !s.Actiontaken.IsUnset() { + t.Actiontaken = s.Actiontaken.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Avetemp.IsUnset() { + t.Avetemp = s.Avetemp.MustGetNull() + } + if !s.Windspeed.IsUnset() { + t.Windspeed = s.Windspeed.MustGetNull() + } + if !s.Raingauge.IsUnset() { + t.Raingauge = s.Raingauge.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.Startdatetime.IsUnset() { + t.Startdatetime = s.Startdatetime.MustGetNull() + } + if !s.Enddatetime.IsUnset() { + t.Enddatetime = s.Enddatetime.MustGetNull() + } + if !s.Winddir.IsUnset() { + t.Winddir = s.Winddir.MustGetNull() + } + if !s.Reviewed.IsUnset() { + t.Reviewed = s.Reviewed.MustGetNull() + } + if !s.Reviewedby.IsUnset() { + t.Reviewedby = s.Reviewedby.MustGetNull() + } + if !s.Revieweddate.IsUnset() { + t.Revieweddate = s.Revieweddate.MustGetNull() + } + if !s.Locationname.IsUnset() { + t.Locationname = s.Locationname.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Recordstatus.IsUnset() { + t.Recordstatus = s.Recordstatus.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.LR.IsUnset() { + t.LR = s.LR.MustGetNull() + } + if !s.Negdips.IsUnset() { + t.Negdips = s.Negdips.MustGetNull() + } + if !s.Totalacres.IsUnset() { + t.Totalacres = s.Totalacres.MustGetNull() + } + if !s.Acresbreeding.IsUnset() { + t.Acresbreeding = s.Acresbreeding.MustGetNull() + } + if !s.Fish.IsUnset() { + t.Fish = s.Fish.MustGetNull() + } + if !s.Sitetype.IsUnset() { + t.Sitetype = s.Sitetype.MustGetNull() + } + if !s.Breedingpotential.IsUnset() { + t.Breedingpotential = s.Breedingpotential.MustGetNull() + } + if !s.Movingwater.IsUnset() { + t.Movingwater = s.Movingwater.MustGetNull() + } + if !s.Nowaterever.IsUnset() { + t.Nowaterever = s.Nowaterever.MustGetNull() + } + if !s.Mosquitohabitat.IsUnset() { + t.Mosquitohabitat = s.Mosquitohabitat.MustGetNull() + } + if !s.Habvalue1.IsUnset() { + t.Habvalue1 = s.Habvalue1.MustGetNull() + } + if !s.Habvalue1percent.IsUnset() { + t.Habvalue1percent = s.Habvalue1percent.MustGetNull() + } + if !s.Habvalue2.IsUnset() { + t.Habvalue2 = s.Habvalue2.MustGetNull() + } + if !s.Habvalue2percent.IsUnset() { + t.Habvalue2percent = s.Habvalue2percent.MustGetNull() + } + if !s.Potential.IsUnset() { + t.Potential = s.Potential.MustGetNull() + } + if !s.Larvaepresent.IsUnset() { + t.Larvaepresent = s.Larvaepresent.MustGetNull() + } + if !s.Larvaeinsidetreatedarea.IsUnset() { + t.Larvaeinsidetreatedarea = s.Larvaeinsidetreatedarea.MustGetNull() + } + if !s.Larvaeoutsidetreatedarea.IsUnset() { + t.Larvaeoutsidetreatedarea = s.Larvaeoutsidetreatedarea.MustGetNull() + } + if !s.Larvaereason.IsUnset() { + t.Larvaereason = s.Larvaereason.MustGetNull() + } + if !s.Aquaticorganisms.IsUnset() { + t.Aquaticorganisms = s.Aquaticorganisms.MustGetNull() + } + if !s.Vegetation.IsUnset() { + t.Vegetation = s.Vegetation.MustGetNull() + } + if !s.Sourcereduction.IsUnset() { + t.Sourcereduction = s.Sourcereduction.MustGetNull() + } + if !s.Waterpresent.IsUnset() { + t.Waterpresent = s.Waterpresent.MustGetNull() + } + if !s.Watermovement1.IsUnset() { + t.Watermovement1 = s.Watermovement1.MustGetNull() + } + if !s.Watermovement1percent.IsUnset() { + t.Watermovement1percent = s.Watermovement1percent.MustGetNull() + } + if !s.Watermovement2.IsUnset() { + t.Watermovement2 = s.Watermovement2.MustGetNull() + } + if !s.Watermovement2percent.IsUnset() { + t.Watermovement2percent = s.Watermovement2percent.MustGetNull() + } + if !s.Soilconditions.IsUnset() { + t.Soilconditions = s.Soilconditions.MustGetNull() + } + if !s.Waterduration.IsUnset() { + t.Waterduration = s.Waterduration.MustGetNull() + } + if !s.Watersource.IsUnset() { + t.Watersource = s.Watersource.MustGetNull() + } + if !s.Waterconditions.IsUnset() { + t.Waterconditions = s.Waterconditions.MustGetNull() + } + if !s.Adultactivity.IsUnset() { + t.Adultactivity = s.Adultactivity.MustGetNull() + } + if !s.Linelocid.IsUnset() { + t.Linelocid = s.Linelocid.MustGetNull() + } + if !s.Pointlocid.IsUnset() { + t.Pointlocid = s.Pointlocid.MustGetNull() + } + if !s.Polygonlocid.IsUnset() { + t.Polygonlocid = s.Polygonlocid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Fieldtech.IsUnset() { + t.Fieldtech = s.Fieldtech.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } +} + +func (s *FieldseekerQamosquitoinspectionSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerQamosquitoinspections.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 62) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Posdips.IsUnset() { + vals[1] = psql.Arg(s.Posdips.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Actiontaken.IsUnset() { + vals[2] = psql.Arg(s.Actiontaken.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[3] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Avetemp.IsUnset() { + vals[4] = psql.Arg(s.Avetemp.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Windspeed.IsUnset() { + vals[5] = psql.Arg(s.Windspeed.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Raingauge.IsUnset() { + vals[6] = psql.Arg(s.Raingauge.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[7] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Startdatetime.IsUnset() { + vals[8] = psql.Arg(s.Startdatetime.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Enddatetime.IsUnset() { + vals[9] = psql.Arg(s.Enddatetime.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Winddir.IsUnset() { + vals[10] = psql.Arg(s.Winddir.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Reviewed.IsUnset() { + vals[11] = psql.Arg(s.Reviewed.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Reviewedby.IsUnset() { + vals[12] = psql.Arg(s.Reviewedby.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Revieweddate.IsUnset() { + vals[13] = psql.Arg(s.Revieweddate.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Locationname.IsUnset() { + vals[14] = psql.Arg(s.Locationname.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[15] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Recordstatus.IsUnset() { + vals[16] = psql.Arg(s.Recordstatus.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[17] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.LR.IsUnset() { + vals[18] = psql.Arg(s.LR.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Negdips.IsUnset() { + vals[19] = psql.Arg(s.Negdips.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Totalacres.IsUnset() { + vals[20] = psql.Arg(s.Totalacres.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Acresbreeding.IsUnset() { + vals[21] = psql.Arg(s.Acresbreeding.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Fish.IsUnset() { + vals[22] = psql.Arg(s.Fish.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Sitetype.IsUnset() { + vals[23] = psql.Arg(s.Sitetype.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Breedingpotential.IsUnset() { + vals[24] = psql.Arg(s.Breedingpotential.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Movingwater.IsUnset() { + vals[25] = psql.Arg(s.Movingwater.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Nowaterever.IsUnset() { + vals[26] = psql.Arg(s.Nowaterever.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Mosquitohabitat.IsUnset() { + vals[27] = psql.Arg(s.Mosquitohabitat.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.Habvalue1.IsUnset() { + vals[28] = psql.Arg(s.Habvalue1.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.Habvalue1percent.IsUnset() { + vals[29] = psql.Arg(s.Habvalue1percent.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + if !s.Habvalue2.IsUnset() { + vals[30] = psql.Arg(s.Habvalue2.MustGetNull()) + } else { + vals[30] = psql.Raw("DEFAULT") + } + + if !s.Habvalue2percent.IsUnset() { + vals[31] = psql.Arg(s.Habvalue2percent.MustGetNull()) + } else { + vals[31] = psql.Raw("DEFAULT") + } + + if !s.Potential.IsUnset() { + vals[32] = psql.Arg(s.Potential.MustGetNull()) + } else { + vals[32] = psql.Raw("DEFAULT") + } + + if !s.Larvaepresent.IsUnset() { + vals[33] = psql.Arg(s.Larvaepresent.MustGetNull()) + } else { + vals[33] = psql.Raw("DEFAULT") + } + + if !s.Larvaeinsidetreatedarea.IsUnset() { + vals[34] = psql.Arg(s.Larvaeinsidetreatedarea.MustGetNull()) + } else { + vals[34] = psql.Raw("DEFAULT") + } + + if !s.Larvaeoutsidetreatedarea.IsUnset() { + vals[35] = psql.Arg(s.Larvaeoutsidetreatedarea.MustGetNull()) + } else { + vals[35] = psql.Raw("DEFAULT") + } + + if !s.Larvaereason.IsUnset() { + vals[36] = psql.Arg(s.Larvaereason.MustGetNull()) + } else { + vals[36] = psql.Raw("DEFAULT") + } + + if !s.Aquaticorganisms.IsUnset() { + vals[37] = psql.Arg(s.Aquaticorganisms.MustGetNull()) + } else { + vals[37] = psql.Raw("DEFAULT") + } + + if !s.Vegetation.IsUnset() { + vals[38] = psql.Arg(s.Vegetation.MustGetNull()) + } else { + vals[38] = psql.Raw("DEFAULT") + } + + if !s.Sourcereduction.IsUnset() { + vals[39] = psql.Arg(s.Sourcereduction.MustGetNull()) + } else { + vals[39] = psql.Raw("DEFAULT") + } + + if !s.Waterpresent.IsUnset() { + vals[40] = psql.Arg(s.Waterpresent.MustGetNull()) + } else { + vals[40] = psql.Raw("DEFAULT") + } + + if !s.Watermovement1.IsUnset() { + vals[41] = psql.Arg(s.Watermovement1.MustGetNull()) + } else { + vals[41] = psql.Raw("DEFAULT") + } + + if !s.Watermovement1percent.IsUnset() { + vals[42] = psql.Arg(s.Watermovement1percent.MustGetNull()) + } else { + vals[42] = psql.Raw("DEFAULT") + } + + if !s.Watermovement2.IsUnset() { + vals[43] = psql.Arg(s.Watermovement2.MustGetNull()) + } else { + vals[43] = psql.Raw("DEFAULT") + } + + if !s.Watermovement2percent.IsUnset() { + vals[44] = psql.Arg(s.Watermovement2percent.MustGetNull()) + } else { + vals[44] = psql.Raw("DEFAULT") + } + + if !s.Soilconditions.IsUnset() { + vals[45] = psql.Arg(s.Soilconditions.MustGetNull()) + } else { + vals[45] = psql.Raw("DEFAULT") + } + + if !s.Waterduration.IsUnset() { + vals[46] = psql.Arg(s.Waterduration.MustGetNull()) + } else { + vals[46] = psql.Raw("DEFAULT") + } + + if !s.Watersource.IsUnset() { + vals[47] = psql.Arg(s.Watersource.MustGetNull()) + } else { + vals[47] = psql.Raw("DEFAULT") + } + + if !s.Waterconditions.IsUnset() { + vals[48] = psql.Arg(s.Waterconditions.MustGetNull()) + } else { + vals[48] = psql.Raw("DEFAULT") + } + + if !s.Adultactivity.IsUnset() { + vals[49] = psql.Arg(s.Adultactivity.MustGetNull()) + } else { + vals[49] = psql.Raw("DEFAULT") + } + + if !s.Linelocid.IsUnset() { + vals[50] = psql.Arg(s.Linelocid.MustGetNull()) + } else { + vals[50] = psql.Raw("DEFAULT") + } + + if !s.Pointlocid.IsUnset() { + vals[51] = psql.Arg(s.Pointlocid.MustGetNull()) + } else { + vals[51] = psql.Raw("DEFAULT") + } + + if !s.Polygonlocid.IsUnset() { + vals[52] = psql.Arg(s.Polygonlocid.MustGetNull()) + } else { + vals[52] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[53] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[53] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[54] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[54] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[55] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[55] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[56] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[56] = psql.Raw("DEFAULT") + } + + if !s.Fieldtech.IsUnset() { + vals[57] = psql.Arg(s.Fieldtech.MustGetNull()) + } else { + vals[57] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[58] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[58] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[59] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[59] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[60] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[60] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[61] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[61] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerQamosquitoinspectionSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerQamosquitoinspectionSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 62) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Posdips.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "posdips")...), + psql.Arg(s.Posdips), + }}) + } + + if !s.Actiontaken.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "actiontaken")...), + psql.Arg(s.Actiontaken), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Avetemp.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "avetemp")...), + psql.Arg(s.Avetemp), + }}) + } + + if !s.Windspeed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "windspeed")...), + psql.Arg(s.Windspeed), + }}) + } + + if !s.Raingauge.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "raingauge")...), + psql.Arg(s.Raingauge), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.Startdatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "startdatetime")...), + psql.Arg(s.Startdatetime), + }}) + } + + if !s.Enddatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "enddatetime")...), + psql.Arg(s.Enddatetime), + }}) + } + + if !s.Winddir.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "winddir")...), + psql.Arg(s.Winddir), + }}) + } + + if !s.Reviewed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewed")...), + psql.Arg(s.Reviewed), + }}) + } + + if !s.Reviewedby.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewedby")...), + psql.Arg(s.Reviewedby), + }}) + } + + if !s.Revieweddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "revieweddate")...), + psql.Arg(s.Revieweddate), + }}) + } + + if !s.Locationname.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationname")...), + psql.Arg(s.Locationname), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Recordstatus.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "recordstatus")...), + psql.Arg(s.Recordstatus), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.LR.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lr")...), + psql.Arg(s.LR), + }}) + } + + if !s.Negdips.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "negdips")...), + psql.Arg(s.Negdips), + }}) + } + + if !s.Totalacres.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "totalacres")...), + psql.Arg(s.Totalacres), + }}) + } + + if !s.Acresbreeding.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "acresbreeding")...), + psql.Arg(s.Acresbreeding), + }}) + } + + if !s.Fish.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fish")...), + psql.Arg(s.Fish), + }}) + } + + if !s.Sitetype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sitetype")...), + psql.Arg(s.Sitetype), + }}) + } + + if !s.Breedingpotential.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "breedingpotential")...), + psql.Arg(s.Breedingpotential), + }}) + } + + if !s.Movingwater.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "movingwater")...), + psql.Arg(s.Movingwater), + }}) + } + + if !s.Nowaterever.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "nowaterever")...), + psql.Arg(s.Nowaterever), + }}) + } + + if !s.Mosquitohabitat.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "mosquitohabitat")...), + psql.Arg(s.Mosquitohabitat), + }}) + } + + if !s.Habvalue1.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habvalue1")...), + psql.Arg(s.Habvalue1), + }}) + } + + if !s.Habvalue1percent.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habvalue1percent")...), + psql.Arg(s.Habvalue1percent), + }}) + } + + if !s.Habvalue2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habvalue2")...), + psql.Arg(s.Habvalue2), + }}) + } + + if !s.Habvalue2percent.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habvalue2percent")...), + psql.Arg(s.Habvalue2percent), + }}) + } + + if !s.Potential.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "potential")...), + psql.Arg(s.Potential), + }}) + } + + if !s.Larvaepresent.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "larvaepresent")...), + psql.Arg(s.Larvaepresent), + }}) + } + + if !s.Larvaeinsidetreatedarea.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "larvaeinsidetreatedarea")...), + psql.Arg(s.Larvaeinsidetreatedarea), + }}) + } + + if !s.Larvaeoutsidetreatedarea.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "larvaeoutsidetreatedarea")...), + psql.Arg(s.Larvaeoutsidetreatedarea), + }}) + } + + if !s.Larvaereason.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "larvaereason")...), + psql.Arg(s.Larvaereason), + }}) + } + + if !s.Aquaticorganisms.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "aquaticorganisms")...), + psql.Arg(s.Aquaticorganisms), + }}) + } + + if !s.Vegetation.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "vegetation")...), + psql.Arg(s.Vegetation), + }}) + } + + if !s.Sourcereduction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sourcereduction")...), + psql.Arg(s.Sourcereduction), + }}) + } + + if !s.Waterpresent.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "waterpresent")...), + psql.Arg(s.Waterpresent), + }}) + } + + if !s.Watermovement1.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "watermovement1")...), + psql.Arg(s.Watermovement1), + }}) + } + + if !s.Watermovement1percent.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "watermovement1percent")...), + psql.Arg(s.Watermovement1percent), + }}) + } + + if !s.Watermovement2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "watermovement2")...), + psql.Arg(s.Watermovement2), + }}) + } + + if !s.Watermovement2percent.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "watermovement2percent")...), + psql.Arg(s.Watermovement2percent), + }}) + } + + if !s.Soilconditions.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "soilconditions")...), + psql.Arg(s.Soilconditions), + }}) + } + + if !s.Waterduration.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "waterduration")...), + psql.Arg(s.Waterduration), + }}) + } + + if !s.Watersource.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "watersource")...), + psql.Arg(s.Watersource), + }}) + } + + if !s.Waterconditions.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "waterconditions")...), + psql.Arg(s.Waterconditions), + }}) + } + + if !s.Adultactivity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "adultactivity")...), + psql.Arg(s.Adultactivity), + }}) + } + + if !s.Linelocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "linelocid")...), + psql.Arg(s.Linelocid), + }}) + } + + if !s.Pointlocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "pointlocid")...), + psql.Arg(s.Pointlocid), + }}) + } + + if !s.Polygonlocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "polygonlocid")...), + psql.Arg(s.Polygonlocid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Fieldtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fieldtech")...), + psql.Arg(s.Fieldtech), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + return exprs +} + +// FindFieldseekerQamosquitoinspection retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerQamosquitoinspection(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerQamosquitoinspection, error) { + if len(cols) == 0 { + return FieldseekerQamosquitoinspections.Query( + sm.Where(FieldseekerQamosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerQamosquitoinspections.Query( + sm.Where(FieldseekerQamosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerQamosquitoinspections.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerQamosquitoinspectionExists checks the presence of a single record by primary key +func FieldseekerQamosquitoinspectionExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerQamosquitoinspections.Query( + sm.Where(FieldseekerQamosquitoinspections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerQamosquitoinspection is retrieved from the database +func (o *FieldseekerQamosquitoinspection) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerQamosquitoinspections.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerQamosquitoinspectionSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerQamosquitoinspections.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerQamosquitoinspectionSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerQamosquitoinspections.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerQamosquitoinspectionSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerQamosquitoinspections.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerQamosquitoinspectionSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerQamosquitoinspection +func (o *FieldseekerQamosquitoinspection) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerQamosquitoinspection) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.qamosquitoinspection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerQamosquitoinspection +func (o *FieldseekerQamosquitoinspection) Update(ctx context.Context, exec bob.Executor, s *FieldseekerQamosquitoinspectionSetter) error { + v, err := FieldseekerQamosquitoinspections.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerQamosquitoinspection record with an executor +func (o *FieldseekerQamosquitoinspection) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerQamosquitoinspections.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerQamosquitoinspection using the executor +func (o *FieldseekerQamosquitoinspection) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerQamosquitoinspections.Query( + sm.Where(FieldseekerQamosquitoinspections.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerQamosquitoinspectionSlice is retrieved from the database +func (o FieldseekerQamosquitoinspectionSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerQamosquitoinspections.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerQamosquitoinspections.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerQamosquitoinspections.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerQamosquitoinspections.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerQamosquitoinspectionSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.qamosquitoinspection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerQamosquitoinspectionSlice) copyMatchingRows(from ...*FieldseekerQamosquitoinspection) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerQamosquitoinspectionSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerQamosquitoinspections.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerQamosquitoinspection: + o.copyMatchingRows(retrieved) + case []*FieldseekerQamosquitoinspection: + o.copyMatchingRows(retrieved...) + case FieldseekerQamosquitoinspectionSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerQamosquitoinspection or a slice of FieldseekerQamosquitoinspection + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerQamosquitoinspections.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerQamosquitoinspectionSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerQamosquitoinspections.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerQamosquitoinspection: + o.copyMatchingRows(retrieved) + case []*FieldseekerQamosquitoinspection: + o.copyMatchingRows(retrieved...) + case FieldseekerQamosquitoinspectionSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerQamosquitoinspection or a slice of FieldseekerQamosquitoinspection + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerQamosquitoinspections.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerQamosquitoinspectionSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerQamosquitoinspectionSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerQamosquitoinspections.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerQamosquitoinspectionSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerQamosquitoinspections.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerQamosquitoinspectionSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerQamosquitoinspections.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerQamosquitoinspectionWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Posdips psql.WhereNullMod[Q, int16] + Actiontaken psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionMosquitoactionEnum] + Comments psql.WhereNullMod[Q, string] + Avetemp psql.WhereNullMod[Q, float64] + Windspeed psql.WhereNullMod[Q, float64] + Raingauge psql.WhereNullMod[Q, float64] + Globalid psql.WhereNullMod[Q, uuid.UUID] + Startdatetime psql.WhereNullMod[Q, time.Time] + Enddatetime psql.WhereNullMod[Q, time.Time] + Winddir psql.WhereNullMod[Q, string] + Reviewed psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Reviewedby psql.WhereNullMod[Q, string] + Revieweddate psql.WhereNullMod[Q, time.Time] + Locationname psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Recordstatus psql.WhereNullMod[Q, int16] + Zone2 psql.WhereNullMod[Q, string] + LR psql.WhereNullMod[Q, int16] + Negdips psql.WhereNullMod[Q, int16] + Totalacres psql.WhereNullMod[Q, float64] + Acresbreeding psql.WhereNullMod[Q, float64] + Fish psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Sitetype psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQasitetypeEnum] + Breedingpotential psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum] + Movingwater psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Nowaterever psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Mosquitohabitat psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum] + Habvalue1 psql.WhereNullMod[Q, int16] + Habvalue1percent psql.WhereNullMod[Q, int16] + Habvalue2 psql.WhereNullMod[Q, int16] + Habvalue2percent psql.WhereNullMod[Q, int16] + Potential psql.WhereNullMod[Q, int16] + Larvaepresent psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Larvaeinsidetreatedarea psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Larvaeoutsidetreatedarea psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Larvaereason psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum] + Aquaticorganisms psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum] + Vegetation psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQavegetationEnum] + Sourcereduction psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQasourcereductionEnum] + Waterpresent psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Watermovement1 psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQawatermovementEnum] + Watermovement1percent psql.WhereNullMod[Q, int16] + Watermovement2 psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQawatermovementEnum] + Watermovement2percent psql.WhereNullMod[Q, int16] + Soilconditions psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQasoilconditionEnum] + Waterduration psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQawaterdurationEnum] + Watersource psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQawatersourceEnum] + Waterconditions psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum] + Adultactivity psql.WhereNullMod[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum] + Linelocid psql.WhereNullMod[Q, uuid.UUID] + Pointlocid psql.WhereNullMod[Q, uuid.UUID] + Polygonlocid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Fieldtech psql.WhereNullMod[Q, string] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] +} + +func (fieldseekerQamosquitoinspectionWhere[Q]) AliasedAs(alias string) fieldseekerQamosquitoinspectionWhere[Q] { + return buildFieldseekerQamosquitoinspectionWhere[Q](buildFieldseekerQamosquitoinspectionColumns(alias)) +} + +func buildFieldseekerQamosquitoinspectionWhere[Q psql.Filterable](cols fieldseekerQamosquitoinspectionColumns) fieldseekerQamosquitoinspectionWhere[Q] { + return fieldseekerQamosquitoinspectionWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Posdips: psql.WhereNull[Q, int16](cols.Posdips), + Actiontaken: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionMosquitoactionEnum](cols.Actiontaken), + Comments: psql.WhereNull[Q, string](cols.Comments), + Avetemp: psql.WhereNull[Q, float64](cols.Avetemp), + Windspeed: psql.WhereNull[Q, float64](cols.Windspeed), + Raingauge: psql.WhereNull[Q, float64](cols.Raingauge), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + Startdatetime: psql.WhereNull[Q, time.Time](cols.Startdatetime), + Enddatetime: psql.WhereNull[Q, time.Time](cols.Enddatetime), + Winddir: psql.WhereNull[Q, string](cols.Winddir), + Reviewed: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum](cols.Reviewed), + Reviewedby: psql.WhereNull[Q, string](cols.Reviewedby), + Revieweddate: psql.WhereNull[Q, time.Time](cols.Revieweddate), + Locationname: psql.WhereNull[Q, string](cols.Locationname), + Zone: psql.WhereNull[Q, string](cols.Zone), + Recordstatus: psql.WhereNull[Q, int16](cols.Recordstatus), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + LR: psql.WhereNull[Q, int16](cols.LR), + Negdips: psql.WhereNull[Q, int16](cols.Negdips), + Totalacres: psql.WhereNull[Q, float64](cols.Totalacres), + Acresbreeding: psql.WhereNull[Q, float64](cols.Acresbreeding), + Fish: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum](cols.Fish), + Sitetype: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQasitetypeEnum](cols.Sitetype), + Breedingpotential: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQabreedingpotentialEnum](cols.Breedingpotential), + Movingwater: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum](cols.Movingwater), + Nowaterever: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum](cols.Nowaterever), + Mosquitohabitat: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQamosquitohabitatEnum](cols.Mosquitohabitat), + Habvalue1: psql.WhereNull[Q, int16](cols.Habvalue1), + Habvalue1percent: psql.WhereNull[Q, int16](cols.Habvalue1percent), + Habvalue2: psql.WhereNull[Q, int16](cols.Habvalue2), + Habvalue2percent: psql.WhereNull[Q, int16](cols.Habvalue2percent), + Potential: psql.WhereNull[Q, int16](cols.Potential), + Larvaepresent: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum](cols.Larvaepresent), + Larvaeinsidetreatedarea: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum](cols.Larvaeinsidetreatedarea), + Larvaeoutsidetreatedarea: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum](cols.Larvaeoutsidetreatedarea), + Larvaereason: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQalarvaereasonEnum](cols.Larvaereason), + Aquaticorganisms: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQaaquaticorganismsEnum](cols.Aquaticorganisms), + Vegetation: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQavegetationEnum](cols.Vegetation), + Sourcereduction: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQasourcereductionEnum](cols.Sourcereduction), + Waterpresent: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum](cols.Waterpresent), + Watermovement1: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQawatermovementEnum](cols.Watermovement1), + Watermovement1percent: psql.WhereNull[Q, int16](cols.Watermovement1percent), + Watermovement2: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQawatermovementEnum](cols.Watermovement2), + Watermovement2percent: psql.WhereNull[Q, int16](cols.Watermovement2percent), + Soilconditions: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQasoilconditionEnum](cols.Soilconditions), + Waterduration: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQawaterdurationEnum](cols.Waterduration), + Watersource: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQawatersourceEnum](cols.Watersource), + Waterconditions: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionQawaterconditionsEnum](cols.Waterconditions), + Adultactivity: psql.WhereNull[Q, enums.FieldseekerQamosquitoinspectionNotinuitFEnum](cols.Adultactivity), + Linelocid: psql.WhereNull[Q, uuid.UUID](cols.Linelocid), + Pointlocid: psql.WhereNull[Q, uuid.UUID](cols.Pointlocid), + Polygonlocid: psql.WhereNull[Q, uuid.UUID](cols.Polygonlocid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Fieldtech: psql.WhereNull[Q, string](cols.Fieldtech), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + } +} diff --git a/db/models/fieldseeker.qaproductobservation.bob.go b/db/models/fieldseeker.qaproductobservation.bob.go new file mode 100644 index 00000000..f7efe679 --- /dev/null +++ b/db/models/fieldseeker.qaproductobservation.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerQaproductobservation is an object representing the database table. +type FieldseekerQaproductobservation struct{} + +// FieldseekerQaproductobservationSlice is an alias for a slice of pointers to FieldseekerQaproductobservation. +// This should almost always be used instead of []*FieldseekerQaproductobservation. +type FieldseekerQaproductobservationSlice []*FieldseekerQaproductobservation + +// FieldseekerQaproductobservations contains methods to work with the qaproductobservation view +var FieldseekerQaproductobservations = psql.NewViewx[*FieldseekerQaproductobservation, FieldseekerQaproductobservationSlice]("fieldseeker", "qaproductobservation", buildFieldseekerQaproductobservationColumns("fieldseeker.qaproductobservation")) + +// FieldseekerQaproductobservationsQuery is a query on the qaproductobservation view +type FieldseekerQaproductobservationsQuery = *psql.ViewQuery[*FieldseekerQaproductobservation, FieldseekerQaproductobservationSlice] + +func buildFieldseekerQaproductobservationColumns(alias string) fieldseekerQaproductobservationColumns { + return fieldseekerQaproductobservationColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.qaproductobservation"), + tableAlias: alias, + } +} + +type fieldseekerQaproductobservationColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerQaproductobservationColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerQaproductobservationColumns) AliasedAs(alias string) fieldseekerQaproductobservationColumns { + return buildFieldseekerQaproductobservationColumns(alias) +} + +// AfterQueryHook is called after FieldseekerQaproductobservation is retrieved from the database +func (o *FieldseekerQaproductobservation) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerQaproductobservations.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerQaproductobservationSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerQaproductobservationSlice is retrieved from the database +func (o FieldseekerQaproductobservationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerQaproductobservations.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerQaproductobservationWhere[Q psql.Filterable] struct{} + +func (fieldseekerQaproductobservationWhere[Q]) AliasedAs(alias string) fieldseekerQaproductobservationWhere[Q] { + return buildFieldseekerQaproductobservationWhere[Q](buildFieldseekerQaproductobservationColumns(alias)) +} + +func buildFieldseekerQaproductobservationWhere[Q psql.Filterable](cols fieldseekerQaproductobservationColumns) fieldseekerQaproductobservationWhere[Q] { + return fieldseekerQaproductobservationWhere[Q]{} +} diff --git a/db/models/fieldseeker.restrictedarea.bob.go b/db/models/fieldseeker.restrictedarea.bob.go new file mode 100644 index 00000000..2a0e5d64 --- /dev/null +++ b/db/models/fieldseeker.restrictedarea.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerRestrictedarea is an object representing the database table. +type FieldseekerRestrictedarea struct{} + +// FieldseekerRestrictedareaSlice is an alias for a slice of pointers to FieldseekerRestrictedarea. +// This should almost always be used instead of []*FieldseekerRestrictedarea. +type FieldseekerRestrictedareaSlice []*FieldseekerRestrictedarea + +// FieldseekerRestrictedareas contains methods to work with the restrictedarea view +var FieldseekerRestrictedareas = psql.NewViewx[*FieldseekerRestrictedarea, FieldseekerRestrictedareaSlice]("fieldseeker", "restrictedarea", buildFieldseekerRestrictedareaColumns("fieldseeker.restrictedarea")) + +// FieldseekerRestrictedareasQuery is a query on the restrictedarea view +type FieldseekerRestrictedareasQuery = *psql.ViewQuery[*FieldseekerRestrictedarea, FieldseekerRestrictedareaSlice] + +func buildFieldseekerRestrictedareaColumns(alias string) fieldseekerRestrictedareaColumns { + return fieldseekerRestrictedareaColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.restrictedarea"), + tableAlias: alias, + } +} + +type fieldseekerRestrictedareaColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerRestrictedareaColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerRestrictedareaColumns) AliasedAs(alias string) fieldseekerRestrictedareaColumns { + return buildFieldseekerRestrictedareaColumns(alias) +} + +// AfterQueryHook is called after FieldseekerRestrictedarea is retrieved from the database +func (o *FieldseekerRestrictedarea) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerRestrictedareas.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerRestrictedareaSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerRestrictedareaSlice is retrieved from the database +func (o FieldseekerRestrictedareaSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerRestrictedareas.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerRestrictedareaWhere[Q psql.Filterable] struct{} + +func (fieldseekerRestrictedareaWhere[Q]) AliasedAs(alias string) fieldseekerRestrictedareaWhere[Q] { + return buildFieldseekerRestrictedareaWhere[Q](buildFieldseekerRestrictedareaColumns(alias)) +} + +func buildFieldseekerRestrictedareaWhere[Q psql.Filterable](cols fieldseekerRestrictedareaColumns) fieldseekerRestrictedareaWhere[Q] { + return fieldseekerRestrictedareaWhere[Q]{} +} diff --git a/db/models/fieldseeker.rodentinspection.bob.go b/db/models/fieldseeker.rodentinspection.bob.go new file mode 100644 index 00000000..7dc6e3b4 --- /dev/null +++ b/db/models/fieldseeker.rodentinspection.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerRodentinspection is an object representing the database table. +type FieldseekerRodentinspection struct{} + +// FieldseekerRodentinspectionSlice is an alias for a slice of pointers to FieldseekerRodentinspection. +// This should almost always be used instead of []*FieldseekerRodentinspection. +type FieldseekerRodentinspectionSlice []*FieldseekerRodentinspection + +// FieldseekerRodentinspections contains methods to work with the rodentinspection view +var FieldseekerRodentinspections = psql.NewViewx[*FieldseekerRodentinspection, FieldseekerRodentinspectionSlice]("fieldseeker", "rodentinspection", buildFieldseekerRodentinspectionColumns("fieldseeker.rodentinspection")) + +// FieldseekerRodentinspectionsQuery is a query on the rodentinspection view +type FieldseekerRodentinspectionsQuery = *psql.ViewQuery[*FieldseekerRodentinspection, FieldseekerRodentinspectionSlice] + +func buildFieldseekerRodentinspectionColumns(alias string) fieldseekerRodentinspectionColumns { + return fieldseekerRodentinspectionColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.rodentinspection"), + tableAlias: alias, + } +} + +type fieldseekerRodentinspectionColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerRodentinspectionColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerRodentinspectionColumns) AliasedAs(alias string) fieldseekerRodentinspectionColumns { + return buildFieldseekerRodentinspectionColumns(alias) +} + +// AfterQueryHook is called after FieldseekerRodentinspection is retrieved from the database +func (o *FieldseekerRodentinspection) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerRodentinspections.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerRodentinspectionSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerRodentinspectionSlice is retrieved from the database +func (o FieldseekerRodentinspectionSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerRodentinspections.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerRodentinspectionWhere[Q psql.Filterable] struct{} + +func (fieldseekerRodentinspectionWhere[Q]) AliasedAs(alias string) fieldseekerRodentinspectionWhere[Q] { + return buildFieldseekerRodentinspectionWhere[Q](buildFieldseekerRodentinspectionColumns(alias)) +} + +func buildFieldseekerRodentinspectionWhere[Q psql.Filterable](cols fieldseekerRodentinspectionColumns) fieldseekerRodentinspectionWhere[Q] { + return fieldseekerRodentinspectionWhere[Q]{} +} diff --git a/db/models/fieldseeker.rodentlocation.bob.go b/db/models/fieldseeker.rodentlocation.bob.go new file mode 100644 index 00000000..769b7761 --- /dev/null +++ b/db/models/fieldseeker.rodentlocation.bob.go @@ -0,0 +1,1340 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "fmt" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" + "github.com/stephenafamo/bob/mods" + "github.com/stephenafamo/bob/orm" + "github.com/stephenafamo/bob/types/pgtypes" +) + +// FieldseekerRodentlocation is an object representing the database table. +type FieldseekerRodentlocation struct { + OrganizationID int32 `db:"organization_id" ` + Objectid int64 `db:"objectid,pk" ` + // Location Name + Locationname null.Val[string] `db:"locationname" ` + Zone null.Val[string] `db:"zone" ` + Zone2 null.Val[string] `db:"zone2" ` + Habitat null.Val[enums.FieldseekerRodentlocationRodentlocationhabitatEnum] `db:"habitat" ` + Priority null.Val[enums.FieldseekerRodentlocationLocationpriority1Enum] `db:"priority" ` + Usetype null.Val[enums.FieldseekerRodentlocationLocationusetype1Enum] `db:"usetype" ` + Active null.Val[enums.FieldseekerRodentlocationNotinuitF1Enum] `db:"active" ` + Description null.Val[string] `db:"description" ` + Accessdesc null.Val[string] `db:"accessdesc" ` + Comments null.Val[string] `db:"comments" ` + Symbology null.Val[enums.FieldseekerRodentlocationRodentlocationSymbologyEnum] `db:"symbology" ` + // External ID + Externalid null.Val[string] `db:"externalid" ` + Nextactiondatescheduled null.Val[time.Time] `db:"nextactiondatescheduled" ` + Locationnumber null.Val[int32] `db:"locationnumber" ` + // Last Inspection Date + Lastinspectdate null.Val[time.Time] `db:"lastinspectdate" ` + // Last Inspection Species + Lastinspectspecies null.Val[string] `db:"lastinspectspecies" ` + // Last Inspection Action + Lastinspectaction null.Val[string] `db:"lastinspectaction" ` + // Last Inspection Conditions + Lastinspectconditions null.Val[string] `db:"lastinspectconditions" ` + // Last Inspection Rodent Evidence + Lastinspectrodentevidence null.Val[string] `db:"lastinspectrodentevidence" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + // Jurisdiction + Jurisdiction null.Val[string] `db:"jurisdiction" ` + + R fieldseekerRodentlocationR `db:"-" ` +} + +// FieldseekerRodentlocationSlice is an alias for a slice of pointers to FieldseekerRodentlocation. +// This should almost always be used instead of []*FieldseekerRodentlocation. +type FieldseekerRodentlocationSlice []*FieldseekerRodentlocation + +// FieldseekerRodentlocations contains methods to work with the rodentlocation table +var FieldseekerRodentlocations = psql.NewTablex[*FieldseekerRodentlocation, FieldseekerRodentlocationSlice, *FieldseekerRodentlocationSetter]("fieldseeker", "rodentlocation", buildFieldseekerRodentlocationColumns("fieldseeker.rodentlocation")) + +// FieldseekerRodentlocationsQuery is a query on the rodentlocation table +type FieldseekerRodentlocationsQuery = *psql.ViewQuery[*FieldseekerRodentlocation, FieldseekerRodentlocationSlice] + +// fieldseekerRodentlocationR is where relationships are stored. +type fieldseekerRodentlocationR struct { + Organization *Organization // fieldseeker.rodentlocation.rodentlocation_organization_id_fkey +} + +func buildFieldseekerRodentlocationColumns(alias string) fieldseekerRodentlocationColumns { + return fieldseekerRodentlocationColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "organization_id", "objectid", "locationname", "zone", "zone2", "habitat", "priority", "usetype", "active", "description", "accessdesc", "comments", "symbology", "externalid", "nextactiondatescheduled", "locationnumber", "lastinspectdate", "lastinspectspecies", "lastinspectaction", "lastinspectconditions", "lastinspectrodentevidence", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "creationdate", "creator", "editdate", "editor", "jurisdiction", + ).WithParent("fieldseeker.rodentlocation"), + tableAlias: alias, + OrganizationID: psql.Quote(alias, "organization_id"), + Objectid: psql.Quote(alias, "objectid"), + Locationname: psql.Quote(alias, "locationname"), + Zone: psql.Quote(alias, "zone"), + Zone2: psql.Quote(alias, "zone2"), + Habitat: psql.Quote(alias, "habitat"), + Priority: psql.Quote(alias, "priority"), + Usetype: psql.Quote(alias, "usetype"), + Active: psql.Quote(alias, "active"), + Description: psql.Quote(alias, "description"), + Accessdesc: psql.Quote(alias, "accessdesc"), + Comments: psql.Quote(alias, "comments"), + Symbology: psql.Quote(alias, "symbology"), + Externalid: psql.Quote(alias, "externalid"), + Nextactiondatescheduled: psql.Quote(alias, "nextactiondatescheduled"), + Locationnumber: psql.Quote(alias, "locationnumber"), + Lastinspectdate: psql.Quote(alias, "lastinspectdate"), + Lastinspectspecies: psql.Quote(alias, "lastinspectspecies"), + Lastinspectaction: psql.Quote(alias, "lastinspectaction"), + Lastinspectconditions: psql.Quote(alias, "lastinspectconditions"), + Lastinspectrodentevidence: psql.Quote(alias, "lastinspectrodentevidence"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Jurisdiction: psql.Quote(alias, "jurisdiction"), + } +} + +type fieldseekerRodentlocationColumns struct { + expr.ColumnsExpr + tableAlias string + OrganizationID psql.Expression + Objectid psql.Expression + Locationname psql.Expression + Zone psql.Expression + Zone2 psql.Expression + Habitat psql.Expression + Priority psql.Expression + Usetype psql.Expression + Active psql.Expression + Description psql.Expression + Accessdesc psql.Expression + Comments psql.Expression + Symbology psql.Expression + Externalid psql.Expression + Nextactiondatescheduled psql.Expression + Locationnumber psql.Expression + Lastinspectdate psql.Expression + Lastinspectspecies psql.Expression + Lastinspectaction psql.Expression + Lastinspectconditions psql.Expression + Lastinspectrodentevidence psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Jurisdiction psql.Expression +} + +func (c fieldseekerRodentlocationColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerRodentlocationColumns) AliasedAs(alias string) fieldseekerRodentlocationColumns { + return buildFieldseekerRodentlocationColumns(alias) +} + +// FieldseekerRodentlocationSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerRodentlocationSetter struct { + OrganizationID omit.Val[int32] `db:"organization_id" ` + Objectid omit.Val[int64] `db:"objectid,pk" ` + Locationname omitnull.Val[string] `db:"locationname" ` + Zone omitnull.Val[string] `db:"zone" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Habitat omitnull.Val[enums.FieldseekerRodentlocationRodentlocationhabitatEnum] `db:"habitat" ` + Priority omitnull.Val[enums.FieldseekerRodentlocationLocationpriority1Enum] `db:"priority" ` + Usetype omitnull.Val[enums.FieldseekerRodentlocationLocationusetype1Enum] `db:"usetype" ` + Active omitnull.Val[enums.FieldseekerRodentlocationNotinuitF1Enum] `db:"active" ` + Description omitnull.Val[string] `db:"description" ` + Accessdesc omitnull.Val[string] `db:"accessdesc" ` + Comments omitnull.Val[string] `db:"comments" ` + Symbology omitnull.Val[enums.FieldseekerRodentlocationRodentlocationSymbologyEnum] `db:"symbology" ` + Externalid omitnull.Val[string] `db:"externalid" ` + Nextactiondatescheduled omitnull.Val[time.Time] `db:"nextactiondatescheduled" ` + Locationnumber omitnull.Val[int32] `db:"locationnumber" ` + Lastinspectdate omitnull.Val[time.Time] `db:"lastinspectdate" ` + Lastinspectspecies omitnull.Val[string] `db:"lastinspectspecies" ` + Lastinspectaction omitnull.Val[string] `db:"lastinspectaction" ` + Lastinspectconditions omitnull.Val[string] `db:"lastinspectconditions" ` + Lastinspectrodentevidence omitnull.Val[string] `db:"lastinspectrodentevidence" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Jurisdiction omitnull.Val[string] `db:"jurisdiction" ` +} + +func (s FieldseekerRodentlocationSetter) SetColumns() []string { + vals := make([]string, 0, 31) + if s.OrganizationID.IsValue() { + vals = append(vals, "organization_id") + } + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Locationname.IsUnset() { + vals = append(vals, "locationname") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Habitat.IsUnset() { + vals = append(vals, "habitat") + } + if !s.Priority.IsUnset() { + vals = append(vals, "priority") + } + if !s.Usetype.IsUnset() { + vals = append(vals, "usetype") + } + if !s.Active.IsUnset() { + vals = append(vals, "active") + } + if !s.Description.IsUnset() { + vals = append(vals, "description") + } + if !s.Accessdesc.IsUnset() { + vals = append(vals, "accessdesc") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Symbology.IsUnset() { + vals = append(vals, "symbology") + } + if !s.Externalid.IsUnset() { + vals = append(vals, "externalid") + } + if !s.Nextactiondatescheduled.IsUnset() { + vals = append(vals, "nextactiondatescheduled") + } + if !s.Locationnumber.IsUnset() { + vals = append(vals, "locationnumber") + } + if !s.Lastinspectdate.IsUnset() { + vals = append(vals, "lastinspectdate") + } + if !s.Lastinspectspecies.IsUnset() { + vals = append(vals, "lastinspectspecies") + } + if !s.Lastinspectaction.IsUnset() { + vals = append(vals, "lastinspectaction") + } + if !s.Lastinspectconditions.IsUnset() { + vals = append(vals, "lastinspectconditions") + } + if !s.Lastinspectrodentevidence.IsUnset() { + vals = append(vals, "lastinspectrodentevidence") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Jurisdiction.IsUnset() { + vals = append(vals, "jurisdiction") + } + return vals +} + +func (s FieldseekerRodentlocationSetter) Overwrite(t *FieldseekerRodentlocation) { + if s.OrganizationID.IsValue() { + t.OrganizationID = s.OrganizationID.MustGet() + } + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Locationname.IsUnset() { + t.Locationname = s.Locationname.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Habitat.IsUnset() { + t.Habitat = s.Habitat.MustGetNull() + } + if !s.Priority.IsUnset() { + t.Priority = s.Priority.MustGetNull() + } + if !s.Usetype.IsUnset() { + t.Usetype = s.Usetype.MustGetNull() + } + if !s.Active.IsUnset() { + t.Active = s.Active.MustGetNull() + } + if !s.Description.IsUnset() { + t.Description = s.Description.MustGetNull() + } + if !s.Accessdesc.IsUnset() { + t.Accessdesc = s.Accessdesc.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Symbology.IsUnset() { + t.Symbology = s.Symbology.MustGetNull() + } + if !s.Externalid.IsUnset() { + t.Externalid = s.Externalid.MustGetNull() + } + if !s.Nextactiondatescheduled.IsUnset() { + t.Nextactiondatescheduled = s.Nextactiondatescheduled.MustGetNull() + } + if !s.Locationnumber.IsUnset() { + t.Locationnumber = s.Locationnumber.MustGetNull() + } + if !s.Lastinspectdate.IsUnset() { + t.Lastinspectdate = s.Lastinspectdate.MustGetNull() + } + if !s.Lastinspectspecies.IsUnset() { + t.Lastinspectspecies = s.Lastinspectspecies.MustGetNull() + } + if !s.Lastinspectaction.IsUnset() { + t.Lastinspectaction = s.Lastinspectaction.MustGetNull() + } + if !s.Lastinspectconditions.IsUnset() { + t.Lastinspectconditions = s.Lastinspectconditions.MustGetNull() + } + if !s.Lastinspectrodentevidence.IsUnset() { + t.Lastinspectrodentevidence = s.Lastinspectrodentevidence.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Jurisdiction.IsUnset() { + t.Jurisdiction = s.Jurisdiction.MustGetNull() + } +} + +func (s *FieldseekerRodentlocationSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerRodentlocations.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 31) + if s.OrganizationID.IsValue() { + vals[0] = psql.Arg(s.OrganizationID.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if s.Objectid.IsValue() { + vals[1] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Locationname.IsUnset() { + vals[2] = psql.Arg(s.Locationname.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[3] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[4] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Habitat.IsUnset() { + vals[5] = psql.Arg(s.Habitat.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Priority.IsUnset() { + vals[6] = psql.Arg(s.Priority.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Usetype.IsUnset() { + vals[7] = psql.Arg(s.Usetype.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Active.IsUnset() { + vals[8] = psql.Arg(s.Active.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Description.IsUnset() { + vals[9] = psql.Arg(s.Description.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Accessdesc.IsUnset() { + vals[10] = psql.Arg(s.Accessdesc.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[11] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Symbology.IsUnset() { + vals[12] = psql.Arg(s.Symbology.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Externalid.IsUnset() { + vals[13] = psql.Arg(s.Externalid.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Nextactiondatescheduled.IsUnset() { + vals[14] = psql.Arg(s.Nextactiondatescheduled.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Locationnumber.IsUnset() { + vals[15] = psql.Arg(s.Locationnumber.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectdate.IsUnset() { + vals[16] = psql.Arg(s.Lastinspectdate.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectspecies.IsUnset() { + vals[17] = psql.Arg(s.Lastinspectspecies.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectaction.IsUnset() { + vals[18] = psql.Arg(s.Lastinspectaction.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectconditions.IsUnset() { + vals[19] = psql.Arg(s.Lastinspectconditions.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Lastinspectrodentevidence.IsUnset() { + vals[20] = psql.Arg(s.Lastinspectrodentevidence.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[21] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[22] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[23] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[24] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[25] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[26] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[27] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[28] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[29] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + if !s.Jurisdiction.IsUnset() { + vals[30] = psql.Arg(s.Jurisdiction.MustGetNull()) + } else { + vals[30] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerRodentlocationSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerRodentlocationSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 31) + + if s.OrganizationID.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "organization_id")...), + psql.Arg(s.OrganizationID), + }}) + } + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Locationname.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationname")...), + psql.Arg(s.Locationname), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Habitat.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habitat")...), + psql.Arg(s.Habitat), + }}) + } + + if !s.Priority.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "priority")...), + psql.Arg(s.Priority), + }}) + } + + if !s.Usetype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "usetype")...), + psql.Arg(s.Usetype), + }}) + } + + if !s.Active.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "active")...), + psql.Arg(s.Active), + }}) + } + + if !s.Description.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "description")...), + psql.Arg(s.Description), + }}) + } + + if !s.Accessdesc.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "accessdesc")...), + psql.Arg(s.Accessdesc), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Symbology.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "symbology")...), + psql.Arg(s.Symbology), + }}) + } + + if !s.Externalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "externalid")...), + psql.Arg(s.Externalid), + }}) + } + + if !s.Nextactiondatescheduled.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "nextactiondatescheduled")...), + psql.Arg(s.Nextactiondatescheduled), + }}) + } + + if !s.Locationnumber.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationnumber")...), + psql.Arg(s.Locationnumber), + }}) + } + + if !s.Lastinspectdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectdate")...), + psql.Arg(s.Lastinspectdate), + }}) + } + + if !s.Lastinspectspecies.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectspecies")...), + psql.Arg(s.Lastinspectspecies), + }}) + } + + if !s.Lastinspectaction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectaction")...), + psql.Arg(s.Lastinspectaction), + }}) + } + + if !s.Lastinspectconditions.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectconditions")...), + psql.Arg(s.Lastinspectconditions), + }}) + } + + if !s.Lastinspectrodentevidence.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastinspectrodentevidence")...), + psql.Arg(s.Lastinspectrodentevidence), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Jurisdiction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "jurisdiction")...), + psql.Arg(s.Jurisdiction), + }}) + } + + return exprs +} + +// FindFieldseekerRodentlocation retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerRodentlocation(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerRodentlocation, error) { + if len(cols) == 0 { + return FieldseekerRodentlocations.Query( + sm.Where(FieldseekerRodentlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerRodentlocations.Query( + sm.Where(FieldseekerRodentlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerRodentlocations.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerRodentlocationExists checks the presence of a single record by primary key +func FieldseekerRodentlocationExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerRodentlocations.Query( + sm.Where(FieldseekerRodentlocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerRodentlocation is retrieved from the database +func (o *FieldseekerRodentlocation) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerRodentlocations.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerRodentlocationSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerRodentlocations.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerRodentlocationSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerRodentlocations.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerRodentlocationSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerRodentlocations.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerRodentlocationSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerRodentlocation +func (o *FieldseekerRodentlocation) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerRodentlocation) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.rodentlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerRodentlocation +func (o *FieldseekerRodentlocation) Update(ctx context.Context, exec bob.Executor, s *FieldseekerRodentlocationSetter) error { + v, err := FieldseekerRodentlocations.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + o.R = v.R + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerRodentlocation record with an executor +func (o *FieldseekerRodentlocation) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerRodentlocations.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerRodentlocation using the executor +func (o *FieldseekerRodentlocation) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerRodentlocations.Query( + sm.Where(FieldseekerRodentlocations.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + o2.R = o.R + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerRodentlocationSlice is retrieved from the database +func (o FieldseekerRodentlocationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerRodentlocations.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerRodentlocations.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerRodentlocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerRodentlocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerRodentlocationSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.rodentlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerRodentlocationSlice) copyMatchingRows(from ...*FieldseekerRodentlocation) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + new.R = old.R + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerRodentlocationSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerRodentlocations.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerRodentlocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerRodentlocation: + o.copyMatchingRows(retrieved...) + case FieldseekerRodentlocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerRodentlocation or a slice of FieldseekerRodentlocation + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerRodentlocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerRodentlocationSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerRodentlocations.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerRodentlocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerRodentlocation: + o.copyMatchingRows(retrieved...) + case FieldseekerRodentlocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerRodentlocation or a slice of FieldseekerRodentlocation + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerRodentlocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerRodentlocationSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerRodentlocationSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerRodentlocations.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerRodentlocationSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerRodentlocations.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerRodentlocationSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerRodentlocations.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +// Organization starts a query for related objects on organization +func (o *FieldseekerRodentlocation) Organization(mods ...bob.Mod[*dialect.SelectQuery]) OrganizationsQuery { + return Organizations.Query(append(mods, + sm.Where(Organizations.Columns.ID.EQ(psql.Arg(o.OrganizationID))), + )...) +} + +func (os FieldseekerRodentlocationSlice) Organization(mods ...bob.Mod[*dialect.SelectQuery]) OrganizationsQuery { + pkOrganizationID := make(pgtypes.Array[int32], 0, len(os)) + for _, o := range os { + if o == nil { + continue + } + pkOrganizationID = append(pkOrganizationID, o.OrganizationID) + } + PKArgExpr := psql.Select(sm.Columns( + psql.F("unnest", psql.Cast(psql.Arg(pkOrganizationID), "integer[]")), + )) + + return Organizations.Query(append(mods, + sm.Where(psql.Group(Organizations.Columns.ID).OP("IN", PKArgExpr)), + )...) +} + +func attachFieldseekerRodentlocationOrganization0(ctx context.Context, exec bob.Executor, count int, fieldseekerRodentlocation0 *FieldseekerRodentlocation, organization1 *Organization) (*FieldseekerRodentlocation, error) { + setter := &FieldseekerRodentlocationSetter{ + OrganizationID: omit.From(organization1.ID), + } + + err := fieldseekerRodentlocation0.Update(ctx, exec, setter) + if err != nil { + return nil, fmt.Errorf("attachFieldseekerRodentlocationOrganization0: %w", err) + } + + return fieldseekerRodentlocation0, nil +} + +func (fieldseekerRodentlocation0 *FieldseekerRodentlocation) InsertOrganization(ctx context.Context, exec bob.Executor, related *OrganizationSetter) error { + var err error + + organization1, err := Organizations.Insert(related).One(ctx, exec) + if err != nil { + return fmt.Errorf("inserting related objects: %w", err) + } + + _, err = attachFieldseekerRodentlocationOrganization0(ctx, exec, 1, fieldseekerRodentlocation0, organization1) + if err != nil { + return err + } + + fieldseekerRodentlocation0.R.Organization = organization1 + + organization1.R.Rodentlocations = append(organization1.R.Rodentlocations, fieldseekerRodentlocation0) + + return nil +} + +func (fieldseekerRodentlocation0 *FieldseekerRodentlocation) AttachOrganization(ctx context.Context, exec bob.Executor, organization1 *Organization) error { + var err error + + _, err = attachFieldseekerRodentlocationOrganization0(ctx, exec, 1, fieldseekerRodentlocation0, organization1) + if err != nil { + return err + } + + fieldseekerRodentlocation0.R.Organization = organization1 + + organization1.R.Rodentlocations = append(organization1.R.Rodentlocations, fieldseekerRodentlocation0) + + return nil +} + +type fieldseekerRodentlocationWhere[Q psql.Filterable] struct { + OrganizationID psql.WhereMod[Q, int32] + Objectid psql.WhereMod[Q, int64] + Locationname psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Zone2 psql.WhereNullMod[Q, string] + Habitat psql.WhereNullMod[Q, enums.FieldseekerRodentlocationRodentlocationhabitatEnum] + Priority psql.WhereNullMod[Q, enums.FieldseekerRodentlocationLocationpriority1Enum] + Usetype psql.WhereNullMod[Q, enums.FieldseekerRodentlocationLocationusetype1Enum] + Active psql.WhereNullMod[Q, enums.FieldseekerRodentlocationNotinuitF1Enum] + Description psql.WhereNullMod[Q, string] + Accessdesc psql.WhereNullMod[Q, string] + Comments psql.WhereNullMod[Q, string] + Symbology psql.WhereNullMod[Q, enums.FieldseekerRodentlocationRodentlocationSymbologyEnum] + Externalid psql.WhereNullMod[Q, string] + Nextactiondatescheduled psql.WhereNullMod[Q, time.Time] + Locationnumber psql.WhereNullMod[Q, int32] + Lastinspectdate psql.WhereNullMod[Q, time.Time] + Lastinspectspecies psql.WhereNullMod[Q, string] + Lastinspectaction psql.WhereNullMod[Q, string] + Lastinspectconditions psql.WhereNullMod[Q, string] + Lastinspectrodentevidence psql.WhereNullMod[Q, string] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Jurisdiction psql.WhereNullMod[Q, string] +} + +func (fieldseekerRodentlocationWhere[Q]) AliasedAs(alias string) fieldseekerRodentlocationWhere[Q] { + return buildFieldseekerRodentlocationWhere[Q](buildFieldseekerRodentlocationColumns(alias)) +} + +func buildFieldseekerRodentlocationWhere[Q psql.Filterable](cols fieldseekerRodentlocationColumns) fieldseekerRodentlocationWhere[Q] { + return fieldseekerRodentlocationWhere[Q]{ + OrganizationID: psql.Where[Q, int32](cols.OrganizationID), + Objectid: psql.Where[Q, int64](cols.Objectid), + Locationname: psql.WhereNull[Q, string](cols.Locationname), + Zone: psql.WhereNull[Q, string](cols.Zone), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Habitat: psql.WhereNull[Q, enums.FieldseekerRodentlocationRodentlocationhabitatEnum](cols.Habitat), + Priority: psql.WhereNull[Q, enums.FieldseekerRodentlocationLocationpriority1Enum](cols.Priority), + Usetype: psql.WhereNull[Q, enums.FieldseekerRodentlocationLocationusetype1Enum](cols.Usetype), + Active: psql.WhereNull[Q, enums.FieldseekerRodentlocationNotinuitF1Enum](cols.Active), + Description: psql.WhereNull[Q, string](cols.Description), + Accessdesc: psql.WhereNull[Q, string](cols.Accessdesc), + Comments: psql.WhereNull[Q, string](cols.Comments), + Symbology: psql.WhereNull[Q, enums.FieldseekerRodentlocationRodentlocationSymbologyEnum](cols.Symbology), + Externalid: psql.WhereNull[Q, string](cols.Externalid), + Nextactiondatescheduled: psql.WhereNull[Q, time.Time](cols.Nextactiondatescheduled), + Locationnumber: psql.WhereNull[Q, int32](cols.Locationnumber), + Lastinspectdate: psql.WhereNull[Q, time.Time](cols.Lastinspectdate), + Lastinspectspecies: psql.WhereNull[Q, string](cols.Lastinspectspecies), + Lastinspectaction: psql.WhereNull[Q, string](cols.Lastinspectaction), + Lastinspectconditions: psql.WhereNull[Q, string](cols.Lastinspectconditions), + Lastinspectrodentevidence: psql.WhereNull[Q, string](cols.Lastinspectrodentevidence), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Jurisdiction: psql.WhereNull[Q, string](cols.Jurisdiction), + } +} + +func (o *FieldseekerRodentlocation) Preload(name string, retrieved any) error { + if o == nil { + return nil + } + + switch name { + case "Organization": + rel, ok := retrieved.(*Organization) + if !ok { + return fmt.Errorf("fieldseekerRodentlocation cannot load %T as %q", retrieved, name) + } + + o.R.Organization = rel + + if rel != nil { + rel.R.Rodentlocations = FieldseekerRodentlocationSlice{o} + } + return nil + default: + return fmt.Errorf("fieldseekerRodentlocation has no relationship %q", name) + } +} + +type fieldseekerRodentlocationPreloader struct { + Organization func(...psql.PreloadOption) psql.Preloader +} + +func buildFieldseekerRodentlocationPreloader() fieldseekerRodentlocationPreloader { + return fieldseekerRodentlocationPreloader{ + Organization: func(opts ...psql.PreloadOption) psql.Preloader { + return psql.Preload[*Organization, OrganizationSlice](psql.PreloadRel{ + Name: "Organization", + Sides: []psql.PreloadSide{ + { + From: FieldseekerRodentlocations, + To: Organizations, + FromColumns: []string{"organization_id"}, + ToColumns: []string{"id"}, + }, + }, + }, Organizations.Columns.Names(), opts...) + }, + } +} + +type fieldseekerRodentlocationThenLoader[Q orm.Loadable] struct { + Organization func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q] +} + +func buildFieldseekerRodentlocationThenLoader[Q orm.Loadable]() fieldseekerRodentlocationThenLoader[Q] { + type OrganizationLoadInterface interface { + LoadOrganization(context.Context, bob.Executor, ...bob.Mod[*dialect.SelectQuery]) error + } + + return fieldseekerRodentlocationThenLoader[Q]{ + Organization: thenLoadBuilder[Q]( + "Organization", + func(ctx context.Context, exec bob.Executor, retrieved OrganizationLoadInterface, mods ...bob.Mod[*dialect.SelectQuery]) error { + return retrieved.LoadOrganization(ctx, exec, mods...) + }, + ), + } +} + +// LoadOrganization loads the fieldseekerRodentlocation's Organization into the .R struct +func (o *FieldseekerRodentlocation) LoadOrganization(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error { + if o == nil { + return nil + } + + // Reset the relationship + o.R.Organization = nil + + related, err := o.Organization(mods...).One(ctx, exec) + if err != nil { + return err + } + + related.R.Rodentlocations = FieldseekerRodentlocationSlice{o} + + o.R.Organization = related + return nil +} + +// LoadOrganization loads the fieldseekerRodentlocation's Organization into the .R struct +func (os FieldseekerRodentlocationSlice) LoadOrganization(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error { + if len(os) == 0 { + return nil + } + + organizations, err := os.Organization(mods...).All(ctx, exec) + if err != nil { + return err + } + + for _, o := range os { + if o == nil { + continue + } + + for _, rel := range organizations { + + if !(o.OrganizationID == rel.ID) { + continue + } + + rel.R.Rodentlocations = append(rel.R.Rodentlocations, o) + + o.R.Organization = rel + break + } + } + + return nil +} + +type fieldseekerRodentlocationJoins[Q dialect.Joinable] struct { + typ string + Organization modAs[Q, organizationColumns] +} + +func (j fieldseekerRodentlocationJoins[Q]) aliasedAs(alias string) fieldseekerRodentlocationJoins[Q] { + return buildFieldseekerRodentlocationJoins[Q](buildFieldseekerRodentlocationColumns(alias), j.typ) +} + +func buildFieldseekerRodentlocationJoins[Q dialect.Joinable](cols fieldseekerRodentlocationColumns, typ string) fieldseekerRodentlocationJoins[Q] { + return fieldseekerRodentlocationJoins[Q]{ + typ: typ, + Organization: modAs[Q, organizationColumns]{ + c: Organizations.Columns, + f: func(to organizationColumns) bob.Mod[Q] { + mods := make(mods.QueryMods[Q], 0, 1) + + { + mods = append(mods, dialect.Join[Q](typ, Organizations.Name().As(to.Alias())).On( + to.ID.EQ(cols.OrganizationID), + )) + } + + return mods + }, + }, + } +} diff --git a/db/models/fieldseeker.samplecollection.bob.go b/db/models/fieldseeker.samplecollection.bob.go new file mode 100644 index 00000000..1a53f2aa --- /dev/null +++ b/db/models/fieldseeker.samplecollection.bob.go @@ -0,0 +1,1512 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerSamplecollection is an object representing the database table. +type FieldseekerSamplecollection struct { + Objectid int64 `db:"objectid,pk" ` + LocID null.Val[uuid.UUID] `db:"loc_id" ` + // Start + Startdatetime null.Val[time.Time] `db:"startdatetime" ` + // Finish + Enddatetime null.Val[time.Time] `db:"enddatetime" ` + // Conditions + Sitecond null.Val[enums.FieldseekerSamplecollectionMosquitositeconditionEnum] `db:"sitecond" ` + // Sample ID + Sampleid null.Val[string] `db:"sampleid" ` + // Surveillance Technician + Survtech null.Val[string] `db:"survtech" ` + // Sent + Datesent null.Val[time.Time] `db:"datesent" ` + // Tested + Datetested null.Val[time.Time] `db:"datetested" ` + // Test Technician + Testtech null.Val[string] `db:"testtech" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // Processed + Processed null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] `db:"processed" ` + // Sample Type + Sampletype null.Val[enums.FieldseekerSamplecollectionMosquitosampletypeEnum] `db:"sampletype" ` + // Sample Condition + Samplecond null.Val[enums.FieldseekerSamplecollectionMosquitosampleconditionEnum] `db:"samplecond" ` + // Species + Species null.Val[enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum] `db:"species" ` + // Sex + Sex null.Val[enums.FieldseekerSamplecollectionNotinuisexEnum] `db:"sex" ` + // Average Temperature + Avetemp null.Val[float64] `db:"avetemp" ` + // Wind Speed + Windspeed null.Val[float64] `db:"windspeed" ` + // Wind Direction + Winddir null.Val[enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum] `db:"winddir" ` + // Rain Gauge + Raingauge null.Val[float64] `db:"raingauge" ` + // Activity + Activity null.Val[enums.FieldseekerSamplecollectionMosquitoactivityEnum] `db:"activity" ` + // Test Method + Testmethod null.Val[enums.FieldseekerSamplecollectionMosquitotestmethodEnum] `db:"testmethod" ` + // Disease Tested + Diseasetested null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] `db:"diseasetested" ` + // Disease Positive + Diseasepos null.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] `db:"diseasepos" ` + // Reviewed + Reviewed null.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] `db:"reviewed" ` + // Reviewed By + Reviewedby null.Val[string] `db:"reviewedby" ` + // Reviewed Date + Revieweddate null.Val[time.Time] `db:"revieweddate" ` + // Location Name + Locationname null.Val[string] `db:"locationname" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // RecordStatus + Recordstatus null.Val[int16] `db:"recordstatus" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + // Lab + Lab null.Val[enums.FieldseekerSamplecollectionMosquitolabnameEnum] `db:"lab" ` + // Field Tech + Fieldtech null.Val[string] `db:"fieldtech" ` + Flockid null.Val[uuid.UUID] `db:"flockid" ` + // Sample Count + Samplecount null.Val[int16] `db:"samplecount" ` + // ChickenID + Chickenid null.Val[uuid.UUID] `db:"chickenid" ` + // Gateway Sync + Gatewaysync null.Val[int16] `db:"gatewaysync" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` +} + +// FieldseekerSamplecollectionSlice is an alias for a slice of pointers to FieldseekerSamplecollection. +// This should almost always be used instead of []*FieldseekerSamplecollection. +type FieldseekerSamplecollectionSlice []*FieldseekerSamplecollection + +// FieldseekerSamplecollections contains methods to work with the samplecollection table +var FieldseekerSamplecollections = psql.NewTablex[*FieldseekerSamplecollection, FieldseekerSamplecollectionSlice, *FieldseekerSamplecollectionSetter]("fieldseeker", "samplecollection", buildFieldseekerSamplecollectionColumns("fieldseeker.samplecollection")) + +// FieldseekerSamplecollectionsQuery is a query on the samplecollection table +type FieldseekerSamplecollectionsQuery = *psql.ViewQuery[*FieldseekerSamplecollection, FieldseekerSamplecollectionSlice] + +func buildFieldseekerSamplecollectionColumns(alias string) fieldseekerSamplecollectionColumns { + return fieldseekerSamplecollectionColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "loc_id", "startdatetime", "enddatetime", "sitecond", "sampleid", "survtech", "datesent", "datetested", "testtech", "comments", "processed", "sampletype", "samplecond", "species", "sex", "avetemp", "windspeed", "winddir", "raingauge", "activity", "testmethod", "diseasetested", "diseasepos", "reviewed", "reviewedby", "revieweddate", "locationname", "zone", "recordstatus", "zone2", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "lab", "fieldtech", "flockid", "samplecount", "chickenid", "gatewaysync", "creationdate", "creator", "editdate", "editor", + ).WithParent("fieldseeker.samplecollection"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + LocID: psql.Quote(alias, "loc_id"), + Startdatetime: psql.Quote(alias, "startdatetime"), + Enddatetime: psql.Quote(alias, "enddatetime"), + Sitecond: psql.Quote(alias, "sitecond"), + Sampleid: psql.Quote(alias, "sampleid"), + Survtech: psql.Quote(alias, "survtech"), + Datesent: psql.Quote(alias, "datesent"), + Datetested: psql.Quote(alias, "datetested"), + Testtech: psql.Quote(alias, "testtech"), + Comments: psql.Quote(alias, "comments"), + Processed: psql.Quote(alias, "processed"), + Sampletype: psql.Quote(alias, "sampletype"), + Samplecond: psql.Quote(alias, "samplecond"), + Species: psql.Quote(alias, "species"), + Sex: psql.Quote(alias, "sex"), + Avetemp: psql.Quote(alias, "avetemp"), + Windspeed: psql.Quote(alias, "windspeed"), + Winddir: psql.Quote(alias, "winddir"), + Raingauge: psql.Quote(alias, "raingauge"), + Activity: psql.Quote(alias, "activity"), + Testmethod: psql.Quote(alias, "testmethod"), + Diseasetested: psql.Quote(alias, "diseasetested"), + Diseasepos: psql.Quote(alias, "diseasepos"), + Reviewed: psql.Quote(alias, "reviewed"), + Reviewedby: psql.Quote(alias, "reviewedby"), + Revieweddate: psql.Quote(alias, "revieweddate"), + Locationname: psql.Quote(alias, "locationname"), + Zone: psql.Quote(alias, "zone"), + Recordstatus: psql.Quote(alias, "recordstatus"), + Zone2: psql.Quote(alias, "zone2"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Lab: psql.Quote(alias, "lab"), + Fieldtech: psql.Quote(alias, "fieldtech"), + Flockid: psql.Quote(alias, "flockid"), + Samplecount: psql.Quote(alias, "samplecount"), + Chickenid: psql.Quote(alias, "chickenid"), + Gatewaysync: psql.Quote(alias, "gatewaysync"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + } +} + +type fieldseekerSamplecollectionColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + LocID psql.Expression + Startdatetime psql.Expression + Enddatetime psql.Expression + Sitecond psql.Expression + Sampleid psql.Expression + Survtech psql.Expression + Datesent psql.Expression + Datetested psql.Expression + Testtech psql.Expression + Comments psql.Expression + Processed psql.Expression + Sampletype psql.Expression + Samplecond psql.Expression + Species psql.Expression + Sex psql.Expression + Avetemp psql.Expression + Windspeed psql.Expression + Winddir psql.Expression + Raingauge psql.Expression + Activity psql.Expression + Testmethod psql.Expression + Diseasetested psql.Expression + Diseasepos psql.Expression + Reviewed psql.Expression + Reviewedby psql.Expression + Revieweddate psql.Expression + Locationname psql.Expression + Zone psql.Expression + Recordstatus psql.Expression + Zone2 psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Lab psql.Expression + Fieldtech psql.Expression + Flockid psql.Expression + Samplecount psql.Expression + Chickenid psql.Expression + Gatewaysync psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression +} + +func (c fieldseekerSamplecollectionColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerSamplecollectionColumns) AliasedAs(alias string) fieldseekerSamplecollectionColumns { + return buildFieldseekerSamplecollectionColumns(alias) +} + +// FieldseekerSamplecollectionSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerSamplecollectionSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + LocID omitnull.Val[uuid.UUID] `db:"loc_id" ` + Startdatetime omitnull.Val[time.Time] `db:"startdatetime" ` + Enddatetime omitnull.Val[time.Time] `db:"enddatetime" ` + Sitecond omitnull.Val[enums.FieldseekerSamplecollectionMosquitositeconditionEnum] `db:"sitecond" ` + Sampleid omitnull.Val[string] `db:"sampleid" ` + Survtech omitnull.Val[string] `db:"survtech" ` + Datesent omitnull.Val[time.Time] `db:"datesent" ` + Datetested omitnull.Val[time.Time] `db:"datetested" ` + Testtech omitnull.Val[string] `db:"testtech" ` + Comments omitnull.Val[string] `db:"comments" ` + Processed omitnull.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] `db:"processed" ` + Sampletype omitnull.Val[enums.FieldseekerSamplecollectionMosquitosampletypeEnum] `db:"sampletype" ` + Samplecond omitnull.Val[enums.FieldseekerSamplecollectionMosquitosampleconditionEnum] `db:"samplecond" ` + Species omitnull.Val[enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum] `db:"species" ` + Sex omitnull.Val[enums.FieldseekerSamplecollectionNotinuisexEnum] `db:"sex" ` + Avetemp omitnull.Val[float64] `db:"avetemp" ` + Windspeed omitnull.Val[float64] `db:"windspeed" ` + Winddir omitnull.Val[enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum] `db:"winddir" ` + Raingauge omitnull.Val[float64] `db:"raingauge" ` + Activity omitnull.Val[enums.FieldseekerSamplecollectionMosquitoactivityEnum] `db:"activity" ` + Testmethod omitnull.Val[enums.FieldseekerSamplecollectionMosquitotestmethodEnum] `db:"testmethod" ` + Diseasetested omitnull.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] `db:"diseasetested" ` + Diseasepos omitnull.Val[enums.FieldseekerSamplecollectionMosquitodiseaseEnum] `db:"diseasepos" ` + Reviewed omitnull.Val[enums.FieldseekerSamplecollectionNotinuitFEnum] `db:"reviewed" ` + Reviewedby omitnull.Val[string] `db:"reviewedby" ` + Revieweddate omitnull.Val[time.Time] `db:"revieweddate" ` + Locationname omitnull.Val[string] `db:"locationname" ` + Zone omitnull.Val[string] `db:"zone" ` + Recordstatus omitnull.Val[int16] `db:"recordstatus" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Lab omitnull.Val[enums.FieldseekerSamplecollectionMosquitolabnameEnum] `db:"lab" ` + Fieldtech omitnull.Val[string] `db:"fieldtech" ` + Flockid omitnull.Val[uuid.UUID] `db:"flockid" ` + Samplecount omitnull.Val[int16] `db:"samplecount" ` + Chickenid omitnull.Val[uuid.UUID] `db:"chickenid" ` + Gatewaysync omitnull.Val[int16] `db:"gatewaysync" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` +} + +func (s FieldseekerSamplecollectionSetter) SetColumns() []string { + vals := make([]string, 0, 46) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.LocID.IsUnset() { + vals = append(vals, "loc_id") + } + if !s.Startdatetime.IsUnset() { + vals = append(vals, "startdatetime") + } + if !s.Enddatetime.IsUnset() { + vals = append(vals, "enddatetime") + } + if !s.Sitecond.IsUnset() { + vals = append(vals, "sitecond") + } + if !s.Sampleid.IsUnset() { + vals = append(vals, "sampleid") + } + if !s.Survtech.IsUnset() { + vals = append(vals, "survtech") + } + if !s.Datesent.IsUnset() { + vals = append(vals, "datesent") + } + if !s.Datetested.IsUnset() { + vals = append(vals, "datetested") + } + if !s.Testtech.IsUnset() { + vals = append(vals, "testtech") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Processed.IsUnset() { + vals = append(vals, "processed") + } + if !s.Sampletype.IsUnset() { + vals = append(vals, "sampletype") + } + if !s.Samplecond.IsUnset() { + vals = append(vals, "samplecond") + } + if !s.Species.IsUnset() { + vals = append(vals, "species") + } + if !s.Sex.IsUnset() { + vals = append(vals, "sex") + } + if !s.Avetemp.IsUnset() { + vals = append(vals, "avetemp") + } + if !s.Windspeed.IsUnset() { + vals = append(vals, "windspeed") + } + if !s.Winddir.IsUnset() { + vals = append(vals, "winddir") + } + if !s.Raingauge.IsUnset() { + vals = append(vals, "raingauge") + } + if !s.Activity.IsUnset() { + vals = append(vals, "activity") + } + if !s.Testmethod.IsUnset() { + vals = append(vals, "testmethod") + } + if !s.Diseasetested.IsUnset() { + vals = append(vals, "diseasetested") + } + if !s.Diseasepos.IsUnset() { + vals = append(vals, "diseasepos") + } + if !s.Reviewed.IsUnset() { + vals = append(vals, "reviewed") + } + if !s.Reviewedby.IsUnset() { + vals = append(vals, "reviewedby") + } + if !s.Revieweddate.IsUnset() { + vals = append(vals, "revieweddate") + } + if !s.Locationname.IsUnset() { + vals = append(vals, "locationname") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Recordstatus.IsUnset() { + vals = append(vals, "recordstatus") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Lab.IsUnset() { + vals = append(vals, "lab") + } + if !s.Fieldtech.IsUnset() { + vals = append(vals, "fieldtech") + } + if !s.Flockid.IsUnset() { + vals = append(vals, "flockid") + } + if !s.Samplecount.IsUnset() { + vals = append(vals, "samplecount") + } + if !s.Chickenid.IsUnset() { + vals = append(vals, "chickenid") + } + if !s.Gatewaysync.IsUnset() { + vals = append(vals, "gatewaysync") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + return vals +} + +func (s FieldseekerSamplecollectionSetter) Overwrite(t *FieldseekerSamplecollection) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.LocID.IsUnset() { + t.LocID = s.LocID.MustGetNull() + } + if !s.Startdatetime.IsUnset() { + t.Startdatetime = s.Startdatetime.MustGetNull() + } + if !s.Enddatetime.IsUnset() { + t.Enddatetime = s.Enddatetime.MustGetNull() + } + if !s.Sitecond.IsUnset() { + t.Sitecond = s.Sitecond.MustGetNull() + } + if !s.Sampleid.IsUnset() { + t.Sampleid = s.Sampleid.MustGetNull() + } + if !s.Survtech.IsUnset() { + t.Survtech = s.Survtech.MustGetNull() + } + if !s.Datesent.IsUnset() { + t.Datesent = s.Datesent.MustGetNull() + } + if !s.Datetested.IsUnset() { + t.Datetested = s.Datetested.MustGetNull() + } + if !s.Testtech.IsUnset() { + t.Testtech = s.Testtech.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Processed.IsUnset() { + t.Processed = s.Processed.MustGetNull() + } + if !s.Sampletype.IsUnset() { + t.Sampletype = s.Sampletype.MustGetNull() + } + if !s.Samplecond.IsUnset() { + t.Samplecond = s.Samplecond.MustGetNull() + } + if !s.Species.IsUnset() { + t.Species = s.Species.MustGetNull() + } + if !s.Sex.IsUnset() { + t.Sex = s.Sex.MustGetNull() + } + if !s.Avetemp.IsUnset() { + t.Avetemp = s.Avetemp.MustGetNull() + } + if !s.Windspeed.IsUnset() { + t.Windspeed = s.Windspeed.MustGetNull() + } + if !s.Winddir.IsUnset() { + t.Winddir = s.Winddir.MustGetNull() + } + if !s.Raingauge.IsUnset() { + t.Raingauge = s.Raingauge.MustGetNull() + } + if !s.Activity.IsUnset() { + t.Activity = s.Activity.MustGetNull() + } + if !s.Testmethod.IsUnset() { + t.Testmethod = s.Testmethod.MustGetNull() + } + if !s.Diseasetested.IsUnset() { + t.Diseasetested = s.Diseasetested.MustGetNull() + } + if !s.Diseasepos.IsUnset() { + t.Diseasepos = s.Diseasepos.MustGetNull() + } + if !s.Reviewed.IsUnset() { + t.Reviewed = s.Reviewed.MustGetNull() + } + if !s.Reviewedby.IsUnset() { + t.Reviewedby = s.Reviewedby.MustGetNull() + } + if !s.Revieweddate.IsUnset() { + t.Revieweddate = s.Revieweddate.MustGetNull() + } + if !s.Locationname.IsUnset() { + t.Locationname = s.Locationname.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Recordstatus.IsUnset() { + t.Recordstatus = s.Recordstatus.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Lab.IsUnset() { + t.Lab = s.Lab.MustGetNull() + } + if !s.Fieldtech.IsUnset() { + t.Fieldtech = s.Fieldtech.MustGetNull() + } + if !s.Flockid.IsUnset() { + t.Flockid = s.Flockid.MustGetNull() + } + if !s.Samplecount.IsUnset() { + t.Samplecount = s.Samplecount.MustGetNull() + } + if !s.Chickenid.IsUnset() { + t.Chickenid = s.Chickenid.MustGetNull() + } + if !s.Gatewaysync.IsUnset() { + t.Gatewaysync = s.Gatewaysync.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } +} + +func (s *FieldseekerSamplecollectionSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerSamplecollections.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 46) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.LocID.IsUnset() { + vals[1] = psql.Arg(s.LocID.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Startdatetime.IsUnset() { + vals[2] = psql.Arg(s.Startdatetime.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Enddatetime.IsUnset() { + vals[3] = psql.Arg(s.Enddatetime.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Sitecond.IsUnset() { + vals[4] = psql.Arg(s.Sitecond.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Sampleid.IsUnset() { + vals[5] = psql.Arg(s.Sampleid.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Survtech.IsUnset() { + vals[6] = psql.Arg(s.Survtech.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Datesent.IsUnset() { + vals[7] = psql.Arg(s.Datesent.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Datetested.IsUnset() { + vals[8] = psql.Arg(s.Datetested.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Testtech.IsUnset() { + vals[9] = psql.Arg(s.Testtech.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[10] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Processed.IsUnset() { + vals[11] = psql.Arg(s.Processed.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Sampletype.IsUnset() { + vals[12] = psql.Arg(s.Sampletype.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Samplecond.IsUnset() { + vals[13] = psql.Arg(s.Samplecond.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Species.IsUnset() { + vals[14] = psql.Arg(s.Species.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Sex.IsUnset() { + vals[15] = psql.Arg(s.Sex.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Avetemp.IsUnset() { + vals[16] = psql.Arg(s.Avetemp.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Windspeed.IsUnset() { + vals[17] = psql.Arg(s.Windspeed.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Winddir.IsUnset() { + vals[18] = psql.Arg(s.Winddir.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Raingauge.IsUnset() { + vals[19] = psql.Arg(s.Raingauge.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Activity.IsUnset() { + vals[20] = psql.Arg(s.Activity.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Testmethod.IsUnset() { + vals[21] = psql.Arg(s.Testmethod.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Diseasetested.IsUnset() { + vals[22] = psql.Arg(s.Diseasetested.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Diseasepos.IsUnset() { + vals[23] = psql.Arg(s.Diseasepos.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Reviewed.IsUnset() { + vals[24] = psql.Arg(s.Reviewed.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Reviewedby.IsUnset() { + vals[25] = psql.Arg(s.Reviewedby.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Revieweddate.IsUnset() { + vals[26] = psql.Arg(s.Revieweddate.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Locationname.IsUnset() { + vals[27] = psql.Arg(s.Locationname.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[28] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.Recordstatus.IsUnset() { + vals[29] = psql.Arg(s.Recordstatus.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[30] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[30] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[31] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[31] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[32] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[32] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[33] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[33] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[34] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[34] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[35] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[35] = psql.Raw("DEFAULT") + } + + if !s.Lab.IsUnset() { + vals[36] = psql.Arg(s.Lab.MustGetNull()) + } else { + vals[36] = psql.Raw("DEFAULT") + } + + if !s.Fieldtech.IsUnset() { + vals[37] = psql.Arg(s.Fieldtech.MustGetNull()) + } else { + vals[37] = psql.Raw("DEFAULT") + } + + if !s.Flockid.IsUnset() { + vals[38] = psql.Arg(s.Flockid.MustGetNull()) + } else { + vals[38] = psql.Raw("DEFAULT") + } + + if !s.Samplecount.IsUnset() { + vals[39] = psql.Arg(s.Samplecount.MustGetNull()) + } else { + vals[39] = psql.Raw("DEFAULT") + } + + if !s.Chickenid.IsUnset() { + vals[40] = psql.Arg(s.Chickenid.MustGetNull()) + } else { + vals[40] = psql.Raw("DEFAULT") + } + + if !s.Gatewaysync.IsUnset() { + vals[41] = psql.Arg(s.Gatewaysync.MustGetNull()) + } else { + vals[41] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[42] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[42] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[43] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[43] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[44] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[44] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[45] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[45] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerSamplecollectionSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerSamplecollectionSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 46) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.LocID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "loc_id")...), + psql.Arg(s.LocID), + }}) + } + + if !s.Startdatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "startdatetime")...), + psql.Arg(s.Startdatetime), + }}) + } + + if !s.Enddatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "enddatetime")...), + psql.Arg(s.Enddatetime), + }}) + } + + if !s.Sitecond.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sitecond")...), + psql.Arg(s.Sitecond), + }}) + } + + if !s.Sampleid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sampleid")...), + psql.Arg(s.Sampleid), + }}) + } + + if !s.Survtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "survtech")...), + psql.Arg(s.Survtech), + }}) + } + + if !s.Datesent.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "datesent")...), + psql.Arg(s.Datesent), + }}) + } + + if !s.Datetested.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "datetested")...), + psql.Arg(s.Datetested), + }}) + } + + if !s.Testtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "testtech")...), + psql.Arg(s.Testtech), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Processed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "processed")...), + psql.Arg(s.Processed), + }}) + } + + if !s.Sampletype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sampletype")...), + psql.Arg(s.Sampletype), + }}) + } + + if !s.Samplecond.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "samplecond")...), + psql.Arg(s.Samplecond), + }}) + } + + if !s.Species.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "species")...), + psql.Arg(s.Species), + }}) + } + + if !s.Sex.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sex")...), + psql.Arg(s.Sex), + }}) + } + + if !s.Avetemp.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "avetemp")...), + psql.Arg(s.Avetemp), + }}) + } + + if !s.Windspeed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "windspeed")...), + psql.Arg(s.Windspeed), + }}) + } + + if !s.Winddir.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "winddir")...), + psql.Arg(s.Winddir), + }}) + } + + if !s.Raingauge.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "raingauge")...), + psql.Arg(s.Raingauge), + }}) + } + + if !s.Activity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "activity")...), + psql.Arg(s.Activity), + }}) + } + + if !s.Testmethod.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "testmethod")...), + psql.Arg(s.Testmethod), + }}) + } + + if !s.Diseasetested.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "diseasetested")...), + psql.Arg(s.Diseasetested), + }}) + } + + if !s.Diseasepos.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "diseasepos")...), + psql.Arg(s.Diseasepos), + }}) + } + + if !s.Reviewed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewed")...), + psql.Arg(s.Reviewed), + }}) + } + + if !s.Reviewedby.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewedby")...), + psql.Arg(s.Reviewedby), + }}) + } + + if !s.Revieweddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "revieweddate")...), + psql.Arg(s.Revieweddate), + }}) + } + + if !s.Locationname.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationname")...), + psql.Arg(s.Locationname), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Recordstatus.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "recordstatus")...), + psql.Arg(s.Recordstatus), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Lab.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lab")...), + psql.Arg(s.Lab), + }}) + } + + if !s.Fieldtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fieldtech")...), + psql.Arg(s.Fieldtech), + }}) + } + + if !s.Flockid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "flockid")...), + psql.Arg(s.Flockid), + }}) + } + + if !s.Samplecount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "samplecount")...), + psql.Arg(s.Samplecount), + }}) + } + + if !s.Chickenid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "chickenid")...), + psql.Arg(s.Chickenid), + }}) + } + + if !s.Gatewaysync.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "gatewaysync")...), + psql.Arg(s.Gatewaysync), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + return exprs +} + +// FindFieldseekerSamplecollection retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerSamplecollection(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerSamplecollection, error) { + if len(cols) == 0 { + return FieldseekerSamplecollections.Query( + sm.Where(FieldseekerSamplecollections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerSamplecollections.Query( + sm.Where(FieldseekerSamplecollections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerSamplecollections.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerSamplecollectionExists checks the presence of a single record by primary key +func FieldseekerSamplecollectionExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerSamplecollections.Query( + sm.Where(FieldseekerSamplecollections.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerSamplecollection is retrieved from the database +func (o *FieldseekerSamplecollection) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerSamplecollections.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerSamplecollectionSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerSamplecollections.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerSamplecollectionSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerSamplecollections.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerSamplecollectionSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerSamplecollections.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerSamplecollectionSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerSamplecollection +func (o *FieldseekerSamplecollection) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerSamplecollection) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.samplecollection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerSamplecollection +func (o *FieldseekerSamplecollection) Update(ctx context.Context, exec bob.Executor, s *FieldseekerSamplecollectionSetter) error { + v, err := FieldseekerSamplecollections.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerSamplecollection record with an executor +func (o *FieldseekerSamplecollection) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerSamplecollections.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerSamplecollection using the executor +func (o *FieldseekerSamplecollection) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerSamplecollections.Query( + sm.Where(FieldseekerSamplecollections.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerSamplecollectionSlice is retrieved from the database +func (o FieldseekerSamplecollectionSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerSamplecollections.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerSamplecollections.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerSamplecollections.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerSamplecollections.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerSamplecollectionSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.samplecollection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerSamplecollectionSlice) copyMatchingRows(from ...*FieldseekerSamplecollection) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerSamplecollectionSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerSamplecollections.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerSamplecollection: + o.copyMatchingRows(retrieved) + case []*FieldseekerSamplecollection: + o.copyMatchingRows(retrieved...) + case FieldseekerSamplecollectionSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerSamplecollection or a slice of FieldseekerSamplecollection + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerSamplecollections.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerSamplecollectionSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerSamplecollections.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerSamplecollection: + o.copyMatchingRows(retrieved) + case []*FieldseekerSamplecollection: + o.copyMatchingRows(retrieved...) + case FieldseekerSamplecollectionSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerSamplecollection or a slice of FieldseekerSamplecollection + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerSamplecollections.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerSamplecollectionSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerSamplecollectionSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerSamplecollections.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerSamplecollectionSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerSamplecollections.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerSamplecollectionSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerSamplecollections.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerSamplecollectionWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + LocID psql.WhereNullMod[Q, uuid.UUID] + Startdatetime psql.WhereNullMod[Q, time.Time] + Enddatetime psql.WhereNullMod[Q, time.Time] + Sitecond psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionMosquitositeconditionEnum] + Sampleid psql.WhereNullMod[Q, string] + Survtech psql.WhereNullMod[Q, string] + Datesent psql.WhereNullMod[Q, time.Time] + Datetested psql.WhereNullMod[Q, time.Time] + Testtech psql.WhereNullMod[Q, string] + Comments psql.WhereNullMod[Q, string] + Processed psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionNotinuitFEnum] + Sampletype psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionMosquitosampletypeEnum] + Samplecond psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionMosquitosampleconditionEnum] + Species psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum] + Sex psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionNotinuisexEnum] + Avetemp psql.WhereNullMod[Q, float64] + Windspeed psql.WhereNullMod[Q, float64] + Winddir psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum] + Raingauge psql.WhereNullMod[Q, float64] + Activity psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionMosquitoactivityEnum] + Testmethod psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionMosquitotestmethodEnum] + Diseasetested psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionMosquitodiseaseEnum] + Diseasepos psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionMosquitodiseaseEnum] + Reviewed psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionNotinuitFEnum] + Reviewedby psql.WhereNullMod[Q, string] + Revieweddate psql.WhereNullMod[Q, time.Time] + Locationname psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Recordstatus psql.WhereNullMod[Q, int16] + Zone2 psql.WhereNullMod[Q, string] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Lab psql.WhereNullMod[Q, enums.FieldseekerSamplecollectionMosquitolabnameEnum] + Fieldtech psql.WhereNullMod[Q, string] + Flockid psql.WhereNullMod[Q, uuid.UUID] + Samplecount psql.WhereNullMod[Q, int16] + Chickenid psql.WhereNullMod[Q, uuid.UUID] + Gatewaysync psql.WhereNullMod[Q, int16] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] +} + +func (fieldseekerSamplecollectionWhere[Q]) AliasedAs(alias string) fieldseekerSamplecollectionWhere[Q] { + return buildFieldseekerSamplecollectionWhere[Q](buildFieldseekerSamplecollectionColumns(alias)) +} + +func buildFieldseekerSamplecollectionWhere[Q psql.Filterable](cols fieldseekerSamplecollectionColumns) fieldseekerSamplecollectionWhere[Q] { + return fieldseekerSamplecollectionWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + LocID: psql.WhereNull[Q, uuid.UUID](cols.LocID), + Startdatetime: psql.WhereNull[Q, time.Time](cols.Startdatetime), + Enddatetime: psql.WhereNull[Q, time.Time](cols.Enddatetime), + Sitecond: psql.WhereNull[Q, enums.FieldseekerSamplecollectionMosquitositeconditionEnum](cols.Sitecond), + Sampleid: psql.WhereNull[Q, string](cols.Sampleid), + Survtech: psql.WhereNull[Q, string](cols.Survtech), + Datesent: psql.WhereNull[Q, time.Time](cols.Datesent), + Datetested: psql.WhereNull[Q, time.Time](cols.Datetested), + Testtech: psql.WhereNull[Q, string](cols.Testtech), + Comments: psql.WhereNull[Q, string](cols.Comments), + Processed: psql.WhereNull[Q, enums.FieldseekerSamplecollectionNotinuitFEnum](cols.Processed), + Sampletype: psql.WhereNull[Q, enums.FieldseekerSamplecollectionMosquitosampletypeEnum](cols.Sampletype), + Samplecond: psql.WhereNull[Q, enums.FieldseekerSamplecollectionMosquitosampleconditionEnum](cols.Samplecond), + Species: psql.WhereNull[Q, enums.FieldseekerSamplecollectionMosquitosamplespeciesEnum](cols.Species), + Sex: psql.WhereNull[Q, enums.FieldseekerSamplecollectionNotinuisexEnum](cols.Sex), + Avetemp: psql.WhereNull[Q, float64](cols.Avetemp), + Windspeed: psql.WhereNull[Q, float64](cols.Windspeed), + Winddir: psql.WhereNull[Q, enums.FieldseekerSamplecollectionNotinuiwinddirectionEnum](cols.Winddir), + Raingauge: psql.WhereNull[Q, float64](cols.Raingauge), + Activity: psql.WhereNull[Q, enums.FieldseekerSamplecollectionMosquitoactivityEnum](cols.Activity), + Testmethod: psql.WhereNull[Q, enums.FieldseekerSamplecollectionMosquitotestmethodEnum](cols.Testmethod), + Diseasetested: psql.WhereNull[Q, enums.FieldseekerSamplecollectionMosquitodiseaseEnum](cols.Diseasetested), + Diseasepos: psql.WhereNull[Q, enums.FieldseekerSamplecollectionMosquitodiseaseEnum](cols.Diseasepos), + Reviewed: psql.WhereNull[Q, enums.FieldseekerSamplecollectionNotinuitFEnum](cols.Reviewed), + Reviewedby: psql.WhereNull[Q, string](cols.Reviewedby), + Revieweddate: psql.WhereNull[Q, time.Time](cols.Revieweddate), + Locationname: psql.WhereNull[Q, string](cols.Locationname), + Zone: psql.WhereNull[Q, string](cols.Zone), + Recordstatus: psql.WhereNull[Q, int16](cols.Recordstatus), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Lab: psql.WhereNull[Q, enums.FieldseekerSamplecollectionMosquitolabnameEnum](cols.Lab), + Fieldtech: psql.WhereNull[Q, string](cols.Fieldtech), + Flockid: psql.WhereNull[Q, uuid.UUID](cols.Flockid), + Samplecount: psql.WhereNull[Q, int16](cols.Samplecount), + Chickenid: psql.WhereNull[Q, uuid.UUID](cols.Chickenid), + Gatewaysync: psql.WhereNull[Q, int16](cols.Gatewaysync), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + } +} diff --git a/db/models/fieldseeker.samplelocation.bob.go b/db/models/fieldseeker.samplelocation.bob.go new file mode 100644 index 00000000..2f28627b --- /dev/null +++ b/db/models/fieldseeker.samplelocation.bob.go @@ -0,0 +1,941 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerSamplelocation is an object representing the database table. +type FieldseekerSamplelocation struct { + Objectid int64 `db:"objectid,pk" ` + // Name + Name null.Val[string] `db:"name" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // Habitat + Habitat null.Val[enums.FieldseekerSamplelocationLocationhabitattypeEnum] `db:"habitat" ` + // Priority + Priority null.Val[enums.FieldseekerSamplelocationLocationpriorityEnum] `db:"priority" ` + // Use Type + Usetype null.Val[enums.FieldseekerSamplelocationSamplelocationusetypeEnum] `db:"usetype" ` + // Active + Active null.Val[enums.FieldseekerSamplelocationNotinuitFEnum] `db:"active" ` + // Description + Description null.Val[string] `db:"description" ` + // Access Description + Accessdesc null.Val[string] `db:"accessdesc" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // External ID + Externalid null.Val[string] `db:"externalid" ` + // Next Scheduled Action + Nextactiondatescheduled null.Val[time.Time] `db:"nextactiondatescheduled" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + Locationnumber null.Val[int32] `db:"locationnumber" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + // Gateway Sync + Gatewaysync null.Val[int16] `db:"gatewaysync" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` +} + +// FieldseekerSamplelocationSlice is an alias for a slice of pointers to FieldseekerSamplelocation. +// This should almost always be used instead of []*FieldseekerSamplelocation. +type FieldseekerSamplelocationSlice []*FieldseekerSamplelocation + +// FieldseekerSamplelocations contains methods to work with the samplelocation table +var FieldseekerSamplelocations = psql.NewTablex[*FieldseekerSamplelocation, FieldseekerSamplelocationSlice, *FieldseekerSamplelocationSetter]("fieldseeker", "samplelocation", buildFieldseekerSamplelocationColumns("fieldseeker.samplelocation")) + +// FieldseekerSamplelocationsQuery is a query on the samplelocation table +type FieldseekerSamplelocationsQuery = *psql.ViewQuery[*FieldseekerSamplelocation, FieldseekerSamplelocationSlice] + +func buildFieldseekerSamplelocationColumns(alias string) fieldseekerSamplelocationColumns { + return fieldseekerSamplelocationColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "name", "zone", "habitat", "priority", "usetype", "active", "description", "accessdesc", "comments", "externalid", "nextactiondatescheduled", "zone2", "locationnumber", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "gatewaysync", "creationdate", "creator", "editdate", "editor", + ).WithParent("fieldseeker.samplelocation"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Name: psql.Quote(alias, "name"), + Zone: psql.Quote(alias, "zone"), + Habitat: psql.Quote(alias, "habitat"), + Priority: psql.Quote(alias, "priority"), + Usetype: psql.Quote(alias, "usetype"), + Active: psql.Quote(alias, "active"), + Description: psql.Quote(alias, "description"), + Accessdesc: psql.Quote(alias, "accessdesc"), + Comments: psql.Quote(alias, "comments"), + Externalid: psql.Quote(alias, "externalid"), + Nextactiondatescheduled: psql.Quote(alias, "nextactiondatescheduled"), + Zone2: psql.Quote(alias, "zone2"), + Locationnumber: psql.Quote(alias, "locationnumber"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Gatewaysync: psql.Quote(alias, "gatewaysync"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + } +} + +type fieldseekerSamplelocationColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Name psql.Expression + Zone psql.Expression + Habitat psql.Expression + Priority psql.Expression + Usetype psql.Expression + Active psql.Expression + Description psql.Expression + Accessdesc psql.Expression + Comments psql.Expression + Externalid psql.Expression + Nextactiondatescheduled psql.Expression + Zone2 psql.Expression + Locationnumber psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Gatewaysync psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression +} + +func (c fieldseekerSamplelocationColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerSamplelocationColumns) AliasedAs(alias string) fieldseekerSamplelocationColumns { + return buildFieldseekerSamplelocationColumns(alias) +} + +// FieldseekerSamplelocationSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerSamplelocationSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Name omitnull.Val[string] `db:"name" ` + Zone omitnull.Val[string] `db:"zone" ` + Habitat omitnull.Val[enums.FieldseekerSamplelocationLocationhabitattypeEnum] `db:"habitat" ` + Priority omitnull.Val[enums.FieldseekerSamplelocationLocationpriorityEnum] `db:"priority" ` + Usetype omitnull.Val[enums.FieldseekerSamplelocationSamplelocationusetypeEnum] `db:"usetype" ` + Active omitnull.Val[enums.FieldseekerSamplelocationNotinuitFEnum] `db:"active" ` + Description omitnull.Val[string] `db:"description" ` + Accessdesc omitnull.Val[string] `db:"accessdesc" ` + Comments omitnull.Val[string] `db:"comments" ` + Externalid omitnull.Val[string] `db:"externalid" ` + Nextactiondatescheduled omitnull.Val[time.Time] `db:"nextactiondatescheduled" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Locationnumber omitnull.Val[int32] `db:"locationnumber" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Gatewaysync omitnull.Val[int16] `db:"gatewaysync" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` +} + +func (s FieldseekerSamplelocationSetter) SetColumns() []string { + vals := make([]string, 0, 24) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Name.IsUnset() { + vals = append(vals, "name") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Habitat.IsUnset() { + vals = append(vals, "habitat") + } + if !s.Priority.IsUnset() { + vals = append(vals, "priority") + } + if !s.Usetype.IsUnset() { + vals = append(vals, "usetype") + } + if !s.Active.IsUnset() { + vals = append(vals, "active") + } + if !s.Description.IsUnset() { + vals = append(vals, "description") + } + if !s.Accessdesc.IsUnset() { + vals = append(vals, "accessdesc") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Externalid.IsUnset() { + vals = append(vals, "externalid") + } + if !s.Nextactiondatescheduled.IsUnset() { + vals = append(vals, "nextactiondatescheduled") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Locationnumber.IsUnset() { + vals = append(vals, "locationnumber") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Gatewaysync.IsUnset() { + vals = append(vals, "gatewaysync") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + return vals +} + +func (s FieldseekerSamplelocationSetter) Overwrite(t *FieldseekerSamplelocation) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Name.IsUnset() { + t.Name = s.Name.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Habitat.IsUnset() { + t.Habitat = s.Habitat.MustGetNull() + } + if !s.Priority.IsUnset() { + t.Priority = s.Priority.MustGetNull() + } + if !s.Usetype.IsUnset() { + t.Usetype = s.Usetype.MustGetNull() + } + if !s.Active.IsUnset() { + t.Active = s.Active.MustGetNull() + } + if !s.Description.IsUnset() { + t.Description = s.Description.MustGetNull() + } + if !s.Accessdesc.IsUnset() { + t.Accessdesc = s.Accessdesc.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Externalid.IsUnset() { + t.Externalid = s.Externalid.MustGetNull() + } + if !s.Nextactiondatescheduled.IsUnset() { + t.Nextactiondatescheduled = s.Nextactiondatescheduled.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Locationnumber.IsUnset() { + t.Locationnumber = s.Locationnumber.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Gatewaysync.IsUnset() { + t.Gatewaysync = s.Gatewaysync.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } +} + +func (s *FieldseekerSamplelocationSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerSamplelocations.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 24) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Name.IsUnset() { + vals[1] = psql.Arg(s.Name.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[2] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Habitat.IsUnset() { + vals[3] = psql.Arg(s.Habitat.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Priority.IsUnset() { + vals[4] = psql.Arg(s.Priority.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Usetype.IsUnset() { + vals[5] = psql.Arg(s.Usetype.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Active.IsUnset() { + vals[6] = psql.Arg(s.Active.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Description.IsUnset() { + vals[7] = psql.Arg(s.Description.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Accessdesc.IsUnset() { + vals[8] = psql.Arg(s.Accessdesc.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[9] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Externalid.IsUnset() { + vals[10] = psql.Arg(s.Externalid.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Nextactiondatescheduled.IsUnset() { + vals[11] = psql.Arg(s.Nextactiondatescheduled.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[12] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Locationnumber.IsUnset() { + vals[13] = psql.Arg(s.Locationnumber.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[14] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[15] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[16] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[17] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[18] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Gatewaysync.IsUnset() { + vals[19] = psql.Arg(s.Gatewaysync.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[20] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[21] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[22] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[23] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerSamplelocationSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerSamplelocationSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 24) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Name.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "name")...), + psql.Arg(s.Name), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Habitat.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habitat")...), + psql.Arg(s.Habitat), + }}) + } + + if !s.Priority.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "priority")...), + psql.Arg(s.Priority), + }}) + } + + if !s.Usetype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "usetype")...), + psql.Arg(s.Usetype), + }}) + } + + if !s.Active.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "active")...), + psql.Arg(s.Active), + }}) + } + + if !s.Description.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "description")...), + psql.Arg(s.Description), + }}) + } + + if !s.Accessdesc.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "accessdesc")...), + psql.Arg(s.Accessdesc), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Externalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "externalid")...), + psql.Arg(s.Externalid), + }}) + } + + if !s.Nextactiondatescheduled.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "nextactiondatescheduled")...), + psql.Arg(s.Nextactiondatescheduled), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Locationnumber.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationnumber")...), + psql.Arg(s.Locationnumber), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Gatewaysync.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "gatewaysync")...), + psql.Arg(s.Gatewaysync), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + return exprs +} + +// FindFieldseekerSamplelocation retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerSamplelocation(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerSamplelocation, error) { + if len(cols) == 0 { + return FieldseekerSamplelocations.Query( + sm.Where(FieldseekerSamplelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerSamplelocations.Query( + sm.Where(FieldseekerSamplelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerSamplelocations.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerSamplelocationExists checks the presence of a single record by primary key +func FieldseekerSamplelocationExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerSamplelocations.Query( + sm.Where(FieldseekerSamplelocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerSamplelocation is retrieved from the database +func (o *FieldseekerSamplelocation) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerSamplelocations.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerSamplelocationSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerSamplelocations.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerSamplelocationSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerSamplelocations.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerSamplelocationSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerSamplelocations.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerSamplelocationSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerSamplelocation +func (o *FieldseekerSamplelocation) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerSamplelocation) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.samplelocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerSamplelocation +func (o *FieldseekerSamplelocation) Update(ctx context.Context, exec bob.Executor, s *FieldseekerSamplelocationSetter) error { + v, err := FieldseekerSamplelocations.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerSamplelocation record with an executor +func (o *FieldseekerSamplelocation) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerSamplelocations.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerSamplelocation using the executor +func (o *FieldseekerSamplelocation) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerSamplelocations.Query( + sm.Where(FieldseekerSamplelocations.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerSamplelocationSlice is retrieved from the database +func (o FieldseekerSamplelocationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerSamplelocations.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerSamplelocations.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerSamplelocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerSamplelocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerSamplelocationSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.samplelocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerSamplelocationSlice) copyMatchingRows(from ...*FieldseekerSamplelocation) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerSamplelocationSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerSamplelocations.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerSamplelocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerSamplelocation: + o.copyMatchingRows(retrieved...) + case FieldseekerSamplelocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerSamplelocation or a slice of FieldseekerSamplelocation + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerSamplelocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerSamplelocationSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerSamplelocations.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerSamplelocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerSamplelocation: + o.copyMatchingRows(retrieved...) + case FieldseekerSamplelocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerSamplelocation or a slice of FieldseekerSamplelocation + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerSamplelocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerSamplelocationSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerSamplelocationSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerSamplelocations.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerSamplelocationSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerSamplelocations.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerSamplelocationSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerSamplelocations.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerSamplelocationWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Name psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Habitat psql.WhereNullMod[Q, enums.FieldseekerSamplelocationLocationhabitattypeEnum] + Priority psql.WhereNullMod[Q, enums.FieldseekerSamplelocationLocationpriorityEnum] + Usetype psql.WhereNullMod[Q, enums.FieldseekerSamplelocationSamplelocationusetypeEnum] + Active psql.WhereNullMod[Q, enums.FieldseekerSamplelocationNotinuitFEnum] + Description psql.WhereNullMod[Q, string] + Accessdesc psql.WhereNullMod[Q, string] + Comments psql.WhereNullMod[Q, string] + Externalid psql.WhereNullMod[Q, string] + Nextactiondatescheduled psql.WhereNullMod[Q, time.Time] + Zone2 psql.WhereNullMod[Q, string] + Locationnumber psql.WhereNullMod[Q, int32] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Gatewaysync psql.WhereNullMod[Q, int16] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] +} + +func (fieldseekerSamplelocationWhere[Q]) AliasedAs(alias string) fieldseekerSamplelocationWhere[Q] { + return buildFieldseekerSamplelocationWhere[Q](buildFieldseekerSamplelocationColumns(alias)) +} + +func buildFieldseekerSamplelocationWhere[Q psql.Filterable](cols fieldseekerSamplelocationColumns) fieldseekerSamplelocationWhere[Q] { + return fieldseekerSamplelocationWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Name: psql.WhereNull[Q, string](cols.Name), + Zone: psql.WhereNull[Q, string](cols.Zone), + Habitat: psql.WhereNull[Q, enums.FieldseekerSamplelocationLocationhabitattypeEnum](cols.Habitat), + Priority: psql.WhereNull[Q, enums.FieldseekerSamplelocationLocationpriorityEnum](cols.Priority), + Usetype: psql.WhereNull[Q, enums.FieldseekerSamplelocationSamplelocationusetypeEnum](cols.Usetype), + Active: psql.WhereNull[Q, enums.FieldseekerSamplelocationNotinuitFEnum](cols.Active), + Description: psql.WhereNull[Q, string](cols.Description), + Accessdesc: psql.WhereNull[Q, string](cols.Accessdesc), + Comments: psql.WhereNull[Q, string](cols.Comments), + Externalid: psql.WhereNull[Q, string](cols.Externalid), + Nextactiondatescheduled: psql.WhereNull[Q, time.Time](cols.Nextactiondatescheduled), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Locationnumber: psql.WhereNull[Q, int32](cols.Locationnumber), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Gatewaysync: psql.WhereNull[Q, int16](cols.Gatewaysync), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + } +} diff --git a/db/models/fieldseeker.servicerequest.bob.go b/db/models/fieldseeker.servicerequest.bob.go new file mode 100644 index 00000000..15e0b1cf --- /dev/null +++ b/db/models/fieldseeker.servicerequest.bob.go @@ -0,0 +1,2553 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerServicerequest is an object representing the database table. +type FieldseekerServicerequest struct { + Objectid int64 `db:"objectid,pk" ` + // Received + Recdatetime null.Val[time.Time] `db:"recdatetime" ` + // Source + Source null.Val[enums.FieldseekerServicerequestServicerequestsourceEnum] `db:"source" ` + // Entered By + Entrytech null.Val[string] `db:"entrytech" ` + // Priority + Priority null.Val[enums.FieldseekerServicerequestServicerequestpriorityEnum] `db:"priority" ` + // Supervisor + Supervisor null.Val[enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808] `db:"supervisor" ` + // Assigned To + Assignedtech null.Val[enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8] `db:"assignedtech" ` + // Status + Status null.Val[enums.FieldseekerServicerequestServicerequeststatusEnum] `db:"status" ` + // Anonymous Caller + Clranon null.Val[enums.FieldseekerServicerequestNotinuitFEnum] `db:"clranon" ` + // Caller Name + Clrfname null.Val[string] `db:"clrfname" ` + // Caller Phone + Clrphone1 null.Val[string] `db:"clrphone1" ` + // Caller Alternate Phone + Clrphone2 null.Val[string] `db:"clrphone2" ` + // Caller Email + Clremail null.Val[string] `db:"clremail" ` + // Caller Company + Clrcompany null.Val[string] `db:"clrcompany" ` + // Caller Address + Clraddr1 null.Val[string] `db:"clraddr1" ` + // Caller Address 2 + Clraddr2 null.Val[string] `db:"clraddr2" ` + // Caller City + Clrcity null.Val[string] `db:"clrcity" ` + // Caller State + Clrstate null.Val[enums.FieldseekerServicerequestServicerequestregionEnum] `db:"clrstate" ` + // Caller ZIP + Clrzip null.Val[string] `db:"clrzip" ` + // Caller Other + Clrother null.Val[string] `db:"clrother" ` + // Caller Contact Preference + Clrcontpref null.Val[enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum] `db:"clrcontpref" ` + // Request Company + Reqcompany null.Val[string] `db:"reqcompany" ` + // Request Address + Reqaddr1 null.Val[string] `db:"reqaddr1" ` + // Request Address 2 + Reqaddr2 null.Val[string] `db:"reqaddr2" ` + // Request City + Reqcity null.Val[string] `db:"reqcity" ` + // Request State + Reqstate null.Val[enums.FieldseekerServicerequestServicerequestregionEnum] `db:"reqstate" ` + // Request ZIP + Reqzip null.Val[string] `db:"reqzip" ` + // Request Cross Street + Reqcrossst null.Val[string] `db:"reqcrossst" ` + // Request Subdivision + Reqsubdiv null.Val[string] `db:"reqsubdiv" ` + // Request Map Grid + Reqmapgrid null.Val[string] `db:"reqmapgrid" ` + // Permission to Enter + Reqpermission null.Val[enums.FieldseekerServicerequestNotinuitFEnum] `db:"reqpermission" ` + // Request Target + Reqtarget null.Val[enums.FieldseekerServicerequestServicerequesttargetEnum] `db:"reqtarget" ` + // Request Description + Reqdescr null.Val[string] `db:"reqdescr" ` + // Notes for Field Technician + Reqnotesfortech null.Val[string] `db:"reqnotesfortech" ` + // Notes for Customer + Reqnotesforcust null.Val[string] `db:"reqnotesforcust" ` + // Request Field Notes + Reqfldnotes null.Val[string] `db:"reqfldnotes" ` + // Request Program Actions + Reqprogramactions null.Val[string] `db:"reqprogramactions" ` + // Closed + Datetimeclosed null.Val[time.Time] `db:"datetimeclosed" ` + // Closed By + Techclosed null.Val[string] `db:"techclosed" ` + // SR# + SRNumber null.Val[int32] `db:"sr_number" ` + // Reviewed + Reviewed null.Val[enums.FieldseekerServicerequestNotinuitFEnum] `db:"reviewed" ` + // Reviewed By + Reviewedby null.Val[string] `db:"reviewedby" ` + // Reviewed Date + Revieweddate null.Val[time.Time] `db:"revieweddate" ` + // Accepted + Accepted null.Val[enums.FieldseekerServicerequestNotinuitFEnum] `db:"accepted" ` + // Accepted Date + Accepteddate null.Val[time.Time] `db:"accepteddate" ` + // Rejected By + Rejectedby null.Val[string] `db:"rejectedby" ` + // Rejected Date + Rejecteddate null.Val[time.Time] `db:"rejecteddate" ` + // Rejected Reason + Rejectedreason null.Val[enums.FieldseekerServicerequestServicerequestrejectedreasonEnum] `db:"rejectedreason" ` + // Due Date + Duedate null.Val[time.Time] `db:"duedate" ` + // Accepted By + Acceptedby null.Val[string] `db:"acceptedby" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // Estimated Completion Date + Estcompletedate null.Val[time.Time] `db:"estcompletedate" ` + // Next Action + Nextaction null.Val[enums.FieldseekerServicerequestServicerequestnextactionEnum] `db:"nextaction" ` + // Record Status + Recordstatus null.Val[int16] `db:"recordstatus" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + // First Response Date + Firstresponsedate null.Val[time.Time] `db:"firstresponsedate" ` + // Response Day Count + Responsedaycount null.Val[int16] `db:"responsedaycount" ` + // Verify Correct Location + Allowed null.Val[string] `db:"allowed" ` + // Xvalue + Xvalue null.Val[string] `db:"xvalue" ` + // Yvalue + Yvalue null.Val[string] `db:"yvalue" ` + // ValidX + Validx null.Val[string] `db:"validx" ` + // ValidY + Validy null.Val[string] `db:"validy" ` + // External ID + Externalid null.Val[string] `db:"externalid" ` + // External Error + Externalerror null.Val[string] `db:"externalerror" ` + Pointlocid null.Val[uuid.UUID] `db:"pointlocid" ` + // Notified + Notified null.Val[int16] `db:"notified" ` + // Notified Date + Notifieddate null.Val[time.Time] `db:"notifieddate" ` + // Scheduled + Scheduled null.Val[int16] `db:"scheduled" ` + // Scheduled Date + Scheduleddate null.Val[time.Time] `db:"scheduleddate" ` + // Dog + Dog null.Val[enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31] `db:"dog" ` + // Schedule Period + SchedulePeriod null.Val[enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab] `db:"schedule_period" ` + // Schedule Notes + ScheduleNotes null.Val[string] `db:"schedule_notes" ` + // Prefer speaking Spanish + Spanish null.Val[enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC] `db:"spanish" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + // Issues Reported + Issuesreported null.Val[enums.FieldseekerServicerequestServicerequestissuesEnum] `db:"issuesreported" ` + // Jurisdiction + Jurisdiction null.Val[string] `db:"jurisdiction" ` + // Notification Timestamp + Notificationtimestamp null.Val[string] `db:"notificationtimestamp" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` +} + +// FieldseekerServicerequestSlice is an alias for a slice of pointers to FieldseekerServicerequest. +// This should almost always be used instead of []*FieldseekerServicerequest. +type FieldseekerServicerequestSlice []*FieldseekerServicerequest + +// FieldseekerServicerequests contains methods to work with the servicerequest table +var FieldseekerServicerequests = psql.NewTablex[*FieldseekerServicerequest, FieldseekerServicerequestSlice, *FieldseekerServicerequestSetter]("fieldseeker", "servicerequest", buildFieldseekerServicerequestColumns("fieldseeker.servicerequest")) + +// FieldseekerServicerequestsQuery is a query on the servicerequest table +type FieldseekerServicerequestsQuery = *psql.ViewQuery[*FieldseekerServicerequest, FieldseekerServicerequestSlice] + +func buildFieldseekerServicerequestColumns(alias string) fieldseekerServicerequestColumns { + return fieldseekerServicerequestColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "recdatetime", "source", "entrytech", "priority", "supervisor", "assignedtech", "status", "clranon", "clrfname", "clrphone1", "clrphone2", "clremail", "clrcompany", "clraddr1", "clraddr2", "clrcity", "clrstate", "clrzip", "clrother", "clrcontpref", "reqcompany", "reqaddr1", "reqaddr2", "reqcity", "reqstate", "reqzip", "reqcrossst", "reqsubdiv", "reqmapgrid", "reqpermission", "reqtarget", "reqdescr", "reqnotesfortech", "reqnotesforcust", "reqfldnotes", "reqprogramactions", "datetimeclosed", "techclosed", "sr_number", "reviewed", "reviewedby", "revieweddate", "accepted", "accepteddate", "rejectedby", "rejecteddate", "rejectedreason", "duedate", "acceptedby", "comments", "estcompletedate", "nextaction", "recordstatus", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "firstresponsedate", "responsedaycount", "allowed", "xvalue", "yvalue", "validx", "validy", "externalid", "externalerror", "pointlocid", "notified", "notifieddate", "scheduled", "scheduleddate", "dog", "schedule_period", "schedule_notes", "spanish", "creationdate", "creator", "editdate", "editor", "issuesreported", "jurisdiction", "notificationtimestamp", "zone", "zone2", + ).WithParent("fieldseeker.servicerequest"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Recdatetime: psql.Quote(alias, "recdatetime"), + Source: psql.Quote(alias, "source"), + Entrytech: psql.Quote(alias, "entrytech"), + Priority: psql.Quote(alias, "priority"), + Supervisor: psql.Quote(alias, "supervisor"), + Assignedtech: psql.Quote(alias, "assignedtech"), + Status: psql.Quote(alias, "status"), + Clranon: psql.Quote(alias, "clranon"), + Clrfname: psql.Quote(alias, "clrfname"), + Clrphone1: psql.Quote(alias, "clrphone1"), + Clrphone2: psql.Quote(alias, "clrphone2"), + Clremail: psql.Quote(alias, "clremail"), + Clrcompany: psql.Quote(alias, "clrcompany"), + Clraddr1: psql.Quote(alias, "clraddr1"), + Clraddr2: psql.Quote(alias, "clraddr2"), + Clrcity: psql.Quote(alias, "clrcity"), + Clrstate: psql.Quote(alias, "clrstate"), + Clrzip: psql.Quote(alias, "clrzip"), + Clrother: psql.Quote(alias, "clrother"), + Clrcontpref: psql.Quote(alias, "clrcontpref"), + Reqcompany: psql.Quote(alias, "reqcompany"), + Reqaddr1: psql.Quote(alias, "reqaddr1"), + Reqaddr2: psql.Quote(alias, "reqaddr2"), + Reqcity: psql.Quote(alias, "reqcity"), + Reqstate: psql.Quote(alias, "reqstate"), + Reqzip: psql.Quote(alias, "reqzip"), + Reqcrossst: psql.Quote(alias, "reqcrossst"), + Reqsubdiv: psql.Quote(alias, "reqsubdiv"), + Reqmapgrid: psql.Quote(alias, "reqmapgrid"), + Reqpermission: psql.Quote(alias, "reqpermission"), + Reqtarget: psql.Quote(alias, "reqtarget"), + Reqdescr: psql.Quote(alias, "reqdescr"), + Reqnotesfortech: psql.Quote(alias, "reqnotesfortech"), + Reqnotesforcust: psql.Quote(alias, "reqnotesforcust"), + Reqfldnotes: psql.Quote(alias, "reqfldnotes"), + Reqprogramactions: psql.Quote(alias, "reqprogramactions"), + Datetimeclosed: psql.Quote(alias, "datetimeclosed"), + Techclosed: psql.Quote(alias, "techclosed"), + SRNumber: psql.Quote(alias, "sr_number"), + Reviewed: psql.Quote(alias, "reviewed"), + Reviewedby: psql.Quote(alias, "reviewedby"), + Revieweddate: psql.Quote(alias, "revieweddate"), + Accepted: psql.Quote(alias, "accepted"), + Accepteddate: psql.Quote(alias, "accepteddate"), + Rejectedby: psql.Quote(alias, "rejectedby"), + Rejecteddate: psql.Quote(alias, "rejecteddate"), + Rejectedreason: psql.Quote(alias, "rejectedreason"), + Duedate: psql.Quote(alias, "duedate"), + Acceptedby: psql.Quote(alias, "acceptedby"), + Comments: psql.Quote(alias, "comments"), + Estcompletedate: psql.Quote(alias, "estcompletedate"), + Nextaction: psql.Quote(alias, "nextaction"), + Recordstatus: psql.Quote(alias, "recordstatus"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Firstresponsedate: psql.Quote(alias, "firstresponsedate"), + Responsedaycount: psql.Quote(alias, "responsedaycount"), + Allowed: psql.Quote(alias, "allowed"), + Xvalue: psql.Quote(alias, "xvalue"), + Yvalue: psql.Quote(alias, "yvalue"), + Validx: psql.Quote(alias, "validx"), + Validy: psql.Quote(alias, "validy"), + Externalid: psql.Quote(alias, "externalid"), + Externalerror: psql.Quote(alias, "externalerror"), + Pointlocid: psql.Quote(alias, "pointlocid"), + Notified: psql.Quote(alias, "notified"), + Notifieddate: psql.Quote(alias, "notifieddate"), + Scheduled: psql.Quote(alias, "scheduled"), + Scheduleddate: psql.Quote(alias, "scheduleddate"), + Dog: psql.Quote(alias, "dog"), + SchedulePeriod: psql.Quote(alias, "schedule_period"), + ScheduleNotes: psql.Quote(alias, "schedule_notes"), + Spanish: psql.Quote(alias, "spanish"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Issuesreported: psql.Quote(alias, "issuesreported"), + Jurisdiction: psql.Quote(alias, "jurisdiction"), + Notificationtimestamp: psql.Quote(alias, "notificationtimestamp"), + Zone: psql.Quote(alias, "zone"), + Zone2: psql.Quote(alias, "zone2"), + } +} + +type fieldseekerServicerequestColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Recdatetime psql.Expression + Source psql.Expression + Entrytech psql.Expression + Priority psql.Expression + Supervisor psql.Expression + Assignedtech psql.Expression + Status psql.Expression + Clranon psql.Expression + Clrfname psql.Expression + Clrphone1 psql.Expression + Clrphone2 psql.Expression + Clremail psql.Expression + Clrcompany psql.Expression + Clraddr1 psql.Expression + Clraddr2 psql.Expression + Clrcity psql.Expression + Clrstate psql.Expression + Clrzip psql.Expression + Clrother psql.Expression + Clrcontpref psql.Expression + Reqcompany psql.Expression + Reqaddr1 psql.Expression + Reqaddr2 psql.Expression + Reqcity psql.Expression + Reqstate psql.Expression + Reqzip psql.Expression + Reqcrossst psql.Expression + Reqsubdiv psql.Expression + Reqmapgrid psql.Expression + Reqpermission psql.Expression + Reqtarget psql.Expression + Reqdescr psql.Expression + Reqnotesfortech psql.Expression + Reqnotesforcust psql.Expression + Reqfldnotes psql.Expression + Reqprogramactions psql.Expression + Datetimeclosed psql.Expression + Techclosed psql.Expression + SRNumber psql.Expression + Reviewed psql.Expression + Reviewedby psql.Expression + Revieweddate psql.Expression + Accepted psql.Expression + Accepteddate psql.Expression + Rejectedby psql.Expression + Rejecteddate psql.Expression + Rejectedreason psql.Expression + Duedate psql.Expression + Acceptedby psql.Expression + Comments psql.Expression + Estcompletedate psql.Expression + Nextaction psql.Expression + Recordstatus psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Firstresponsedate psql.Expression + Responsedaycount psql.Expression + Allowed psql.Expression + Xvalue psql.Expression + Yvalue psql.Expression + Validx psql.Expression + Validy psql.Expression + Externalid psql.Expression + Externalerror psql.Expression + Pointlocid psql.Expression + Notified psql.Expression + Notifieddate psql.Expression + Scheduled psql.Expression + Scheduleddate psql.Expression + Dog psql.Expression + SchedulePeriod psql.Expression + ScheduleNotes psql.Expression + Spanish psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Issuesreported psql.Expression + Jurisdiction psql.Expression + Notificationtimestamp psql.Expression + Zone psql.Expression + Zone2 psql.Expression +} + +func (c fieldseekerServicerequestColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerServicerequestColumns) AliasedAs(alias string) fieldseekerServicerequestColumns { + return buildFieldseekerServicerequestColumns(alias) +} + +// FieldseekerServicerequestSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerServicerequestSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Recdatetime omitnull.Val[time.Time] `db:"recdatetime" ` + Source omitnull.Val[enums.FieldseekerServicerequestServicerequestsourceEnum] `db:"source" ` + Entrytech omitnull.Val[string] `db:"entrytech" ` + Priority omitnull.Val[enums.FieldseekerServicerequestServicerequestpriorityEnum] `db:"priority" ` + Supervisor omitnull.Val[enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808] `db:"supervisor" ` + Assignedtech omitnull.Val[enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8] `db:"assignedtech" ` + Status omitnull.Val[enums.FieldseekerServicerequestServicerequeststatusEnum] `db:"status" ` + Clranon omitnull.Val[enums.FieldseekerServicerequestNotinuitFEnum] `db:"clranon" ` + Clrfname omitnull.Val[string] `db:"clrfname" ` + Clrphone1 omitnull.Val[string] `db:"clrphone1" ` + Clrphone2 omitnull.Val[string] `db:"clrphone2" ` + Clremail omitnull.Val[string] `db:"clremail" ` + Clrcompany omitnull.Val[string] `db:"clrcompany" ` + Clraddr1 omitnull.Val[string] `db:"clraddr1" ` + Clraddr2 omitnull.Val[string] `db:"clraddr2" ` + Clrcity omitnull.Val[string] `db:"clrcity" ` + Clrstate omitnull.Val[enums.FieldseekerServicerequestServicerequestregionEnum] `db:"clrstate" ` + Clrzip omitnull.Val[string] `db:"clrzip" ` + Clrother omitnull.Val[string] `db:"clrother" ` + Clrcontpref omitnull.Val[enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum] `db:"clrcontpref" ` + Reqcompany omitnull.Val[string] `db:"reqcompany" ` + Reqaddr1 omitnull.Val[string] `db:"reqaddr1" ` + Reqaddr2 omitnull.Val[string] `db:"reqaddr2" ` + Reqcity omitnull.Val[string] `db:"reqcity" ` + Reqstate omitnull.Val[enums.FieldseekerServicerequestServicerequestregionEnum] `db:"reqstate" ` + Reqzip omitnull.Val[string] `db:"reqzip" ` + Reqcrossst omitnull.Val[string] `db:"reqcrossst" ` + Reqsubdiv omitnull.Val[string] `db:"reqsubdiv" ` + Reqmapgrid omitnull.Val[string] `db:"reqmapgrid" ` + Reqpermission omitnull.Val[enums.FieldseekerServicerequestNotinuitFEnum] `db:"reqpermission" ` + Reqtarget omitnull.Val[enums.FieldseekerServicerequestServicerequesttargetEnum] `db:"reqtarget" ` + Reqdescr omitnull.Val[string] `db:"reqdescr" ` + Reqnotesfortech omitnull.Val[string] `db:"reqnotesfortech" ` + Reqnotesforcust omitnull.Val[string] `db:"reqnotesforcust" ` + Reqfldnotes omitnull.Val[string] `db:"reqfldnotes" ` + Reqprogramactions omitnull.Val[string] `db:"reqprogramactions" ` + Datetimeclosed omitnull.Val[time.Time] `db:"datetimeclosed" ` + Techclosed omitnull.Val[string] `db:"techclosed" ` + SRNumber omitnull.Val[int32] `db:"sr_number" ` + Reviewed omitnull.Val[enums.FieldseekerServicerequestNotinuitFEnum] `db:"reviewed" ` + Reviewedby omitnull.Val[string] `db:"reviewedby" ` + Revieweddate omitnull.Val[time.Time] `db:"revieweddate" ` + Accepted omitnull.Val[enums.FieldseekerServicerequestNotinuitFEnum] `db:"accepted" ` + Accepteddate omitnull.Val[time.Time] `db:"accepteddate" ` + Rejectedby omitnull.Val[string] `db:"rejectedby" ` + Rejecteddate omitnull.Val[time.Time] `db:"rejecteddate" ` + Rejectedreason omitnull.Val[enums.FieldseekerServicerequestServicerequestrejectedreasonEnum] `db:"rejectedreason" ` + Duedate omitnull.Val[time.Time] `db:"duedate" ` + Acceptedby omitnull.Val[string] `db:"acceptedby" ` + Comments omitnull.Val[string] `db:"comments" ` + Estcompletedate omitnull.Val[time.Time] `db:"estcompletedate" ` + Nextaction omitnull.Val[enums.FieldseekerServicerequestServicerequestnextactionEnum] `db:"nextaction" ` + Recordstatus omitnull.Val[int16] `db:"recordstatus" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Firstresponsedate omitnull.Val[time.Time] `db:"firstresponsedate" ` + Responsedaycount omitnull.Val[int16] `db:"responsedaycount" ` + Allowed omitnull.Val[string] `db:"allowed" ` + Xvalue omitnull.Val[string] `db:"xvalue" ` + Yvalue omitnull.Val[string] `db:"yvalue" ` + Validx omitnull.Val[string] `db:"validx" ` + Validy omitnull.Val[string] `db:"validy" ` + Externalid omitnull.Val[string] `db:"externalid" ` + Externalerror omitnull.Val[string] `db:"externalerror" ` + Pointlocid omitnull.Val[uuid.UUID] `db:"pointlocid" ` + Notified omitnull.Val[int16] `db:"notified" ` + Notifieddate omitnull.Val[time.Time] `db:"notifieddate" ` + Scheduled omitnull.Val[int16] `db:"scheduled" ` + Scheduleddate omitnull.Val[time.Time] `db:"scheduleddate" ` + Dog omitnull.Val[enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31] `db:"dog" ` + SchedulePeriod omitnull.Val[enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab] `db:"schedule_period" ` + ScheduleNotes omitnull.Val[string] `db:"schedule_notes" ` + Spanish omitnull.Val[enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC] `db:"spanish" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Issuesreported omitnull.Val[enums.FieldseekerServicerequestServicerequestissuesEnum] `db:"issuesreported" ` + Jurisdiction omitnull.Val[string] `db:"jurisdiction" ` + Notificationtimestamp omitnull.Val[string] `db:"notificationtimestamp" ` + Zone omitnull.Val[string] `db:"zone" ` + Zone2 omitnull.Val[string] `db:"zone2" ` +} + +func (s FieldseekerServicerequestSetter) SetColumns() []string { + vals := make([]string, 0, 86) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Recdatetime.IsUnset() { + vals = append(vals, "recdatetime") + } + if !s.Source.IsUnset() { + vals = append(vals, "source") + } + if !s.Entrytech.IsUnset() { + vals = append(vals, "entrytech") + } + if !s.Priority.IsUnset() { + vals = append(vals, "priority") + } + if !s.Supervisor.IsUnset() { + vals = append(vals, "supervisor") + } + if !s.Assignedtech.IsUnset() { + vals = append(vals, "assignedtech") + } + if !s.Status.IsUnset() { + vals = append(vals, "status") + } + if !s.Clranon.IsUnset() { + vals = append(vals, "clranon") + } + if !s.Clrfname.IsUnset() { + vals = append(vals, "clrfname") + } + if !s.Clrphone1.IsUnset() { + vals = append(vals, "clrphone1") + } + if !s.Clrphone2.IsUnset() { + vals = append(vals, "clrphone2") + } + if !s.Clremail.IsUnset() { + vals = append(vals, "clremail") + } + if !s.Clrcompany.IsUnset() { + vals = append(vals, "clrcompany") + } + if !s.Clraddr1.IsUnset() { + vals = append(vals, "clraddr1") + } + if !s.Clraddr2.IsUnset() { + vals = append(vals, "clraddr2") + } + if !s.Clrcity.IsUnset() { + vals = append(vals, "clrcity") + } + if !s.Clrstate.IsUnset() { + vals = append(vals, "clrstate") + } + if !s.Clrzip.IsUnset() { + vals = append(vals, "clrzip") + } + if !s.Clrother.IsUnset() { + vals = append(vals, "clrother") + } + if !s.Clrcontpref.IsUnset() { + vals = append(vals, "clrcontpref") + } + if !s.Reqcompany.IsUnset() { + vals = append(vals, "reqcompany") + } + if !s.Reqaddr1.IsUnset() { + vals = append(vals, "reqaddr1") + } + if !s.Reqaddr2.IsUnset() { + vals = append(vals, "reqaddr2") + } + if !s.Reqcity.IsUnset() { + vals = append(vals, "reqcity") + } + if !s.Reqstate.IsUnset() { + vals = append(vals, "reqstate") + } + if !s.Reqzip.IsUnset() { + vals = append(vals, "reqzip") + } + if !s.Reqcrossst.IsUnset() { + vals = append(vals, "reqcrossst") + } + if !s.Reqsubdiv.IsUnset() { + vals = append(vals, "reqsubdiv") + } + if !s.Reqmapgrid.IsUnset() { + vals = append(vals, "reqmapgrid") + } + if !s.Reqpermission.IsUnset() { + vals = append(vals, "reqpermission") + } + if !s.Reqtarget.IsUnset() { + vals = append(vals, "reqtarget") + } + if !s.Reqdescr.IsUnset() { + vals = append(vals, "reqdescr") + } + if !s.Reqnotesfortech.IsUnset() { + vals = append(vals, "reqnotesfortech") + } + if !s.Reqnotesforcust.IsUnset() { + vals = append(vals, "reqnotesforcust") + } + if !s.Reqfldnotes.IsUnset() { + vals = append(vals, "reqfldnotes") + } + if !s.Reqprogramactions.IsUnset() { + vals = append(vals, "reqprogramactions") + } + if !s.Datetimeclosed.IsUnset() { + vals = append(vals, "datetimeclosed") + } + if !s.Techclosed.IsUnset() { + vals = append(vals, "techclosed") + } + if !s.SRNumber.IsUnset() { + vals = append(vals, "sr_number") + } + if !s.Reviewed.IsUnset() { + vals = append(vals, "reviewed") + } + if !s.Reviewedby.IsUnset() { + vals = append(vals, "reviewedby") + } + if !s.Revieweddate.IsUnset() { + vals = append(vals, "revieweddate") + } + if !s.Accepted.IsUnset() { + vals = append(vals, "accepted") + } + if !s.Accepteddate.IsUnset() { + vals = append(vals, "accepteddate") + } + if !s.Rejectedby.IsUnset() { + vals = append(vals, "rejectedby") + } + if !s.Rejecteddate.IsUnset() { + vals = append(vals, "rejecteddate") + } + if !s.Rejectedreason.IsUnset() { + vals = append(vals, "rejectedreason") + } + if !s.Duedate.IsUnset() { + vals = append(vals, "duedate") + } + if !s.Acceptedby.IsUnset() { + vals = append(vals, "acceptedby") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Estcompletedate.IsUnset() { + vals = append(vals, "estcompletedate") + } + if !s.Nextaction.IsUnset() { + vals = append(vals, "nextaction") + } + if !s.Recordstatus.IsUnset() { + vals = append(vals, "recordstatus") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Firstresponsedate.IsUnset() { + vals = append(vals, "firstresponsedate") + } + if !s.Responsedaycount.IsUnset() { + vals = append(vals, "responsedaycount") + } + if !s.Allowed.IsUnset() { + vals = append(vals, "allowed") + } + if !s.Xvalue.IsUnset() { + vals = append(vals, "xvalue") + } + if !s.Yvalue.IsUnset() { + vals = append(vals, "yvalue") + } + if !s.Validx.IsUnset() { + vals = append(vals, "validx") + } + if !s.Validy.IsUnset() { + vals = append(vals, "validy") + } + if !s.Externalid.IsUnset() { + vals = append(vals, "externalid") + } + if !s.Externalerror.IsUnset() { + vals = append(vals, "externalerror") + } + if !s.Pointlocid.IsUnset() { + vals = append(vals, "pointlocid") + } + if !s.Notified.IsUnset() { + vals = append(vals, "notified") + } + if !s.Notifieddate.IsUnset() { + vals = append(vals, "notifieddate") + } + if !s.Scheduled.IsUnset() { + vals = append(vals, "scheduled") + } + if !s.Scheduleddate.IsUnset() { + vals = append(vals, "scheduleddate") + } + if !s.Dog.IsUnset() { + vals = append(vals, "dog") + } + if !s.SchedulePeriod.IsUnset() { + vals = append(vals, "schedule_period") + } + if !s.ScheduleNotes.IsUnset() { + vals = append(vals, "schedule_notes") + } + if !s.Spanish.IsUnset() { + vals = append(vals, "spanish") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Issuesreported.IsUnset() { + vals = append(vals, "issuesreported") + } + if !s.Jurisdiction.IsUnset() { + vals = append(vals, "jurisdiction") + } + if !s.Notificationtimestamp.IsUnset() { + vals = append(vals, "notificationtimestamp") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + return vals +} + +func (s FieldseekerServicerequestSetter) Overwrite(t *FieldseekerServicerequest) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Recdatetime.IsUnset() { + t.Recdatetime = s.Recdatetime.MustGetNull() + } + if !s.Source.IsUnset() { + t.Source = s.Source.MustGetNull() + } + if !s.Entrytech.IsUnset() { + t.Entrytech = s.Entrytech.MustGetNull() + } + if !s.Priority.IsUnset() { + t.Priority = s.Priority.MustGetNull() + } + if !s.Supervisor.IsUnset() { + t.Supervisor = s.Supervisor.MustGetNull() + } + if !s.Assignedtech.IsUnset() { + t.Assignedtech = s.Assignedtech.MustGetNull() + } + if !s.Status.IsUnset() { + t.Status = s.Status.MustGetNull() + } + if !s.Clranon.IsUnset() { + t.Clranon = s.Clranon.MustGetNull() + } + if !s.Clrfname.IsUnset() { + t.Clrfname = s.Clrfname.MustGetNull() + } + if !s.Clrphone1.IsUnset() { + t.Clrphone1 = s.Clrphone1.MustGetNull() + } + if !s.Clrphone2.IsUnset() { + t.Clrphone2 = s.Clrphone2.MustGetNull() + } + if !s.Clremail.IsUnset() { + t.Clremail = s.Clremail.MustGetNull() + } + if !s.Clrcompany.IsUnset() { + t.Clrcompany = s.Clrcompany.MustGetNull() + } + if !s.Clraddr1.IsUnset() { + t.Clraddr1 = s.Clraddr1.MustGetNull() + } + if !s.Clraddr2.IsUnset() { + t.Clraddr2 = s.Clraddr2.MustGetNull() + } + if !s.Clrcity.IsUnset() { + t.Clrcity = s.Clrcity.MustGetNull() + } + if !s.Clrstate.IsUnset() { + t.Clrstate = s.Clrstate.MustGetNull() + } + if !s.Clrzip.IsUnset() { + t.Clrzip = s.Clrzip.MustGetNull() + } + if !s.Clrother.IsUnset() { + t.Clrother = s.Clrother.MustGetNull() + } + if !s.Clrcontpref.IsUnset() { + t.Clrcontpref = s.Clrcontpref.MustGetNull() + } + if !s.Reqcompany.IsUnset() { + t.Reqcompany = s.Reqcompany.MustGetNull() + } + if !s.Reqaddr1.IsUnset() { + t.Reqaddr1 = s.Reqaddr1.MustGetNull() + } + if !s.Reqaddr2.IsUnset() { + t.Reqaddr2 = s.Reqaddr2.MustGetNull() + } + if !s.Reqcity.IsUnset() { + t.Reqcity = s.Reqcity.MustGetNull() + } + if !s.Reqstate.IsUnset() { + t.Reqstate = s.Reqstate.MustGetNull() + } + if !s.Reqzip.IsUnset() { + t.Reqzip = s.Reqzip.MustGetNull() + } + if !s.Reqcrossst.IsUnset() { + t.Reqcrossst = s.Reqcrossst.MustGetNull() + } + if !s.Reqsubdiv.IsUnset() { + t.Reqsubdiv = s.Reqsubdiv.MustGetNull() + } + if !s.Reqmapgrid.IsUnset() { + t.Reqmapgrid = s.Reqmapgrid.MustGetNull() + } + if !s.Reqpermission.IsUnset() { + t.Reqpermission = s.Reqpermission.MustGetNull() + } + if !s.Reqtarget.IsUnset() { + t.Reqtarget = s.Reqtarget.MustGetNull() + } + if !s.Reqdescr.IsUnset() { + t.Reqdescr = s.Reqdescr.MustGetNull() + } + if !s.Reqnotesfortech.IsUnset() { + t.Reqnotesfortech = s.Reqnotesfortech.MustGetNull() + } + if !s.Reqnotesforcust.IsUnset() { + t.Reqnotesforcust = s.Reqnotesforcust.MustGetNull() + } + if !s.Reqfldnotes.IsUnset() { + t.Reqfldnotes = s.Reqfldnotes.MustGetNull() + } + if !s.Reqprogramactions.IsUnset() { + t.Reqprogramactions = s.Reqprogramactions.MustGetNull() + } + if !s.Datetimeclosed.IsUnset() { + t.Datetimeclosed = s.Datetimeclosed.MustGetNull() + } + if !s.Techclosed.IsUnset() { + t.Techclosed = s.Techclosed.MustGetNull() + } + if !s.SRNumber.IsUnset() { + t.SRNumber = s.SRNumber.MustGetNull() + } + if !s.Reviewed.IsUnset() { + t.Reviewed = s.Reviewed.MustGetNull() + } + if !s.Reviewedby.IsUnset() { + t.Reviewedby = s.Reviewedby.MustGetNull() + } + if !s.Revieweddate.IsUnset() { + t.Revieweddate = s.Revieweddate.MustGetNull() + } + if !s.Accepted.IsUnset() { + t.Accepted = s.Accepted.MustGetNull() + } + if !s.Accepteddate.IsUnset() { + t.Accepteddate = s.Accepteddate.MustGetNull() + } + if !s.Rejectedby.IsUnset() { + t.Rejectedby = s.Rejectedby.MustGetNull() + } + if !s.Rejecteddate.IsUnset() { + t.Rejecteddate = s.Rejecteddate.MustGetNull() + } + if !s.Rejectedreason.IsUnset() { + t.Rejectedreason = s.Rejectedreason.MustGetNull() + } + if !s.Duedate.IsUnset() { + t.Duedate = s.Duedate.MustGetNull() + } + if !s.Acceptedby.IsUnset() { + t.Acceptedby = s.Acceptedby.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Estcompletedate.IsUnset() { + t.Estcompletedate = s.Estcompletedate.MustGetNull() + } + if !s.Nextaction.IsUnset() { + t.Nextaction = s.Nextaction.MustGetNull() + } + if !s.Recordstatus.IsUnset() { + t.Recordstatus = s.Recordstatus.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Firstresponsedate.IsUnset() { + t.Firstresponsedate = s.Firstresponsedate.MustGetNull() + } + if !s.Responsedaycount.IsUnset() { + t.Responsedaycount = s.Responsedaycount.MustGetNull() + } + if !s.Allowed.IsUnset() { + t.Allowed = s.Allowed.MustGetNull() + } + if !s.Xvalue.IsUnset() { + t.Xvalue = s.Xvalue.MustGetNull() + } + if !s.Yvalue.IsUnset() { + t.Yvalue = s.Yvalue.MustGetNull() + } + if !s.Validx.IsUnset() { + t.Validx = s.Validx.MustGetNull() + } + if !s.Validy.IsUnset() { + t.Validy = s.Validy.MustGetNull() + } + if !s.Externalid.IsUnset() { + t.Externalid = s.Externalid.MustGetNull() + } + if !s.Externalerror.IsUnset() { + t.Externalerror = s.Externalerror.MustGetNull() + } + if !s.Pointlocid.IsUnset() { + t.Pointlocid = s.Pointlocid.MustGetNull() + } + if !s.Notified.IsUnset() { + t.Notified = s.Notified.MustGetNull() + } + if !s.Notifieddate.IsUnset() { + t.Notifieddate = s.Notifieddate.MustGetNull() + } + if !s.Scheduled.IsUnset() { + t.Scheduled = s.Scheduled.MustGetNull() + } + if !s.Scheduleddate.IsUnset() { + t.Scheduleddate = s.Scheduleddate.MustGetNull() + } + if !s.Dog.IsUnset() { + t.Dog = s.Dog.MustGetNull() + } + if !s.SchedulePeriod.IsUnset() { + t.SchedulePeriod = s.SchedulePeriod.MustGetNull() + } + if !s.ScheduleNotes.IsUnset() { + t.ScheduleNotes = s.ScheduleNotes.MustGetNull() + } + if !s.Spanish.IsUnset() { + t.Spanish = s.Spanish.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Issuesreported.IsUnset() { + t.Issuesreported = s.Issuesreported.MustGetNull() + } + if !s.Jurisdiction.IsUnset() { + t.Jurisdiction = s.Jurisdiction.MustGetNull() + } + if !s.Notificationtimestamp.IsUnset() { + t.Notificationtimestamp = s.Notificationtimestamp.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } +} + +func (s *FieldseekerServicerequestSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerServicerequests.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 86) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Recdatetime.IsUnset() { + vals[1] = psql.Arg(s.Recdatetime.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Source.IsUnset() { + vals[2] = psql.Arg(s.Source.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Entrytech.IsUnset() { + vals[3] = psql.Arg(s.Entrytech.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Priority.IsUnset() { + vals[4] = psql.Arg(s.Priority.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Supervisor.IsUnset() { + vals[5] = psql.Arg(s.Supervisor.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Assignedtech.IsUnset() { + vals[6] = psql.Arg(s.Assignedtech.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Status.IsUnset() { + vals[7] = psql.Arg(s.Status.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Clranon.IsUnset() { + vals[8] = psql.Arg(s.Clranon.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Clrfname.IsUnset() { + vals[9] = psql.Arg(s.Clrfname.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Clrphone1.IsUnset() { + vals[10] = psql.Arg(s.Clrphone1.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Clrphone2.IsUnset() { + vals[11] = psql.Arg(s.Clrphone2.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Clremail.IsUnset() { + vals[12] = psql.Arg(s.Clremail.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Clrcompany.IsUnset() { + vals[13] = psql.Arg(s.Clrcompany.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Clraddr1.IsUnset() { + vals[14] = psql.Arg(s.Clraddr1.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Clraddr2.IsUnset() { + vals[15] = psql.Arg(s.Clraddr2.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Clrcity.IsUnset() { + vals[16] = psql.Arg(s.Clrcity.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Clrstate.IsUnset() { + vals[17] = psql.Arg(s.Clrstate.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Clrzip.IsUnset() { + vals[18] = psql.Arg(s.Clrzip.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Clrother.IsUnset() { + vals[19] = psql.Arg(s.Clrother.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Clrcontpref.IsUnset() { + vals[20] = psql.Arg(s.Clrcontpref.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Reqcompany.IsUnset() { + vals[21] = psql.Arg(s.Reqcompany.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Reqaddr1.IsUnset() { + vals[22] = psql.Arg(s.Reqaddr1.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Reqaddr2.IsUnset() { + vals[23] = psql.Arg(s.Reqaddr2.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Reqcity.IsUnset() { + vals[24] = psql.Arg(s.Reqcity.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Reqstate.IsUnset() { + vals[25] = psql.Arg(s.Reqstate.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Reqzip.IsUnset() { + vals[26] = psql.Arg(s.Reqzip.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Reqcrossst.IsUnset() { + vals[27] = psql.Arg(s.Reqcrossst.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.Reqsubdiv.IsUnset() { + vals[28] = psql.Arg(s.Reqsubdiv.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.Reqmapgrid.IsUnset() { + vals[29] = psql.Arg(s.Reqmapgrid.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + if !s.Reqpermission.IsUnset() { + vals[30] = psql.Arg(s.Reqpermission.MustGetNull()) + } else { + vals[30] = psql.Raw("DEFAULT") + } + + if !s.Reqtarget.IsUnset() { + vals[31] = psql.Arg(s.Reqtarget.MustGetNull()) + } else { + vals[31] = psql.Raw("DEFAULT") + } + + if !s.Reqdescr.IsUnset() { + vals[32] = psql.Arg(s.Reqdescr.MustGetNull()) + } else { + vals[32] = psql.Raw("DEFAULT") + } + + if !s.Reqnotesfortech.IsUnset() { + vals[33] = psql.Arg(s.Reqnotesfortech.MustGetNull()) + } else { + vals[33] = psql.Raw("DEFAULT") + } + + if !s.Reqnotesforcust.IsUnset() { + vals[34] = psql.Arg(s.Reqnotesforcust.MustGetNull()) + } else { + vals[34] = psql.Raw("DEFAULT") + } + + if !s.Reqfldnotes.IsUnset() { + vals[35] = psql.Arg(s.Reqfldnotes.MustGetNull()) + } else { + vals[35] = psql.Raw("DEFAULT") + } + + if !s.Reqprogramactions.IsUnset() { + vals[36] = psql.Arg(s.Reqprogramactions.MustGetNull()) + } else { + vals[36] = psql.Raw("DEFAULT") + } + + if !s.Datetimeclosed.IsUnset() { + vals[37] = psql.Arg(s.Datetimeclosed.MustGetNull()) + } else { + vals[37] = psql.Raw("DEFAULT") + } + + if !s.Techclosed.IsUnset() { + vals[38] = psql.Arg(s.Techclosed.MustGetNull()) + } else { + vals[38] = psql.Raw("DEFAULT") + } + + if !s.SRNumber.IsUnset() { + vals[39] = psql.Arg(s.SRNumber.MustGetNull()) + } else { + vals[39] = psql.Raw("DEFAULT") + } + + if !s.Reviewed.IsUnset() { + vals[40] = psql.Arg(s.Reviewed.MustGetNull()) + } else { + vals[40] = psql.Raw("DEFAULT") + } + + if !s.Reviewedby.IsUnset() { + vals[41] = psql.Arg(s.Reviewedby.MustGetNull()) + } else { + vals[41] = psql.Raw("DEFAULT") + } + + if !s.Revieweddate.IsUnset() { + vals[42] = psql.Arg(s.Revieweddate.MustGetNull()) + } else { + vals[42] = psql.Raw("DEFAULT") + } + + if !s.Accepted.IsUnset() { + vals[43] = psql.Arg(s.Accepted.MustGetNull()) + } else { + vals[43] = psql.Raw("DEFAULT") + } + + if !s.Accepteddate.IsUnset() { + vals[44] = psql.Arg(s.Accepteddate.MustGetNull()) + } else { + vals[44] = psql.Raw("DEFAULT") + } + + if !s.Rejectedby.IsUnset() { + vals[45] = psql.Arg(s.Rejectedby.MustGetNull()) + } else { + vals[45] = psql.Raw("DEFAULT") + } + + if !s.Rejecteddate.IsUnset() { + vals[46] = psql.Arg(s.Rejecteddate.MustGetNull()) + } else { + vals[46] = psql.Raw("DEFAULT") + } + + if !s.Rejectedreason.IsUnset() { + vals[47] = psql.Arg(s.Rejectedreason.MustGetNull()) + } else { + vals[47] = psql.Raw("DEFAULT") + } + + if !s.Duedate.IsUnset() { + vals[48] = psql.Arg(s.Duedate.MustGetNull()) + } else { + vals[48] = psql.Raw("DEFAULT") + } + + if !s.Acceptedby.IsUnset() { + vals[49] = psql.Arg(s.Acceptedby.MustGetNull()) + } else { + vals[49] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[50] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[50] = psql.Raw("DEFAULT") + } + + if !s.Estcompletedate.IsUnset() { + vals[51] = psql.Arg(s.Estcompletedate.MustGetNull()) + } else { + vals[51] = psql.Raw("DEFAULT") + } + + if !s.Nextaction.IsUnset() { + vals[52] = psql.Arg(s.Nextaction.MustGetNull()) + } else { + vals[52] = psql.Raw("DEFAULT") + } + + if !s.Recordstatus.IsUnset() { + vals[53] = psql.Arg(s.Recordstatus.MustGetNull()) + } else { + vals[53] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[54] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[54] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[55] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[55] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[56] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[56] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[57] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[57] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[58] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[58] = psql.Raw("DEFAULT") + } + + if !s.Firstresponsedate.IsUnset() { + vals[59] = psql.Arg(s.Firstresponsedate.MustGetNull()) + } else { + vals[59] = psql.Raw("DEFAULT") + } + + if !s.Responsedaycount.IsUnset() { + vals[60] = psql.Arg(s.Responsedaycount.MustGetNull()) + } else { + vals[60] = psql.Raw("DEFAULT") + } + + if !s.Allowed.IsUnset() { + vals[61] = psql.Arg(s.Allowed.MustGetNull()) + } else { + vals[61] = psql.Raw("DEFAULT") + } + + if !s.Xvalue.IsUnset() { + vals[62] = psql.Arg(s.Xvalue.MustGetNull()) + } else { + vals[62] = psql.Raw("DEFAULT") + } + + if !s.Yvalue.IsUnset() { + vals[63] = psql.Arg(s.Yvalue.MustGetNull()) + } else { + vals[63] = psql.Raw("DEFAULT") + } + + if !s.Validx.IsUnset() { + vals[64] = psql.Arg(s.Validx.MustGetNull()) + } else { + vals[64] = psql.Raw("DEFAULT") + } + + if !s.Validy.IsUnset() { + vals[65] = psql.Arg(s.Validy.MustGetNull()) + } else { + vals[65] = psql.Raw("DEFAULT") + } + + if !s.Externalid.IsUnset() { + vals[66] = psql.Arg(s.Externalid.MustGetNull()) + } else { + vals[66] = psql.Raw("DEFAULT") + } + + if !s.Externalerror.IsUnset() { + vals[67] = psql.Arg(s.Externalerror.MustGetNull()) + } else { + vals[67] = psql.Raw("DEFAULT") + } + + if !s.Pointlocid.IsUnset() { + vals[68] = psql.Arg(s.Pointlocid.MustGetNull()) + } else { + vals[68] = psql.Raw("DEFAULT") + } + + if !s.Notified.IsUnset() { + vals[69] = psql.Arg(s.Notified.MustGetNull()) + } else { + vals[69] = psql.Raw("DEFAULT") + } + + if !s.Notifieddate.IsUnset() { + vals[70] = psql.Arg(s.Notifieddate.MustGetNull()) + } else { + vals[70] = psql.Raw("DEFAULT") + } + + if !s.Scheduled.IsUnset() { + vals[71] = psql.Arg(s.Scheduled.MustGetNull()) + } else { + vals[71] = psql.Raw("DEFAULT") + } + + if !s.Scheduleddate.IsUnset() { + vals[72] = psql.Arg(s.Scheduleddate.MustGetNull()) + } else { + vals[72] = psql.Raw("DEFAULT") + } + + if !s.Dog.IsUnset() { + vals[73] = psql.Arg(s.Dog.MustGetNull()) + } else { + vals[73] = psql.Raw("DEFAULT") + } + + if !s.SchedulePeriod.IsUnset() { + vals[74] = psql.Arg(s.SchedulePeriod.MustGetNull()) + } else { + vals[74] = psql.Raw("DEFAULT") + } + + if !s.ScheduleNotes.IsUnset() { + vals[75] = psql.Arg(s.ScheduleNotes.MustGetNull()) + } else { + vals[75] = psql.Raw("DEFAULT") + } + + if !s.Spanish.IsUnset() { + vals[76] = psql.Arg(s.Spanish.MustGetNull()) + } else { + vals[76] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[77] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[77] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[78] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[78] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[79] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[79] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[80] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[80] = psql.Raw("DEFAULT") + } + + if !s.Issuesreported.IsUnset() { + vals[81] = psql.Arg(s.Issuesreported.MustGetNull()) + } else { + vals[81] = psql.Raw("DEFAULT") + } + + if !s.Jurisdiction.IsUnset() { + vals[82] = psql.Arg(s.Jurisdiction.MustGetNull()) + } else { + vals[82] = psql.Raw("DEFAULT") + } + + if !s.Notificationtimestamp.IsUnset() { + vals[83] = psql.Arg(s.Notificationtimestamp.MustGetNull()) + } else { + vals[83] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[84] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[84] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[85] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[85] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerServicerequestSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerServicerequestSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 86) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Recdatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "recdatetime")...), + psql.Arg(s.Recdatetime), + }}) + } + + if !s.Source.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "source")...), + psql.Arg(s.Source), + }}) + } + + if !s.Entrytech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "entrytech")...), + psql.Arg(s.Entrytech), + }}) + } + + if !s.Priority.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "priority")...), + psql.Arg(s.Priority), + }}) + } + + if !s.Supervisor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "supervisor")...), + psql.Arg(s.Supervisor), + }}) + } + + if !s.Assignedtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "assignedtech")...), + psql.Arg(s.Assignedtech), + }}) + } + + if !s.Status.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "status")...), + psql.Arg(s.Status), + }}) + } + + if !s.Clranon.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clranon")...), + psql.Arg(s.Clranon), + }}) + } + + if !s.Clrfname.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clrfname")...), + psql.Arg(s.Clrfname), + }}) + } + + if !s.Clrphone1.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clrphone1")...), + psql.Arg(s.Clrphone1), + }}) + } + + if !s.Clrphone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clrphone2")...), + psql.Arg(s.Clrphone2), + }}) + } + + if !s.Clremail.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clremail")...), + psql.Arg(s.Clremail), + }}) + } + + if !s.Clrcompany.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clrcompany")...), + psql.Arg(s.Clrcompany), + }}) + } + + if !s.Clraddr1.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clraddr1")...), + psql.Arg(s.Clraddr1), + }}) + } + + if !s.Clraddr2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clraddr2")...), + psql.Arg(s.Clraddr2), + }}) + } + + if !s.Clrcity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clrcity")...), + psql.Arg(s.Clrcity), + }}) + } + + if !s.Clrstate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clrstate")...), + psql.Arg(s.Clrstate), + }}) + } + + if !s.Clrzip.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clrzip")...), + psql.Arg(s.Clrzip), + }}) + } + + if !s.Clrother.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clrother")...), + psql.Arg(s.Clrother), + }}) + } + + if !s.Clrcontpref.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "clrcontpref")...), + psql.Arg(s.Clrcontpref), + }}) + } + + if !s.Reqcompany.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqcompany")...), + psql.Arg(s.Reqcompany), + }}) + } + + if !s.Reqaddr1.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqaddr1")...), + psql.Arg(s.Reqaddr1), + }}) + } + + if !s.Reqaddr2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqaddr2")...), + psql.Arg(s.Reqaddr2), + }}) + } + + if !s.Reqcity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqcity")...), + psql.Arg(s.Reqcity), + }}) + } + + if !s.Reqstate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqstate")...), + psql.Arg(s.Reqstate), + }}) + } + + if !s.Reqzip.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqzip")...), + psql.Arg(s.Reqzip), + }}) + } + + if !s.Reqcrossst.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqcrossst")...), + psql.Arg(s.Reqcrossst), + }}) + } + + if !s.Reqsubdiv.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqsubdiv")...), + psql.Arg(s.Reqsubdiv), + }}) + } + + if !s.Reqmapgrid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqmapgrid")...), + psql.Arg(s.Reqmapgrid), + }}) + } + + if !s.Reqpermission.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqpermission")...), + psql.Arg(s.Reqpermission), + }}) + } + + if !s.Reqtarget.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqtarget")...), + psql.Arg(s.Reqtarget), + }}) + } + + if !s.Reqdescr.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqdescr")...), + psql.Arg(s.Reqdescr), + }}) + } + + if !s.Reqnotesfortech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqnotesfortech")...), + psql.Arg(s.Reqnotesfortech), + }}) + } + + if !s.Reqnotesforcust.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqnotesforcust")...), + psql.Arg(s.Reqnotesforcust), + }}) + } + + if !s.Reqfldnotes.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqfldnotes")...), + psql.Arg(s.Reqfldnotes), + }}) + } + + if !s.Reqprogramactions.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reqprogramactions")...), + psql.Arg(s.Reqprogramactions), + }}) + } + + if !s.Datetimeclosed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "datetimeclosed")...), + psql.Arg(s.Datetimeclosed), + }}) + } + + if !s.Techclosed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "techclosed")...), + psql.Arg(s.Techclosed), + }}) + } + + if !s.SRNumber.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sr_number")...), + psql.Arg(s.SRNumber), + }}) + } + + if !s.Reviewed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewed")...), + psql.Arg(s.Reviewed), + }}) + } + + if !s.Reviewedby.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewedby")...), + psql.Arg(s.Reviewedby), + }}) + } + + if !s.Revieweddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "revieweddate")...), + psql.Arg(s.Revieweddate), + }}) + } + + if !s.Accepted.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "accepted")...), + psql.Arg(s.Accepted), + }}) + } + + if !s.Accepteddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "accepteddate")...), + psql.Arg(s.Accepteddate), + }}) + } + + if !s.Rejectedby.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "rejectedby")...), + psql.Arg(s.Rejectedby), + }}) + } + + if !s.Rejecteddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "rejecteddate")...), + psql.Arg(s.Rejecteddate), + }}) + } + + if !s.Rejectedreason.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "rejectedreason")...), + psql.Arg(s.Rejectedreason), + }}) + } + + if !s.Duedate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "duedate")...), + psql.Arg(s.Duedate), + }}) + } + + if !s.Acceptedby.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "acceptedby")...), + psql.Arg(s.Acceptedby), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Estcompletedate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "estcompletedate")...), + psql.Arg(s.Estcompletedate), + }}) + } + + if !s.Nextaction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "nextaction")...), + psql.Arg(s.Nextaction), + }}) + } + + if !s.Recordstatus.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "recordstatus")...), + psql.Arg(s.Recordstatus), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Firstresponsedate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "firstresponsedate")...), + psql.Arg(s.Firstresponsedate), + }}) + } + + if !s.Responsedaycount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "responsedaycount")...), + psql.Arg(s.Responsedaycount), + }}) + } + + if !s.Allowed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "allowed")...), + psql.Arg(s.Allowed), + }}) + } + + if !s.Xvalue.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "xvalue")...), + psql.Arg(s.Xvalue), + }}) + } + + if !s.Yvalue.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "yvalue")...), + psql.Arg(s.Yvalue), + }}) + } + + if !s.Validx.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "validx")...), + psql.Arg(s.Validx), + }}) + } + + if !s.Validy.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "validy")...), + psql.Arg(s.Validy), + }}) + } + + if !s.Externalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "externalid")...), + psql.Arg(s.Externalid), + }}) + } + + if !s.Externalerror.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "externalerror")...), + psql.Arg(s.Externalerror), + }}) + } + + if !s.Pointlocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "pointlocid")...), + psql.Arg(s.Pointlocid), + }}) + } + + if !s.Notified.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "notified")...), + psql.Arg(s.Notified), + }}) + } + + if !s.Notifieddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "notifieddate")...), + psql.Arg(s.Notifieddate), + }}) + } + + if !s.Scheduled.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "scheduled")...), + psql.Arg(s.Scheduled), + }}) + } + + if !s.Scheduleddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "scheduleddate")...), + psql.Arg(s.Scheduleddate), + }}) + } + + if !s.Dog.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "dog")...), + psql.Arg(s.Dog), + }}) + } + + if !s.SchedulePeriod.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "schedule_period")...), + psql.Arg(s.SchedulePeriod), + }}) + } + + if !s.ScheduleNotes.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "schedule_notes")...), + psql.Arg(s.ScheduleNotes), + }}) + } + + if !s.Spanish.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "spanish")...), + psql.Arg(s.Spanish), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Issuesreported.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "issuesreported")...), + psql.Arg(s.Issuesreported), + }}) + } + + if !s.Jurisdiction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "jurisdiction")...), + psql.Arg(s.Jurisdiction), + }}) + } + + if !s.Notificationtimestamp.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "notificationtimestamp")...), + psql.Arg(s.Notificationtimestamp), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + return exprs +} + +// FindFieldseekerServicerequest retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerServicerequest(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerServicerequest, error) { + if len(cols) == 0 { + return FieldseekerServicerequests.Query( + sm.Where(FieldseekerServicerequests.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerServicerequests.Query( + sm.Where(FieldseekerServicerequests.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerServicerequests.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerServicerequestExists checks the presence of a single record by primary key +func FieldseekerServicerequestExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerServicerequests.Query( + sm.Where(FieldseekerServicerequests.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerServicerequest is retrieved from the database +func (o *FieldseekerServicerequest) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerServicerequests.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerServicerequestSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerServicerequests.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerServicerequestSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerServicerequests.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerServicerequestSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerServicerequests.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerServicerequestSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerServicerequest +func (o *FieldseekerServicerequest) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerServicerequest) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.servicerequest", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerServicerequest +func (o *FieldseekerServicerequest) Update(ctx context.Context, exec bob.Executor, s *FieldseekerServicerequestSetter) error { + v, err := FieldseekerServicerequests.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerServicerequest record with an executor +func (o *FieldseekerServicerequest) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerServicerequests.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerServicerequest using the executor +func (o *FieldseekerServicerequest) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerServicerequests.Query( + sm.Where(FieldseekerServicerequests.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerServicerequestSlice is retrieved from the database +func (o FieldseekerServicerequestSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerServicerequests.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerServicerequests.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerServicerequests.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerServicerequests.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerServicerequestSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.servicerequest", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerServicerequestSlice) copyMatchingRows(from ...*FieldseekerServicerequest) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerServicerequestSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerServicerequests.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerServicerequest: + o.copyMatchingRows(retrieved) + case []*FieldseekerServicerequest: + o.copyMatchingRows(retrieved...) + case FieldseekerServicerequestSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerServicerequest or a slice of FieldseekerServicerequest + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerServicerequests.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerServicerequestSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerServicerequests.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerServicerequest: + o.copyMatchingRows(retrieved) + case []*FieldseekerServicerequest: + o.copyMatchingRows(retrieved...) + case FieldseekerServicerequestSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerServicerequest or a slice of FieldseekerServicerequest + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerServicerequests.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerServicerequestSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerServicerequestSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerServicerequests.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerServicerequestSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerServicerequests.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerServicerequestSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerServicerequests.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerServicerequestWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Recdatetime psql.WhereNullMod[Q, time.Time] + Source psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestsourceEnum] + Entrytech psql.WhereNullMod[Q, string] + Priority psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestpriorityEnum] + Supervisor psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808] + Assignedtech psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8] + Status psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequeststatusEnum] + Clranon psql.WhereNullMod[Q, enums.FieldseekerServicerequestNotinuitFEnum] + Clrfname psql.WhereNullMod[Q, string] + Clrphone1 psql.WhereNullMod[Q, string] + Clrphone2 psql.WhereNullMod[Q, string] + Clremail psql.WhereNullMod[Q, string] + Clrcompany psql.WhereNullMod[Q, string] + Clraddr1 psql.WhereNullMod[Q, string] + Clraddr2 psql.WhereNullMod[Q, string] + Clrcity psql.WhereNullMod[Q, string] + Clrstate psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestregionEnum] + Clrzip psql.WhereNullMod[Q, string] + Clrother psql.WhereNullMod[Q, string] + Clrcontpref psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum] + Reqcompany psql.WhereNullMod[Q, string] + Reqaddr1 psql.WhereNullMod[Q, string] + Reqaddr2 psql.WhereNullMod[Q, string] + Reqcity psql.WhereNullMod[Q, string] + Reqstate psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestregionEnum] + Reqzip psql.WhereNullMod[Q, string] + Reqcrossst psql.WhereNullMod[Q, string] + Reqsubdiv psql.WhereNullMod[Q, string] + Reqmapgrid psql.WhereNullMod[Q, string] + Reqpermission psql.WhereNullMod[Q, enums.FieldseekerServicerequestNotinuitFEnum] + Reqtarget psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequesttargetEnum] + Reqdescr psql.WhereNullMod[Q, string] + Reqnotesfortech psql.WhereNullMod[Q, string] + Reqnotesforcust psql.WhereNullMod[Q, string] + Reqfldnotes psql.WhereNullMod[Q, string] + Reqprogramactions psql.WhereNullMod[Q, string] + Datetimeclosed psql.WhereNullMod[Q, time.Time] + Techclosed psql.WhereNullMod[Q, string] + SRNumber psql.WhereNullMod[Q, int32] + Reviewed psql.WhereNullMod[Q, enums.FieldseekerServicerequestNotinuitFEnum] + Reviewedby psql.WhereNullMod[Q, string] + Revieweddate psql.WhereNullMod[Q, time.Time] + Accepted psql.WhereNullMod[Q, enums.FieldseekerServicerequestNotinuitFEnum] + Accepteddate psql.WhereNullMod[Q, time.Time] + Rejectedby psql.WhereNullMod[Q, string] + Rejecteddate psql.WhereNullMod[Q, time.Time] + Rejectedreason psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestrejectedreasonEnum] + Duedate psql.WhereNullMod[Q, time.Time] + Acceptedby psql.WhereNullMod[Q, string] + Comments psql.WhereNullMod[Q, string] + Estcompletedate psql.WhereNullMod[Q, time.Time] + Nextaction psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestnextactionEnum] + Recordstatus psql.WhereNullMod[Q, int16] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Firstresponsedate psql.WhereNullMod[Q, time.Time] + Responsedaycount psql.WhereNullMod[Q, int16] + Allowed psql.WhereNullMod[Q, string] + Xvalue psql.WhereNullMod[Q, string] + Yvalue psql.WhereNullMod[Q, string] + Validx psql.WhereNullMod[Q, string] + Validy psql.WhereNullMod[Q, string] + Externalid psql.WhereNullMod[Q, string] + Externalerror psql.WhereNullMod[Q, string] + Pointlocid psql.WhereNullMod[Q, uuid.UUID] + Notified psql.WhereNullMod[Q, int16] + Notifieddate psql.WhereNullMod[Q, time.Time] + Scheduled psql.WhereNullMod[Q, int16] + Scheduleddate psql.WhereNullMod[Q, time.Time] + Dog psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31] + SchedulePeriod psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab] + ScheduleNotes psql.WhereNullMod[Q, string] + Spanish psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Issuesreported psql.WhereNullMod[Q, enums.FieldseekerServicerequestServicerequestissuesEnum] + Jurisdiction psql.WhereNullMod[Q, string] + Notificationtimestamp psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Zone2 psql.WhereNullMod[Q, string] +} + +func (fieldseekerServicerequestWhere[Q]) AliasedAs(alias string) fieldseekerServicerequestWhere[Q] { + return buildFieldseekerServicerequestWhere[Q](buildFieldseekerServicerequestColumns(alias)) +} + +func buildFieldseekerServicerequestWhere[Q psql.Filterable](cols fieldseekerServicerequestColumns) fieldseekerServicerequestWhere[Q] { + return fieldseekerServicerequestWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Recdatetime: psql.WhereNull[Q, time.Time](cols.Recdatetime), + Source: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestsourceEnum](cols.Source), + Entrytech: psql.WhereNull[Q, string](cols.Entrytech), + Priority: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestpriorityEnum](cols.Priority), + Supervisor: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestSupervisorEba07b90C8854fe6808](cols.Supervisor), + Assignedtech: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestAssignedtech71D0D685868F4b7a8](cols.Assignedtech), + Status: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequeststatusEnum](cols.Status), + Clranon: psql.WhereNull[Q, enums.FieldseekerServicerequestNotinuitFEnum](cols.Clranon), + Clrfname: psql.WhereNull[Q, string](cols.Clrfname), + Clrphone1: psql.WhereNull[Q, string](cols.Clrphone1), + Clrphone2: psql.WhereNull[Q, string](cols.Clrphone2), + Clremail: psql.WhereNull[Q, string](cols.Clremail), + Clrcompany: psql.WhereNull[Q, string](cols.Clrcompany), + Clraddr1: psql.WhereNull[Q, string](cols.Clraddr1), + Clraddr2: psql.WhereNull[Q, string](cols.Clraddr2), + Clrcity: psql.WhereNull[Q, string](cols.Clrcity), + Clrstate: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestregionEnum](cols.Clrstate), + Clrzip: psql.WhereNull[Q, string](cols.Clrzip), + Clrother: psql.WhereNull[Q, string](cols.Clrother), + Clrcontpref: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestcontactpreferencesEnum](cols.Clrcontpref), + Reqcompany: psql.WhereNull[Q, string](cols.Reqcompany), + Reqaddr1: psql.WhereNull[Q, string](cols.Reqaddr1), + Reqaddr2: psql.WhereNull[Q, string](cols.Reqaddr2), + Reqcity: psql.WhereNull[Q, string](cols.Reqcity), + Reqstate: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestregionEnum](cols.Reqstate), + Reqzip: psql.WhereNull[Q, string](cols.Reqzip), + Reqcrossst: psql.WhereNull[Q, string](cols.Reqcrossst), + Reqsubdiv: psql.WhereNull[Q, string](cols.Reqsubdiv), + Reqmapgrid: psql.WhereNull[Q, string](cols.Reqmapgrid), + Reqpermission: psql.WhereNull[Q, enums.FieldseekerServicerequestNotinuitFEnum](cols.Reqpermission), + Reqtarget: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequesttargetEnum](cols.Reqtarget), + Reqdescr: psql.WhereNull[Q, string](cols.Reqdescr), + Reqnotesfortech: psql.WhereNull[Q, string](cols.Reqnotesfortech), + Reqnotesforcust: psql.WhereNull[Q, string](cols.Reqnotesforcust), + Reqfldnotes: psql.WhereNull[Q, string](cols.Reqfldnotes), + Reqprogramactions: psql.WhereNull[Q, string](cols.Reqprogramactions), + Datetimeclosed: psql.WhereNull[Q, time.Time](cols.Datetimeclosed), + Techclosed: psql.WhereNull[Q, string](cols.Techclosed), + SRNumber: psql.WhereNull[Q, int32](cols.SRNumber), + Reviewed: psql.WhereNull[Q, enums.FieldseekerServicerequestNotinuitFEnum](cols.Reviewed), + Reviewedby: psql.WhereNull[Q, string](cols.Reviewedby), + Revieweddate: psql.WhereNull[Q, time.Time](cols.Revieweddate), + Accepted: psql.WhereNull[Q, enums.FieldseekerServicerequestNotinuitFEnum](cols.Accepted), + Accepteddate: psql.WhereNull[Q, time.Time](cols.Accepteddate), + Rejectedby: psql.WhereNull[Q, string](cols.Rejectedby), + Rejecteddate: psql.WhereNull[Q, time.Time](cols.Rejecteddate), + Rejectedreason: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestrejectedreasonEnum](cols.Rejectedreason), + Duedate: psql.WhereNull[Q, time.Time](cols.Duedate), + Acceptedby: psql.WhereNull[Q, string](cols.Acceptedby), + Comments: psql.WhereNull[Q, string](cols.Comments), + Estcompletedate: psql.WhereNull[Q, time.Time](cols.Estcompletedate), + Nextaction: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestnextactionEnum](cols.Nextaction), + Recordstatus: psql.WhereNull[Q, int16](cols.Recordstatus), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Firstresponsedate: psql.WhereNull[Q, time.Time](cols.Firstresponsedate), + Responsedaycount: psql.WhereNull[Q, int16](cols.Responsedaycount), + Allowed: psql.WhereNull[Q, string](cols.Allowed), + Xvalue: psql.WhereNull[Q, string](cols.Xvalue), + Yvalue: psql.WhereNull[Q, string](cols.Yvalue), + Validx: psql.WhereNull[Q, string](cols.Validx), + Validy: psql.WhereNull[Q, string](cols.Validy), + Externalid: psql.WhereNull[Q, string](cols.Externalid), + Externalerror: psql.WhereNull[Q, string](cols.Externalerror), + Pointlocid: psql.WhereNull[Q, uuid.UUID](cols.Pointlocid), + Notified: psql.WhereNull[Q, int16](cols.Notified), + Notifieddate: psql.WhereNull[Q, time.Time](cols.Notifieddate), + Scheduled: psql.WhereNull[Q, int16](cols.Scheduled), + Scheduleddate: psql.WhereNull[Q, time.Time](cols.Scheduleddate), + Dog: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestDog2b95ec9712864FCD88F4F0e31](cols.Dog), + SchedulePeriod: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestSchedulePeriod3F40C046Afd14ab](cols.SchedulePeriod), + ScheduleNotes: psql.WhereNull[Q, string](cols.ScheduleNotes), + Spanish: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestSpanishAaa3dc669f9a45278ecdC](cols.Spanish), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Issuesreported: psql.WhereNull[Q, enums.FieldseekerServicerequestServicerequestissuesEnum](cols.Issuesreported), + Jurisdiction: psql.WhereNull[Q, string](cols.Jurisdiction), + Notificationtimestamp: psql.WhereNull[Q, string](cols.Notificationtimestamp), + Zone: psql.WhereNull[Q, string](cols.Zone), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + } +} diff --git a/db/models/fieldseeker.speciesabundance.bob.go b/db/models/fieldseeker.speciesabundance.bob.go new file mode 100644 index 00000000..fa1ef0d5 --- /dev/null +++ b/db/models/fieldseeker.speciesabundance.bob.go @@ -0,0 +1,1066 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerSpeciesabundance is an object representing the database table. +type FieldseekerSpeciesabundance struct { + Objectid int64 `db:"objectid,pk" ` + // Trap Data ID + TrapdataID null.Val[uuid.UUID] `db:"trapdata_id" ` + // Species + Species null.Val[string] `db:"species" ` + // Males + Males null.Val[int16] `db:"males" ` + // Unknown + Unknown null.Val[int16] `db:"unknown" ` + // Blooded Females + Bloodedfem null.Val[int16] `db:"bloodedfem" ` + // Gravid Females + Gravidfem null.Val[int16] `db:"gravidfem" ` + // Larvae + Larvae null.Val[int16] `db:"larvae" ` + // Pools to Generate + Poolstogen null.Val[int16] `db:"poolstogen" ` + // Processed + Processed null.Val[enums.FieldseekerSpeciesabundanceNotinuitFEnum] `db:"processed" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + // Pupae + Pupae null.Val[int16] `db:"pupae" ` + // Eggs + Eggs null.Val[int16] `db:"eggs" ` + // Females + Females null.Val[int32] `db:"females" ` + // Total Adults + Total null.Val[int32] `db:"total" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + Yearweek null.Val[int32] `db:"yearweek" ` + Globalzscore null.Val[float64] `db:"globalzscore" ` + R7score null.Val[float64] `db:"r7score" ` + R8score null.Val[float64] `db:"r8score" ` + H3R7 null.Val[string] `db:"h3r7" ` + H3R8 null.Val[string] `db:"h3r8" ` +} + +// FieldseekerSpeciesabundanceSlice is an alias for a slice of pointers to FieldseekerSpeciesabundance. +// This should almost always be used instead of []*FieldseekerSpeciesabundance. +type FieldseekerSpeciesabundanceSlice []*FieldseekerSpeciesabundance + +// FieldseekerSpeciesabundances contains methods to work with the speciesabundance table +var FieldseekerSpeciesabundances = psql.NewTablex[*FieldseekerSpeciesabundance, FieldseekerSpeciesabundanceSlice, *FieldseekerSpeciesabundanceSetter]("fieldseeker", "speciesabundance", buildFieldseekerSpeciesabundanceColumns("fieldseeker.speciesabundance")) + +// FieldseekerSpeciesabundancesQuery is a query on the speciesabundance table +type FieldseekerSpeciesabundancesQuery = *psql.ViewQuery[*FieldseekerSpeciesabundance, FieldseekerSpeciesabundanceSlice] + +func buildFieldseekerSpeciesabundanceColumns(alias string) fieldseekerSpeciesabundanceColumns { + return fieldseekerSpeciesabundanceColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "trapdata_id", "species", "males", "unknown", "bloodedfem", "gravidfem", "larvae", "poolstogen", "processed", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "pupae", "eggs", "females", "total", "creationdate", "creator", "editdate", "editor", "yearweek", "globalzscore", "r7score", "r8score", "h3r7", "h3r8", + ).WithParent("fieldseeker.speciesabundance"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + TrapdataID: psql.Quote(alias, "trapdata_id"), + Species: psql.Quote(alias, "species"), + Males: psql.Quote(alias, "males"), + Unknown: psql.Quote(alias, "unknown"), + Bloodedfem: psql.Quote(alias, "bloodedfem"), + Gravidfem: psql.Quote(alias, "gravidfem"), + Larvae: psql.Quote(alias, "larvae"), + Poolstogen: psql.Quote(alias, "poolstogen"), + Processed: psql.Quote(alias, "processed"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Pupae: psql.Quote(alias, "pupae"), + Eggs: psql.Quote(alias, "eggs"), + Females: psql.Quote(alias, "females"), + Total: psql.Quote(alias, "total"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Yearweek: psql.Quote(alias, "yearweek"), + Globalzscore: psql.Quote(alias, "globalzscore"), + R7score: psql.Quote(alias, "r7score"), + R8score: psql.Quote(alias, "r8score"), + H3R7: psql.Quote(alias, "h3r7"), + H3R8: psql.Quote(alias, "h3r8"), + } +} + +type fieldseekerSpeciesabundanceColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + TrapdataID psql.Expression + Species psql.Expression + Males psql.Expression + Unknown psql.Expression + Bloodedfem psql.Expression + Gravidfem psql.Expression + Larvae psql.Expression + Poolstogen psql.Expression + Processed psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Pupae psql.Expression + Eggs psql.Expression + Females psql.Expression + Total psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Yearweek psql.Expression + Globalzscore psql.Expression + R7score psql.Expression + R8score psql.Expression + H3R7 psql.Expression + H3R8 psql.Expression +} + +func (c fieldseekerSpeciesabundanceColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerSpeciesabundanceColumns) AliasedAs(alias string) fieldseekerSpeciesabundanceColumns { + return buildFieldseekerSpeciesabundanceColumns(alias) +} + +// FieldseekerSpeciesabundanceSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerSpeciesabundanceSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + TrapdataID omitnull.Val[uuid.UUID] `db:"trapdata_id" ` + Species omitnull.Val[string] `db:"species" ` + Males omitnull.Val[int16] `db:"males" ` + Unknown omitnull.Val[int16] `db:"unknown" ` + Bloodedfem omitnull.Val[int16] `db:"bloodedfem" ` + Gravidfem omitnull.Val[int16] `db:"gravidfem" ` + Larvae omitnull.Val[int16] `db:"larvae" ` + Poolstogen omitnull.Val[int16] `db:"poolstogen" ` + Processed omitnull.Val[enums.FieldseekerSpeciesabundanceNotinuitFEnum] `db:"processed" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Pupae omitnull.Val[int16] `db:"pupae" ` + Eggs omitnull.Val[int16] `db:"eggs" ` + Females omitnull.Val[int32] `db:"females" ` + Total omitnull.Val[int32] `db:"total" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Yearweek omitnull.Val[int32] `db:"yearweek" ` + Globalzscore omitnull.Val[float64] `db:"globalzscore" ` + R7score omitnull.Val[float64] `db:"r7score" ` + R8score omitnull.Val[float64] `db:"r8score" ` + H3R7 omitnull.Val[string] `db:"h3r7" ` + H3R8 omitnull.Val[string] `db:"h3r8" ` +} + +func (s FieldseekerSpeciesabundanceSetter) SetColumns() []string { + vals := make([]string, 0, 29) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.TrapdataID.IsUnset() { + vals = append(vals, "trapdata_id") + } + if !s.Species.IsUnset() { + vals = append(vals, "species") + } + if !s.Males.IsUnset() { + vals = append(vals, "males") + } + if !s.Unknown.IsUnset() { + vals = append(vals, "unknown") + } + if !s.Bloodedfem.IsUnset() { + vals = append(vals, "bloodedfem") + } + if !s.Gravidfem.IsUnset() { + vals = append(vals, "gravidfem") + } + if !s.Larvae.IsUnset() { + vals = append(vals, "larvae") + } + if !s.Poolstogen.IsUnset() { + vals = append(vals, "poolstogen") + } + if !s.Processed.IsUnset() { + vals = append(vals, "processed") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Pupae.IsUnset() { + vals = append(vals, "pupae") + } + if !s.Eggs.IsUnset() { + vals = append(vals, "eggs") + } + if !s.Females.IsUnset() { + vals = append(vals, "females") + } + if !s.Total.IsUnset() { + vals = append(vals, "total") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Yearweek.IsUnset() { + vals = append(vals, "yearweek") + } + if !s.Globalzscore.IsUnset() { + vals = append(vals, "globalzscore") + } + if !s.R7score.IsUnset() { + vals = append(vals, "r7score") + } + if !s.R8score.IsUnset() { + vals = append(vals, "r8score") + } + if !s.H3R7.IsUnset() { + vals = append(vals, "h3r7") + } + if !s.H3R8.IsUnset() { + vals = append(vals, "h3r8") + } + return vals +} + +func (s FieldseekerSpeciesabundanceSetter) Overwrite(t *FieldseekerSpeciesabundance) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.TrapdataID.IsUnset() { + t.TrapdataID = s.TrapdataID.MustGetNull() + } + if !s.Species.IsUnset() { + t.Species = s.Species.MustGetNull() + } + if !s.Males.IsUnset() { + t.Males = s.Males.MustGetNull() + } + if !s.Unknown.IsUnset() { + t.Unknown = s.Unknown.MustGetNull() + } + if !s.Bloodedfem.IsUnset() { + t.Bloodedfem = s.Bloodedfem.MustGetNull() + } + if !s.Gravidfem.IsUnset() { + t.Gravidfem = s.Gravidfem.MustGetNull() + } + if !s.Larvae.IsUnset() { + t.Larvae = s.Larvae.MustGetNull() + } + if !s.Poolstogen.IsUnset() { + t.Poolstogen = s.Poolstogen.MustGetNull() + } + if !s.Processed.IsUnset() { + t.Processed = s.Processed.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Pupae.IsUnset() { + t.Pupae = s.Pupae.MustGetNull() + } + if !s.Eggs.IsUnset() { + t.Eggs = s.Eggs.MustGetNull() + } + if !s.Females.IsUnset() { + t.Females = s.Females.MustGetNull() + } + if !s.Total.IsUnset() { + t.Total = s.Total.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Yearweek.IsUnset() { + t.Yearweek = s.Yearweek.MustGetNull() + } + if !s.Globalzscore.IsUnset() { + t.Globalzscore = s.Globalzscore.MustGetNull() + } + if !s.R7score.IsUnset() { + t.R7score = s.R7score.MustGetNull() + } + if !s.R8score.IsUnset() { + t.R8score = s.R8score.MustGetNull() + } + if !s.H3R7.IsUnset() { + t.H3R7 = s.H3R7.MustGetNull() + } + if !s.H3R8.IsUnset() { + t.H3R8 = s.H3R8.MustGetNull() + } +} + +func (s *FieldseekerSpeciesabundanceSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerSpeciesabundances.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 29) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.TrapdataID.IsUnset() { + vals[1] = psql.Arg(s.TrapdataID.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Species.IsUnset() { + vals[2] = psql.Arg(s.Species.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Males.IsUnset() { + vals[3] = psql.Arg(s.Males.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Unknown.IsUnset() { + vals[4] = psql.Arg(s.Unknown.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Bloodedfem.IsUnset() { + vals[5] = psql.Arg(s.Bloodedfem.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Gravidfem.IsUnset() { + vals[6] = psql.Arg(s.Gravidfem.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Larvae.IsUnset() { + vals[7] = psql.Arg(s.Larvae.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Poolstogen.IsUnset() { + vals[8] = psql.Arg(s.Poolstogen.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Processed.IsUnset() { + vals[9] = psql.Arg(s.Processed.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[10] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[11] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[12] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[13] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[14] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Pupae.IsUnset() { + vals[15] = psql.Arg(s.Pupae.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Eggs.IsUnset() { + vals[16] = psql.Arg(s.Eggs.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Females.IsUnset() { + vals[17] = psql.Arg(s.Females.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Total.IsUnset() { + vals[18] = psql.Arg(s.Total.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[19] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[20] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[21] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[22] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Yearweek.IsUnset() { + vals[23] = psql.Arg(s.Yearweek.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Globalzscore.IsUnset() { + vals[24] = psql.Arg(s.Globalzscore.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.R7score.IsUnset() { + vals[25] = psql.Arg(s.R7score.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.R8score.IsUnset() { + vals[26] = psql.Arg(s.R8score.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.H3R7.IsUnset() { + vals[27] = psql.Arg(s.H3R7.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.H3R8.IsUnset() { + vals[28] = psql.Arg(s.H3R8.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerSpeciesabundanceSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerSpeciesabundanceSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 29) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.TrapdataID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "trapdata_id")...), + psql.Arg(s.TrapdataID), + }}) + } + + if !s.Species.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "species")...), + psql.Arg(s.Species), + }}) + } + + if !s.Males.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "males")...), + psql.Arg(s.Males), + }}) + } + + if !s.Unknown.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "unknown")...), + psql.Arg(s.Unknown), + }}) + } + + if !s.Bloodedfem.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "bloodedfem")...), + psql.Arg(s.Bloodedfem), + }}) + } + + if !s.Gravidfem.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "gravidfem")...), + psql.Arg(s.Gravidfem), + }}) + } + + if !s.Larvae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "larvae")...), + psql.Arg(s.Larvae), + }}) + } + + if !s.Poolstogen.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "poolstogen")...), + psql.Arg(s.Poolstogen), + }}) + } + + if !s.Processed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "processed")...), + psql.Arg(s.Processed), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Pupae.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "pupae")...), + psql.Arg(s.Pupae), + }}) + } + + if !s.Eggs.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "eggs")...), + psql.Arg(s.Eggs), + }}) + } + + if !s.Females.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "females")...), + psql.Arg(s.Females), + }}) + } + + if !s.Total.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "total")...), + psql.Arg(s.Total), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Yearweek.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "yearweek")...), + psql.Arg(s.Yearweek), + }}) + } + + if !s.Globalzscore.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalzscore")...), + psql.Arg(s.Globalzscore), + }}) + } + + if !s.R7score.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "r7score")...), + psql.Arg(s.R7score), + }}) + } + + if !s.R8score.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "r8score")...), + psql.Arg(s.R8score), + }}) + } + + if !s.H3R7.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "h3r7")...), + psql.Arg(s.H3R7), + }}) + } + + if !s.H3R8.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "h3r8")...), + psql.Arg(s.H3R8), + }}) + } + + return exprs +} + +// FindFieldseekerSpeciesabundance retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerSpeciesabundance(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerSpeciesabundance, error) { + if len(cols) == 0 { + return FieldseekerSpeciesabundances.Query( + sm.Where(FieldseekerSpeciesabundances.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerSpeciesabundances.Query( + sm.Where(FieldseekerSpeciesabundances.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerSpeciesabundances.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerSpeciesabundanceExists checks the presence of a single record by primary key +func FieldseekerSpeciesabundanceExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerSpeciesabundances.Query( + sm.Where(FieldseekerSpeciesabundances.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerSpeciesabundance is retrieved from the database +func (o *FieldseekerSpeciesabundance) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerSpeciesabundances.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerSpeciesabundanceSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerSpeciesabundances.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerSpeciesabundanceSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerSpeciesabundances.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerSpeciesabundanceSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerSpeciesabundances.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerSpeciesabundanceSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerSpeciesabundance +func (o *FieldseekerSpeciesabundance) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerSpeciesabundance) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.speciesabundance", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerSpeciesabundance +func (o *FieldseekerSpeciesabundance) Update(ctx context.Context, exec bob.Executor, s *FieldseekerSpeciesabundanceSetter) error { + v, err := FieldseekerSpeciesabundances.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerSpeciesabundance record with an executor +func (o *FieldseekerSpeciesabundance) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerSpeciesabundances.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerSpeciesabundance using the executor +func (o *FieldseekerSpeciesabundance) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerSpeciesabundances.Query( + sm.Where(FieldseekerSpeciesabundances.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerSpeciesabundanceSlice is retrieved from the database +func (o FieldseekerSpeciesabundanceSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerSpeciesabundances.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerSpeciesabundances.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerSpeciesabundances.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerSpeciesabundances.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerSpeciesabundanceSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.speciesabundance", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerSpeciesabundanceSlice) copyMatchingRows(from ...*FieldseekerSpeciesabundance) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerSpeciesabundanceSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerSpeciesabundances.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerSpeciesabundance: + o.copyMatchingRows(retrieved) + case []*FieldseekerSpeciesabundance: + o.copyMatchingRows(retrieved...) + case FieldseekerSpeciesabundanceSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerSpeciesabundance or a slice of FieldseekerSpeciesabundance + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerSpeciesabundances.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerSpeciesabundanceSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerSpeciesabundances.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerSpeciesabundance: + o.copyMatchingRows(retrieved) + case []*FieldseekerSpeciesabundance: + o.copyMatchingRows(retrieved...) + case FieldseekerSpeciesabundanceSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerSpeciesabundance or a slice of FieldseekerSpeciesabundance + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerSpeciesabundances.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerSpeciesabundanceSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerSpeciesabundanceSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerSpeciesabundances.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerSpeciesabundanceSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerSpeciesabundances.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerSpeciesabundanceSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerSpeciesabundances.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerSpeciesabundanceWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + TrapdataID psql.WhereNullMod[Q, uuid.UUID] + Species psql.WhereNullMod[Q, string] + Males psql.WhereNullMod[Q, int16] + Unknown psql.WhereNullMod[Q, int16] + Bloodedfem psql.WhereNullMod[Q, int16] + Gravidfem psql.WhereNullMod[Q, int16] + Larvae psql.WhereNullMod[Q, int16] + Poolstogen psql.WhereNullMod[Q, int16] + Processed psql.WhereNullMod[Q, enums.FieldseekerSpeciesabundanceNotinuitFEnum] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Pupae psql.WhereNullMod[Q, int16] + Eggs psql.WhereNullMod[Q, int16] + Females psql.WhereNullMod[Q, int32] + Total psql.WhereNullMod[Q, int32] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Yearweek psql.WhereNullMod[Q, int32] + Globalzscore psql.WhereNullMod[Q, float64] + R7score psql.WhereNullMod[Q, float64] + R8score psql.WhereNullMod[Q, float64] + H3R7 psql.WhereNullMod[Q, string] + H3R8 psql.WhereNullMod[Q, string] +} + +func (fieldseekerSpeciesabundanceWhere[Q]) AliasedAs(alias string) fieldseekerSpeciesabundanceWhere[Q] { + return buildFieldseekerSpeciesabundanceWhere[Q](buildFieldseekerSpeciesabundanceColumns(alias)) +} + +func buildFieldseekerSpeciesabundanceWhere[Q psql.Filterable](cols fieldseekerSpeciesabundanceColumns) fieldseekerSpeciesabundanceWhere[Q] { + return fieldseekerSpeciesabundanceWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + TrapdataID: psql.WhereNull[Q, uuid.UUID](cols.TrapdataID), + Species: psql.WhereNull[Q, string](cols.Species), + Males: psql.WhereNull[Q, int16](cols.Males), + Unknown: psql.WhereNull[Q, int16](cols.Unknown), + Bloodedfem: psql.WhereNull[Q, int16](cols.Bloodedfem), + Gravidfem: psql.WhereNull[Q, int16](cols.Gravidfem), + Larvae: psql.WhereNull[Q, int16](cols.Larvae), + Poolstogen: psql.WhereNull[Q, int16](cols.Poolstogen), + Processed: psql.WhereNull[Q, enums.FieldseekerSpeciesabundanceNotinuitFEnum](cols.Processed), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Pupae: psql.WhereNull[Q, int16](cols.Pupae), + Eggs: psql.WhereNull[Q, int16](cols.Eggs), + Females: psql.WhereNull[Q, int32](cols.Females), + Total: psql.WhereNull[Q, int32](cols.Total), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Yearweek: psql.WhereNull[Q, int32](cols.Yearweek), + Globalzscore: psql.WhereNull[Q, float64](cols.Globalzscore), + R7score: psql.WhereNull[Q, float64](cols.R7score), + R8score: psql.WhereNull[Q, float64](cols.R8score), + H3R7: psql.WhereNull[Q, string](cols.H3R7), + H3R8: psql.WhereNull[Q, string](cols.H3R8), + } +} diff --git a/db/models/fieldseeker.stormdrain.bob.go b/db/models/fieldseeker.stormdrain.bob.go new file mode 100644 index 00000000..651e97c7 --- /dev/null +++ b/db/models/fieldseeker.stormdrain.bob.go @@ -0,0 +1,807 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerStormdrain is an object representing the database table. +type FieldseekerStormdrain struct { + Objectid int64 `db:"objectid,pk" ` + Nexttreatmentdate null.Val[time.Time] `db:"nexttreatmentdate" ` + Lasttreatdate null.Val[time.Time] `db:"lasttreatdate" ` + Lastaction null.Val[string] `db:"lastaction" ` + Symbology null.Val[enums.FieldseekerStormdrainStormdrainsymbologyEnum] `db:"symbology" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Laststatus null.Val[string] `db:"laststatus" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + // Type + Type null.Val[string] `db:"type" ` + // Jurisdiction + Jurisdiction null.Val[string] `db:"jurisdiction" ` +} + +// FieldseekerStormdrainSlice is an alias for a slice of pointers to FieldseekerStormdrain. +// This should almost always be used instead of []*FieldseekerStormdrain. +type FieldseekerStormdrainSlice []*FieldseekerStormdrain + +// FieldseekerStormdrains contains methods to work with the stormdrain table +var FieldseekerStormdrains = psql.NewTablex[*FieldseekerStormdrain, FieldseekerStormdrainSlice, *FieldseekerStormdrainSetter]("fieldseeker", "stormdrain", buildFieldseekerStormdrainColumns("fieldseeker.stormdrain")) + +// FieldseekerStormdrainsQuery is a query on the stormdrain table +type FieldseekerStormdrainsQuery = *psql.ViewQuery[*FieldseekerStormdrain, FieldseekerStormdrainSlice] + +func buildFieldseekerStormdrainColumns(alias string) fieldseekerStormdrainColumns { + return fieldseekerStormdrainColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "nexttreatmentdate", "lasttreatdate", "lastaction", "symbology", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "laststatus", "zone", "zone2", "creationdate", "creator", "editdate", "editor", "type", "jurisdiction", + ).WithParent("fieldseeker.stormdrain"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Nexttreatmentdate: psql.Quote(alias, "nexttreatmentdate"), + Lasttreatdate: psql.Quote(alias, "lasttreatdate"), + Lastaction: psql.Quote(alias, "lastaction"), + Symbology: psql.Quote(alias, "symbology"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Laststatus: psql.Quote(alias, "laststatus"), + Zone: psql.Quote(alias, "zone"), + Zone2: psql.Quote(alias, "zone2"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Type: psql.Quote(alias, "type"), + Jurisdiction: psql.Quote(alias, "jurisdiction"), + } +} + +type fieldseekerStormdrainColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Nexttreatmentdate psql.Expression + Lasttreatdate psql.Expression + Lastaction psql.Expression + Symbology psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Laststatus psql.Expression + Zone psql.Expression + Zone2 psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Type psql.Expression + Jurisdiction psql.Expression +} + +func (c fieldseekerStormdrainColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerStormdrainColumns) AliasedAs(alias string) fieldseekerStormdrainColumns { + return buildFieldseekerStormdrainColumns(alias) +} + +// FieldseekerStormdrainSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerStormdrainSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Nexttreatmentdate omitnull.Val[time.Time] `db:"nexttreatmentdate" ` + Lasttreatdate omitnull.Val[time.Time] `db:"lasttreatdate" ` + Lastaction omitnull.Val[string] `db:"lastaction" ` + Symbology omitnull.Val[enums.FieldseekerStormdrainStormdrainsymbologyEnum] `db:"symbology" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Laststatus omitnull.Val[string] `db:"laststatus" ` + Zone omitnull.Val[string] `db:"zone" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Type omitnull.Val[string] `db:"type" ` + Jurisdiction omitnull.Val[string] `db:"jurisdiction" ` +} + +func (s FieldseekerStormdrainSetter) SetColumns() []string { + vals := make([]string, 0, 19) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Nexttreatmentdate.IsUnset() { + vals = append(vals, "nexttreatmentdate") + } + if !s.Lasttreatdate.IsUnset() { + vals = append(vals, "lasttreatdate") + } + if !s.Lastaction.IsUnset() { + vals = append(vals, "lastaction") + } + if !s.Symbology.IsUnset() { + vals = append(vals, "symbology") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Laststatus.IsUnset() { + vals = append(vals, "laststatus") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Type.IsUnset() { + vals = append(vals, "type") + } + if !s.Jurisdiction.IsUnset() { + vals = append(vals, "jurisdiction") + } + return vals +} + +func (s FieldseekerStormdrainSetter) Overwrite(t *FieldseekerStormdrain) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Nexttreatmentdate.IsUnset() { + t.Nexttreatmentdate = s.Nexttreatmentdate.MustGetNull() + } + if !s.Lasttreatdate.IsUnset() { + t.Lasttreatdate = s.Lasttreatdate.MustGetNull() + } + if !s.Lastaction.IsUnset() { + t.Lastaction = s.Lastaction.MustGetNull() + } + if !s.Symbology.IsUnset() { + t.Symbology = s.Symbology.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Laststatus.IsUnset() { + t.Laststatus = s.Laststatus.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Type.IsUnset() { + t.Type = s.Type.MustGetNull() + } + if !s.Jurisdiction.IsUnset() { + t.Jurisdiction = s.Jurisdiction.MustGetNull() + } +} + +func (s *FieldseekerStormdrainSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerStormdrains.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 19) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Nexttreatmentdate.IsUnset() { + vals[1] = psql.Arg(s.Nexttreatmentdate.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Lasttreatdate.IsUnset() { + vals[2] = psql.Arg(s.Lasttreatdate.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Lastaction.IsUnset() { + vals[3] = psql.Arg(s.Lastaction.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Symbology.IsUnset() { + vals[4] = psql.Arg(s.Symbology.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[5] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[6] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[7] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[8] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[9] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Laststatus.IsUnset() { + vals[10] = psql.Arg(s.Laststatus.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[11] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[12] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[13] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[14] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[15] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[16] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Type.IsUnset() { + vals[17] = psql.Arg(s.Type.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Jurisdiction.IsUnset() { + vals[18] = psql.Arg(s.Jurisdiction.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerStormdrainSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerStormdrainSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 19) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Nexttreatmentdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "nexttreatmentdate")...), + psql.Arg(s.Nexttreatmentdate), + }}) + } + + if !s.Lasttreatdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lasttreatdate")...), + psql.Arg(s.Lasttreatdate), + }}) + } + + if !s.Lastaction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lastaction")...), + psql.Arg(s.Lastaction), + }}) + } + + if !s.Symbology.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "symbology")...), + psql.Arg(s.Symbology), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Laststatus.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "laststatus")...), + psql.Arg(s.Laststatus), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Type.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "type")...), + psql.Arg(s.Type), + }}) + } + + if !s.Jurisdiction.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "jurisdiction")...), + psql.Arg(s.Jurisdiction), + }}) + } + + return exprs +} + +// FindFieldseekerStormdrain retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerStormdrain(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerStormdrain, error) { + if len(cols) == 0 { + return FieldseekerStormdrains.Query( + sm.Where(FieldseekerStormdrains.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerStormdrains.Query( + sm.Where(FieldseekerStormdrains.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerStormdrains.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerStormdrainExists checks the presence of a single record by primary key +func FieldseekerStormdrainExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerStormdrains.Query( + sm.Where(FieldseekerStormdrains.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerStormdrain is retrieved from the database +func (o *FieldseekerStormdrain) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerStormdrains.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerStormdrainSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerStormdrains.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerStormdrainSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerStormdrains.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerStormdrainSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerStormdrains.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerStormdrainSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerStormdrain +func (o *FieldseekerStormdrain) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerStormdrain) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.stormdrain", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerStormdrain +func (o *FieldseekerStormdrain) Update(ctx context.Context, exec bob.Executor, s *FieldseekerStormdrainSetter) error { + v, err := FieldseekerStormdrains.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerStormdrain record with an executor +func (o *FieldseekerStormdrain) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerStormdrains.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerStormdrain using the executor +func (o *FieldseekerStormdrain) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerStormdrains.Query( + sm.Where(FieldseekerStormdrains.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerStormdrainSlice is retrieved from the database +func (o FieldseekerStormdrainSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerStormdrains.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerStormdrains.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerStormdrains.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerStormdrains.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerStormdrainSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.stormdrain", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerStormdrainSlice) copyMatchingRows(from ...*FieldseekerStormdrain) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerStormdrainSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerStormdrains.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerStormdrain: + o.copyMatchingRows(retrieved) + case []*FieldseekerStormdrain: + o.copyMatchingRows(retrieved...) + case FieldseekerStormdrainSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerStormdrain or a slice of FieldseekerStormdrain + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerStormdrains.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerStormdrainSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerStormdrains.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerStormdrain: + o.copyMatchingRows(retrieved) + case []*FieldseekerStormdrain: + o.copyMatchingRows(retrieved...) + case FieldseekerStormdrainSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerStormdrain or a slice of FieldseekerStormdrain + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerStormdrains.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerStormdrainSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerStormdrainSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerStormdrains.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerStormdrainSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerStormdrains.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerStormdrainSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerStormdrains.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerStormdrainWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Nexttreatmentdate psql.WhereNullMod[Q, time.Time] + Lasttreatdate psql.WhereNullMod[Q, time.Time] + Lastaction psql.WhereNullMod[Q, string] + Symbology psql.WhereNullMod[Q, enums.FieldseekerStormdrainStormdrainsymbologyEnum] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Laststatus psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Zone2 psql.WhereNullMod[Q, string] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Type psql.WhereNullMod[Q, string] + Jurisdiction psql.WhereNullMod[Q, string] +} + +func (fieldseekerStormdrainWhere[Q]) AliasedAs(alias string) fieldseekerStormdrainWhere[Q] { + return buildFieldseekerStormdrainWhere[Q](buildFieldseekerStormdrainColumns(alias)) +} + +func buildFieldseekerStormdrainWhere[Q psql.Filterable](cols fieldseekerStormdrainColumns) fieldseekerStormdrainWhere[Q] { + return fieldseekerStormdrainWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Nexttreatmentdate: psql.WhereNull[Q, time.Time](cols.Nexttreatmentdate), + Lasttreatdate: psql.WhereNull[Q, time.Time](cols.Lasttreatdate), + Lastaction: psql.WhereNull[Q, string](cols.Lastaction), + Symbology: psql.WhereNull[Q, enums.FieldseekerStormdrainStormdrainsymbologyEnum](cols.Symbology), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Laststatus: psql.WhereNull[Q, string](cols.Laststatus), + Zone: psql.WhereNull[Q, string](cols.Zone), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Type: psql.WhereNull[Q, string](cols.Type), + Jurisdiction: psql.WhereNull[Q, string](cols.Jurisdiction), + } +} diff --git a/db/models/fieldseeker.timecard.bob.go b/db/models/fieldseeker.timecard.bob.go new file mode 100644 index 00000000..c197088c --- /dev/null +++ b/db/models/fieldseeker.timecard.bob.go @@ -0,0 +1,1037 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerTimecard is an object representing the database table. +type FieldseekerTimecard struct { + Objectid int64 `db:"objectid,pk" ` + // Activity + Activity null.Val[enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu] `db:"activity" ` + // Start + Startdatetime null.Val[time.Time] `db:"startdatetime" ` + // Finish + Enddatetime null.Val[time.Time] `db:"enddatetime" ` + // Comments + Comments null.Val[string] `db:"comments" ` + Externalid null.Val[string] `db:"externalid" ` + // Equipment Type + Equiptype null.Val[enums.FieldseekerTimecardTimecardequipmenttypeEnum] `db:"equiptype" ` + // Location Name + Locationname null.Val[string] `db:"locationname" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Linelocid null.Val[uuid.UUID] `db:"linelocid" ` + Pointlocid null.Val[uuid.UUID] `db:"pointlocid" ` + Polygonlocid null.Val[uuid.UUID] `db:"polygonlocid" ` + Lclocid null.Val[uuid.UUID] `db:"lclocid" ` + Samplelocid null.Val[uuid.UUID] `db:"samplelocid" ` + Srid null.Val[uuid.UUID] `db:"srid" ` + Traplocid null.Val[uuid.UUID] `db:"traplocid" ` + // Field Tech + Fieldtech null.Val[string] `db:"fieldtech" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + Rodentlocid null.Val[uuid.UUID] `db:"rodentlocid" ` +} + +// FieldseekerTimecardSlice is an alias for a slice of pointers to FieldseekerTimecard. +// This should almost always be used instead of []*FieldseekerTimecard. +type FieldseekerTimecardSlice []*FieldseekerTimecard + +// FieldseekerTimecards contains methods to work with the timecard table +var FieldseekerTimecards = psql.NewTablex[*FieldseekerTimecard, FieldseekerTimecardSlice, *FieldseekerTimecardSetter]("fieldseeker", "timecard", buildFieldseekerTimecardColumns("fieldseeker.timecard")) + +// FieldseekerTimecardsQuery is a query on the timecard table +type FieldseekerTimecardsQuery = *psql.ViewQuery[*FieldseekerTimecard, FieldseekerTimecardSlice] + +func buildFieldseekerTimecardColumns(alias string) fieldseekerTimecardColumns { + return fieldseekerTimecardColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "activity", "startdatetime", "enddatetime", "comments", "externalid", "equiptype", "locationname", "zone", "zone2", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "linelocid", "pointlocid", "polygonlocid", "lclocid", "samplelocid", "srid", "traplocid", "fieldtech", "creationdate", "creator", "editdate", "editor", "rodentlocid", + ).WithParent("fieldseeker.timecard"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Activity: psql.Quote(alias, "activity"), + Startdatetime: psql.Quote(alias, "startdatetime"), + Enddatetime: psql.Quote(alias, "enddatetime"), + Comments: psql.Quote(alias, "comments"), + Externalid: psql.Quote(alias, "externalid"), + Equiptype: psql.Quote(alias, "equiptype"), + Locationname: psql.Quote(alias, "locationname"), + Zone: psql.Quote(alias, "zone"), + Zone2: psql.Quote(alias, "zone2"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Linelocid: psql.Quote(alias, "linelocid"), + Pointlocid: psql.Quote(alias, "pointlocid"), + Polygonlocid: psql.Quote(alias, "polygonlocid"), + Lclocid: psql.Quote(alias, "lclocid"), + Samplelocid: psql.Quote(alias, "samplelocid"), + Srid: psql.Quote(alias, "srid"), + Traplocid: psql.Quote(alias, "traplocid"), + Fieldtech: psql.Quote(alias, "fieldtech"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Rodentlocid: psql.Quote(alias, "rodentlocid"), + } +} + +type fieldseekerTimecardColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Activity psql.Expression + Startdatetime psql.Expression + Enddatetime psql.Expression + Comments psql.Expression + Externalid psql.Expression + Equiptype psql.Expression + Locationname psql.Expression + Zone psql.Expression + Zone2 psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Linelocid psql.Expression + Pointlocid psql.Expression + Polygonlocid psql.Expression + Lclocid psql.Expression + Samplelocid psql.Expression + Srid psql.Expression + Traplocid psql.Expression + Fieldtech psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Rodentlocid psql.Expression +} + +func (c fieldseekerTimecardColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerTimecardColumns) AliasedAs(alias string) fieldseekerTimecardColumns { + return buildFieldseekerTimecardColumns(alias) +} + +// FieldseekerTimecardSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerTimecardSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Activity omitnull.Val[enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu] `db:"activity" ` + Startdatetime omitnull.Val[time.Time] `db:"startdatetime" ` + Enddatetime omitnull.Val[time.Time] `db:"enddatetime" ` + Comments omitnull.Val[string] `db:"comments" ` + Externalid omitnull.Val[string] `db:"externalid" ` + Equiptype omitnull.Val[enums.FieldseekerTimecardTimecardequipmenttypeEnum] `db:"equiptype" ` + Locationname omitnull.Val[string] `db:"locationname" ` + Zone omitnull.Val[string] `db:"zone" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Linelocid omitnull.Val[uuid.UUID] `db:"linelocid" ` + Pointlocid omitnull.Val[uuid.UUID] `db:"pointlocid" ` + Polygonlocid omitnull.Val[uuid.UUID] `db:"polygonlocid" ` + Lclocid omitnull.Val[uuid.UUID] `db:"lclocid" ` + Samplelocid omitnull.Val[uuid.UUID] `db:"samplelocid" ` + Srid omitnull.Val[uuid.UUID] `db:"srid" ` + Traplocid omitnull.Val[uuid.UUID] `db:"traplocid" ` + Fieldtech omitnull.Val[string] `db:"fieldtech" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Rodentlocid omitnull.Val[uuid.UUID] `db:"rodentlocid" ` +} + +func (s FieldseekerTimecardSetter) SetColumns() []string { + vals := make([]string, 0, 28) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Activity.IsUnset() { + vals = append(vals, "activity") + } + if !s.Startdatetime.IsUnset() { + vals = append(vals, "startdatetime") + } + if !s.Enddatetime.IsUnset() { + vals = append(vals, "enddatetime") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Externalid.IsUnset() { + vals = append(vals, "externalid") + } + if !s.Equiptype.IsUnset() { + vals = append(vals, "equiptype") + } + if !s.Locationname.IsUnset() { + vals = append(vals, "locationname") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Linelocid.IsUnset() { + vals = append(vals, "linelocid") + } + if !s.Pointlocid.IsUnset() { + vals = append(vals, "pointlocid") + } + if !s.Polygonlocid.IsUnset() { + vals = append(vals, "polygonlocid") + } + if !s.Lclocid.IsUnset() { + vals = append(vals, "lclocid") + } + if !s.Samplelocid.IsUnset() { + vals = append(vals, "samplelocid") + } + if !s.Srid.IsUnset() { + vals = append(vals, "srid") + } + if !s.Traplocid.IsUnset() { + vals = append(vals, "traplocid") + } + if !s.Fieldtech.IsUnset() { + vals = append(vals, "fieldtech") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Rodentlocid.IsUnset() { + vals = append(vals, "rodentlocid") + } + return vals +} + +func (s FieldseekerTimecardSetter) Overwrite(t *FieldseekerTimecard) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Activity.IsUnset() { + t.Activity = s.Activity.MustGetNull() + } + if !s.Startdatetime.IsUnset() { + t.Startdatetime = s.Startdatetime.MustGetNull() + } + if !s.Enddatetime.IsUnset() { + t.Enddatetime = s.Enddatetime.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Externalid.IsUnset() { + t.Externalid = s.Externalid.MustGetNull() + } + if !s.Equiptype.IsUnset() { + t.Equiptype = s.Equiptype.MustGetNull() + } + if !s.Locationname.IsUnset() { + t.Locationname = s.Locationname.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Linelocid.IsUnset() { + t.Linelocid = s.Linelocid.MustGetNull() + } + if !s.Pointlocid.IsUnset() { + t.Pointlocid = s.Pointlocid.MustGetNull() + } + if !s.Polygonlocid.IsUnset() { + t.Polygonlocid = s.Polygonlocid.MustGetNull() + } + if !s.Lclocid.IsUnset() { + t.Lclocid = s.Lclocid.MustGetNull() + } + if !s.Samplelocid.IsUnset() { + t.Samplelocid = s.Samplelocid.MustGetNull() + } + if !s.Srid.IsUnset() { + t.Srid = s.Srid.MustGetNull() + } + if !s.Traplocid.IsUnset() { + t.Traplocid = s.Traplocid.MustGetNull() + } + if !s.Fieldtech.IsUnset() { + t.Fieldtech = s.Fieldtech.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Rodentlocid.IsUnset() { + t.Rodentlocid = s.Rodentlocid.MustGetNull() + } +} + +func (s *FieldseekerTimecardSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTimecards.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 28) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Activity.IsUnset() { + vals[1] = psql.Arg(s.Activity.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Startdatetime.IsUnset() { + vals[2] = psql.Arg(s.Startdatetime.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Enddatetime.IsUnset() { + vals[3] = psql.Arg(s.Enddatetime.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[4] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Externalid.IsUnset() { + vals[5] = psql.Arg(s.Externalid.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Equiptype.IsUnset() { + vals[6] = psql.Arg(s.Equiptype.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Locationname.IsUnset() { + vals[7] = psql.Arg(s.Locationname.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[8] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[9] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[10] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[11] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[12] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[13] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[14] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Linelocid.IsUnset() { + vals[15] = psql.Arg(s.Linelocid.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Pointlocid.IsUnset() { + vals[16] = psql.Arg(s.Pointlocid.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Polygonlocid.IsUnset() { + vals[17] = psql.Arg(s.Polygonlocid.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Lclocid.IsUnset() { + vals[18] = psql.Arg(s.Lclocid.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Samplelocid.IsUnset() { + vals[19] = psql.Arg(s.Samplelocid.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Srid.IsUnset() { + vals[20] = psql.Arg(s.Srid.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Traplocid.IsUnset() { + vals[21] = psql.Arg(s.Traplocid.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Fieldtech.IsUnset() { + vals[22] = psql.Arg(s.Fieldtech.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[23] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[24] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[25] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[26] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Rodentlocid.IsUnset() { + vals[27] = psql.Arg(s.Rodentlocid.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerTimecardSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerTimecardSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 28) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Activity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "activity")...), + psql.Arg(s.Activity), + }}) + } + + if !s.Startdatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "startdatetime")...), + psql.Arg(s.Startdatetime), + }}) + } + + if !s.Enddatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "enddatetime")...), + psql.Arg(s.Enddatetime), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Externalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "externalid")...), + psql.Arg(s.Externalid), + }}) + } + + if !s.Equiptype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "equiptype")...), + psql.Arg(s.Equiptype), + }}) + } + + if !s.Locationname.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationname")...), + psql.Arg(s.Locationname), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Linelocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "linelocid")...), + psql.Arg(s.Linelocid), + }}) + } + + if !s.Pointlocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "pointlocid")...), + psql.Arg(s.Pointlocid), + }}) + } + + if !s.Polygonlocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "polygonlocid")...), + psql.Arg(s.Polygonlocid), + }}) + } + + if !s.Lclocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lclocid")...), + psql.Arg(s.Lclocid), + }}) + } + + if !s.Samplelocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "samplelocid")...), + psql.Arg(s.Samplelocid), + }}) + } + + if !s.Srid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "srid")...), + psql.Arg(s.Srid), + }}) + } + + if !s.Traplocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "traplocid")...), + psql.Arg(s.Traplocid), + }}) + } + + if !s.Fieldtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fieldtech")...), + psql.Arg(s.Fieldtech), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Rodentlocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "rodentlocid")...), + psql.Arg(s.Rodentlocid), + }}) + } + + return exprs +} + +// FindFieldseekerTimecard retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerTimecard(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerTimecard, error) { + if len(cols) == 0 { + return FieldseekerTimecards.Query( + sm.Where(FieldseekerTimecards.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerTimecards.Query( + sm.Where(FieldseekerTimecards.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerTimecards.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerTimecardExists checks the presence of a single record by primary key +func FieldseekerTimecardExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerTimecards.Query( + sm.Where(FieldseekerTimecards.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerTimecard is retrieved from the database +func (o *FieldseekerTimecard) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTimecards.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerTimecardSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerTimecards.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerTimecardSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerTimecards.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerTimecardSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerTimecards.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerTimecardSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerTimecard +func (o *FieldseekerTimecard) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerTimecard) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.timecard", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerTimecard +func (o *FieldseekerTimecard) Update(ctx context.Context, exec bob.Executor, s *FieldseekerTimecardSetter) error { + v, err := FieldseekerTimecards.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerTimecard record with an executor +func (o *FieldseekerTimecard) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerTimecards.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerTimecard using the executor +func (o *FieldseekerTimecard) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerTimecards.Query( + sm.Where(FieldseekerTimecards.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerTimecardSlice is retrieved from the database +func (o FieldseekerTimecardSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTimecards.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerTimecards.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerTimecards.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerTimecards.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerTimecardSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.timecard", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerTimecardSlice) copyMatchingRows(from ...*FieldseekerTimecard) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerTimecardSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTimecards.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerTimecard: + o.copyMatchingRows(retrieved) + case []*FieldseekerTimecard: + o.copyMatchingRows(retrieved...) + case FieldseekerTimecardSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerTimecard or a slice of FieldseekerTimecard + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerTimecards.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerTimecardSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTimecards.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerTimecard: + o.copyMatchingRows(retrieved) + case []*FieldseekerTimecard: + o.copyMatchingRows(retrieved...) + case FieldseekerTimecardSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerTimecard or a slice of FieldseekerTimecard + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerTimecards.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerTimecardSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerTimecardSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerTimecards.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerTimecardSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerTimecards.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerTimecardSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerTimecards.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerTimecardWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Activity psql.WhereNullMod[Q, enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu] + Startdatetime psql.WhereNullMod[Q, time.Time] + Enddatetime psql.WhereNullMod[Q, time.Time] + Comments psql.WhereNullMod[Q, string] + Externalid psql.WhereNullMod[Q, string] + Equiptype psql.WhereNullMod[Q, enums.FieldseekerTimecardTimecardequipmenttypeEnum] + Locationname psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Zone2 psql.WhereNullMod[Q, string] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Linelocid psql.WhereNullMod[Q, uuid.UUID] + Pointlocid psql.WhereNullMod[Q, uuid.UUID] + Polygonlocid psql.WhereNullMod[Q, uuid.UUID] + Lclocid psql.WhereNullMod[Q, uuid.UUID] + Samplelocid psql.WhereNullMod[Q, uuid.UUID] + Srid psql.WhereNullMod[Q, uuid.UUID] + Traplocid psql.WhereNullMod[Q, uuid.UUID] + Fieldtech psql.WhereNullMod[Q, string] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Rodentlocid psql.WhereNullMod[Q, uuid.UUID] +} + +func (fieldseekerTimecardWhere[Q]) AliasedAs(alias string) fieldseekerTimecardWhere[Q] { + return buildFieldseekerTimecardWhere[Q](buildFieldseekerTimecardColumns(alias)) +} + +func buildFieldseekerTimecardWhere[Q psql.Filterable](cols fieldseekerTimecardColumns) fieldseekerTimecardWhere[Q] { + return fieldseekerTimecardWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Activity: psql.WhereNull[Q, enums.FieldseekerTimecardTimecardActivity451e67260c084304a35457170dc13366Enu](cols.Activity), + Startdatetime: psql.WhereNull[Q, time.Time](cols.Startdatetime), + Enddatetime: psql.WhereNull[Q, time.Time](cols.Enddatetime), + Comments: psql.WhereNull[Q, string](cols.Comments), + Externalid: psql.WhereNull[Q, string](cols.Externalid), + Equiptype: psql.WhereNull[Q, enums.FieldseekerTimecardTimecardequipmenttypeEnum](cols.Equiptype), + Locationname: psql.WhereNull[Q, string](cols.Locationname), + Zone: psql.WhereNull[Q, string](cols.Zone), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Linelocid: psql.WhereNull[Q, uuid.UUID](cols.Linelocid), + Pointlocid: psql.WhereNull[Q, uuid.UUID](cols.Pointlocid), + Polygonlocid: psql.WhereNull[Q, uuid.UUID](cols.Polygonlocid), + Lclocid: psql.WhereNull[Q, uuid.UUID](cols.Lclocid), + Samplelocid: psql.WhereNull[Q, uuid.UUID](cols.Samplelocid), + Srid: psql.WhereNull[Q, uuid.UUID](cols.Srid), + Traplocid: psql.WhereNull[Q, uuid.UUID](cols.Traplocid), + Fieldtech: psql.WhereNull[Q, string](cols.Fieldtech), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Rodentlocid: psql.WhereNull[Q, uuid.UUID](cols.Rodentlocid), + } +} diff --git a/db/models/fieldseeker.tracklog.bob.go b/db/models/fieldseeker.tracklog.bob.go new file mode 100644 index 00000000..53854e99 --- /dev/null +++ b/db/models/fieldseeker.tracklog.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerTracklog is an object representing the database table. +type FieldseekerTracklog struct{} + +// FieldseekerTracklogSlice is an alias for a slice of pointers to FieldseekerTracklog. +// This should almost always be used instead of []*FieldseekerTracklog. +type FieldseekerTracklogSlice []*FieldseekerTracklog + +// FieldseekerTracklogs contains methods to work with the tracklog view +var FieldseekerTracklogs = psql.NewViewx[*FieldseekerTracklog, FieldseekerTracklogSlice]("fieldseeker", "tracklog", buildFieldseekerTracklogColumns("fieldseeker.tracklog")) + +// FieldseekerTracklogsQuery is a query on the tracklog view +type FieldseekerTracklogsQuery = *psql.ViewQuery[*FieldseekerTracklog, FieldseekerTracklogSlice] + +func buildFieldseekerTracklogColumns(alias string) fieldseekerTracklogColumns { + return fieldseekerTracklogColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.tracklog"), + tableAlias: alias, + } +} + +type fieldseekerTracklogColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerTracklogColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerTracklogColumns) AliasedAs(alias string) fieldseekerTracklogColumns { + return buildFieldseekerTracklogColumns(alias) +} + +// AfterQueryHook is called after FieldseekerTracklog is retrieved from the database +func (o *FieldseekerTracklog) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTracklogs.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerTracklogSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerTracklogSlice is retrieved from the database +func (o FieldseekerTracklogSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTracklogs.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerTracklogWhere[Q psql.Filterable] struct{} + +func (fieldseekerTracklogWhere[Q]) AliasedAs(alias string) fieldseekerTracklogWhere[Q] { + return buildFieldseekerTracklogWhere[Q](buildFieldseekerTracklogColumns(alias)) +} + +func buildFieldseekerTracklogWhere[Q psql.Filterable](cols fieldseekerTracklogColumns) fieldseekerTracklogWhere[Q] { + return fieldseekerTracklogWhere[Q]{} +} diff --git a/db/models/fieldseeker.trapdata.bob.go b/db/models/fieldseeker.trapdata.bob.go new file mode 100644 index 00000000..a7e1fd8d --- /dev/null +++ b/db/models/fieldseeker.trapdata.bob.go @@ -0,0 +1,1400 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerTrapdatum is an object representing the database table. +type FieldseekerTrapdatum struct { + Objectid int64 `db:"objectid,pk" ` + // Trap Type + Traptype null.Val[enums.FieldseekerTrapdataMosquitotraptypeEnum] `db:"traptype" ` + // Trap Activity Type + Trapactivitytype null.Val[enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum] `db:"trapactivitytype" ` + // Start + Startdatetime null.Val[time.Time] `db:"startdatetime" ` + // Finish + Enddatetime null.Val[time.Time] `db:"enddatetime" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // Tech Identifying Species in Lab + Idbytech null.Val[string] `db:"idbytech" ` + // Tech Sorting Trap Results in Lab + Sortbytech null.Val[string] `db:"sortbytech" ` + // Processed + Processed null.Val[enums.FieldseekerTrapdataNotinuitFEnum] `db:"processed" ` + // Site Conditions + Sitecond null.Val[enums.FieldseekerTrapdataMosquitositeconditionEnum] `db:"sitecond" ` + // Location Name + Locationname null.Val[string] `db:"locationname" ` + // RecordStatus + Recordstatus null.Val[int16] `db:"recordstatus" ` + // Reviewed + Reviewed null.Val[enums.FieldseekerTrapdataNotinuitFEnum] `db:"reviewed" ` + // Reviewed By + Reviewedby null.Val[string] `db:"reviewedby" ` + // Reviewed Date + Revieweddate null.Val[time.Time] `db:"revieweddate" ` + // Trap Condition + Trapcondition null.Val[enums.FieldseekerTrapdataMosquitotrapconditionEnum] `db:"trapcondition" ` + // Trap Nights + Trapnights null.Val[int16] `db:"trapnights" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Srid null.Val[uuid.UUID] `db:"srid" ` + // Field Tech + Fieldtech null.Val[string] `db:"fieldtech" ` + // Gateway Sync + Gatewaysync null.Val[int16] `db:"gatewaysync" ` + LocID null.Val[uuid.UUID] `db:"loc_id" ` + // Voltage + Voltage null.Val[float64] `db:"voltage" ` + Winddir null.Val[enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166] `db:"winddir" ` + Windspeed null.Val[float64] `db:"windspeed" ` + Avetemp null.Val[float64] `db:"avetemp" ` + Raingauge null.Val[float64] `db:"raingauge" ` + // Landing Rate + LR null.Val[int16] `db:"lr" ` + Field null.Val[int32] `db:"field" ` + Vectorsurvtrapdataid null.Val[string] `db:"vectorsurvtrapdataid" ` + Vectorsurvtraplocationid null.Val[string] `db:"vectorsurvtraplocationid" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + Lure null.Val[enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu] `db:"lure" ` +} + +// FieldseekerTrapdatumSlice is an alias for a slice of pointers to FieldseekerTrapdatum. +// This should almost always be used instead of []*FieldseekerTrapdatum. +type FieldseekerTrapdatumSlice []*FieldseekerTrapdatum + +// FieldseekerTrapdata contains methods to work with the trapdata table +var FieldseekerTrapdata = psql.NewTablex[*FieldseekerTrapdatum, FieldseekerTrapdatumSlice, *FieldseekerTrapdatumSetter]("fieldseeker", "trapdata", buildFieldseekerTrapdatumColumns("fieldseeker.trapdata")) + +// FieldseekerTrapdataQuery is a query on the trapdata table +type FieldseekerTrapdataQuery = *psql.ViewQuery[*FieldseekerTrapdatum, FieldseekerTrapdatumSlice] + +func buildFieldseekerTrapdatumColumns(alias string) fieldseekerTrapdatumColumns { + return fieldseekerTrapdatumColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "traptype", "trapactivitytype", "startdatetime", "enddatetime", "comments", "idbytech", "sortbytech", "processed", "sitecond", "locationname", "recordstatus", "reviewed", "reviewedby", "revieweddate", "trapcondition", "trapnights", "zone", "zone2", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "srid", "fieldtech", "gatewaysync", "loc_id", "voltage", "winddir", "windspeed", "avetemp", "raingauge", "lr", "field", "vectorsurvtrapdataid", "vectorsurvtraplocationid", "creationdate", "creator", "editdate", "editor", "lure", + ).WithParent("fieldseeker.trapdata"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Traptype: psql.Quote(alias, "traptype"), + Trapactivitytype: psql.Quote(alias, "trapactivitytype"), + Startdatetime: psql.Quote(alias, "startdatetime"), + Enddatetime: psql.Quote(alias, "enddatetime"), + Comments: psql.Quote(alias, "comments"), + Idbytech: psql.Quote(alias, "idbytech"), + Sortbytech: psql.Quote(alias, "sortbytech"), + Processed: psql.Quote(alias, "processed"), + Sitecond: psql.Quote(alias, "sitecond"), + Locationname: psql.Quote(alias, "locationname"), + Recordstatus: psql.Quote(alias, "recordstatus"), + Reviewed: psql.Quote(alias, "reviewed"), + Reviewedby: psql.Quote(alias, "reviewedby"), + Revieweddate: psql.Quote(alias, "revieweddate"), + Trapcondition: psql.Quote(alias, "trapcondition"), + Trapnights: psql.Quote(alias, "trapnights"), + Zone: psql.Quote(alias, "zone"), + Zone2: psql.Quote(alias, "zone2"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Srid: psql.Quote(alias, "srid"), + Fieldtech: psql.Quote(alias, "fieldtech"), + Gatewaysync: psql.Quote(alias, "gatewaysync"), + LocID: psql.Quote(alias, "loc_id"), + Voltage: psql.Quote(alias, "voltage"), + Winddir: psql.Quote(alias, "winddir"), + Windspeed: psql.Quote(alias, "windspeed"), + Avetemp: psql.Quote(alias, "avetemp"), + Raingauge: psql.Quote(alias, "raingauge"), + LR: psql.Quote(alias, "lr"), + Field: psql.Quote(alias, "field"), + Vectorsurvtrapdataid: psql.Quote(alias, "vectorsurvtrapdataid"), + Vectorsurvtraplocationid: psql.Quote(alias, "vectorsurvtraplocationid"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Lure: psql.Quote(alias, "lure"), + } +} + +type fieldseekerTrapdatumColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Traptype psql.Expression + Trapactivitytype psql.Expression + Startdatetime psql.Expression + Enddatetime psql.Expression + Comments psql.Expression + Idbytech psql.Expression + Sortbytech psql.Expression + Processed psql.Expression + Sitecond psql.Expression + Locationname psql.Expression + Recordstatus psql.Expression + Reviewed psql.Expression + Reviewedby psql.Expression + Revieweddate psql.Expression + Trapcondition psql.Expression + Trapnights psql.Expression + Zone psql.Expression + Zone2 psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Srid psql.Expression + Fieldtech psql.Expression + Gatewaysync psql.Expression + LocID psql.Expression + Voltage psql.Expression + Winddir psql.Expression + Windspeed psql.Expression + Avetemp psql.Expression + Raingauge psql.Expression + LR psql.Expression + Field psql.Expression + Vectorsurvtrapdataid psql.Expression + Vectorsurvtraplocationid psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Lure psql.Expression +} + +func (c fieldseekerTrapdatumColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerTrapdatumColumns) AliasedAs(alias string) fieldseekerTrapdatumColumns { + return buildFieldseekerTrapdatumColumns(alias) +} + +// FieldseekerTrapdatumSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerTrapdatumSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Traptype omitnull.Val[enums.FieldseekerTrapdataMosquitotraptypeEnum] `db:"traptype" ` + Trapactivitytype omitnull.Val[enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum] `db:"trapactivitytype" ` + Startdatetime omitnull.Val[time.Time] `db:"startdatetime" ` + Enddatetime omitnull.Val[time.Time] `db:"enddatetime" ` + Comments omitnull.Val[string] `db:"comments" ` + Idbytech omitnull.Val[string] `db:"idbytech" ` + Sortbytech omitnull.Val[string] `db:"sortbytech" ` + Processed omitnull.Val[enums.FieldseekerTrapdataNotinuitFEnum] `db:"processed" ` + Sitecond omitnull.Val[enums.FieldseekerTrapdataMosquitositeconditionEnum] `db:"sitecond" ` + Locationname omitnull.Val[string] `db:"locationname" ` + Recordstatus omitnull.Val[int16] `db:"recordstatus" ` + Reviewed omitnull.Val[enums.FieldseekerTrapdataNotinuitFEnum] `db:"reviewed" ` + Reviewedby omitnull.Val[string] `db:"reviewedby" ` + Revieweddate omitnull.Val[time.Time] `db:"revieweddate" ` + Trapcondition omitnull.Val[enums.FieldseekerTrapdataMosquitotrapconditionEnum] `db:"trapcondition" ` + Trapnights omitnull.Val[int16] `db:"trapnights" ` + Zone omitnull.Val[string] `db:"zone" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Srid omitnull.Val[uuid.UUID] `db:"srid" ` + Fieldtech omitnull.Val[string] `db:"fieldtech" ` + Gatewaysync omitnull.Val[int16] `db:"gatewaysync" ` + LocID omitnull.Val[uuid.UUID] `db:"loc_id" ` + Voltage omitnull.Val[float64] `db:"voltage" ` + Winddir omitnull.Val[enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166] `db:"winddir" ` + Windspeed omitnull.Val[float64] `db:"windspeed" ` + Avetemp omitnull.Val[float64] `db:"avetemp" ` + Raingauge omitnull.Val[float64] `db:"raingauge" ` + LR omitnull.Val[int16] `db:"lr" ` + Field omitnull.Val[int32] `db:"field" ` + Vectorsurvtrapdataid omitnull.Val[string] `db:"vectorsurvtrapdataid" ` + Vectorsurvtraplocationid omitnull.Val[string] `db:"vectorsurvtraplocationid" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Lure omitnull.Val[enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu] `db:"lure" ` +} + +func (s FieldseekerTrapdatumSetter) SetColumns() []string { + vals := make([]string, 0, 42) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Traptype.IsUnset() { + vals = append(vals, "traptype") + } + if !s.Trapactivitytype.IsUnset() { + vals = append(vals, "trapactivitytype") + } + if !s.Startdatetime.IsUnset() { + vals = append(vals, "startdatetime") + } + if !s.Enddatetime.IsUnset() { + vals = append(vals, "enddatetime") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Idbytech.IsUnset() { + vals = append(vals, "idbytech") + } + if !s.Sortbytech.IsUnset() { + vals = append(vals, "sortbytech") + } + if !s.Processed.IsUnset() { + vals = append(vals, "processed") + } + if !s.Sitecond.IsUnset() { + vals = append(vals, "sitecond") + } + if !s.Locationname.IsUnset() { + vals = append(vals, "locationname") + } + if !s.Recordstatus.IsUnset() { + vals = append(vals, "recordstatus") + } + if !s.Reviewed.IsUnset() { + vals = append(vals, "reviewed") + } + if !s.Reviewedby.IsUnset() { + vals = append(vals, "reviewedby") + } + if !s.Revieweddate.IsUnset() { + vals = append(vals, "revieweddate") + } + if !s.Trapcondition.IsUnset() { + vals = append(vals, "trapcondition") + } + if !s.Trapnights.IsUnset() { + vals = append(vals, "trapnights") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Srid.IsUnset() { + vals = append(vals, "srid") + } + if !s.Fieldtech.IsUnset() { + vals = append(vals, "fieldtech") + } + if !s.Gatewaysync.IsUnset() { + vals = append(vals, "gatewaysync") + } + if !s.LocID.IsUnset() { + vals = append(vals, "loc_id") + } + if !s.Voltage.IsUnset() { + vals = append(vals, "voltage") + } + if !s.Winddir.IsUnset() { + vals = append(vals, "winddir") + } + if !s.Windspeed.IsUnset() { + vals = append(vals, "windspeed") + } + if !s.Avetemp.IsUnset() { + vals = append(vals, "avetemp") + } + if !s.Raingauge.IsUnset() { + vals = append(vals, "raingauge") + } + if !s.LR.IsUnset() { + vals = append(vals, "lr") + } + if !s.Field.IsUnset() { + vals = append(vals, "field") + } + if !s.Vectorsurvtrapdataid.IsUnset() { + vals = append(vals, "vectorsurvtrapdataid") + } + if !s.Vectorsurvtraplocationid.IsUnset() { + vals = append(vals, "vectorsurvtraplocationid") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Lure.IsUnset() { + vals = append(vals, "lure") + } + return vals +} + +func (s FieldseekerTrapdatumSetter) Overwrite(t *FieldseekerTrapdatum) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Traptype.IsUnset() { + t.Traptype = s.Traptype.MustGetNull() + } + if !s.Trapactivitytype.IsUnset() { + t.Trapactivitytype = s.Trapactivitytype.MustGetNull() + } + if !s.Startdatetime.IsUnset() { + t.Startdatetime = s.Startdatetime.MustGetNull() + } + if !s.Enddatetime.IsUnset() { + t.Enddatetime = s.Enddatetime.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Idbytech.IsUnset() { + t.Idbytech = s.Idbytech.MustGetNull() + } + if !s.Sortbytech.IsUnset() { + t.Sortbytech = s.Sortbytech.MustGetNull() + } + if !s.Processed.IsUnset() { + t.Processed = s.Processed.MustGetNull() + } + if !s.Sitecond.IsUnset() { + t.Sitecond = s.Sitecond.MustGetNull() + } + if !s.Locationname.IsUnset() { + t.Locationname = s.Locationname.MustGetNull() + } + if !s.Recordstatus.IsUnset() { + t.Recordstatus = s.Recordstatus.MustGetNull() + } + if !s.Reviewed.IsUnset() { + t.Reviewed = s.Reviewed.MustGetNull() + } + if !s.Reviewedby.IsUnset() { + t.Reviewedby = s.Reviewedby.MustGetNull() + } + if !s.Revieweddate.IsUnset() { + t.Revieweddate = s.Revieweddate.MustGetNull() + } + if !s.Trapcondition.IsUnset() { + t.Trapcondition = s.Trapcondition.MustGetNull() + } + if !s.Trapnights.IsUnset() { + t.Trapnights = s.Trapnights.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Srid.IsUnset() { + t.Srid = s.Srid.MustGetNull() + } + if !s.Fieldtech.IsUnset() { + t.Fieldtech = s.Fieldtech.MustGetNull() + } + if !s.Gatewaysync.IsUnset() { + t.Gatewaysync = s.Gatewaysync.MustGetNull() + } + if !s.LocID.IsUnset() { + t.LocID = s.LocID.MustGetNull() + } + if !s.Voltage.IsUnset() { + t.Voltage = s.Voltage.MustGetNull() + } + if !s.Winddir.IsUnset() { + t.Winddir = s.Winddir.MustGetNull() + } + if !s.Windspeed.IsUnset() { + t.Windspeed = s.Windspeed.MustGetNull() + } + if !s.Avetemp.IsUnset() { + t.Avetemp = s.Avetemp.MustGetNull() + } + if !s.Raingauge.IsUnset() { + t.Raingauge = s.Raingauge.MustGetNull() + } + if !s.LR.IsUnset() { + t.LR = s.LR.MustGetNull() + } + if !s.Field.IsUnset() { + t.Field = s.Field.MustGetNull() + } + if !s.Vectorsurvtrapdataid.IsUnset() { + t.Vectorsurvtrapdataid = s.Vectorsurvtrapdataid.MustGetNull() + } + if !s.Vectorsurvtraplocationid.IsUnset() { + t.Vectorsurvtraplocationid = s.Vectorsurvtraplocationid.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Lure.IsUnset() { + t.Lure = s.Lure.MustGetNull() + } +} + +func (s *FieldseekerTrapdatumSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTrapdata.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 42) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Traptype.IsUnset() { + vals[1] = psql.Arg(s.Traptype.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Trapactivitytype.IsUnset() { + vals[2] = psql.Arg(s.Trapactivitytype.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Startdatetime.IsUnset() { + vals[3] = psql.Arg(s.Startdatetime.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Enddatetime.IsUnset() { + vals[4] = psql.Arg(s.Enddatetime.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[5] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Idbytech.IsUnset() { + vals[6] = psql.Arg(s.Idbytech.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Sortbytech.IsUnset() { + vals[7] = psql.Arg(s.Sortbytech.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Processed.IsUnset() { + vals[8] = psql.Arg(s.Processed.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Sitecond.IsUnset() { + vals[9] = psql.Arg(s.Sitecond.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Locationname.IsUnset() { + vals[10] = psql.Arg(s.Locationname.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Recordstatus.IsUnset() { + vals[11] = psql.Arg(s.Recordstatus.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Reviewed.IsUnset() { + vals[12] = psql.Arg(s.Reviewed.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Reviewedby.IsUnset() { + vals[13] = psql.Arg(s.Reviewedby.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Revieweddate.IsUnset() { + vals[14] = psql.Arg(s.Revieweddate.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Trapcondition.IsUnset() { + vals[15] = psql.Arg(s.Trapcondition.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.Trapnights.IsUnset() { + vals[16] = psql.Arg(s.Trapnights.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[17] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[18] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[19] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[20] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[21] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[22] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[23] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Srid.IsUnset() { + vals[24] = psql.Arg(s.Srid.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Fieldtech.IsUnset() { + vals[25] = psql.Arg(s.Fieldtech.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Gatewaysync.IsUnset() { + vals[26] = psql.Arg(s.Gatewaysync.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.LocID.IsUnset() { + vals[27] = psql.Arg(s.LocID.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.Voltage.IsUnset() { + vals[28] = psql.Arg(s.Voltage.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.Winddir.IsUnset() { + vals[29] = psql.Arg(s.Winddir.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + if !s.Windspeed.IsUnset() { + vals[30] = psql.Arg(s.Windspeed.MustGetNull()) + } else { + vals[30] = psql.Raw("DEFAULT") + } + + if !s.Avetemp.IsUnset() { + vals[31] = psql.Arg(s.Avetemp.MustGetNull()) + } else { + vals[31] = psql.Raw("DEFAULT") + } + + if !s.Raingauge.IsUnset() { + vals[32] = psql.Arg(s.Raingauge.MustGetNull()) + } else { + vals[32] = psql.Raw("DEFAULT") + } + + if !s.LR.IsUnset() { + vals[33] = psql.Arg(s.LR.MustGetNull()) + } else { + vals[33] = psql.Raw("DEFAULT") + } + + if !s.Field.IsUnset() { + vals[34] = psql.Arg(s.Field.MustGetNull()) + } else { + vals[34] = psql.Raw("DEFAULT") + } + + if !s.Vectorsurvtrapdataid.IsUnset() { + vals[35] = psql.Arg(s.Vectorsurvtrapdataid.MustGetNull()) + } else { + vals[35] = psql.Raw("DEFAULT") + } + + if !s.Vectorsurvtraplocationid.IsUnset() { + vals[36] = psql.Arg(s.Vectorsurvtraplocationid.MustGetNull()) + } else { + vals[36] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[37] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[37] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[38] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[38] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[39] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[39] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[40] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[40] = psql.Raw("DEFAULT") + } + + if !s.Lure.IsUnset() { + vals[41] = psql.Arg(s.Lure.MustGetNull()) + } else { + vals[41] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerTrapdatumSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerTrapdatumSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 42) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Traptype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "traptype")...), + psql.Arg(s.Traptype), + }}) + } + + if !s.Trapactivitytype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "trapactivitytype")...), + psql.Arg(s.Trapactivitytype), + }}) + } + + if !s.Startdatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "startdatetime")...), + psql.Arg(s.Startdatetime), + }}) + } + + if !s.Enddatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "enddatetime")...), + psql.Arg(s.Enddatetime), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Idbytech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "idbytech")...), + psql.Arg(s.Idbytech), + }}) + } + + if !s.Sortbytech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sortbytech")...), + psql.Arg(s.Sortbytech), + }}) + } + + if !s.Processed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "processed")...), + psql.Arg(s.Processed), + }}) + } + + if !s.Sitecond.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sitecond")...), + psql.Arg(s.Sitecond), + }}) + } + + if !s.Locationname.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationname")...), + psql.Arg(s.Locationname), + }}) + } + + if !s.Recordstatus.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "recordstatus")...), + psql.Arg(s.Recordstatus), + }}) + } + + if !s.Reviewed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewed")...), + psql.Arg(s.Reviewed), + }}) + } + + if !s.Reviewedby.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewedby")...), + psql.Arg(s.Reviewedby), + }}) + } + + if !s.Revieweddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "revieweddate")...), + psql.Arg(s.Revieweddate), + }}) + } + + if !s.Trapcondition.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "trapcondition")...), + psql.Arg(s.Trapcondition), + }}) + } + + if !s.Trapnights.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "trapnights")...), + psql.Arg(s.Trapnights), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Srid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "srid")...), + psql.Arg(s.Srid), + }}) + } + + if !s.Fieldtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fieldtech")...), + psql.Arg(s.Fieldtech), + }}) + } + + if !s.Gatewaysync.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "gatewaysync")...), + psql.Arg(s.Gatewaysync), + }}) + } + + if !s.LocID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "loc_id")...), + psql.Arg(s.LocID), + }}) + } + + if !s.Voltage.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "voltage")...), + psql.Arg(s.Voltage), + }}) + } + + if !s.Winddir.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "winddir")...), + psql.Arg(s.Winddir), + }}) + } + + if !s.Windspeed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "windspeed")...), + psql.Arg(s.Windspeed), + }}) + } + + if !s.Avetemp.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "avetemp")...), + psql.Arg(s.Avetemp), + }}) + } + + if !s.Raingauge.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "raingauge")...), + psql.Arg(s.Raingauge), + }}) + } + + if !s.LR.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lr")...), + psql.Arg(s.LR), + }}) + } + + if !s.Field.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "field")...), + psql.Arg(s.Field), + }}) + } + + if !s.Vectorsurvtrapdataid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "vectorsurvtrapdataid")...), + psql.Arg(s.Vectorsurvtrapdataid), + }}) + } + + if !s.Vectorsurvtraplocationid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "vectorsurvtraplocationid")...), + psql.Arg(s.Vectorsurvtraplocationid), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Lure.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "lure")...), + psql.Arg(s.Lure), + }}) + } + + return exprs +} + +// FindFieldseekerTrapdatum retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerTrapdatum(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerTrapdatum, error) { + if len(cols) == 0 { + return FieldseekerTrapdata.Query( + sm.Where(FieldseekerTrapdata.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerTrapdata.Query( + sm.Where(FieldseekerTrapdata.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerTrapdata.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerTrapdatumExists checks the presence of a single record by primary key +func FieldseekerTrapdatumExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerTrapdata.Query( + sm.Where(FieldseekerTrapdata.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerTrapdatum is retrieved from the database +func (o *FieldseekerTrapdatum) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTrapdata.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerTrapdatumSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerTrapdata.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerTrapdatumSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerTrapdata.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerTrapdatumSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerTrapdata.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerTrapdatumSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerTrapdatum +func (o *FieldseekerTrapdatum) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerTrapdatum) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.trapdata", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerTrapdatum +func (o *FieldseekerTrapdatum) Update(ctx context.Context, exec bob.Executor, s *FieldseekerTrapdatumSetter) error { + v, err := FieldseekerTrapdata.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerTrapdatum record with an executor +func (o *FieldseekerTrapdatum) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerTrapdata.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerTrapdatum using the executor +func (o *FieldseekerTrapdatum) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerTrapdata.Query( + sm.Where(FieldseekerTrapdata.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerTrapdatumSlice is retrieved from the database +func (o FieldseekerTrapdatumSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTrapdata.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerTrapdata.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerTrapdata.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerTrapdata.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerTrapdatumSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.trapdata", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerTrapdatumSlice) copyMatchingRows(from ...*FieldseekerTrapdatum) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerTrapdatumSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTrapdata.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerTrapdatum: + o.copyMatchingRows(retrieved) + case []*FieldseekerTrapdatum: + o.copyMatchingRows(retrieved...) + case FieldseekerTrapdatumSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerTrapdatum or a slice of FieldseekerTrapdatum + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerTrapdata.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerTrapdatumSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTrapdata.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerTrapdatum: + o.copyMatchingRows(retrieved) + case []*FieldseekerTrapdatum: + o.copyMatchingRows(retrieved...) + case FieldseekerTrapdatumSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerTrapdatum or a slice of FieldseekerTrapdatum + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerTrapdata.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerTrapdatumSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerTrapdatumSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerTrapdata.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerTrapdatumSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerTrapdata.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerTrapdatumSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerTrapdata.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerTrapdatumWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Traptype psql.WhereNullMod[Q, enums.FieldseekerTrapdataMosquitotraptypeEnum] + Trapactivitytype psql.WhereNullMod[Q, enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum] + Startdatetime psql.WhereNullMod[Q, time.Time] + Enddatetime psql.WhereNullMod[Q, time.Time] + Comments psql.WhereNullMod[Q, string] + Idbytech psql.WhereNullMod[Q, string] + Sortbytech psql.WhereNullMod[Q, string] + Processed psql.WhereNullMod[Q, enums.FieldseekerTrapdataNotinuitFEnum] + Sitecond psql.WhereNullMod[Q, enums.FieldseekerTrapdataMosquitositeconditionEnum] + Locationname psql.WhereNullMod[Q, string] + Recordstatus psql.WhereNullMod[Q, int16] + Reviewed psql.WhereNullMod[Q, enums.FieldseekerTrapdataNotinuitFEnum] + Reviewedby psql.WhereNullMod[Q, string] + Revieweddate psql.WhereNullMod[Q, time.Time] + Trapcondition psql.WhereNullMod[Q, enums.FieldseekerTrapdataMosquitotrapconditionEnum] + Trapnights psql.WhereNullMod[Q, int16] + Zone psql.WhereNullMod[Q, string] + Zone2 psql.WhereNullMod[Q, string] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Srid psql.WhereNullMod[Q, uuid.UUID] + Fieldtech psql.WhereNullMod[Q, string] + Gatewaysync psql.WhereNullMod[Q, int16] + LocID psql.WhereNullMod[Q, uuid.UUID] + Voltage psql.WhereNullMod[Q, float64] + Winddir psql.WhereNullMod[Q, enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166] + Windspeed psql.WhereNullMod[Q, float64] + Avetemp psql.WhereNullMod[Q, float64] + Raingauge psql.WhereNullMod[Q, float64] + LR psql.WhereNullMod[Q, int16] + Field psql.WhereNullMod[Q, int32] + Vectorsurvtrapdataid psql.WhereNullMod[Q, string] + Vectorsurvtraplocationid psql.WhereNullMod[Q, string] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Lure psql.WhereNullMod[Q, enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu] +} + +func (fieldseekerTrapdatumWhere[Q]) AliasedAs(alias string) fieldseekerTrapdatumWhere[Q] { + return buildFieldseekerTrapdatumWhere[Q](buildFieldseekerTrapdatumColumns(alias)) +} + +func buildFieldseekerTrapdatumWhere[Q psql.Filterable](cols fieldseekerTrapdatumColumns) fieldseekerTrapdatumWhere[Q] { + return fieldseekerTrapdatumWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Traptype: psql.WhereNull[Q, enums.FieldseekerTrapdataMosquitotraptypeEnum](cols.Traptype), + Trapactivitytype: psql.WhereNull[Q, enums.FieldseekerTrapdataNotinuitrapactivitytypeEnum](cols.Trapactivitytype), + Startdatetime: psql.WhereNull[Q, time.Time](cols.Startdatetime), + Enddatetime: psql.WhereNull[Q, time.Time](cols.Enddatetime), + Comments: psql.WhereNull[Q, string](cols.Comments), + Idbytech: psql.WhereNull[Q, string](cols.Idbytech), + Sortbytech: psql.WhereNull[Q, string](cols.Sortbytech), + Processed: psql.WhereNull[Q, enums.FieldseekerTrapdataNotinuitFEnum](cols.Processed), + Sitecond: psql.WhereNull[Q, enums.FieldseekerTrapdataMosquitositeconditionEnum](cols.Sitecond), + Locationname: psql.WhereNull[Q, string](cols.Locationname), + Recordstatus: psql.WhereNull[Q, int16](cols.Recordstatus), + Reviewed: psql.WhereNull[Q, enums.FieldseekerTrapdataNotinuitFEnum](cols.Reviewed), + Reviewedby: psql.WhereNull[Q, string](cols.Reviewedby), + Revieweddate: psql.WhereNull[Q, time.Time](cols.Revieweddate), + Trapcondition: psql.WhereNull[Q, enums.FieldseekerTrapdataMosquitotrapconditionEnum](cols.Trapcondition), + Trapnights: psql.WhereNull[Q, int16](cols.Trapnights), + Zone: psql.WhereNull[Q, string](cols.Zone), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Srid: psql.WhereNull[Q, uuid.UUID](cols.Srid), + Fieldtech: psql.WhereNull[Q, string](cols.Fieldtech), + Gatewaysync: psql.WhereNull[Q, int16](cols.Gatewaysync), + LocID: psql.WhereNull[Q, uuid.UUID](cols.LocID), + Voltage: psql.WhereNull[Q, float64](cols.Voltage), + Winddir: psql.WhereNull[Q, enums.FieldseekerTrapdataTrapdataWinddirC1a31e05D0B94B228800Be127bb3f166](cols.Winddir), + Windspeed: psql.WhereNull[Q, float64](cols.Windspeed), + Avetemp: psql.WhereNull[Q, float64](cols.Avetemp), + Raingauge: psql.WhereNull[Q, float64](cols.Raingauge), + LR: psql.WhereNull[Q, int16](cols.LR), + Field: psql.WhereNull[Q, int32](cols.Field), + Vectorsurvtrapdataid: psql.WhereNull[Q, string](cols.Vectorsurvtrapdataid), + Vectorsurvtraplocationid: psql.WhereNull[Q, string](cols.Vectorsurvtraplocationid), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Lure: psql.WhereNull[Q, enums.FieldseekerTrapdataTrapdataLure25fe542f077F4254868176e8f436354bEnu](cols.Lure), + } +} diff --git a/db/models/fieldseeker.traplocation.bob.go b/db/models/fieldseeker.traplocation.bob.go new file mode 100644 index 00000000..d6830f38 --- /dev/null +++ b/db/models/fieldseeker.traplocation.bob.go @@ -0,0 +1,1094 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerTraplocation is an object representing the database table. +type FieldseekerTraplocation struct { + Objectid int64 `db:"objectid,pk" ` + // Name + Name null.Val[string] `db:"name" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // Habitat + Habitat null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e] `db:"habitat" ` + // Priority + Priority null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B] `db:"priority" ` + // Use Type + Usetype null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2] `db:"usetype" ` + // Active + Active null.Val[enums.FieldseekerTraplocationNotinuitFEnum] `db:"active" ` + // Description + Description null.Val[string] `db:"description" ` + // Access Description + Accessdesc null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0] `db:"accessdesc" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // External ID + Externalid null.Val[string] `db:"externalid" ` + // Next Scheduled Action + Nextactiondatescheduled null.Val[time.Time] `db:"nextactiondatescheduled" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + Locationnumber null.Val[int32] `db:"locationnumber" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + // Gateway Sync + Gatewaysync null.Val[int16] `db:"gatewaysync" ` + // Route + Route null.Val[int32] `db:"route" ` + // Set Day of Week + SetDow null.Val[int32] `db:"set_dow" ` + // Route order + RouteOrder null.Val[int32] `db:"route_order" ` + Vectorsurvsiteid null.Val[string] `db:"vectorsurvsiteid" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + H3R7 null.Val[string] `db:"h3r7" ` + H3R8 null.Val[string] `db:"h3r8" ` +} + +// FieldseekerTraplocationSlice is an alias for a slice of pointers to FieldseekerTraplocation. +// This should almost always be used instead of []*FieldseekerTraplocation. +type FieldseekerTraplocationSlice []*FieldseekerTraplocation + +// FieldseekerTraplocations contains methods to work with the traplocation table +var FieldseekerTraplocations = psql.NewTablex[*FieldseekerTraplocation, FieldseekerTraplocationSlice, *FieldseekerTraplocationSetter]("fieldseeker", "traplocation", buildFieldseekerTraplocationColumns("fieldseeker.traplocation")) + +// FieldseekerTraplocationsQuery is a query on the traplocation table +type FieldseekerTraplocationsQuery = *psql.ViewQuery[*FieldseekerTraplocation, FieldseekerTraplocationSlice] + +func buildFieldseekerTraplocationColumns(alias string) fieldseekerTraplocationColumns { + return fieldseekerTraplocationColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "name", "zone", "habitat", "priority", "usetype", "active", "description", "accessdesc", "comments", "externalid", "nextactiondatescheduled", "zone2", "locationnumber", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "gatewaysync", "route", "set_dow", "route_order", "vectorsurvsiteid", "creationdate", "creator", "editdate", "editor", "h3r7", "h3r8", + ).WithParent("fieldseeker.traplocation"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Name: psql.Quote(alias, "name"), + Zone: psql.Quote(alias, "zone"), + Habitat: psql.Quote(alias, "habitat"), + Priority: psql.Quote(alias, "priority"), + Usetype: psql.Quote(alias, "usetype"), + Active: psql.Quote(alias, "active"), + Description: psql.Quote(alias, "description"), + Accessdesc: psql.Quote(alias, "accessdesc"), + Comments: psql.Quote(alias, "comments"), + Externalid: psql.Quote(alias, "externalid"), + Nextactiondatescheduled: psql.Quote(alias, "nextactiondatescheduled"), + Zone2: psql.Quote(alias, "zone2"), + Locationnumber: psql.Quote(alias, "locationnumber"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Gatewaysync: psql.Quote(alias, "gatewaysync"), + Route: psql.Quote(alias, "route"), + SetDow: psql.Quote(alias, "set_dow"), + RouteOrder: psql.Quote(alias, "route_order"), + Vectorsurvsiteid: psql.Quote(alias, "vectorsurvsiteid"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + H3R7: psql.Quote(alias, "h3r7"), + H3R8: psql.Quote(alias, "h3r8"), + } +} + +type fieldseekerTraplocationColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Name psql.Expression + Zone psql.Expression + Habitat psql.Expression + Priority psql.Expression + Usetype psql.Expression + Active psql.Expression + Description psql.Expression + Accessdesc psql.Expression + Comments psql.Expression + Externalid psql.Expression + Nextactiondatescheduled psql.Expression + Zone2 psql.Expression + Locationnumber psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Gatewaysync psql.Expression + Route psql.Expression + SetDow psql.Expression + RouteOrder psql.Expression + Vectorsurvsiteid psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + H3R7 psql.Expression + H3R8 psql.Expression +} + +func (c fieldseekerTraplocationColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerTraplocationColumns) AliasedAs(alias string) fieldseekerTraplocationColumns { + return buildFieldseekerTraplocationColumns(alias) +} + +// FieldseekerTraplocationSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerTraplocationSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Name omitnull.Val[string] `db:"name" ` + Zone omitnull.Val[string] `db:"zone" ` + Habitat omitnull.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e] `db:"habitat" ` + Priority omitnull.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B] `db:"priority" ` + Usetype omitnull.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2] `db:"usetype" ` + Active omitnull.Val[enums.FieldseekerTraplocationNotinuitFEnum] `db:"active" ` + Description omitnull.Val[string] `db:"description" ` + Accessdesc omitnull.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0] `db:"accessdesc" ` + Comments omitnull.Val[string] `db:"comments" ` + Externalid omitnull.Val[string] `db:"externalid" ` + Nextactiondatescheduled omitnull.Val[time.Time] `db:"nextactiondatescheduled" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Locationnumber omitnull.Val[int32] `db:"locationnumber" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Gatewaysync omitnull.Val[int16] `db:"gatewaysync" ` + Route omitnull.Val[int32] `db:"route" ` + SetDow omitnull.Val[int32] `db:"set_dow" ` + RouteOrder omitnull.Val[int32] `db:"route_order" ` + Vectorsurvsiteid omitnull.Val[string] `db:"vectorsurvsiteid" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + H3R7 omitnull.Val[string] `db:"h3r7" ` + H3R8 omitnull.Val[string] `db:"h3r8" ` +} + +func (s FieldseekerTraplocationSetter) SetColumns() []string { + vals := make([]string, 0, 30) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Name.IsUnset() { + vals = append(vals, "name") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Habitat.IsUnset() { + vals = append(vals, "habitat") + } + if !s.Priority.IsUnset() { + vals = append(vals, "priority") + } + if !s.Usetype.IsUnset() { + vals = append(vals, "usetype") + } + if !s.Active.IsUnset() { + vals = append(vals, "active") + } + if !s.Description.IsUnset() { + vals = append(vals, "description") + } + if !s.Accessdesc.IsUnset() { + vals = append(vals, "accessdesc") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Externalid.IsUnset() { + vals = append(vals, "externalid") + } + if !s.Nextactiondatescheduled.IsUnset() { + vals = append(vals, "nextactiondatescheduled") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Locationnumber.IsUnset() { + vals = append(vals, "locationnumber") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Gatewaysync.IsUnset() { + vals = append(vals, "gatewaysync") + } + if !s.Route.IsUnset() { + vals = append(vals, "route") + } + if !s.SetDow.IsUnset() { + vals = append(vals, "set_dow") + } + if !s.RouteOrder.IsUnset() { + vals = append(vals, "route_order") + } + if !s.Vectorsurvsiteid.IsUnset() { + vals = append(vals, "vectorsurvsiteid") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.H3R7.IsUnset() { + vals = append(vals, "h3r7") + } + if !s.H3R8.IsUnset() { + vals = append(vals, "h3r8") + } + return vals +} + +func (s FieldseekerTraplocationSetter) Overwrite(t *FieldseekerTraplocation) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Name.IsUnset() { + t.Name = s.Name.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Habitat.IsUnset() { + t.Habitat = s.Habitat.MustGetNull() + } + if !s.Priority.IsUnset() { + t.Priority = s.Priority.MustGetNull() + } + if !s.Usetype.IsUnset() { + t.Usetype = s.Usetype.MustGetNull() + } + if !s.Active.IsUnset() { + t.Active = s.Active.MustGetNull() + } + if !s.Description.IsUnset() { + t.Description = s.Description.MustGetNull() + } + if !s.Accessdesc.IsUnset() { + t.Accessdesc = s.Accessdesc.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Externalid.IsUnset() { + t.Externalid = s.Externalid.MustGetNull() + } + if !s.Nextactiondatescheduled.IsUnset() { + t.Nextactiondatescheduled = s.Nextactiondatescheduled.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Locationnumber.IsUnset() { + t.Locationnumber = s.Locationnumber.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Gatewaysync.IsUnset() { + t.Gatewaysync = s.Gatewaysync.MustGetNull() + } + if !s.Route.IsUnset() { + t.Route = s.Route.MustGetNull() + } + if !s.SetDow.IsUnset() { + t.SetDow = s.SetDow.MustGetNull() + } + if !s.RouteOrder.IsUnset() { + t.RouteOrder = s.RouteOrder.MustGetNull() + } + if !s.Vectorsurvsiteid.IsUnset() { + t.Vectorsurvsiteid = s.Vectorsurvsiteid.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.H3R7.IsUnset() { + t.H3R7 = s.H3R7.MustGetNull() + } + if !s.H3R8.IsUnset() { + t.H3R8 = s.H3R8.MustGetNull() + } +} + +func (s *FieldseekerTraplocationSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTraplocations.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 30) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Name.IsUnset() { + vals[1] = psql.Arg(s.Name.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[2] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Habitat.IsUnset() { + vals[3] = psql.Arg(s.Habitat.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Priority.IsUnset() { + vals[4] = psql.Arg(s.Priority.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Usetype.IsUnset() { + vals[5] = psql.Arg(s.Usetype.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Active.IsUnset() { + vals[6] = psql.Arg(s.Active.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Description.IsUnset() { + vals[7] = psql.Arg(s.Description.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Accessdesc.IsUnset() { + vals[8] = psql.Arg(s.Accessdesc.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[9] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Externalid.IsUnset() { + vals[10] = psql.Arg(s.Externalid.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Nextactiondatescheduled.IsUnset() { + vals[11] = psql.Arg(s.Nextactiondatescheduled.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[12] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Locationnumber.IsUnset() { + vals[13] = psql.Arg(s.Locationnumber.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[14] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[15] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[16] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[17] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[18] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Gatewaysync.IsUnset() { + vals[19] = psql.Arg(s.Gatewaysync.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Route.IsUnset() { + vals[20] = psql.Arg(s.Route.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.SetDow.IsUnset() { + vals[21] = psql.Arg(s.SetDow.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.RouteOrder.IsUnset() { + vals[22] = psql.Arg(s.RouteOrder.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Vectorsurvsiteid.IsUnset() { + vals[23] = psql.Arg(s.Vectorsurvsiteid.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[24] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[25] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[26] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[27] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.H3R7.IsUnset() { + vals[28] = psql.Arg(s.H3R7.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.H3R8.IsUnset() { + vals[29] = psql.Arg(s.H3R8.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerTraplocationSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerTraplocationSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 30) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Name.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "name")...), + psql.Arg(s.Name), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Habitat.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habitat")...), + psql.Arg(s.Habitat), + }}) + } + + if !s.Priority.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "priority")...), + psql.Arg(s.Priority), + }}) + } + + if !s.Usetype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "usetype")...), + psql.Arg(s.Usetype), + }}) + } + + if !s.Active.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "active")...), + psql.Arg(s.Active), + }}) + } + + if !s.Description.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "description")...), + psql.Arg(s.Description), + }}) + } + + if !s.Accessdesc.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "accessdesc")...), + psql.Arg(s.Accessdesc), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Externalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "externalid")...), + psql.Arg(s.Externalid), + }}) + } + + if !s.Nextactiondatescheduled.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "nextactiondatescheduled")...), + psql.Arg(s.Nextactiondatescheduled), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Locationnumber.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationnumber")...), + psql.Arg(s.Locationnumber), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Gatewaysync.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "gatewaysync")...), + psql.Arg(s.Gatewaysync), + }}) + } + + if !s.Route.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "route")...), + psql.Arg(s.Route), + }}) + } + + if !s.SetDow.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "set_dow")...), + psql.Arg(s.SetDow), + }}) + } + + if !s.RouteOrder.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "route_order")...), + psql.Arg(s.RouteOrder), + }}) + } + + if !s.Vectorsurvsiteid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "vectorsurvsiteid")...), + psql.Arg(s.Vectorsurvsiteid), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.H3R7.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "h3r7")...), + psql.Arg(s.H3R7), + }}) + } + + if !s.H3R8.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "h3r8")...), + psql.Arg(s.H3R8), + }}) + } + + return exprs +} + +// FindFieldseekerTraplocation retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerTraplocation(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerTraplocation, error) { + if len(cols) == 0 { + return FieldseekerTraplocations.Query( + sm.Where(FieldseekerTraplocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerTraplocations.Query( + sm.Where(FieldseekerTraplocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerTraplocations.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerTraplocationExists checks the presence of a single record by primary key +func FieldseekerTraplocationExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerTraplocations.Query( + sm.Where(FieldseekerTraplocations.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerTraplocation is retrieved from the database +func (o *FieldseekerTraplocation) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTraplocations.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerTraplocationSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerTraplocations.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerTraplocationSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerTraplocations.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerTraplocationSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerTraplocations.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerTraplocationSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerTraplocation +func (o *FieldseekerTraplocation) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerTraplocation) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.traplocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerTraplocation +func (o *FieldseekerTraplocation) Update(ctx context.Context, exec bob.Executor, s *FieldseekerTraplocationSetter) error { + v, err := FieldseekerTraplocations.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerTraplocation record with an executor +func (o *FieldseekerTraplocation) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerTraplocations.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerTraplocation using the executor +func (o *FieldseekerTraplocation) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerTraplocations.Query( + sm.Where(FieldseekerTraplocations.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerTraplocationSlice is retrieved from the database +func (o FieldseekerTraplocationSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTraplocations.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerTraplocations.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerTraplocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerTraplocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerTraplocationSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.traplocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerTraplocationSlice) copyMatchingRows(from ...*FieldseekerTraplocation) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerTraplocationSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTraplocations.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerTraplocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerTraplocation: + o.copyMatchingRows(retrieved...) + case FieldseekerTraplocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerTraplocation or a slice of FieldseekerTraplocation + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerTraplocations.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerTraplocationSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTraplocations.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerTraplocation: + o.copyMatchingRows(retrieved) + case []*FieldseekerTraplocation: + o.copyMatchingRows(retrieved...) + case FieldseekerTraplocationSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerTraplocation or a slice of FieldseekerTraplocation + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerTraplocations.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerTraplocationSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerTraplocationSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerTraplocations.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerTraplocationSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerTraplocations.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerTraplocationSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerTraplocations.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerTraplocationWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Name psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Habitat psql.WhereNullMod[Q, enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e] + Priority psql.WhereNullMod[Q, enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B] + Usetype psql.WhereNullMod[Q, enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2] + Active psql.WhereNullMod[Q, enums.FieldseekerTraplocationNotinuitFEnum] + Description psql.WhereNullMod[Q, string] + Accessdesc psql.WhereNullMod[Q, enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0] + Comments psql.WhereNullMod[Q, string] + Externalid psql.WhereNullMod[Q, string] + Nextactiondatescheduled psql.WhereNullMod[Q, time.Time] + Zone2 psql.WhereNullMod[Q, string] + Locationnumber psql.WhereNullMod[Q, int32] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Gatewaysync psql.WhereNullMod[Q, int16] + Route psql.WhereNullMod[Q, int32] + SetDow psql.WhereNullMod[Q, int32] + RouteOrder psql.WhereNullMod[Q, int32] + Vectorsurvsiteid psql.WhereNullMod[Q, string] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + H3R7 psql.WhereNullMod[Q, string] + H3R8 psql.WhereNullMod[Q, string] +} + +func (fieldseekerTraplocationWhere[Q]) AliasedAs(alias string) fieldseekerTraplocationWhere[Q] { + return buildFieldseekerTraplocationWhere[Q](buildFieldseekerTraplocationColumns(alias)) +} + +func buildFieldseekerTraplocationWhere[Q psql.Filterable](cols fieldseekerTraplocationColumns) fieldseekerTraplocationWhere[Q] { + return fieldseekerTraplocationWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Name: psql.WhereNull[Q, string](cols.Name), + Zone: psql.WhereNull[Q, string](cols.Zone), + Habitat: psql.WhereNull[Q, enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e](cols.Habitat), + Priority: psql.WhereNull[Q, enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B](cols.Priority), + Usetype: psql.WhereNull[Q, enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2](cols.Usetype), + Active: psql.WhereNull[Q, enums.FieldseekerTraplocationNotinuitFEnum](cols.Active), + Description: psql.WhereNull[Q, string](cols.Description), + Accessdesc: psql.WhereNull[Q, enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0](cols.Accessdesc), + Comments: psql.WhereNull[Q, string](cols.Comments), + Externalid: psql.WhereNull[Q, string](cols.Externalid), + Nextactiondatescheduled: psql.WhereNull[Q, time.Time](cols.Nextactiondatescheduled), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Locationnumber: psql.WhereNull[Q, int32](cols.Locationnumber), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Gatewaysync: psql.WhereNull[Q, int16](cols.Gatewaysync), + Route: psql.WhereNull[Q, int32](cols.Route), + SetDow: psql.WhereNull[Q, int32](cols.SetDow), + RouteOrder: psql.WhereNull[Q, int32](cols.RouteOrder), + Vectorsurvsiteid: psql.WhereNull[Q, string](cols.Vectorsurvsiteid), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + H3R7: psql.WhereNull[Q, string](cols.H3R7), + H3R8: psql.WhereNull[Q, string](cols.H3R8), + } +} diff --git a/db/models/fieldseeker.treatment.bob.go b/db/models/fieldseeker.treatment.bob.go new file mode 100644 index 00000000..b5ef655d --- /dev/null +++ b/db/models/fieldseeker.treatment.bob.go @@ -0,0 +1,1716 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + enums "github.com/Gleipnir-Technology/nidus-sync/db/enums" + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerTreatment is an object representing the database table. +type FieldseekerTreatment struct { + Objectid int64 `db:"objectid,pk" ` + // Activity + Activity null.Val[enums.FieldseekerTreatmentMosquitoactivityEnum] `db:"activity" ` + // Area Treated + Treatarea null.Val[float64] `db:"treatarea" ` + // Area Unit + Areaunit null.Val[enums.FieldseekerTreatmentMosquitoproductareaunitEnum] `db:"areaunit" ` + // Product + Product null.Val[string] `db:"product" ` + // Quantity + Qty null.Val[float64] `db:"qty" ` + // Quantity Unit + Qtyunit null.Val[enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum] `db:"qtyunit" ` + // Method + Method null.Val[enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu] `db:"method" ` + // Equipment Type + Equiptype null.Val[enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f] `db:"equiptype" ` + // Comments + Comments null.Val[string] `db:"comments" ` + // Average Temperature + Avetemp null.Val[float64] `db:"avetemp" ` + // Wind Speed + Windspeed null.Val[float64] `db:"windspeed" ` + // Wind Direction + Winddir null.Val[enums.FieldseekerTreatmentNotinuiwinddirectionEnum] `db:"winddir" ` + // Rain Gauge + Raingauge null.Val[float64] `db:"raingauge" ` + // Start + Startdatetime null.Val[time.Time] `db:"startdatetime" ` + // Finish + Enddatetime null.Val[time.Time] `db:"enddatetime" ` + InspID null.Val[uuid.UUID] `db:"insp_id" ` + // Reviewed + Reviewed null.Val[enums.FieldseekerTreatmentNotinuitFEnum] `db:"reviewed" ` + // Reviewed By + Reviewedby null.Val[string] `db:"reviewedby" ` + // Reviewed Date + Revieweddate null.Val[time.Time] `db:"revieweddate" ` + // Location Name + Locationname null.Val[string] `db:"locationname" ` + // Zone + Zone null.Val[string] `db:"zone" ` + // Warning Override + Warningoverride null.Val[enums.FieldseekerTreatmentNotinuitFEnum] `db:"warningoverride" ` + // RecordStatus + Recordstatus null.Val[int16] `db:"recordstatus" ` + // Zone2 + Zone2 null.Val[string] `db:"zone2" ` + // Treated Acres + Treatacres null.Val[float64] `db:"treatacres" ` + // Tire Count + Tirecount null.Val[int16] `db:"tirecount" ` + // Catch Basin Count + Cbcount null.Val[int16] `db:"cbcount" ` + // Container Count + Containercount null.Val[int16] `db:"containercount" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + // Treatment Length + Treatmentlength null.Val[float64] `db:"treatmentlength" ` + // Treatment Hours + Treatmenthours null.Val[float64] `db:"treatmenthours" ` + // Treatment Length Units + Treatmentlengthunits null.Val[string] `db:"treatmentlengthunits" ` + Linelocid null.Val[uuid.UUID] `db:"linelocid" ` + Pointlocid null.Val[uuid.UUID] `db:"pointlocid" ` + Polygonlocid null.Val[uuid.UUID] `db:"polygonlocid" ` + Srid null.Val[uuid.UUID] `db:"srid" ` + Sdid null.Val[uuid.UUID] `db:"sdid" ` + Barrierrouteid null.Val[uuid.UUID] `db:"barrierrouteid" ` + Ulvrouteid null.Val[uuid.UUID] `db:"ulvrouteid" ` + // Field Tech + Fieldtech null.Val[string] `db:"fieldtech" ` + Ptaid null.Val[uuid.UUID] `db:"ptaid" ` + Flowrate null.Val[float64] `db:"flowrate" ` + // Habitat + Habitat null.Val[enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1] `db:"habitat" ` + // Treat Hectares + Treathectares null.Val[float64] `db:"treathectares" ` + // Inventory Location + Invloc null.Val[string] `db:"invloc" ` + // temp_Conditions + TempSitecond null.Val[enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E] `db:"temp_sitecond" ` + // Conditions + Sitecond null.Val[enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E] `db:"sitecond" ` + // TotalCostProduct + Totalcostprodcut null.Val[float64] `db:"totalcostprodcut" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + // Target Species + Targetspecies null.Val[string] `db:"targetspecies" ` +} + +// FieldseekerTreatmentSlice is an alias for a slice of pointers to FieldseekerTreatment. +// This should almost always be used instead of []*FieldseekerTreatment. +type FieldseekerTreatmentSlice []*FieldseekerTreatment + +// FieldseekerTreatments contains methods to work with the treatment table +var FieldseekerTreatments = psql.NewTablex[*FieldseekerTreatment, FieldseekerTreatmentSlice, *FieldseekerTreatmentSetter]("fieldseeker", "treatment", buildFieldseekerTreatmentColumns("fieldseeker.treatment")) + +// FieldseekerTreatmentsQuery is a query on the treatment table +type FieldseekerTreatmentsQuery = *psql.ViewQuery[*FieldseekerTreatment, FieldseekerTreatmentSlice] + +func buildFieldseekerTreatmentColumns(alias string) fieldseekerTreatmentColumns { + return fieldseekerTreatmentColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "activity", "treatarea", "areaunit", "product", "qty", "qtyunit", "method", "equiptype", "comments", "avetemp", "windspeed", "winddir", "raingauge", "startdatetime", "enddatetime", "insp_id", "reviewed", "reviewedby", "revieweddate", "locationname", "zone", "warningoverride", "recordstatus", "zone2", "treatacres", "tirecount", "cbcount", "containercount", "globalid", "treatmentlength", "treatmenthours", "treatmentlengthunits", "linelocid", "pointlocid", "polygonlocid", "srid", "sdid", "barrierrouteid", "ulvrouteid", "fieldtech", "ptaid", "flowrate", "habitat", "treathectares", "invloc", "temp_sitecond", "sitecond", "totalcostprodcut", "creationdate", "creator", "editdate", "editor", "targetspecies", + ).WithParent("fieldseeker.treatment"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Activity: psql.Quote(alias, "activity"), + Treatarea: psql.Quote(alias, "treatarea"), + Areaunit: psql.Quote(alias, "areaunit"), + Product: psql.Quote(alias, "product"), + Qty: psql.Quote(alias, "qty"), + Qtyunit: psql.Quote(alias, "qtyunit"), + Method: psql.Quote(alias, "method"), + Equiptype: psql.Quote(alias, "equiptype"), + Comments: psql.Quote(alias, "comments"), + Avetemp: psql.Quote(alias, "avetemp"), + Windspeed: psql.Quote(alias, "windspeed"), + Winddir: psql.Quote(alias, "winddir"), + Raingauge: psql.Quote(alias, "raingauge"), + Startdatetime: psql.Quote(alias, "startdatetime"), + Enddatetime: psql.Quote(alias, "enddatetime"), + InspID: psql.Quote(alias, "insp_id"), + Reviewed: psql.Quote(alias, "reviewed"), + Reviewedby: psql.Quote(alias, "reviewedby"), + Revieweddate: psql.Quote(alias, "revieweddate"), + Locationname: psql.Quote(alias, "locationname"), + Zone: psql.Quote(alias, "zone"), + Warningoverride: psql.Quote(alias, "warningoverride"), + Recordstatus: psql.Quote(alias, "recordstatus"), + Zone2: psql.Quote(alias, "zone2"), + Treatacres: psql.Quote(alias, "treatacres"), + Tirecount: psql.Quote(alias, "tirecount"), + Cbcount: psql.Quote(alias, "cbcount"), + Containercount: psql.Quote(alias, "containercount"), + Globalid: psql.Quote(alias, "globalid"), + Treatmentlength: psql.Quote(alias, "treatmentlength"), + Treatmenthours: psql.Quote(alias, "treatmenthours"), + Treatmentlengthunits: psql.Quote(alias, "treatmentlengthunits"), + Linelocid: psql.Quote(alias, "linelocid"), + Pointlocid: psql.Quote(alias, "pointlocid"), + Polygonlocid: psql.Quote(alias, "polygonlocid"), + Srid: psql.Quote(alias, "srid"), + Sdid: psql.Quote(alias, "sdid"), + Barrierrouteid: psql.Quote(alias, "barrierrouteid"), + Ulvrouteid: psql.Quote(alias, "ulvrouteid"), + Fieldtech: psql.Quote(alias, "fieldtech"), + Ptaid: psql.Quote(alias, "ptaid"), + Flowrate: psql.Quote(alias, "flowrate"), + Habitat: psql.Quote(alias, "habitat"), + Treathectares: psql.Quote(alias, "treathectares"), + Invloc: psql.Quote(alias, "invloc"), + TempSitecond: psql.Quote(alias, "temp_sitecond"), + Sitecond: psql.Quote(alias, "sitecond"), + Totalcostprodcut: psql.Quote(alias, "totalcostprodcut"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + Targetspecies: psql.Quote(alias, "targetspecies"), + } +} + +type fieldseekerTreatmentColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Activity psql.Expression + Treatarea psql.Expression + Areaunit psql.Expression + Product psql.Expression + Qty psql.Expression + Qtyunit psql.Expression + Method psql.Expression + Equiptype psql.Expression + Comments psql.Expression + Avetemp psql.Expression + Windspeed psql.Expression + Winddir psql.Expression + Raingauge psql.Expression + Startdatetime psql.Expression + Enddatetime psql.Expression + InspID psql.Expression + Reviewed psql.Expression + Reviewedby psql.Expression + Revieweddate psql.Expression + Locationname psql.Expression + Zone psql.Expression + Warningoverride psql.Expression + Recordstatus psql.Expression + Zone2 psql.Expression + Treatacres psql.Expression + Tirecount psql.Expression + Cbcount psql.Expression + Containercount psql.Expression + Globalid psql.Expression + Treatmentlength psql.Expression + Treatmenthours psql.Expression + Treatmentlengthunits psql.Expression + Linelocid psql.Expression + Pointlocid psql.Expression + Polygonlocid psql.Expression + Srid psql.Expression + Sdid psql.Expression + Barrierrouteid psql.Expression + Ulvrouteid psql.Expression + Fieldtech psql.Expression + Ptaid psql.Expression + Flowrate psql.Expression + Habitat psql.Expression + Treathectares psql.Expression + Invloc psql.Expression + TempSitecond psql.Expression + Sitecond psql.Expression + Totalcostprodcut psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + Targetspecies psql.Expression +} + +func (c fieldseekerTreatmentColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerTreatmentColumns) AliasedAs(alias string) fieldseekerTreatmentColumns { + return buildFieldseekerTreatmentColumns(alias) +} + +// FieldseekerTreatmentSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerTreatmentSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Activity omitnull.Val[enums.FieldseekerTreatmentMosquitoactivityEnum] `db:"activity" ` + Treatarea omitnull.Val[float64] `db:"treatarea" ` + Areaunit omitnull.Val[enums.FieldseekerTreatmentMosquitoproductareaunitEnum] `db:"areaunit" ` + Product omitnull.Val[string] `db:"product" ` + Qty omitnull.Val[float64] `db:"qty" ` + Qtyunit omitnull.Val[enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum] `db:"qtyunit" ` + Method omitnull.Val[enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu] `db:"method" ` + Equiptype omitnull.Val[enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f] `db:"equiptype" ` + Comments omitnull.Val[string] `db:"comments" ` + Avetemp omitnull.Val[float64] `db:"avetemp" ` + Windspeed omitnull.Val[float64] `db:"windspeed" ` + Winddir omitnull.Val[enums.FieldseekerTreatmentNotinuiwinddirectionEnum] `db:"winddir" ` + Raingauge omitnull.Val[float64] `db:"raingauge" ` + Startdatetime omitnull.Val[time.Time] `db:"startdatetime" ` + Enddatetime omitnull.Val[time.Time] `db:"enddatetime" ` + InspID omitnull.Val[uuid.UUID] `db:"insp_id" ` + Reviewed omitnull.Val[enums.FieldseekerTreatmentNotinuitFEnum] `db:"reviewed" ` + Reviewedby omitnull.Val[string] `db:"reviewedby" ` + Revieweddate omitnull.Val[time.Time] `db:"revieweddate" ` + Locationname omitnull.Val[string] `db:"locationname" ` + Zone omitnull.Val[string] `db:"zone" ` + Warningoverride omitnull.Val[enums.FieldseekerTreatmentNotinuitFEnum] `db:"warningoverride" ` + Recordstatus omitnull.Val[int16] `db:"recordstatus" ` + Zone2 omitnull.Val[string] `db:"zone2" ` + Treatacres omitnull.Val[float64] `db:"treatacres" ` + Tirecount omitnull.Val[int16] `db:"tirecount" ` + Cbcount omitnull.Val[int16] `db:"cbcount" ` + Containercount omitnull.Val[int16] `db:"containercount" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + Treatmentlength omitnull.Val[float64] `db:"treatmentlength" ` + Treatmenthours omitnull.Val[float64] `db:"treatmenthours" ` + Treatmentlengthunits omitnull.Val[string] `db:"treatmentlengthunits" ` + Linelocid omitnull.Val[uuid.UUID] `db:"linelocid" ` + Pointlocid omitnull.Val[uuid.UUID] `db:"pointlocid" ` + Polygonlocid omitnull.Val[uuid.UUID] `db:"polygonlocid" ` + Srid omitnull.Val[uuid.UUID] `db:"srid" ` + Sdid omitnull.Val[uuid.UUID] `db:"sdid" ` + Barrierrouteid omitnull.Val[uuid.UUID] `db:"barrierrouteid" ` + Ulvrouteid omitnull.Val[uuid.UUID] `db:"ulvrouteid" ` + Fieldtech omitnull.Val[string] `db:"fieldtech" ` + Ptaid omitnull.Val[uuid.UUID] `db:"ptaid" ` + Flowrate omitnull.Val[float64] `db:"flowrate" ` + Habitat omitnull.Val[enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1] `db:"habitat" ` + Treathectares omitnull.Val[float64] `db:"treathectares" ` + Invloc omitnull.Val[string] `db:"invloc" ` + TempSitecond omitnull.Val[enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E] `db:"temp_sitecond" ` + Sitecond omitnull.Val[enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E] `db:"sitecond" ` + Totalcostprodcut omitnull.Val[float64] `db:"totalcostprodcut" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + Targetspecies omitnull.Val[string] `db:"targetspecies" ` +} + +func (s FieldseekerTreatmentSetter) SetColumns() []string { + vals := make([]string, 0, 54) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Activity.IsUnset() { + vals = append(vals, "activity") + } + if !s.Treatarea.IsUnset() { + vals = append(vals, "treatarea") + } + if !s.Areaunit.IsUnset() { + vals = append(vals, "areaunit") + } + if !s.Product.IsUnset() { + vals = append(vals, "product") + } + if !s.Qty.IsUnset() { + vals = append(vals, "qty") + } + if !s.Qtyunit.IsUnset() { + vals = append(vals, "qtyunit") + } + if !s.Method.IsUnset() { + vals = append(vals, "method") + } + if !s.Equiptype.IsUnset() { + vals = append(vals, "equiptype") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Avetemp.IsUnset() { + vals = append(vals, "avetemp") + } + if !s.Windspeed.IsUnset() { + vals = append(vals, "windspeed") + } + if !s.Winddir.IsUnset() { + vals = append(vals, "winddir") + } + if !s.Raingauge.IsUnset() { + vals = append(vals, "raingauge") + } + if !s.Startdatetime.IsUnset() { + vals = append(vals, "startdatetime") + } + if !s.Enddatetime.IsUnset() { + vals = append(vals, "enddatetime") + } + if !s.InspID.IsUnset() { + vals = append(vals, "insp_id") + } + if !s.Reviewed.IsUnset() { + vals = append(vals, "reviewed") + } + if !s.Reviewedby.IsUnset() { + vals = append(vals, "reviewedby") + } + if !s.Revieweddate.IsUnset() { + vals = append(vals, "revieweddate") + } + if !s.Locationname.IsUnset() { + vals = append(vals, "locationname") + } + if !s.Zone.IsUnset() { + vals = append(vals, "zone") + } + if !s.Warningoverride.IsUnset() { + vals = append(vals, "warningoverride") + } + if !s.Recordstatus.IsUnset() { + vals = append(vals, "recordstatus") + } + if !s.Zone2.IsUnset() { + vals = append(vals, "zone2") + } + if !s.Treatacres.IsUnset() { + vals = append(vals, "treatacres") + } + if !s.Tirecount.IsUnset() { + vals = append(vals, "tirecount") + } + if !s.Cbcount.IsUnset() { + vals = append(vals, "cbcount") + } + if !s.Containercount.IsUnset() { + vals = append(vals, "containercount") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.Treatmentlength.IsUnset() { + vals = append(vals, "treatmentlength") + } + if !s.Treatmenthours.IsUnset() { + vals = append(vals, "treatmenthours") + } + if !s.Treatmentlengthunits.IsUnset() { + vals = append(vals, "treatmentlengthunits") + } + if !s.Linelocid.IsUnset() { + vals = append(vals, "linelocid") + } + if !s.Pointlocid.IsUnset() { + vals = append(vals, "pointlocid") + } + if !s.Polygonlocid.IsUnset() { + vals = append(vals, "polygonlocid") + } + if !s.Srid.IsUnset() { + vals = append(vals, "srid") + } + if !s.Sdid.IsUnset() { + vals = append(vals, "sdid") + } + if !s.Barrierrouteid.IsUnset() { + vals = append(vals, "barrierrouteid") + } + if !s.Ulvrouteid.IsUnset() { + vals = append(vals, "ulvrouteid") + } + if !s.Fieldtech.IsUnset() { + vals = append(vals, "fieldtech") + } + if !s.Ptaid.IsUnset() { + vals = append(vals, "ptaid") + } + if !s.Flowrate.IsUnset() { + vals = append(vals, "flowrate") + } + if !s.Habitat.IsUnset() { + vals = append(vals, "habitat") + } + if !s.Treathectares.IsUnset() { + vals = append(vals, "treathectares") + } + if !s.Invloc.IsUnset() { + vals = append(vals, "invloc") + } + if !s.TempSitecond.IsUnset() { + vals = append(vals, "temp_sitecond") + } + if !s.Sitecond.IsUnset() { + vals = append(vals, "sitecond") + } + if !s.Totalcostprodcut.IsUnset() { + vals = append(vals, "totalcostprodcut") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.Targetspecies.IsUnset() { + vals = append(vals, "targetspecies") + } + return vals +} + +func (s FieldseekerTreatmentSetter) Overwrite(t *FieldseekerTreatment) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Activity.IsUnset() { + t.Activity = s.Activity.MustGetNull() + } + if !s.Treatarea.IsUnset() { + t.Treatarea = s.Treatarea.MustGetNull() + } + if !s.Areaunit.IsUnset() { + t.Areaunit = s.Areaunit.MustGetNull() + } + if !s.Product.IsUnset() { + t.Product = s.Product.MustGetNull() + } + if !s.Qty.IsUnset() { + t.Qty = s.Qty.MustGetNull() + } + if !s.Qtyunit.IsUnset() { + t.Qtyunit = s.Qtyunit.MustGetNull() + } + if !s.Method.IsUnset() { + t.Method = s.Method.MustGetNull() + } + if !s.Equiptype.IsUnset() { + t.Equiptype = s.Equiptype.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Avetemp.IsUnset() { + t.Avetemp = s.Avetemp.MustGetNull() + } + if !s.Windspeed.IsUnset() { + t.Windspeed = s.Windspeed.MustGetNull() + } + if !s.Winddir.IsUnset() { + t.Winddir = s.Winddir.MustGetNull() + } + if !s.Raingauge.IsUnset() { + t.Raingauge = s.Raingauge.MustGetNull() + } + if !s.Startdatetime.IsUnset() { + t.Startdatetime = s.Startdatetime.MustGetNull() + } + if !s.Enddatetime.IsUnset() { + t.Enddatetime = s.Enddatetime.MustGetNull() + } + if !s.InspID.IsUnset() { + t.InspID = s.InspID.MustGetNull() + } + if !s.Reviewed.IsUnset() { + t.Reviewed = s.Reviewed.MustGetNull() + } + if !s.Reviewedby.IsUnset() { + t.Reviewedby = s.Reviewedby.MustGetNull() + } + if !s.Revieweddate.IsUnset() { + t.Revieweddate = s.Revieweddate.MustGetNull() + } + if !s.Locationname.IsUnset() { + t.Locationname = s.Locationname.MustGetNull() + } + if !s.Zone.IsUnset() { + t.Zone = s.Zone.MustGetNull() + } + if !s.Warningoverride.IsUnset() { + t.Warningoverride = s.Warningoverride.MustGetNull() + } + if !s.Recordstatus.IsUnset() { + t.Recordstatus = s.Recordstatus.MustGetNull() + } + if !s.Zone2.IsUnset() { + t.Zone2 = s.Zone2.MustGetNull() + } + if !s.Treatacres.IsUnset() { + t.Treatacres = s.Treatacres.MustGetNull() + } + if !s.Tirecount.IsUnset() { + t.Tirecount = s.Tirecount.MustGetNull() + } + if !s.Cbcount.IsUnset() { + t.Cbcount = s.Cbcount.MustGetNull() + } + if !s.Containercount.IsUnset() { + t.Containercount = s.Containercount.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.Treatmentlength.IsUnset() { + t.Treatmentlength = s.Treatmentlength.MustGetNull() + } + if !s.Treatmenthours.IsUnset() { + t.Treatmenthours = s.Treatmenthours.MustGetNull() + } + if !s.Treatmentlengthunits.IsUnset() { + t.Treatmentlengthunits = s.Treatmentlengthunits.MustGetNull() + } + if !s.Linelocid.IsUnset() { + t.Linelocid = s.Linelocid.MustGetNull() + } + if !s.Pointlocid.IsUnset() { + t.Pointlocid = s.Pointlocid.MustGetNull() + } + if !s.Polygonlocid.IsUnset() { + t.Polygonlocid = s.Polygonlocid.MustGetNull() + } + if !s.Srid.IsUnset() { + t.Srid = s.Srid.MustGetNull() + } + if !s.Sdid.IsUnset() { + t.Sdid = s.Sdid.MustGetNull() + } + if !s.Barrierrouteid.IsUnset() { + t.Barrierrouteid = s.Barrierrouteid.MustGetNull() + } + if !s.Ulvrouteid.IsUnset() { + t.Ulvrouteid = s.Ulvrouteid.MustGetNull() + } + if !s.Fieldtech.IsUnset() { + t.Fieldtech = s.Fieldtech.MustGetNull() + } + if !s.Ptaid.IsUnset() { + t.Ptaid = s.Ptaid.MustGetNull() + } + if !s.Flowrate.IsUnset() { + t.Flowrate = s.Flowrate.MustGetNull() + } + if !s.Habitat.IsUnset() { + t.Habitat = s.Habitat.MustGetNull() + } + if !s.Treathectares.IsUnset() { + t.Treathectares = s.Treathectares.MustGetNull() + } + if !s.Invloc.IsUnset() { + t.Invloc = s.Invloc.MustGetNull() + } + if !s.TempSitecond.IsUnset() { + t.TempSitecond = s.TempSitecond.MustGetNull() + } + if !s.Sitecond.IsUnset() { + t.Sitecond = s.Sitecond.MustGetNull() + } + if !s.Totalcostprodcut.IsUnset() { + t.Totalcostprodcut = s.Totalcostprodcut.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.Targetspecies.IsUnset() { + t.Targetspecies = s.Targetspecies.MustGetNull() + } +} + +func (s *FieldseekerTreatmentSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTreatments.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 54) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Activity.IsUnset() { + vals[1] = psql.Arg(s.Activity.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Treatarea.IsUnset() { + vals[2] = psql.Arg(s.Treatarea.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Areaunit.IsUnset() { + vals[3] = psql.Arg(s.Areaunit.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Product.IsUnset() { + vals[4] = psql.Arg(s.Product.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Qty.IsUnset() { + vals[5] = psql.Arg(s.Qty.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.Qtyunit.IsUnset() { + vals[6] = psql.Arg(s.Qtyunit.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Method.IsUnset() { + vals[7] = psql.Arg(s.Method.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Equiptype.IsUnset() { + vals[8] = psql.Arg(s.Equiptype.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[9] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Avetemp.IsUnset() { + vals[10] = psql.Arg(s.Avetemp.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Windspeed.IsUnset() { + vals[11] = psql.Arg(s.Windspeed.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Winddir.IsUnset() { + vals[12] = psql.Arg(s.Winddir.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Raingauge.IsUnset() { + vals[13] = psql.Arg(s.Raingauge.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Startdatetime.IsUnset() { + vals[14] = psql.Arg(s.Startdatetime.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Enddatetime.IsUnset() { + vals[15] = psql.Arg(s.Enddatetime.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.InspID.IsUnset() { + vals[16] = psql.Arg(s.InspID.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.Reviewed.IsUnset() { + vals[17] = psql.Arg(s.Reviewed.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + if !s.Reviewedby.IsUnset() { + vals[18] = psql.Arg(s.Reviewedby.MustGetNull()) + } else { + vals[18] = psql.Raw("DEFAULT") + } + + if !s.Revieweddate.IsUnset() { + vals[19] = psql.Arg(s.Revieweddate.MustGetNull()) + } else { + vals[19] = psql.Raw("DEFAULT") + } + + if !s.Locationname.IsUnset() { + vals[20] = psql.Arg(s.Locationname.MustGetNull()) + } else { + vals[20] = psql.Raw("DEFAULT") + } + + if !s.Zone.IsUnset() { + vals[21] = psql.Arg(s.Zone.MustGetNull()) + } else { + vals[21] = psql.Raw("DEFAULT") + } + + if !s.Warningoverride.IsUnset() { + vals[22] = psql.Arg(s.Warningoverride.MustGetNull()) + } else { + vals[22] = psql.Raw("DEFAULT") + } + + if !s.Recordstatus.IsUnset() { + vals[23] = psql.Arg(s.Recordstatus.MustGetNull()) + } else { + vals[23] = psql.Raw("DEFAULT") + } + + if !s.Zone2.IsUnset() { + vals[24] = psql.Arg(s.Zone2.MustGetNull()) + } else { + vals[24] = psql.Raw("DEFAULT") + } + + if !s.Treatacres.IsUnset() { + vals[25] = psql.Arg(s.Treatacres.MustGetNull()) + } else { + vals[25] = psql.Raw("DEFAULT") + } + + if !s.Tirecount.IsUnset() { + vals[26] = psql.Arg(s.Tirecount.MustGetNull()) + } else { + vals[26] = psql.Raw("DEFAULT") + } + + if !s.Cbcount.IsUnset() { + vals[27] = psql.Arg(s.Cbcount.MustGetNull()) + } else { + vals[27] = psql.Raw("DEFAULT") + } + + if !s.Containercount.IsUnset() { + vals[28] = psql.Arg(s.Containercount.MustGetNull()) + } else { + vals[28] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[29] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[29] = psql.Raw("DEFAULT") + } + + if !s.Treatmentlength.IsUnset() { + vals[30] = psql.Arg(s.Treatmentlength.MustGetNull()) + } else { + vals[30] = psql.Raw("DEFAULT") + } + + if !s.Treatmenthours.IsUnset() { + vals[31] = psql.Arg(s.Treatmenthours.MustGetNull()) + } else { + vals[31] = psql.Raw("DEFAULT") + } + + if !s.Treatmentlengthunits.IsUnset() { + vals[32] = psql.Arg(s.Treatmentlengthunits.MustGetNull()) + } else { + vals[32] = psql.Raw("DEFAULT") + } + + if !s.Linelocid.IsUnset() { + vals[33] = psql.Arg(s.Linelocid.MustGetNull()) + } else { + vals[33] = psql.Raw("DEFAULT") + } + + if !s.Pointlocid.IsUnset() { + vals[34] = psql.Arg(s.Pointlocid.MustGetNull()) + } else { + vals[34] = psql.Raw("DEFAULT") + } + + if !s.Polygonlocid.IsUnset() { + vals[35] = psql.Arg(s.Polygonlocid.MustGetNull()) + } else { + vals[35] = psql.Raw("DEFAULT") + } + + if !s.Srid.IsUnset() { + vals[36] = psql.Arg(s.Srid.MustGetNull()) + } else { + vals[36] = psql.Raw("DEFAULT") + } + + if !s.Sdid.IsUnset() { + vals[37] = psql.Arg(s.Sdid.MustGetNull()) + } else { + vals[37] = psql.Raw("DEFAULT") + } + + if !s.Barrierrouteid.IsUnset() { + vals[38] = psql.Arg(s.Barrierrouteid.MustGetNull()) + } else { + vals[38] = psql.Raw("DEFAULT") + } + + if !s.Ulvrouteid.IsUnset() { + vals[39] = psql.Arg(s.Ulvrouteid.MustGetNull()) + } else { + vals[39] = psql.Raw("DEFAULT") + } + + if !s.Fieldtech.IsUnset() { + vals[40] = psql.Arg(s.Fieldtech.MustGetNull()) + } else { + vals[40] = psql.Raw("DEFAULT") + } + + if !s.Ptaid.IsUnset() { + vals[41] = psql.Arg(s.Ptaid.MustGetNull()) + } else { + vals[41] = psql.Raw("DEFAULT") + } + + if !s.Flowrate.IsUnset() { + vals[42] = psql.Arg(s.Flowrate.MustGetNull()) + } else { + vals[42] = psql.Raw("DEFAULT") + } + + if !s.Habitat.IsUnset() { + vals[43] = psql.Arg(s.Habitat.MustGetNull()) + } else { + vals[43] = psql.Raw("DEFAULT") + } + + if !s.Treathectares.IsUnset() { + vals[44] = psql.Arg(s.Treathectares.MustGetNull()) + } else { + vals[44] = psql.Raw("DEFAULT") + } + + if !s.Invloc.IsUnset() { + vals[45] = psql.Arg(s.Invloc.MustGetNull()) + } else { + vals[45] = psql.Raw("DEFAULT") + } + + if !s.TempSitecond.IsUnset() { + vals[46] = psql.Arg(s.TempSitecond.MustGetNull()) + } else { + vals[46] = psql.Raw("DEFAULT") + } + + if !s.Sitecond.IsUnset() { + vals[47] = psql.Arg(s.Sitecond.MustGetNull()) + } else { + vals[47] = psql.Raw("DEFAULT") + } + + if !s.Totalcostprodcut.IsUnset() { + vals[48] = psql.Arg(s.Totalcostprodcut.MustGetNull()) + } else { + vals[48] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[49] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[49] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[50] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[50] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[51] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[51] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[52] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[52] = psql.Raw("DEFAULT") + } + + if !s.Targetspecies.IsUnset() { + vals[53] = psql.Arg(s.Targetspecies.MustGetNull()) + } else { + vals[53] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerTreatmentSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerTreatmentSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 54) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Activity.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "activity")...), + psql.Arg(s.Activity), + }}) + } + + if !s.Treatarea.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "treatarea")...), + psql.Arg(s.Treatarea), + }}) + } + + if !s.Areaunit.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "areaunit")...), + psql.Arg(s.Areaunit), + }}) + } + + if !s.Product.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "product")...), + psql.Arg(s.Product), + }}) + } + + if !s.Qty.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "qty")...), + psql.Arg(s.Qty), + }}) + } + + if !s.Qtyunit.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "qtyunit")...), + psql.Arg(s.Qtyunit), + }}) + } + + if !s.Method.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "method")...), + psql.Arg(s.Method), + }}) + } + + if !s.Equiptype.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "equiptype")...), + psql.Arg(s.Equiptype), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Avetemp.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "avetemp")...), + psql.Arg(s.Avetemp), + }}) + } + + if !s.Windspeed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "windspeed")...), + psql.Arg(s.Windspeed), + }}) + } + + if !s.Winddir.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "winddir")...), + psql.Arg(s.Winddir), + }}) + } + + if !s.Raingauge.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "raingauge")...), + psql.Arg(s.Raingauge), + }}) + } + + if !s.Startdatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "startdatetime")...), + psql.Arg(s.Startdatetime), + }}) + } + + if !s.Enddatetime.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "enddatetime")...), + psql.Arg(s.Enddatetime), + }}) + } + + if !s.InspID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "insp_id")...), + psql.Arg(s.InspID), + }}) + } + + if !s.Reviewed.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewed")...), + psql.Arg(s.Reviewed), + }}) + } + + if !s.Reviewedby.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "reviewedby")...), + psql.Arg(s.Reviewedby), + }}) + } + + if !s.Revieweddate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "revieweddate")...), + psql.Arg(s.Revieweddate), + }}) + } + + if !s.Locationname.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "locationname")...), + psql.Arg(s.Locationname), + }}) + } + + if !s.Zone.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone")...), + psql.Arg(s.Zone), + }}) + } + + if !s.Warningoverride.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "warningoverride")...), + psql.Arg(s.Warningoverride), + }}) + } + + if !s.Recordstatus.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "recordstatus")...), + psql.Arg(s.Recordstatus), + }}) + } + + if !s.Zone2.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "zone2")...), + psql.Arg(s.Zone2), + }}) + } + + if !s.Treatacres.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "treatacres")...), + psql.Arg(s.Treatacres), + }}) + } + + if !s.Tirecount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "tirecount")...), + psql.Arg(s.Tirecount), + }}) + } + + if !s.Cbcount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "cbcount")...), + psql.Arg(s.Cbcount), + }}) + } + + if !s.Containercount.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "containercount")...), + psql.Arg(s.Containercount), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.Treatmentlength.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "treatmentlength")...), + psql.Arg(s.Treatmentlength), + }}) + } + + if !s.Treatmenthours.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "treatmenthours")...), + psql.Arg(s.Treatmenthours), + }}) + } + + if !s.Treatmentlengthunits.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "treatmentlengthunits")...), + psql.Arg(s.Treatmentlengthunits), + }}) + } + + if !s.Linelocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "linelocid")...), + psql.Arg(s.Linelocid), + }}) + } + + if !s.Pointlocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "pointlocid")...), + psql.Arg(s.Pointlocid), + }}) + } + + if !s.Polygonlocid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "polygonlocid")...), + psql.Arg(s.Polygonlocid), + }}) + } + + if !s.Srid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "srid")...), + psql.Arg(s.Srid), + }}) + } + + if !s.Sdid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sdid")...), + psql.Arg(s.Sdid), + }}) + } + + if !s.Barrierrouteid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "barrierrouteid")...), + psql.Arg(s.Barrierrouteid), + }}) + } + + if !s.Ulvrouteid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "ulvrouteid")...), + psql.Arg(s.Ulvrouteid), + }}) + } + + if !s.Fieldtech.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "fieldtech")...), + psql.Arg(s.Fieldtech), + }}) + } + + if !s.Ptaid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "ptaid")...), + psql.Arg(s.Ptaid), + }}) + } + + if !s.Flowrate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "flowrate")...), + psql.Arg(s.Flowrate), + }}) + } + + if !s.Habitat.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "habitat")...), + psql.Arg(s.Habitat), + }}) + } + + if !s.Treathectares.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "treathectares")...), + psql.Arg(s.Treathectares), + }}) + } + + if !s.Invloc.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "invloc")...), + psql.Arg(s.Invloc), + }}) + } + + if !s.TempSitecond.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "temp_sitecond")...), + psql.Arg(s.TempSitecond), + }}) + } + + if !s.Sitecond.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "sitecond")...), + psql.Arg(s.Sitecond), + }}) + } + + if !s.Totalcostprodcut.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "totalcostprodcut")...), + psql.Arg(s.Totalcostprodcut), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.Targetspecies.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "targetspecies")...), + psql.Arg(s.Targetspecies), + }}) + } + + return exprs +} + +// FindFieldseekerTreatment retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerTreatment(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerTreatment, error) { + if len(cols) == 0 { + return FieldseekerTreatments.Query( + sm.Where(FieldseekerTreatments.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerTreatments.Query( + sm.Where(FieldseekerTreatments.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerTreatments.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerTreatmentExists checks the presence of a single record by primary key +func FieldseekerTreatmentExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerTreatments.Query( + sm.Where(FieldseekerTreatments.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerTreatment is retrieved from the database +func (o *FieldseekerTreatment) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTreatments.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerTreatmentSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerTreatments.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerTreatmentSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerTreatments.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerTreatmentSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerTreatments.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerTreatmentSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerTreatment +func (o *FieldseekerTreatment) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerTreatment) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.treatment", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerTreatment +func (o *FieldseekerTreatment) Update(ctx context.Context, exec bob.Executor, s *FieldseekerTreatmentSetter) error { + v, err := FieldseekerTreatments.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerTreatment record with an executor +func (o *FieldseekerTreatment) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerTreatments.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerTreatment using the executor +func (o *FieldseekerTreatment) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerTreatments.Query( + sm.Where(FieldseekerTreatments.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerTreatmentSlice is retrieved from the database +func (o FieldseekerTreatmentSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTreatments.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerTreatments.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerTreatments.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerTreatments.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerTreatmentSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.treatment", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerTreatmentSlice) copyMatchingRows(from ...*FieldseekerTreatment) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerTreatmentSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTreatments.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerTreatment: + o.copyMatchingRows(retrieved) + case []*FieldseekerTreatment: + o.copyMatchingRows(retrieved...) + case FieldseekerTreatmentSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerTreatment or a slice of FieldseekerTreatment + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerTreatments.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerTreatmentSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTreatments.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerTreatment: + o.copyMatchingRows(retrieved) + case []*FieldseekerTreatment: + o.copyMatchingRows(retrieved...) + case FieldseekerTreatmentSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerTreatment or a slice of FieldseekerTreatment + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerTreatments.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerTreatmentSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerTreatmentSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerTreatments.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerTreatmentSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerTreatments.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerTreatmentSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerTreatments.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerTreatmentWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Activity psql.WhereNullMod[Q, enums.FieldseekerTreatmentMosquitoactivityEnum] + Treatarea psql.WhereNullMod[Q, float64] + Areaunit psql.WhereNullMod[Q, enums.FieldseekerTreatmentMosquitoproductareaunitEnum] + Product psql.WhereNullMod[Q, string] + Qty psql.WhereNullMod[Q, float64] + Qtyunit psql.WhereNullMod[Q, enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum] + Method psql.WhereNullMod[Q, enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu] + Equiptype psql.WhereNullMod[Q, enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f] + Comments psql.WhereNullMod[Q, string] + Avetemp psql.WhereNullMod[Q, float64] + Windspeed psql.WhereNullMod[Q, float64] + Winddir psql.WhereNullMod[Q, enums.FieldseekerTreatmentNotinuiwinddirectionEnum] + Raingauge psql.WhereNullMod[Q, float64] + Startdatetime psql.WhereNullMod[Q, time.Time] + Enddatetime psql.WhereNullMod[Q, time.Time] + InspID psql.WhereNullMod[Q, uuid.UUID] + Reviewed psql.WhereNullMod[Q, enums.FieldseekerTreatmentNotinuitFEnum] + Reviewedby psql.WhereNullMod[Q, string] + Revieweddate psql.WhereNullMod[Q, time.Time] + Locationname psql.WhereNullMod[Q, string] + Zone psql.WhereNullMod[Q, string] + Warningoverride psql.WhereNullMod[Q, enums.FieldseekerTreatmentNotinuitFEnum] + Recordstatus psql.WhereNullMod[Q, int16] + Zone2 psql.WhereNullMod[Q, string] + Treatacres psql.WhereNullMod[Q, float64] + Tirecount psql.WhereNullMod[Q, int16] + Cbcount psql.WhereNullMod[Q, int16] + Containercount psql.WhereNullMod[Q, int16] + Globalid psql.WhereNullMod[Q, uuid.UUID] + Treatmentlength psql.WhereNullMod[Q, float64] + Treatmenthours psql.WhereNullMod[Q, float64] + Treatmentlengthunits psql.WhereNullMod[Q, string] + Linelocid psql.WhereNullMod[Q, uuid.UUID] + Pointlocid psql.WhereNullMod[Q, uuid.UUID] + Polygonlocid psql.WhereNullMod[Q, uuid.UUID] + Srid psql.WhereNullMod[Q, uuid.UUID] + Sdid psql.WhereNullMod[Q, uuid.UUID] + Barrierrouteid psql.WhereNullMod[Q, uuid.UUID] + Ulvrouteid psql.WhereNullMod[Q, uuid.UUID] + Fieldtech psql.WhereNullMod[Q, string] + Ptaid psql.WhereNullMod[Q, uuid.UUID] + Flowrate psql.WhereNullMod[Q, float64] + Habitat psql.WhereNullMod[Q, enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1] + Treathectares psql.WhereNullMod[Q, float64] + Invloc psql.WhereNullMod[Q, string] + TempSitecond psql.WhereNullMod[Q, enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E] + Sitecond psql.WhereNullMod[Q, enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E] + Totalcostprodcut psql.WhereNullMod[Q, float64] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + Targetspecies psql.WhereNullMod[Q, string] +} + +func (fieldseekerTreatmentWhere[Q]) AliasedAs(alias string) fieldseekerTreatmentWhere[Q] { + return buildFieldseekerTreatmentWhere[Q](buildFieldseekerTreatmentColumns(alias)) +} + +func buildFieldseekerTreatmentWhere[Q psql.Filterable](cols fieldseekerTreatmentColumns) fieldseekerTreatmentWhere[Q] { + return fieldseekerTreatmentWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Activity: psql.WhereNull[Q, enums.FieldseekerTreatmentMosquitoactivityEnum](cols.Activity), + Treatarea: psql.WhereNull[Q, float64](cols.Treatarea), + Areaunit: psql.WhereNull[Q, enums.FieldseekerTreatmentMosquitoproductareaunitEnum](cols.Areaunit), + Product: psql.WhereNull[Q, string](cols.Product), + Qty: psql.WhereNull[Q, float64](cols.Qty), + Qtyunit: psql.WhereNull[Q, enums.FieldseekerTreatmentMosquitoproductmeasureunitEnum](cols.Qtyunit), + Method: psql.WhereNull[Q, enums.FieldseekerTreatmentTreatmentMethodD558ca3ccf43440c8160758253967621Enu](cols.Method), + Equiptype: psql.WhereNull[Q, enums.FieldseekerTreatmentTreatmentEquiptype45694D79FF2142CCBe4fA0d1def4f](cols.Equiptype), + Comments: psql.WhereNull[Q, string](cols.Comments), + Avetemp: psql.WhereNull[Q, float64](cols.Avetemp), + Windspeed: psql.WhereNull[Q, float64](cols.Windspeed), + Winddir: psql.WhereNull[Q, enums.FieldseekerTreatmentNotinuiwinddirectionEnum](cols.Winddir), + Raingauge: psql.WhereNull[Q, float64](cols.Raingauge), + Startdatetime: psql.WhereNull[Q, time.Time](cols.Startdatetime), + Enddatetime: psql.WhereNull[Q, time.Time](cols.Enddatetime), + InspID: psql.WhereNull[Q, uuid.UUID](cols.InspID), + Reviewed: psql.WhereNull[Q, enums.FieldseekerTreatmentNotinuitFEnum](cols.Reviewed), + Reviewedby: psql.WhereNull[Q, string](cols.Reviewedby), + Revieweddate: psql.WhereNull[Q, time.Time](cols.Revieweddate), + Locationname: psql.WhereNull[Q, string](cols.Locationname), + Zone: psql.WhereNull[Q, string](cols.Zone), + Warningoverride: psql.WhereNull[Q, enums.FieldseekerTreatmentNotinuitFEnum](cols.Warningoverride), + Recordstatus: psql.WhereNull[Q, int16](cols.Recordstatus), + Zone2: psql.WhereNull[Q, string](cols.Zone2), + Treatacres: psql.WhereNull[Q, float64](cols.Treatacres), + Tirecount: psql.WhereNull[Q, int16](cols.Tirecount), + Cbcount: psql.WhereNull[Q, int16](cols.Cbcount), + Containercount: psql.WhereNull[Q, int16](cols.Containercount), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + Treatmentlength: psql.WhereNull[Q, float64](cols.Treatmentlength), + Treatmenthours: psql.WhereNull[Q, float64](cols.Treatmenthours), + Treatmentlengthunits: psql.WhereNull[Q, string](cols.Treatmentlengthunits), + Linelocid: psql.WhereNull[Q, uuid.UUID](cols.Linelocid), + Pointlocid: psql.WhereNull[Q, uuid.UUID](cols.Pointlocid), + Polygonlocid: psql.WhereNull[Q, uuid.UUID](cols.Polygonlocid), + Srid: psql.WhereNull[Q, uuid.UUID](cols.Srid), + Sdid: psql.WhereNull[Q, uuid.UUID](cols.Sdid), + Barrierrouteid: psql.WhereNull[Q, uuid.UUID](cols.Barrierrouteid), + Ulvrouteid: psql.WhereNull[Q, uuid.UUID](cols.Ulvrouteid), + Fieldtech: psql.WhereNull[Q, string](cols.Fieldtech), + Ptaid: psql.WhereNull[Q, uuid.UUID](cols.Ptaid), + Flowrate: psql.WhereNull[Q, float64](cols.Flowrate), + Habitat: psql.WhereNull[Q, enums.FieldseekerTreatmentTreatmentHabitat0afee7ebF9ea47078483Cccfe60f0d1](cols.Habitat), + Treathectares: psql.WhereNull[Q, float64](cols.Treathectares), + Invloc: psql.WhereNull[Q, string](cols.Invloc), + TempSitecond: psql.WhereNull[Q, enums.FieldseekerTreatmentTreatmentSitecondF812e1f64dcb4dc9a75da9d00abe6169E](cols.TempSitecond), + Sitecond: psql.WhereNull[Q, enums.FieldseekerTreatmentTreatmentSitecond5a15bf36fa124280b961f31cd1a9b571E](cols.Sitecond), + Totalcostprodcut: psql.WhereNull[Q, float64](cols.Totalcostprodcut), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + Targetspecies: psql.WhereNull[Q, string](cols.Targetspecies), + } +} diff --git a/db/models/fieldseeker.treatmentarea.bob.go b/db/models/fieldseeker.treatmentarea.bob.go new file mode 100644 index 00000000..c7734024 --- /dev/null +++ b/db/models/fieldseeker.treatmentarea.bob.go @@ -0,0 +1,778 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerTreatmentarea is an object representing the database table. +type FieldseekerTreatmentarea struct { + Objectid int64 `db:"objectid,pk" ` + TreatID null.Val[uuid.UUID] `db:"treat_id" ` + SessionID null.Val[uuid.UUID] `db:"session_id" ` + // Treatment Date + Treatdate null.Val[time.Time] `db:"treatdate" ` + Comments null.Val[string] `db:"comments" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Notified null.Val[int16] `db:"notified" ` + Type null.Val[string] `db:"type" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + ShapeArea null.Val[float64] `db:"shape__area" ` + ShapeLength null.Val[float64] `db:"shape__length" ` +} + +// FieldseekerTreatmentareaSlice is an alias for a slice of pointers to FieldseekerTreatmentarea. +// This should almost always be used instead of []*FieldseekerTreatmentarea. +type FieldseekerTreatmentareaSlice []*FieldseekerTreatmentarea + +// FieldseekerTreatmentareas contains methods to work with the treatmentarea table +var FieldseekerTreatmentareas = psql.NewTablex[*FieldseekerTreatmentarea, FieldseekerTreatmentareaSlice, *FieldseekerTreatmentareaSetter]("fieldseeker", "treatmentarea", buildFieldseekerTreatmentareaColumns("fieldseeker.treatmentarea")) + +// FieldseekerTreatmentareasQuery is a query on the treatmentarea table +type FieldseekerTreatmentareasQuery = *psql.ViewQuery[*FieldseekerTreatmentarea, FieldseekerTreatmentareaSlice] + +func buildFieldseekerTreatmentareaColumns(alias string) fieldseekerTreatmentareaColumns { + return fieldseekerTreatmentareaColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "treat_id", "session_id", "treatdate", "comments", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "notified", "type", "creationdate", "creator", "editdate", "editor", "shape__area", "shape__length", + ).WithParent("fieldseeker.treatmentarea"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + TreatID: psql.Quote(alias, "treat_id"), + SessionID: psql.Quote(alias, "session_id"), + Treatdate: psql.Quote(alias, "treatdate"), + Comments: psql.Quote(alias, "comments"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Notified: psql.Quote(alias, "notified"), + Type: psql.Quote(alias, "type"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + ShapeArea: psql.Quote(alias, "shape__area"), + ShapeLength: psql.Quote(alias, "shape__length"), + } +} + +type fieldseekerTreatmentareaColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + TreatID psql.Expression + SessionID psql.Expression + Treatdate psql.Expression + Comments psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Notified psql.Expression + Type psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + ShapeArea psql.Expression + ShapeLength psql.Expression +} + +func (c fieldseekerTreatmentareaColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerTreatmentareaColumns) AliasedAs(alias string) fieldseekerTreatmentareaColumns { + return buildFieldseekerTreatmentareaColumns(alias) +} + +// FieldseekerTreatmentareaSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerTreatmentareaSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + TreatID omitnull.Val[uuid.UUID] `db:"treat_id" ` + SessionID omitnull.Val[uuid.UUID] `db:"session_id" ` + Treatdate omitnull.Val[time.Time] `db:"treatdate" ` + Comments omitnull.Val[string] `db:"comments" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Notified omitnull.Val[int16] `db:"notified" ` + Type omitnull.Val[string] `db:"type" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + ShapeArea omitnull.Val[float64] `db:"shape__area" ` + ShapeLength omitnull.Val[float64] `db:"shape__length" ` +} + +func (s FieldseekerTreatmentareaSetter) SetColumns() []string { + vals := make([]string, 0, 18) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.TreatID.IsUnset() { + vals = append(vals, "treat_id") + } + if !s.SessionID.IsUnset() { + vals = append(vals, "session_id") + } + if !s.Treatdate.IsUnset() { + vals = append(vals, "treatdate") + } + if !s.Comments.IsUnset() { + vals = append(vals, "comments") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Notified.IsUnset() { + vals = append(vals, "notified") + } + if !s.Type.IsUnset() { + vals = append(vals, "type") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.ShapeArea.IsUnset() { + vals = append(vals, "shape__area") + } + if !s.ShapeLength.IsUnset() { + vals = append(vals, "shape__length") + } + return vals +} + +func (s FieldseekerTreatmentareaSetter) Overwrite(t *FieldseekerTreatmentarea) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.TreatID.IsUnset() { + t.TreatID = s.TreatID.MustGetNull() + } + if !s.SessionID.IsUnset() { + t.SessionID = s.SessionID.MustGetNull() + } + if !s.Treatdate.IsUnset() { + t.Treatdate = s.Treatdate.MustGetNull() + } + if !s.Comments.IsUnset() { + t.Comments = s.Comments.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Notified.IsUnset() { + t.Notified = s.Notified.MustGetNull() + } + if !s.Type.IsUnset() { + t.Type = s.Type.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.ShapeArea.IsUnset() { + t.ShapeArea = s.ShapeArea.MustGetNull() + } + if !s.ShapeLength.IsUnset() { + t.ShapeLength = s.ShapeLength.MustGetNull() + } +} + +func (s *FieldseekerTreatmentareaSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTreatmentareas.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 18) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.TreatID.IsUnset() { + vals[1] = psql.Arg(s.TreatID.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.SessionID.IsUnset() { + vals[2] = psql.Arg(s.SessionID.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.Treatdate.IsUnset() { + vals[3] = psql.Arg(s.Treatdate.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.Comments.IsUnset() { + vals[4] = psql.Arg(s.Comments.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[5] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[6] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[7] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[8] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[9] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Notified.IsUnset() { + vals[10] = psql.Arg(s.Notified.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Type.IsUnset() { + vals[11] = psql.Arg(s.Type.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[12] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[13] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[14] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[14] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[15] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[15] = psql.Raw("DEFAULT") + } + + if !s.ShapeArea.IsUnset() { + vals[16] = psql.Arg(s.ShapeArea.MustGetNull()) + } else { + vals[16] = psql.Raw("DEFAULT") + } + + if !s.ShapeLength.IsUnset() { + vals[17] = psql.Arg(s.ShapeLength.MustGetNull()) + } else { + vals[17] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerTreatmentareaSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerTreatmentareaSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 18) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.TreatID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "treat_id")...), + psql.Arg(s.TreatID), + }}) + } + + if !s.SessionID.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "session_id")...), + psql.Arg(s.SessionID), + }}) + } + + if !s.Treatdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "treatdate")...), + psql.Arg(s.Treatdate), + }}) + } + + if !s.Comments.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "comments")...), + psql.Arg(s.Comments), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Notified.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "notified")...), + psql.Arg(s.Notified), + }}) + } + + if !s.Type.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "type")...), + psql.Arg(s.Type), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.ShapeArea.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "shape__area")...), + psql.Arg(s.ShapeArea), + }}) + } + + if !s.ShapeLength.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "shape__length")...), + psql.Arg(s.ShapeLength), + }}) + } + + return exprs +} + +// FindFieldseekerTreatmentarea retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerTreatmentarea(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerTreatmentarea, error) { + if len(cols) == 0 { + return FieldseekerTreatmentareas.Query( + sm.Where(FieldseekerTreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerTreatmentareas.Query( + sm.Where(FieldseekerTreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerTreatmentareas.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerTreatmentareaExists checks the presence of a single record by primary key +func FieldseekerTreatmentareaExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerTreatmentareas.Query( + sm.Where(FieldseekerTreatmentareas.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerTreatmentarea is retrieved from the database +func (o *FieldseekerTreatmentarea) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTreatmentareas.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerTreatmentareaSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerTreatmentareas.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerTreatmentareaSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerTreatmentareas.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerTreatmentareaSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerTreatmentareas.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerTreatmentareaSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerTreatmentarea +func (o *FieldseekerTreatmentarea) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerTreatmentarea) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.treatmentarea", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerTreatmentarea +func (o *FieldseekerTreatmentarea) Update(ctx context.Context, exec bob.Executor, s *FieldseekerTreatmentareaSetter) error { + v, err := FieldseekerTreatmentareas.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerTreatmentarea record with an executor +func (o *FieldseekerTreatmentarea) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerTreatmentareas.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerTreatmentarea using the executor +func (o *FieldseekerTreatmentarea) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerTreatmentareas.Query( + sm.Where(FieldseekerTreatmentareas.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerTreatmentareaSlice is retrieved from the database +func (o FieldseekerTreatmentareaSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerTreatmentareas.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerTreatmentareas.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerTreatmentareas.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerTreatmentareas.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerTreatmentareaSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.treatmentarea", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerTreatmentareaSlice) copyMatchingRows(from ...*FieldseekerTreatmentarea) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerTreatmentareaSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTreatmentareas.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerTreatmentarea: + o.copyMatchingRows(retrieved) + case []*FieldseekerTreatmentarea: + o.copyMatchingRows(retrieved...) + case FieldseekerTreatmentareaSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerTreatmentarea or a slice of FieldseekerTreatmentarea + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerTreatmentareas.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerTreatmentareaSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerTreatmentareas.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerTreatmentarea: + o.copyMatchingRows(retrieved) + case []*FieldseekerTreatmentarea: + o.copyMatchingRows(retrieved...) + case FieldseekerTreatmentareaSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerTreatmentarea or a slice of FieldseekerTreatmentarea + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerTreatmentareas.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerTreatmentareaSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerTreatmentareaSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerTreatmentareas.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerTreatmentareaSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerTreatmentareas.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerTreatmentareaSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerTreatmentareas.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerTreatmentareaWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + TreatID psql.WhereNullMod[Q, uuid.UUID] + SessionID psql.WhereNullMod[Q, uuid.UUID] + Treatdate psql.WhereNullMod[Q, time.Time] + Comments psql.WhereNullMod[Q, string] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Notified psql.WhereNullMod[Q, int16] + Type psql.WhereNullMod[Q, string] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + ShapeArea psql.WhereNullMod[Q, float64] + ShapeLength psql.WhereNullMod[Q, float64] +} + +func (fieldseekerTreatmentareaWhere[Q]) AliasedAs(alias string) fieldseekerTreatmentareaWhere[Q] { + return buildFieldseekerTreatmentareaWhere[Q](buildFieldseekerTreatmentareaColumns(alias)) +} + +func buildFieldseekerTreatmentareaWhere[Q psql.Filterable](cols fieldseekerTreatmentareaColumns) fieldseekerTreatmentareaWhere[Q] { + return fieldseekerTreatmentareaWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + TreatID: psql.WhereNull[Q, uuid.UUID](cols.TreatID), + SessionID: psql.WhereNull[Q, uuid.UUID](cols.SessionID), + Treatdate: psql.WhereNull[Q, time.Time](cols.Treatdate), + Comments: psql.WhereNull[Q, string](cols.Comments), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Notified: psql.WhereNull[Q, int16](cols.Notified), + Type: psql.WhereNull[Q, string](cols.Type), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + ShapeArea: psql.WhereNull[Q, float64](cols.ShapeArea), + ShapeLength: psql.WhereNull[Q, float64](cols.ShapeLength), + } +} diff --git a/db/models/fieldseeker.ulvsprayroute.bob.go b/db/models/fieldseeker.ulvsprayroute.bob.go new file mode 100644 index 00000000..9dc64a19 --- /dev/null +++ b/db/models/fieldseeker.ulvsprayroute.bob.go @@ -0,0 +1,79 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerUlvsprayroute is an object representing the database table. +type FieldseekerUlvsprayroute struct{} + +// FieldseekerUlvsprayrouteSlice is an alias for a slice of pointers to FieldseekerUlvsprayroute. +// This should almost always be used instead of []*FieldseekerUlvsprayroute. +type FieldseekerUlvsprayrouteSlice []*FieldseekerUlvsprayroute + +// FieldseekerUlvsprayroutes contains methods to work with the ulvsprayroute view +var FieldseekerUlvsprayroutes = psql.NewViewx[*FieldseekerUlvsprayroute, FieldseekerUlvsprayrouteSlice]("fieldseeker", "ulvsprayroute", buildFieldseekerUlvsprayrouteColumns("fieldseeker.ulvsprayroute")) + +// FieldseekerUlvsprayroutesQuery is a query on the ulvsprayroute view +type FieldseekerUlvsprayroutesQuery = *psql.ViewQuery[*FieldseekerUlvsprayroute, FieldseekerUlvsprayrouteSlice] + +func buildFieldseekerUlvsprayrouteColumns(alias string) fieldseekerUlvsprayrouteColumns { + return fieldseekerUlvsprayrouteColumns{ + ColumnsExpr: expr.NewColumnsExpr().WithParent("fieldseeker.ulvsprayroute"), + tableAlias: alias, + } +} + +type fieldseekerUlvsprayrouteColumns struct { + expr.ColumnsExpr + tableAlias string +} + +func (c fieldseekerUlvsprayrouteColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerUlvsprayrouteColumns) AliasedAs(alias string) fieldseekerUlvsprayrouteColumns { + return buildFieldseekerUlvsprayrouteColumns(alias) +} + +// AfterQueryHook is called after FieldseekerUlvsprayroute is retrieved from the database +func (o *FieldseekerUlvsprayroute) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerUlvsprayroutes.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerUlvsprayrouteSlice{o}) + } + + return err +} + +// AfterQueryHook is called after FieldseekerUlvsprayrouteSlice is retrieved from the database +func (o FieldseekerUlvsprayrouteSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerUlvsprayroutes.AfterSelectHooks.RunHooks(ctx, exec, o) + } + + return err +} + +type fieldseekerUlvsprayrouteWhere[Q psql.Filterable] struct{} + +func (fieldseekerUlvsprayrouteWhere[Q]) AliasedAs(alias string) fieldseekerUlvsprayrouteWhere[Q] { + return buildFieldseekerUlvsprayrouteWhere[Q](buildFieldseekerUlvsprayrouteColumns(alias)) +} + +func buildFieldseekerUlvsprayrouteWhere[Q psql.Filterable](cols fieldseekerUlvsprayrouteColumns) fieldseekerUlvsprayrouteWhere[Q] { + return fieldseekerUlvsprayrouteWhere[Q]{} +} diff --git a/db/models/fieldseeker.zones.bob.go b/db/models/fieldseeker.zones.bob.go new file mode 100644 index 00000000..ead86336 --- /dev/null +++ b/db/models/fieldseeker.zones.bob.go @@ -0,0 +1,678 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerZone is an object representing the database table. +type FieldseekerZone struct { + Objectid int64 `db:"objectid,pk" ` + // Name + Name null.Val[string] `db:"name" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Active null.Val[int32] `db:"active" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + ShapeArea null.Val[float64] `db:"shape__area" ` + ShapeLength null.Val[float64] `db:"shape__length" ` +} + +// FieldseekerZoneSlice is an alias for a slice of pointers to FieldseekerZone. +// This should almost always be used instead of []*FieldseekerZone. +type FieldseekerZoneSlice []*FieldseekerZone + +// FieldseekerZones contains methods to work with the zones table +var FieldseekerZones = psql.NewTablex[*FieldseekerZone, FieldseekerZoneSlice, *FieldseekerZoneSetter]("fieldseeker", "zones", buildFieldseekerZoneColumns("fieldseeker.zones")) + +// FieldseekerZonesQuery is a query on the zones table +type FieldseekerZonesQuery = *psql.ViewQuery[*FieldseekerZone, FieldseekerZoneSlice] + +func buildFieldseekerZoneColumns(alias string) fieldseekerZoneColumns { + return fieldseekerZoneColumns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "name", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "active", "creationdate", "creator", "editdate", "editor", "shape__area", "shape__length", + ).WithParent("fieldseeker.zones"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Name: psql.Quote(alias, "name"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Active: psql.Quote(alias, "active"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + ShapeArea: psql.Quote(alias, "shape__area"), + ShapeLength: psql.Quote(alias, "shape__length"), + } +} + +type fieldseekerZoneColumns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Name psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Active psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + ShapeArea psql.Expression + ShapeLength psql.Expression +} + +func (c fieldseekerZoneColumns) Alias() string { + return c.tableAlias +} + +func (fieldseekerZoneColumns) AliasedAs(alias string) fieldseekerZoneColumns { + return buildFieldseekerZoneColumns(alias) +} + +// FieldseekerZoneSetter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerZoneSetter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Name omitnull.Val[string] `db:"name" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Active omitnull.Val[int32] `db:"active" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + ShapeArea omitnull.Val[float64] `db:"shape__area" ` + ShapeLength omitnull.Val[float64] `db:"shape__length" ` +} + +func (s FieldseekerZoneSetter) SetColumns() []string { + vals := make([]string, 0, 14) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Name.IsUnset() { + vals = append(vals, "name") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Active.IsUnset() { + vals = append(vals, "active") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.ShapeArea.IsUnset() { + vals = append(vals, "shape__area") + } + if !s.ShapeLength.IsUnset() { + vals = append(vals, "shape__length") + } + return vals +} + +func (s FieldseekerZoneSetter) Overwrite(t *FieldseekerZone) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Name.IsUnset() { + t.Name = s.Name.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Active.IsUnset() { + t.Active = s.Active.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.ShapeArea.IsUnset() { + t.ShapeArea = s.ShapeArea.MustGetNull() + } + if !s.ShapeLength.IsUnset() { + t.ShapeLength = s.ShapeLength.MustGetNull() + } +} + +func (s *FieldseekerZoneSetter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerZones.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 14) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Name.IsUnset() { + vals[1] = psql.Arg(s.Name.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[2] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[3] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[4] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[5] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[6] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Active.IsUnset() { + vals[7] = psql.Arg(s.Active.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[8] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[9] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[10] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[11] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.ShapeArea.IsUnset() { + vals[12] = psql.Arg(s.ShapeArea.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + if !s.ShapeLength.IsUnset() { + vals[13] = psql.Arg(s.ShapeLength.MustGetNull()) + } else { + vals[13] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerZoneSetter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerZoneSetter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 14) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Name.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "name")...), + psql.Arg(s.Name), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Active.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "active")...), + psql.Arg(s.Active), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.ShapeArea.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "shape__area")...), + psql.Arg(s.ShapeArea), + }}) + } + + if !s.ShapeLength.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "shape__length")...), + psql.Arg(s.ShapeLength), + }}) + } + + return exprs +} + +// FindFieldseekerZone retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerZone(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerZone, error) { + if len(cols) == 0 { + return FieldseekerZones.Query( + sm.Where(FieldseekerZones.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerZones.Query( + sm.Where(FieldseekerZones.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerZones.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerZoneExists checks the presence of a single record by primary key +func FieldseekerZoneExists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerZones.Query( + sm.Where(FieldseekerZones.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerZone is retrieved from the database +func (o *FieldseekerZone) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerZones.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerZoneSlice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerZones.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerZoneSlice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerZones.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerZoneSlice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerZones.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerZoneSlice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerZone +func (o *FieldseekerZone) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerZone) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.zones", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerZone +func (o *FieldseekerZone) Update(ctx context.Context, exec bob.Executor, s *FieldseekerZoneSetter) error { + v, err := FieldseekerZones.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerZone record with an executor +func (o *FieldseekerZone) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerZones.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerZone using the executor +func (o *FieldseekerZone) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerZones.Query( + sm.Where(FieldseekerZones.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerZoneSlice is retrieved from the database +func (o FieldseekerZoneSlice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerZones.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerZones.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerZones.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerZones.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerZoneSlice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.zones", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerZoneSlice) copyMatchingRows(from ...*FieldseekerZone) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerZoneSlice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerZones.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerZone: + o.copyMatchingRows(retrieved) + case []*FieldseekerZone: + o.copyMatchingRows(retrieved...) + case FieldseekerZoneSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerZone or a slice of FieldseekerZone + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerZones.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerZoneSlice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerZones.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerZone: + o.copyMatchingRows(retrieved) + case []*FieldseekerZone: + o.copyMatchingRows(retrieved...) + case FieldseekerZoneSlice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerZone or a slice of FieldseekerZone + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerZones.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerZoneSlice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerZoneSetter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerZones.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerZoneSlice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerZones.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerZoneSlice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerZones.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerZoneWhere[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Name psql.WhereNullMod[Q, string] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Active psql.WhereNullMod[Q, int32] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + ShapeArea psql.WhereNullMod[Q, float64] + ShapeLength psql.WhereNullMod[Q, float64] +} + +func (fieldseekerZoneWhere[Q]) AliasedAs(alias string) fieldseekerZoneWhere[Q] { + return buildFieldseekerZoneWhere[Q](buildFieldseekerZoneColumns(alias)) +} + +func buildFieldseekerZoneWhere[Q psql.Filterable](cols fieldseekerZoneColumns) fieldseekerZoneWhere[Q] { + return fieldseekerZoneWhere[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Name: psql.WhereNull[Q, string](cols.Name), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Active: psql.WhereNull[Q, int32](cols.Active), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + ShapeArea: psql.WhereNull[Q, float64](cols.ShapeArea), + ShapeLength: psql.WhereNull[Q, float64](cols.ShapeLength), + } +} diff --git a/db/models/fieldseeker.zones2.bob.go b/db/models/fieldseeker.zones2.bob.go new file mode 100644 index 00000000..33e958d5 --- /dev/null +++ b/db/models/fieldseeker.zones2.bob.go @@ -0,0 +1,653 @@ +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. +// This file is meant to be re-generated in place and/or deleted at any time. + +package models + +import ( + "context" + "io" + "time" + + "github.com/aarondl/opt/null" + "github.com/aarondl/opt/omit" + "github.com/aarondl/opt/omitnull" + "github.com/gofrs/uuid/v5" + "github.com/stephenafamo/bob" + "github.com/stephenafamo/bob/dialect/psql" + "github.com/stephenafamo/bob/dialect/psql/dialect" + "github.com/stephenafamo/bob/dialect/psql/dm" + "github.com/stephenafamo/bob/dialect/psql/sm" + "github.com/stephenafamo/bob/dialect/psql/um" + "github.com/stephenafamo/bob/expr" +) + +// FieldseekerZones2 is an object representing the database table. +type FieldseekerZones2 struct { + Objectid int64 `db:"objectid,pk" ` + // Name + Name null.Val[string] `db:"name" ` + Globalid null.Val[uuid.UUID] `db:"globalid" ` + CreatedUser null.Val[string] `db:"created_user" ` + CreatedDate null.Val[time.Time] `db:"created_date" ` + LastEditedUser null.Val[string] `db:"last_edited_user" ` + LastEditedDate null.Val[time.Time] `db:"last_edited_date" ` + Creationdate null.Val[time.Time] `db:"creationdate" ` + Creator null.Val[string] `db:"creator" ` + Editdate null.Val[time.Time] `db:"editdate" ` + Editor null.Val[string] `db:"editor" ` + ShapeArea null.Val[float64] `db:"shape__area" ` + ShapeLength null.Val[float64] `db:"shape__length" ` +} + +// FieldseekerZones2Slice is an alias for a slice of pointers to FieldseekerZones2. +// This should almost always be used instead of []*FieldseekerZones2. +type FieldseekerZones2Slice []*FieldseekerZones2 + +// FieldseekerZones2s contains methods to work with the zones2 table +var FieldseekerZones2s = psql.NewTablex[*FieldseekerZones2, FieldseekerZones2Slice, *FieldseekerZones2Setter]("fieldseeker", "zones2", buildFieldseekerZones2Columns("fieldseeker.zones2")) + +// FieldseekerZones2sQuery is a query on the zones2 table +type FieldseekerZones2sQuery = *psql.ViewQuery[*FieldseekerZones2, FieldseekerZones2Slice] + +func buildFieldseekerZones2Columns(alias string) fieldseekerZones2Columns { + return fieldseekerZones2Columns{ + ColumnsExpr: expr.NewColumnsExpr( + "objectid", "name", "globalid", "created_user", "created_date", "last_edited_user", "last_edited_date", "creationdate", "creator", "editdate", "editor", "shape__area", "shape__length", + ).WithParent("fieldseeker.zones2"), + tableAlias: alias, + Objectid: psql.Quote(alias, "objectid"), + Name: psql.Quote(alias, "name"), + Globalid: psql.Quote(alias, "globalid"), + CreatedUser: psql.Quote(alias, "created_user"), + CreatedDate: psql.Quote(alias, "created_date"), + LastEditedUser: psql.Quote(alias, "last_edited_user"), + LastEditedDate: psql.Quote(alias, "last_edited_date"), + Creationdate: psql.Quote(alias, "creationdate"), + Creator: psql.Quote(alias, "creator"), + Editdate: psql.Quote(alias, "editdate"), + Editor: psql.Quote(alias, "editor"), + ShapeArea: psql.Quote(alias, "shape__area"), + ShapeLength: psql.Quote(alias, "shape__length"), + } +} + +type fieldseekerZones2Columns struct { + expr.ColumnsExpr + tableAlias string + Objectid psql.Expression + Name psql.Expression + Globalid psql.Expression + CreatedUser psql.Expression + CreatedDate psql.Expression + LastEditedUser psql.Expression + LastEditedDate psql.Expression + Creationdate psql.Expression + Creator psql.Expression + Editdate psql.Expression + Editor psql.Expression + ShapeArea psql.Expression + ShapeLength psql.Expression +} + +func (c fieldseekerZones2Columns) Alias() string { + return c.tableAlias +} + +func (fieldseekerZones2Columns) AliasedAs(alias string) fieldseekerZones2Columns { + return buildFieldseekerZones2Columns(alias) +} + +// FieldseekerZones2Setter is used for insert/upsert/update operations +// All values are optional, and do not have to be set +// Generated columns are not included +type FieldseekerZones2Setter struct { + Objectid omit.Val[int64] `db:"objectid,pk" ` + Name omitnull.Val[string] `db:"name" ` + Globalid omitnull.Val[uuid.UUID] `db:"globalid" ` + CreatedUser omitnull.Val[string] `db:"created_user" ` + CreatedDate omitnull.Val[time.Time] `db:"created_date" ` + LastEditedUser omitnull.Val[string] `db:"last_edited_user" ` + LastEditedDate omitnull.Val[time.Time] `db:"last_edited_date" ` + Creationdate omitnull.Val[time.Time] `db:"creationdate" ` + Creator omitnull.Val[string] `db:"creator" ` + Editdate omitnull.Val[time.Time] `db:"editdate" ` + Editor omitnull.Val[string] `db:"editor" ` + ShapeArea omitnull.Val[float64] `db:"shape__area" ` + ShapeLength omitnull.Val[float64] `db:"shape__length" ` +} + +func (s FieldseekerZones2Setter) SetColumns() []string { + vals := make([]string, 0, 13) + if s.Objectid.IsValue() { + vals = append(vals, "objectid") + } + if !s.Name.IsUnset() { + vals = append(vals, "name") + } + if !s.Globalid.IsUnset() { + vals = append(vals, "globalid") + } + if !s.CreatedUser.IsUnset() { + vals = append(vals, "created_user") + } + if !s.CreatedDate.IsUnset() { + vals = append(vals, "created_date") + } + if !s.LastEditedUser.IsUnset() { + vals = append(vals, "last_edited_user") + } + if !s.LastEditedDate.IsUnset() { + vals = append(vals, "last_edited_date") + } + if !s.Creationdate.IsUnset() { + vals = append(vals, "creationdate") + } + if !s.Creator.IsUnset() { + vals = append(vals, "creator") + } + if !s.Editdate.IsUnset() { + vals = append(vals, "editdate") + } + if !s.Editor.IsUnset() { + vals = append(vals, "editor") + } + if !s.ShapeArea.IsUnset() { + vals = append(vals, "shape__area") + } + if !s.ShapeLength.IsUnset() { + vals = append(vals, "shape__length") + } + return vals +} + +func (s FieldseekerZones2Setter) Overwrite(t *FieldseekerZones2) { + if s.Objectid.IsValue() { + t.Objectid = s.Objectid.MustGet() + } + if !s.Name.IsUnset() { + t.Name = s.Name.MustGetNull() + } + if !s.Globalid.IsUnset() { + t.Globalid = s.Globalid.MustGetNull() + } + if !s.CreatedUser.IsUnset() { + t.CreatedUser = s.CreatedUser.MustGetNull() + } + if !s.CreatedDate.IsUnset() { + t.CreatedDate = s.CreatedDate.MustGetNull() + } + if !s.LastEditedUser.IsUnset() { + t.LastEditedUser = s.LastEditedUser.MustGetNull() + } + if !s.LastEditedDate.IsUnset() { + t.LastEditedDate = s.LastEditedDate.MustGetNull() + } + if !s.Creationdate.IsUnset() { + t.Creationdate = s.Creationdate.MustGetNull() + } + if !s.Creator.IsUnset() { + t.Creator = s.Creator.MustGetNull() + } + if !s.Editdate.IsUnset() { + t.Editdate = s.Editdate.MustGetNull() + } + if !s.Editor.IsUnset() { + t.Editor = s.Editor.MustGetNull() + } + if !s.ShapeArea.IsUnset() { + t.ShapeArea = s.ShapeArea.MustGetNull() + } + if !s.ShapeLength.IsUnset() { + t.ShapeLength = s.ShapeLength.MustGetNull() + } +} + +func (s *FieldseekerZones2Setter) Apply(q *dialect.InsertQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerZones2s.BeforeInsertHooks.RunHooks(ctx, exec, s) + }) + + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + vals := make([]bob.Expression, 13) + if s.Objectid.IsValue() { + vals[0] = psql.Arg(s.Objectid.MustGet()) + } else { + vals[0] = psql.Raw("DEFAULT") + } + + if !s.Name.IsUnset() { + vals[1] = psql.Arg(s.Name.MustGetNull()) + } else { + vals[1] = psql.Raw("DEFAULT") + } + + if !s.Globalid.IsUnset() { + vals[2] = psql.Arg(s.Globalid.MustGetNull()) + } else { + vals[2] = psql.Raw("DEFAULT") + } + + if !s.CreatedUser.IsUnset() { + vals[3] = psql.Arg(s.CreatedUser.MustGetNull()) + } else { + vals[3] = psql.Raw("DEFAULT") + } + + if !s.CreatedDate.IsUnset() { + vals[4] = psql.Arg(s.CreatedDate.MustGetNull()) + } else { + vals[4] = psql.Raw("DEFAULT") + } + + if !s.LastEditedUser.IsUnset() { + vals[5] = psql.Arg(s.LastEditedUser.MustGetNull()) + } else { + vals[5] = psql.Raw("DEFAULT") + } + + if !s.LastEditedDate.IsUnset() { + vals[6] = psql.Arg(s.LastEditedDate.MustGetNull()) + } else { + vals[6] = psql.Raw("DEFAULT") + } + + if !s.Creationdate.IsUnset() { + vals[7] = psql.Arg(s.Creationdate.MustGetNull()) + } else { + vals[7] = psql.Raw("DEFAULT") + } + + if !s.Creator.IsUnset() { + vals[8] = psql.Arg(s.Creator.MustGetNull()) + } else { + vals[8] = psql.Raw("DEFAULT") + } + + if !s.Editdate.IsUnset() { + vals[9] = psql.Arg(s.Editdate.MustGetNull()) + } else { + vals[9] = psql.Raw("DEFAULT") + } + + if !s.Editor.IsUnset() { + vals[10] = psql.Arg(s.Editor.MustGetNull()) + } else { + vals[10] = psql.Raw("DEFAULT") + } + + if !s.ShapeArea.IsUnset() { + vals[11] = psql.Arg(s.ShapeArea.MustGetNull()) + } else { + vals[11] = psql.Raw("DEFAULT") + } + + if !s.ShapeLength.IsUnset() { + vals[12] = psql.Arg(s.ShapeLength.MustGetNull()) + } else { + vals[12] = psql.Raw("DEFAULT") + } + + return bob.ExpressSlice(ctx, w, d, start, vals, "", ", ", "") + })) +} + +func (s FieldseekerZones2Setter) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return um.Set(s.Expressions()...) +} + +func (s FieldseekerZones2Setter) Expressions(prefix ...string) []bob.Expression { + exprs := make([]bob.Expression, 0, 13) + + if s.Objectid.IsValue() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "objectid")...), + psql.Arg(s.Objectid), + }}) + } + + if !s.Name.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "name")...), + psql.Arg(s.Name), + }}) + } + + if !s.Globalid.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "globalid")...), + psql.Arg(s.Globalid), + }}) + } + + if !s.CreatedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_user")...), + psql.Arg(s.CreatedUser), + }}) + } + + if !s.CreatedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "created_date")...), + psql.Arg(s.CreatedDate), + }}) + } + + if !s.LastEditedUser.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_user")...), + psql.Arg(s.LastEditedUser), + }}) + } + + if !s.LastEditedDate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "last_edited_date")...), + psql.Arg(s.LastEditedDate), + }}) + } + + if !s.Creationdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creationdate")...), + psql.Arg(s.Creationdate), + }}) + } + + if !s.Creator.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "creator")...), + psql.Arg(s.Creator), + }}) + } + + if !s.Editdate.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editdate")...), + psql.Arg(s.Editdate), + }}) + } + + if !s.Editor.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "editor")...), + psql.Arg(s.Editor), + }}) + } + + if !s.ShapeArea.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "shape__area")...), + psql.Arg(s.ShapeArea), + }}) + } + + if !s.ShapeLength.IsUnset() { + exprs = append(exprs, expr.Join{Sep: " = ", Exprs: []bob.Expression{ + psql.Quote(append(prefix, "shape__length")...), + psql.Arg(s.ShapeLength), + }}) + } + + return exprs +} + +// FindFieldseekerZones2 retrieves a single record by primary key +// If cols is empty Find will return all columns. +func FindFieldseekerZones2(ctx context.Context, exec bob.Executor, ObjectidPK int64, cols ...string) (*FieldseekerZones2, error) { + if len(cols) == 0 { + return FieldseekerZones2s.Query( + sm.Where(FieldseekerZones2s.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).One(ctx, exec) + } + + return FieldseekerZones2s.Query( + sm.Where(FieldseekerZones2s.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + sm.Columns(FieldseekerZones2s.Columns.Only(cols...)), + ).One(ctx, exec) +} + +// FieldseekerZones2Exists checks the presence of a single record by primary key +func FieldseekerZones2Exists(ctx context.Context, exec bob.Executor, ObjectidPK int64) (bool, error) { + return FieldseekerZones2s.Query( + sm.Where(FieldseekerZones2s.Columns.Objectid.EQ(psql.Arg(ObjectidPK))), + ).Exists(ctx, exec) +} + +// AfterQueryHook is called after FieldseekerZones2 is retrieved from the database +func (o *FieldseekerZones2) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerZones2s.AfterSelectHooks.RunHooks(ctx, exec, FieldseekerZones2Slice{o}) + case bob.QueryTypeInsert: + ctx, err = FieldseekerZones2s.AfterInsertHooks.RunHooks(ctx, exec, FieldseekerZones2Slice{o}) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerZones2s.AfterUpdateHooks.RunHooks(ctx, exec, FieldseekerZones2Slice{o}) + case bob.QueryTypeDelete: + ctx, err = FieldseekerZones2s.AfterDeleteHooks.RunHooks(ctx, exec, FieldseekerZones2Slice{o}) + } + + return err +} + +// primaryKeyVals returns the primary key values of the FieldseekerZones2 +func (o *FieldseekerZones2) primaryKeyVals() bob.Expression { + return psql.Arg(o.Objectid) +} + +func (o *FieldseekerZones2) pkEQ() dialect.Expression { + return psql.Quote("fieldseeker.zones2", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + return o.primaryKeyVals().WriteSQL(ctx, w, d, start) + })) +} + +// Update uses an executor to update the FieldseekerZones2 +func (o *FieldseekerZones2) Update(ctx context.Context, exec bob.Executor, s *FieldseekerZones2Setter) error { + v, err := FieldseekerZones2s.Update(s.UpdateMod(), um.Where(o.pkEQ())).One(ctx, exec) + if err != nil { + return err + } + + *o = *v + + return nil +} + +// Delete deletes a single FieldseekerZones2 record with an executor +func (o *FieldseekerZones2) Delete(ctx context.Context, exec bob.Executor) error { + _, err := FieldseekerZones2s.Delete(dm.Where(o.pkEQ())).Exec(ctx, exec) + return err +} + +// Reload refreshes the FieldseekerZones2 using the executor +func (o *FieldseekerZones2) Reload(ctx context.Context, exec bob.Executor) error { + o2, err := FieldseekerZones2s.Query( + sm.Where(FieldseekerZones2s.Columns.Objectid.EQ(psql.Arg(o.Objectid))), + ).One(ctx, exec) + if err != nil { + return err + } + + *o = *o2 + + return nil +} + +// AfterQueryHook is called after FieldseekerZones2Slice is retrieved from the database +func (o FieldseekerZones2Slice) AfterQueryHook(ctx context.Context, exec bob.Executor, queryType bob.QueryType) error { + var err error + + switch queryType { + case bob.QueryTypeSelect: + ctx, err = FieldseekerZones2s.AfterSelectHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeInsert: + ctx, err = FieldseekerZones2s.AfterInsertHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeUpdate: + ctx, err = FieldseekerZones2s.AfterUpdateHooks.RunHooks(ctx, exec, o) + case bob.QueryTypeDelete: + ctx, err = FieldseekerZones2s.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err +} + +func (o FieldseekerZones2Slice) pkIN() dialect.Expression { + if len(o) == 0 { + return psql.Raw("NULL") + } + + return psql.Quote("fieldseeker.zones2", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { + pkPairs := make([]bob.Expression, len(o)) + for i, row := range o { + pkPairs[i] = row.primaryKeyVals() + } + return bob.ExpressSlice(ctx, w, d, start, pkPairs, "", ", ", "") + })) +} + +// copyMatchingRows finds models in the given slice that have the same primary key +// then it first copies the existing relationships from the old model to the new model +// and then replaces the old model in the slice with the new model +func (o FieldseekerZones2Slice) copyMatchingRows(from ...*FieldseekerZones2) { + for i, old := range o { + for _, new := range from { + if new.Objectid != old.Objectid { + continue + } + + o[i] = new + break + } + } +} + +// UpdateMod modifies an update query with "WHERE primary_key IN (o...)" +func (o FieldseekerZones2Slice) UpdateMod() bob.Mod[*dialect.UpdateQuery] { + return bob.ModFunc[*dialect.UpdateQuery](func(q *dialect.UpdateQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerZones2s.BeforeUpdateHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerZones2: + o.copyMatchingRows(retrieved) + case []*FieldseekerZones2: + o.copyMatchingRows(retrieved...) + case FieldseekerZones2Slice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerZones2 or a slice of FieldseekerZones2 + // then run the AfterUpdateHooks on the slice + _, err = FieldseekerZones2s.AfterUpdateHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +// DeleteMod modifies an delete query with "WHERE primary_key IN (o...)" +func (o FieldseekerZones2Slice) DeleteMod() bob.Mod[*dialect.DeleteQuery] { + return bob.ModFunc[*dialect.DeleteQuery](func(q *dialect.DeleteQuery) { + q.AppendHooks(func(ctx context.Context, exec bob.Executor) (context.Context, error) { + return FieldseekerZones2s.BeforeDeleteHooks.RunHooks(ctx, exec, o) + }) + + q.AppendLoader(bob.LoaderFunc(func(ctx context.Context, exec bob.Executor, retrieved any) error { + var err error + switch retrieved := retrieved.(type) { + case *FieldseekerZones2: + o.copyMatchingRows(retrieved) + case []*FieldseekerZones2: + o.copyMatchingRows(retrieved...) + case FieldseekerZones2Slice: + o.copyMatchingRows(retrieved...) + default: + // If the retrieved value is not a FieldseekerZones2 or a slice of FieldseekerZones2 + // then run the AfterDeleteHooks on the slice + _, err = FieldseekerZones2s.AfterDeleteHooks.RunHooks(ctx, exec, o) + } + + return err + })) + + q.AppendWhere(o.pkIN()) + }) +} + +func (o FieldseekerZones2Slice) UpdateAll(ctx context.Context, exec bob.Executor, vals FieldseekerZones2Setter) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerZones2s.Update(vals.UpdateMod(), o.UpdateMod()).All(ctx, exec) + return err +} + +func (o FieldseekerZones2Slice) DeleteAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + _, err := FieldseekerZones2s.Delete(o.DeleteMod()).Exec(ctx, exec) + return err +} + +func (o FieldseekerZones2Slice) ReloadAll(ctx context.Context, exec bob.Executor) error { + if len(o) == 0 { + return nil + } + + o2, err := FieldseekerZones2s.Query(sm.Where(o.pkIN())).All(ctx, exec) + if err != nil { + return err + } + + o.copyMatchingRows(o2...) + + return nil +} + +type fieldseekerZones2Where[Q psql.Filterable] struct { + Objectid psql.WhereMod[Q, int64] + Name psql.WhereNullMod[Q, string] + Globalid psql.WhereNullMod[Q, uuid.UUID] + CreatedUser psql.WhereNullMod[Q, string] + CreatedDate psql.WhereNullMod[Q, time.Time] + LastEditedUser psql.WhereNullMod[Q, string] + LastEditedDate psql.WhereNullMod[Q, time.Time] + Creationdate psql.WhereNullMod[Q, time.Time] + Creator psql.WhereNullMod[Q, string] + Editdate psql.WhereNullMod[Q, time.Time] + Editor psql.WhereNullMod[Q, string] + ShapeArea psql.WhereNullMod[Q, float64] + ShapeLength psql.WhereNullMod[Q, float64] +} + +func (fieldseekerZones2Where[Q]) AliasedAs(alias string) fieldseekerZones2Where[Q] { + return buildFieldseekerZones2Where[Q](buildFieldseekerZones2Columns(alias)) +} + +func buildFieldseekerZones2Where[Q psql.Filterable](cols fieldseekerZones2Columns) fieldseekerZones2Where[Q] { + return fieldseekerZones2Where[Q]{ + Objectid: psql.Where[Q, int64](cols.Objectid), + Name: psql.WhereNull[Q, string](cols.Name), + Globalid: psql.WhereNull[Q, uuid.UUID](cols.Globalid), + CreatedUser: psql.WhereNull[Q, string](cols.CreatedUser), + CreatedDate: psql.WhereNull[Q, time.Time](cols.CreatedDate), + LastEditedUser: psql.WhereNull[Q, string](cols.LastEditedUser), + LastEditedDate: psql.WhereNull[Q, time.Time](cols.LastEditedDate), + Creationdate: psql.WhereNull[Q, time.Time](cols.Creationdate), + Creator: psql.WhereNull[Q, string](cols.Creator), + Editdate: psql.WhereNull[Q, time.Time](cols.Editdate), + Editor: psql.WhereNull[Q, string](cols.Editor), + ShapeArea: psql.WhereNull[Q, float64](cols.ShapeArea), + ShapeLength: psql.WhereNull[Q, float64](cols.ShapeLength), + } +} diff --git a/db/models/fieldseeker_sync.bob.go b/db/models/fieldseeker_sync.bob.go index 216691fe..0cdf120c 100644 --- a/db/models/fieldseeker_sync.bob.go +++ b/db/models/fieldseeker_sync.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -144,7 +144,7 @@ func (s *FieldseekerSyncSetter) Apply(q *dialect.InsertQuery) { return FieldseekerSyncs.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 6) if s.ID.IsValue() { vals[0] = psql.Arg(s.ID.MustGet()) @@ -284,7 +284,7 @@ func (o *FieldseekerSync) primaryKeyVals() bob.Expression { } func (o *FieldseekerSync) pkEQ() dialect.Expression { - return psql.Quote("fieldseeker_sync", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fieldseeker_sync", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -345,7 +345,7 @@ func (o FieldseekerSyncSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fieldseeker_sync", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fieldseeker_sync", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_containerrelate.bob.go b/db/models/fs_containerrelate.bob.go index d461cf46..f1daebe0 100644 --- a/db/models/fs_containerrelate.bob.go +++ b/db/models/fs_containerrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -266,7 +266,7 @@ func (s *FSContainerrelateSetter) Apply(q *dialect.InsertQuery) { return FSContainerrelates.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 18) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -562,7 +562,7 @@ func (o *FSContainerrelate) primaryKeyVals() bob.Expression { } func (o *FSContainerrelate) pkEQ() dialect.Expression { - return psql.Quote("fs_containerrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_containerrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -623,7 +623,7 @@ func (o FSContainerrelateSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_containerrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_containerrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_fieldscoutinglog.bob.go b/db/models/fs_fieldscoutinglog.bob.go index 51aa2a7c..d42322e8 100644 --- a/db/models/fs_fieldscoutinglog.bob.go +++ b/db/models/fs_fieldscoutinglog.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -236,7 +236,7 @@ func (s *FSFieldscoutinglogSetter) Apply(q *dialect.InsertQuery) { return FSFieldscoutinglogs.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 15) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -493,7 +493,7 @@ func (o *FSFieldscoutinglog) primaryKeyVals() bob.Expression { } func (o *FSFieldscoutinglog) pkEQ() dialect.Expression { - return psql.Quote("fs_fieldscoutinglog", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_fieldscoutinglog", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -554,7 +554,7 @@ func (o FSFieldscoutinglogSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_fieldscoutinglog", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_fieldscoutinglog", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_habitatrelate.bob.go b/db/models/fs_habitatrelate.bob.go index ab956ddc..e628ab8f 100644 --- a/db/models/fs_habitatrelate.bob.go +++ b/db/models/fs_habitatrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -246,7 +246,7 @@ func (s *FSHabitatrelateSetter) Apply(q *dialect.InsertQuery) { return FSHabitatrelates.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 16) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -516,7 +516,7 @@ func (o *FSHabitatrelate) primaryKeyVals() bob.Expression { } func (o *FSHabitatrelate) pkEQ() dialect.Expression { - return psql.Quote("fs_habitatrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_habitatrelate", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -577,7 +577,7 @@ func (o FSHabitatrelateSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_habitatrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_habitatrelate", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_inspectionsample.bob.go b/db/models/fs_inspectionsample.bob.go index 27b0181c..fd918686 100644 --- a/db/models/fs_inspectionsample.bob.go +++ b/db/models/fs_inspectionsample.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -266,7 +266,7 @@ func (s *FSInspectionsampleSetter) Apply(q *dialect.InsertQuery) { return FSInspectionsamples.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 18) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -562,7 +562,7 @@ func (o *FSInspectionsample) primaryKeyVals() bob.Expression { } func (o *FSInspectionsample) pkEQ() dialect.Expression { - return psql.Quote("fs_inspectionsample", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_inspectionsample", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -623,7 +623,7 @@ func (o FSInspectionsampleSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_inspectionsample", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_inspectionsample", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_inspectionsampledetail.bob.go b/db/models/fs_inspectionsampledetail.bob.go index 9dd08173..d7498766 100644 --- a/db/models/fs_inspectionsampledetail.bob.go +++ b/db/models/fs_inspectionsampledetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -376,7 +376,7 @@ func (s *FSInspectionsampledetailSetter) Apply(q *dialect.InsertQuery) { return FSInspectionsampledetails.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 29) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -815,7 +815,7 @@ func (o *FSInspectionsampledetail) primaryKeyVals() bob.Expression { } func (o *FSInspectionsampledetail) pkEQ() dialect.Expression { - return psql.Quote("fs_inspectionsampledetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_inspectionsampledetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -876,7 +876,7 @@ func (o FSInspectionsampledetailSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_inspectionsampledetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_inspectionsampledetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_linelocation.bob.go b/db/models/fs_linelocation.bob.go index 1ae076aa..42b99c5d 100644 --- a/db/models/fs_linelocation.bob.go +++ b/db/models/fs_linelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -606,7 +606,7 @@ func (s *FSLinelocationSetter) Apply(q *dialect.InsertQuery) { return FSLinelocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 52) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1344,7 +1344,7 @@ func (o *FSLinelocation) primaryKeyVals() bob.Expression { } func (o *FSLinelocation) pkEQ() dialect.Expression { - return psql.Quote("fs_linelocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_linelocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1405,7 +1405,7 @@ func (o FSLinelocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_linelocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_linelocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_locationtracking.bob.go b/db/models/fs_locationtracking.bob.go index c85d2c5a..8c1fc886 100644 --- a/db/models/fs_locationtracking.bob.go +++ b/db/models/fs_locationtracking.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -246,7 +246,7 @@ func (s *FSLocationtrackingSetter) Apply(q *dialect.InsertQuery) { return FSLocationtrackings.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 16) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -516,7 +516,7 @@ func (o *FSLocationtracking) primaryKeyVals() bob.Expression { } func (o *FSLocationtracking) pkEQ() dialect.Expression { - return psql.Quote("fs_locationtracking", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_locationtracking", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -577,7 +577,7 @@ func (o FSLocationtrackingSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_locationtracking", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_locationtracking", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_mosquitoinspection.bob.go b/db/models/fs_mosquitoinspection.bob.go index 566745de..ed5830af 100644 --- a/db/models/fs_mosquitoinspection.bob.go +++ b/db/models/fs_mosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -706,7 +706,7 @@ func (s *FSMosquitoinspectionSetter) Apply(q *dialect.InsertQuery) { return FSMosquitoinspections.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 62) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1574,7 +1574,7 @@ func (o *FSMosquitoinspection) primaryKeyVals() bob.Expression { } func (o *FSMosquitoinspection) pkEQ() dialect.Expression { - return psql.Quote("fs_mosquitoinspection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_mosquitoinspection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1635,7 +1635,7 @@ func (o FSMosquitoinspectionSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_mosquitoinspection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_mosquitoinspection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_pointlocation.bob.go b/db/models/fs_pointlocation.bob.go index b05daeea..2e811f85 100644 --- a/db/models/fs_pointlocation.bob.go +++ b/db/models/fs_pointlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -576,7 +576,7 @@ func (s *FSPointlocationSetter) Apply(q *dialect.InsertQuery) { return FSPointlocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 49) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1275,7 +1275,7 @@ func (o *FSPointlocation) primaryKeyVals() bob.Expression { } func (o *FSPointlocation) pkEQ() dialect.Expression { - return psql.Quote("fs_pointlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_pointlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1336,7 +1336,7 @@ func (o FSPointlocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_pointlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_pointlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_polygonlocation.bob.go b/db/models/fs_polygonlocation.bob.go index e6ab4f43..459701d0 100644 --- a/db/models/fs_polygonlocation.bob.go +++ b/db/models/fs_polygonlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -546,7 +546,7 @@ func (s *FSPolygonlocationSetter) Apply(q *dialect.InsertQuery) { return FSPolygonlocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 46) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1206,7 +1206,7 @@ func (o *FSPolygonlocation) primaryKeyVals() bob.Expression { } func (o *FSPolygonlocation) pkEQ() dialect.Expression { - return psql.Quote("fs_polygonlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_polygonlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1267,7 +1267,7 @@ func (o FSPolygonlocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_polygonlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_polygonlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_pool.bob.go b/db/models/fs_pool.bob.go index 969538d9..9c43587d 100644 --- a/db/models/fs_pool.bob.go +++ b/db/models/fs_pool.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -406,7 +406,7 @@ func (s *FSPoolSetter) Apply(q *dialect.InsertQuery) { return FSPools.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 32) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -884,7 +884,7 @@ func (o *FSPool) primaryKeyVals() bob.Expression { } func (o *FSPool) pkEQ() dialect.Expression { - return psql.Quote("fs_pool", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_pool", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -945,7 +945,7 @@ func (o FSPoolSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_pool", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_pool", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_pooldetail.bob.go b/db/models/fs_pooldetail.bob.go index b41a3f6a..e2f27615 100644 --- a/db/models/fs_pooldetail.bob.go +++ b/db/models/fs_pooldetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -266,7 +266,7 @@ func (s *FSPooldetailSetter) Apply(q *dialect.InsertQuery) { return FSPooldetails.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 18) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -562,7 +562,7 @@ func (o *FSPooldetail) primaryKeyVals() bob.Expression { } func (o *FSPooldetail) pkEQ() dialect.Expression { - return psql.Quote("fs_pooldetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_pooldetail", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -623,7 +623,7 @@ func (o FSPooldetailSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_pooldetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_pooldetail", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_proposedtreatmentarea.bob.go b/db/models/fs_proposedtreatmentarea.bob.go index 1614f14f..793c406d 100644 --- a/db/models/fs_proposedtreatmentarea.bob.go +++ b/db/models/fs_proposedtreatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -456,7 +456,7 @@ func (s *FSProposedtreatmentareaSetter) Apply(q *dialect.InsertQuery) { return FSProposedtreatmentareas.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 37) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -999,7 +999,7 @@ func (o *FSProposedtreatmentarea) primaryKeyVals() bob.Expression { } func (o *FSProposedtreatmentarea) pkEQ() dialect.Expression { - return psql.Quote("fs_proposedtreatmentarea", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_proposedtreatmentarea", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1060,7 +1060,7 @@ func (o FSProposedtreatmentareaSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_proposedtreatmentarea", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_proposedtreatmentarea", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_qamosquitoinspection.bob.go b/db/models/fs_qamosquitoinspection.bob.go index bb954659..bb4ea43f 100644 --- a/db/models/fs_qamosquitoinspection.bob.go +++ b/db/models/fs_qamosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -746,7 +746,7 @@ func (s *FSQamosquitoinspectionSetter) Apply(q *dialect.InsertQuery) { return FSQamosquitoinspections.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 66) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1666,7 +1666,7 @@ func (o *FSQamosquitoinspection) primaryKeyVals() bob.Expression { } func (o *FSQamosquitoinspection) pkEQ() dialect.Expression { - return psql.Quote("fs_qamosquitoinspection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_qamosquitoinspection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1727,7 +1727,7 @@ func (o FSQamosquitoinspectionSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_qamosquitoinspection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_qamosquitoinspection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_rodentlocation.bob.go b/db/models/fs_rodentlocation.bob.go index 048d1875..0173520f 100644 --- a/db/models/fs_rodentlocation.bob.go +++ b/db/models/fs_rodentlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -426,7 +426,7 @@ func (s *FSRodentlocationSetter) Apply(q *dialect.InsertQuery) { return FSRodentlocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 34) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -930,7 +930,7 @@ func (o *FSRodentlocation) primaryKeyVals() bob.Expression { } func (o *FSRodentlocation) pkEQ() dialect.Expression { - return psql.Quote("fs_rodentlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_rodentlocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -991,7 +991,7 @@ func (o FSRodentlocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_rodentlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_rodentlocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_samplecollection.bob.go b/db/models/fs_samplecollection.bob.go index 1ec61241..df590e93 100644 --- a/db/models/fs_samplecollection.bob.go +++ b/db/models/fs_samplecollection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -586,7 +586,7 @@ func (s *FSSamplecollectionSetter) Apply(q *dialect.InsertQuery) { return FSSamplecollections.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 50) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1298,7 +1298,7 @@ func (o *FSSamplecollection) primaryKeyVals() bob.Expression { } func (o *FSSamplecollection) pkEQ() dialect.Expression { - return psql.Quote("fs_samplecollection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_samplecollection", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1359,7 +1359,7 @@ func (o FSSamplecollectionSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_samplecollection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_samplecollection", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_samplelocation.bob.go b/db/models/fs_samplelocation.bob.go index 6f6eef8c..6a37a170 100644 --- a/db/models/fs_samplelocation.bob.go +++ b/db/models/fs_samplelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -366,7 +366,7 @@ func (s *FSSamplelocationSetter) Apply(q *dialect.InsertQuery) { return FSSamplelocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 28) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -792,7 +792,7 @@ func (o *FSSamplelocation) primaryKeyVals() bob.Expression { } func (o *FSSamplelocation) pkEQ() dialect.Expression { - return psql.Quote("fs_samplelocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_samplelocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -853,7 +853,7 @@ func (o FSSamplelocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_samplelocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_samplelocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_servicerequest.bob.go b/db/models/fs_servicerequest.bob.go index d045fb71..48cbc026 100644 --- a/db/models/fs_servicerequest.bob.go +++ b/db/models/fs_servicerequest.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -986,7 +986,7 @@ func (s *FSServicerequestSetter) Apply(q *dialect.InsertQuery) { return FSServicerequests.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 90) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -2218,7 +2218,7 @@ func (o *FSServicerequest) primaryKeyVals() bob.Expression { } func (o *FSServicerequest) pkEQ() dialect.Expression { - return psql.Quote("fs_servicerequest", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_servicerequest", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -2279,7 +2279,7 @@ func (o FSServicerequestSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_servicerequest", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_servicerequest", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_speciesabundance.bob.go b/db/models/fs_speciesabundance.bob.go index 87938620..a8d29eb5 100644 --- a/db/models/fs_speciesabundance.bob.go +++ b/db/models/fs_speciesabundance.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -416,7 +416,7 @@ func (s *FSSpeciesabundanceSetter) Apply(q *dialect.InsertQuery) { return FSSpeciesabundances.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 33) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -907,7 +907,7 @@ func (o *FSSpeciesabundance) primaryKeyVals() bob.Expression { } func (o *FSSpeciesabundance) pkEQ() dialect.Expression { - return psql.Quote("fs_speciesabundance", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_speciesabundance", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -968,7 +968,7 @@ func (o FSSpeciesabundanceSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_speciesabundance", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_speciesabundance", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_stormdrain.bob.go b/db/models/fs_stormdrain.bob.go index a9448003..dfa2a8ec 100644 --- a/db/models/fs_stormdrain.bob.go +++ b/db/models/fs_stormdrain.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -316,7 +316,7 @@ func (s *FSStormdrainSetter) Apply(q *dialect.InsertQuery) { return FSStormdrains.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 23) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -677,7 +677,7 @@ func (o *FSStormdrain) primaryKeyVals() bob.Expression { } func (o *FSStormdrain) pkEQ() dialect.Expression { - return psql.Quote("fs_stormdrain", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_stormdrain", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -738,7 +738,7 @@ func (o FSStormdrainSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_stormdrain", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_stormdrain", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_timecard.bob.go b/db/models/fs_timecard.bob.go index a52fe0b5..2d375344 100644 --- a/db/models/fs_timecard.bob.go +++ b/db/models/fs_timecard.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -406,7 +406,7 @@ func (s *FSTimecardSetter) Apply(q *dialect.InsertQuery) { return FSTimecards.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 32) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -884,7 +884,7 @@ func (o *FSTimecard) primaryKeyVals() bob.Expression { } func (o *FSTimecard) pkEQ() dialect.Expression { - return psql.Quote("fs_timecard", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_timecard", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -945,7 +945,7 @@ func (o FSTimecardSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_timecard", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_timecard", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_trapdata.bob.go b/db/models/fs_trapdata.bob.go index c17d48c0..d7922f2c 100644 --- a/db/models/fs_trapdata.bob.go +++ b/db/models/fs_trapdata.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -546,7 +546,7 @@ func (s *FSTrapdatumSetter) Apply(q *dialect.InsertQuery) { return FSTrapdata.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 46) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1206,7 +1206,7 @@ func (o *FSTrapdatum) primaryKeyVals() bob.Expression { } func (o *FSTrapdatum) pkEQ() dialect.Expression { - return psql.Quote("fs_trapdata", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_trapdata", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1267,7 +1267,7 @@ func (o FSTrapdatumSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_trapdata", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_trapdata", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_traplocation.bob.go b/db/models/fs_traplocation.bob.go index ea4f7d2e..908e2fef 100644 --- a/db/models/fs_traplocation.bob.go +++ b/db/models/fs_traplocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -436,7 +436,7 @@ func (s *FSTraplocationSetter) Apply(q *dialect.InsertQuery) { return FSTraplocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 35) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -953,7 +953,7 @@ func (o *FSTraplocation) primaryKeyVals() bob.Expression { } func (o *FSTraplocation) pkEQ() dialect.Expression { - return psql.Quote("fs_traplocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_traplocation", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1014,7 +1014,7 @@ func (o FSTraplocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_traplocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_traplocation", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_treatment.bob.go b/db/models/fs_treatment.bob.go index d69cf92e..de73f5ab 100644 --- a/db/models/fs_treatment.bob.go +++ b/db/models/fs_treatment.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -676,7 +676,7 @@ func (s *FSTreatmentSetter) Apply(q *dialect.InsertQuery) { return FSTreatments.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 59) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1505,7 +1505,7 @@ func (o *FSTreatment) primaryKeyVals() bob.Expression { } func (o *FSTreatment) pkEQ() dialect.Expression { - return psql.Quote("fs_treatment", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_treatment", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1566,7 +1566,7 @@ func (o FSTreatmentSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_treatment", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_treatment", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_treatmentarea.bob.go b/db/models/fs_treatmentarea.bob.go index ab74a35d..6a8c5b10 100644 --- a/db/models/fs_treatmentarea.bob.go +++ b/db/models/fs_treatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -306,7 +306,7 @@ func (s *FSTreatmentareaSetter) Apply(q *dialect.InsertQuery) { return FSTreatmentareas.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 22) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -654,7 +654,7 @@ func (o *FSTreatmentarea) primaryKeyVals() bob.Expression { } func (o *FSTreatmentarea) pkEQ() dialect.Expression { - return psql.Quote("fs_treatmentarea", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_treatmentarea", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -715,7 +715,7 @@ func (o FSTreatmentareaSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_treatmentarea", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_treatmentarea", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_zones.bob.go b/db/models/fs_zones.bob.go index 980bb838..0a49e938 100644 --- a/db/models/fs_zones.bob.go +++ b/db/models/fs_zones.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -266,7 +266,7 @@ func (s *FSZoneSetter) Apply(q *dialect.InsertQuery) { return FSZones.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 18) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -562,7 +562,7 @@ func (o *FSZone) primaryKeyVals() bob.Expression { } func (o *FSZone) pkEQ() dialect.Expression { - return psql.Quote("fs_zones", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_zones", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -623,7 +623,7 @@ func (o FSZoneSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_zones", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_zones", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/fs_zones2.bob.go b/db/models/fs_zones2.bob.go index 696c22ba..01df8527 100644 --- a/db/models/fs_zones2.bob.go +++ b/db/models/fs_zones2.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -256,7 +256,7 @@ func (s *FSZones2Setter) Apply(q *dialect.InsertQuery) { return FSZones2s.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 17) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -539,7 +539,7 @@ func (o *FSZones2) primaryKeyVals() bob.Expression { } func (o *FSZones2) pkEQ() dialect.Expression { - return psql.Quote("fs_zones2", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_zones2", "objectid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -600,7 +600,7 @@ func (o FSZones2Slice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("fs_zones2", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("fs_zones2", "objectid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/geography_columns.bob.go b/db/models/geography_columns.bob.go index 194b4b4a..61ec66dc 100644 --- a/db/models/geography_columns.bob.go +++ b/db/models/geography_columns.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models diff --git a/db/models/geometry_columns.bob.go b/db/models/geometry_columns.bob.go index 38a7c6be..6afc4e69 100644 --- a/db/models/geometry_columns.bob.go +++ b/db/models/geometry_columns.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models diff --git a/db/models/goose_db_version.bob.go b/db/models/goose_db_version.bob.go index 40f2b3b9..73a6c23e 100644 --- a/db/models/goose_db_version.bob.go +++ b/db/models/goose_db_version.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -113,7 +113,7 @@ func (s *GooseDBVersionSetter) Apply(q *dialect.InsertQuery) { return GooseDBVersions.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 4) if s.ID.IsValue() { vals[0] = psql.Arg(s.ID.MustGet()) @@ -227,7 +227,7 @@ func (o *GooseDBVersion) primaryKeyVals() bob.Expression { } func (o *GooseDBVersion) pkEQ() dialect.Expression { - return psql.Quote("goose_db_version", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("goose_db_version", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -287,7 +287,7 @@ func (o GooseDBVersionSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("goose_db_version", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("goose_db_version", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/h3_aggregation.bob.go b/db/models/h3_aggregation.bob.go index 8555fb4e..1713a702 100644 --- a/db/models/h3_aggregation.bob.go +++ b/db/models/h3_aggregation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -156,7 +156,7 @@ func (s *H3AggregationSetter) Apply(q *dialect.InsertQuery) { return H3Aggregations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 7) if s.ID.IsValue() { vals[0] = psql.Arg(s.ID.MustGet()) @@ -309,7 +309,7 @@ func (o *H3Aggregation) primaryKeyVals() bob.Expression { } func (o *H3Aggregation) pkEQ() dialect.Expression { - return psql.Quote("h3_aggregation", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("h3_aggregation", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -370,7 +370,7 @@ func (o H3AggregationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("h3_aggregation", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("h3_aggregation", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_containerrelate.bob.go b/db/models/history_containerrelate.bob.go index e035f3a7..6d891923 100644 --- a/db/models/history_containerrelate.bob.go +++ b/db/models/history_containerrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -276,7 +276,7 @@ func (s *HistoryContainerrelateSetter) Apply(q *dialect.InsertQuery) { return HistoryContainerrelates.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 19) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -591,7 +591,7 @@ func (o *HistoryContainerrelate) primaryKeyVals() bob.Expression { } func (o *HistoryContainerrelate) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_containerrelate", "objectid"), psql.Quote("history_containerrelate", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_containerrelate", "objectid"), psql.Quote("history_containerrelate", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -653,7 +653,7 @@ func (o HistoryContainerrelateSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_containerrelate", "objectid"), psql.Quote("history_containerrelate", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_containerrelate", "objectid"), psql.Quote("history_containerrelate", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_fieldscoutinglog.bob.go b/db/models/history_fieldscoutinglog.bob.go index 90ce6116..8bde1bba 100644 --- a/db/models/history_fieldscoutinglog.bob.go +++ b/db/models/history_fieldscoutinglog.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -246,7 +246,7 @@ func (s *HistoryFieldscoutinglogSetter) Apply(q *dialect.InsertQuery) { return HistoryFieldscoutinglogs.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 16) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -522,7 +522,7 @@ func (o *HistoryFieldscoutinglog) primaryKeyVals() bob.Expression { } func (o *HistoryFieldscoutinglog) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_fieldscoutinglog", "objectid"), psql.Quote("history_fieldscoutinglog", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_fieldscoutinglog", "objectid"), psql.Quote("history_fieldscoutinglog", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -584,7 +584,7 @@ func (o HistoryFieldscoutinglogSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_fieldscoutinglog", "objectid"), psql.Quote("history_fieldscoutinglog", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_fieldscoutinglog", "objectid"), psql.Quote("history_fieldscoutinglog", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_habitatrelate.bob.go b/db/models/history_habitatrelate.bob.go index 5d31843a..d7266704 100644 --- a/db/models/history_habitatrelate.bob.go +++ b/db/models/history_habitatrelate.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -256,7 +256,7 @@ func (s *HistoryHabitatrelateSetter) Apply(q *dialect.InsertQuery) { return HistoryHabitatrelates.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 17) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -545,7 +545,7 @@ func (o *HistoryHabitatrelate) primaryKeyVals() bob.Expression { } func (o *HistoryHabitatrelate) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_habitatrelate", "objectid"), psql.Quote("history_habitatrelate", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_habitatrelate", "objectid"), psql.Quote("history_habitatrelate", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -607,7 +607,7 @@ func (o HistoryHabitatrelateSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_habitatrelate", "objectid"), psql.Quote("history_habitatrelate", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_habitatrelate", "objectid"), psql.Quote("history_habitatrelate", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_inspectionsample.bob.go b/db/models/history_inspectionsample.bob.go index e1854956..02c9a0f0 100644 --- a/db/models/history_inspectionsample.bob.go +++ b/db/models/history_inspectionsample.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -276,7 +276,7 @@ func (s *HistoryInspectionsampleSetter) Apply(q *dialect.InsertQuery) { return HistoryInspectionsamples.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 19) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -591,7 +591,7 @@ func (o *HistoryInspectionsample) primaryKeyVals() bob.Expression { } func (o *HistoryInspectionsample) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_inspectionsample", "objectid"), psql.Quote("history_inspectionsample", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_inspectionsample", "objectid"), psql.Quote("history_inspectionsample", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -653,7 +653,7 @@ func (o HistoryInspectionsampleSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_inspectionsample", "objectid"), psql.Quote("history_inspectionsample", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_inspectionsample", "objectid"), psql.Quote("history_inspectionsample", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_inspectionsampledetail.bob.go b/db/models/history_inspectionsampledetail.bob.go index 1bebd8cd..7208c49a 100644 --- a/db/models/history_inspectionsampledetail.bob.go +++ b/db/models/history_inspectionsampledetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -386,7 +386,7 @@ func (s *HistoryInspectionsampledetailSetter) Apply(q *dialect.InsertQuery) { return HistoryInspectionsampledetails.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 30) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -844,7 +844,7 @@ func (o *HistoryInspectionsampledetail) primaryKeyVals() bob.Expression { } func (o *HistoryInspectionsampledetail) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_inspectionsampledetail", "objectid"), psql.Quote("history_inspectionsampledetail", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_inspectionsampledetail", "objectid"), psql.Quote("history_inspectionsampledetail", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -906,7 +906,7 @@ func (o HistoryInspectionsampledetailSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_inspectionsampledetail", "objectid"), psql.Quote("history_inspectionsampledetail", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_inspectionsampledetail", "objectid"), psql.Quote("history_inspectionsampledetail", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_linelocation.bob.go b/db/models/history_linelocation.bob.go index fd5b9d5a..2eee03c0 100644 --- a/db/models/history_linelocation.bob.go +++ b/db/models/history_linelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -616,7 +616,7 @@ func (s *HistoryLinelocationSetter) Apply(q *dialect.InsertQuery) { return HistoryLinelocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 53) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1373,7 +1373,7 @@ func (o *HistoryLinelocation) primaryKeyVals() bob.Expression { } func (o *HistoryLinelocation) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_linelocation", "objectid"), psql.Quote("history_linelocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_linelocation", "objectid"), psql.Quote("history_linelocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1435,7 +1435,7 @@ func (o HistoryLinelocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_linelocation", "objectid"), psql.Quote("history_linelocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_linelocation", "objectid"), psql.Quote("history_linelocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_locationtracking.bob.go b/db/models/history_locationtracking.bob.go index e1f7580d..49c73fc5 100644 --- a/db/models/history_locationtracking.bob.go +++ b/db/models/history_locationtracking.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -256,7 +256,7 @@ func (s *HistoryLocationtrackingSetter) Apply(q *dialect.InsertQuery) { return HistoryLocationtrackings.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 17) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -545,7 +545,7 @@ func (o *HistoryLocationtracking) primaryKeyVals() bob.Expression { } func (o *HistoryLocationtracking) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_locationtracking", "objectid"), psql.Quote("history_locationtracking", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_locationtracking", "objectid"), psql.Quote("history_locationtracking", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -607,7 +607,7 @@ func (o HistoryLocationtrackingSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_locationtracking", "objectid"), psql.Quote("history_locationtracking", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_locationtracking", "objectid"), psql.Quote("history_locationtracking", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_mosquitoinspection.bob.go b/db/models/history_mosquitoinspection.bob.go index c661ffa8..4c7d78ec 100644 --- a/db/models/history_mosquitoinspection.bob.go +++ b/db/models/history_mosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -706,7 +706,7 @@ func (s *HistoryMosquitoinspectionSetter) Apply(q *dialect.InsertQuery) { return HistoryMosquitoinspections.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 62) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1580,7 +1580,7 @@ func (o *HistoryMosquitoinspection) primaryKeyVals() bob.Expression { } func (o *HistoryMosquitoinspection) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_mosquitoinspection", "objectid"), psql.Quote("history_mosquitoinspection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_mosquitoinspection", "objectid"), psql.Quote("history_mosquitoinspection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1642,7 +1642,7 @@ func (o HistoryMosquitoinspectionSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_mosquitoinspection", "objectid"), psql.Quote("history_mosquitoinspection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_mosquitoinspection", "objectid"), psql.Quote("history_mosquitoinspection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_pointlocation.bob.go b/db/models/history_pointlocation.bob.go index 83b75639..84db5ad3 100644 --- a/db/models/history_pointlocation.bob.go +++ b/db/models/history_pointlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -576,7 +576,7 @@ func (s *HistoryPointlocationSetter) Apply(q *dialect.InsertQuery) { return HistoryPointlocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 49) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1281,7 +1281,7 @@ func (o *HistoryPointlocation) primaryKeyVals() bob.Expression { } func (o *HistoryPointlocation) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_pointlocation", "objectid"), psql.Quote("history_pointlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_pointlocation", "objectid"), psql.Quote("history_pointlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1343,7 +1343,7 @@ func (o HistoryPointlocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_pointlocation", "objectid"), psql.Quote("history_pointlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_pointlocation", "objectid"), psql.Quote("history_pointlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_polygonlocation.bob.go b/db/models/history_polygonlocation.bob.go index 522ec498..7b1cc594 100644 --- a/db/models/history_polygonlocation.bob.go +++ b/db/models/history_polygonlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -556,7 +556,7 @@ func (s *HistoryPolygonlocationSetter) Apply(q *dialect.InsertQuery) { return HistoryPolygonlocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 47) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1235,7 +1235,7 @@ func (o *HistoryPolygonlocation) primaryKeyVals() bob.Expression { } func (o *HistoryPolygonlocation) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_polygonlocation", "objectid"), psql.Quote("history_polygonlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_polygonlocation", "objectid"), psql.Quote("history_polygonlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1297,7 +1297,7 @@ func (o HistoryPolygonlocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_polygonlocation", "objectid"), psql.Quote("history_polygonlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_polygonlocation", "objectid"), psql.Quote("history_polygonlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_pool.bob.go b/db/models/history_pool.bob.go index 23279e00..8183709f 100644 --- a/db/models/history_pool.bob.go +++ b/db/models/history_pool.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -416,7 +416,7 @@ func (s *HistoryPoolSetter) Apply(q *dialect.InsertQuery) { return HistoryPools.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 33) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -913,7 +913,7 @@ func (o *HistoryPool) primaryKeyVals() bob.Expression { } func (o *HistoryPool) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_pool", "objectid"), psql.Quote("history_pool", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_pool", "objectid"), psql.Quote("history_pool", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -975,7 +975,7 @@ func (o HistoryPoolSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_pool", "objectid"), psql.Quote("history_pool", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_pool", "objectid"), psql.Quote("history_pool", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_pooldetail.bob.go b/db/models/history_pooldetail.bob.go index b3f87e5a..93cdb161 100644 --- a/db/models/history_pooldetail.bob.go +++ b/db/models/history_pooldetail.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -276,7 +276,7 @@ func (s *HistoryPooldetailSetter) Apply(q *dialect.InsertQuery) { return HistoryPooldetails.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 19) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -591,7 +591,7 @@ func (o *HistoryPooldetail) primaryKeyVals() bob.Expression { } func (o *HistoryPooldetail) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_pooldetail", "objectid"), psql.Quote("history_pooldetail", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_pooldetail", "objectid"), psql.Quote("history_pooldetail", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -653,7 +653,7 @@ func (o HistoryPooldetailSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_pooldetail", "objectid"), psql.Quote("history_pooldetail", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_pooldetail", "objectid"), psql.Quote("history_pooldetail", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_proposedtreatmentarea.bob.go b/db/models/history_proposedtreatmentarea.bob.go index 97ff3010..d4be578a 100644 --- a/db/models/history_proposedtreatmentarea.bob.go +++ b/db/models/history_proposedtreatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -466,7 +466,7 @@ func (s *HistoryProposedtreatmentareaSetter) Apply(q *dialect.InsertQuery) { return HistoryProposedtreatmentareas.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 38) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1028,7 +1028,7 @@ func (o *HistoryProposedtreatmentarea) primaryKeyVals() bob.Expression { } func (o *HistoryProposedtreatmentarea) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_proposedtreatmentarea", "objectid"), psql.Quote("history_proposedtreatmentarea", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_proposedtreatmentarea", "objectid"), psql.Quote("history_proposedtreatmentarea", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1090,7 +1090,7 @@ func (o HistoryProposedtreatmentareaSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_proposedtreatmentarea", "objectid"), psql.Quote("history_proposedtreatmentarea", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_proposedtreatmentarea", "objectid"), psql.Quote("history_proposedtreatmentarea", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_qamosquitoinspection.bob.go b/db/models/history_qamosquitoinspection.bob.go index c9e05033..4042a1d0 100644 --- a/db/models/history_qamosquitoinspection.bob.go +++ b/db/models/history_qamosquitoinspection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -756,7 +756,7 @@ func (s *HistoryQamosquitoinspectionSetter) Apply(q *dialect.InsertQuery) { return HistoryQamosquitoinspections.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 67) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1695,7 +1695,7 @@ func (o *HistoryQamosquitoinspection) primaryKeyVals() bob.Expression { } func (o *HistoryQamosquitoinspection) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_qamosquitoinspection", "objectid"), psql.Quote("history_qamosquitoinspection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_qamosquitoinspection", "objectid"), psql.Quote("history_qamosquitoinspection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1757,7 +1757,7 @@ func (o HistoryQamosquitoinspectionSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_qamosquitoinspection", "objectid"), psql.Quote("history_qamosquitoinspection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_qamosquitoinspection", "objectid"), psql.Quote("history_qamosquitoinspection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_rodentlocation.bob.go b/db/models/history_rodentlocation.bob.go index 426e58ac..e4716ce7 100644 --- a/db/models/history_rodentlocation.bob.go +++ b/db/models/history_rodentlocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -436,7 +436,7 @@ func (s *HistoryRodentlocationSetter) Apply(q *dialect.InsertQuery) { return HistoryRodentlocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 35) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -959,7 +959,7 @@ func (o *HistoryRodentlocation) primaryKeyVals() bob.Expression { } func (o *HistoryRodentlocation) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_rodentlocation", "objectid"), psql.Quote("history_rodentlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_rodentlocation", "objectid"), psql.Quote("history_rodentlocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1021,7 +1021,7 @@ func (o HistoryRodentlocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_rodentlocation", "objectid"), psql.Quote("history_rodentlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_rodentlocation", "objectid"), psql.Quote("history_rodentlocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_samplecollection.bob.go b/db/models/history_samplecollection.bob.go index e2788ea2..85ea4394 100644 --- a/db/models/history_samplecollection.bob.go +++ b/db/models/history_samplecollection.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -596,7 +596,7 @@ func (s *HistorySamplecollectionSetter) Apply(q *dialect.InsertQuery) { return HistorySamplecollections.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 51) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1327,7 +1327,7 @@ func (o *HistorySamplecollection) primaryKeyVals() bob.Expression { } func (o *HistorySamplecollection) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_samplecollection", "objectid"), psql.Quote("history_samplecollection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_samplecollection", "objectid"), psql.Quote("history_samplecollection", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1389,7 +1389,7 @@ func (o HistorySamplecollectionSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_samplecollection", "objectid"), psql.Quote("history_samplecollection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_samplecollection", "objectid"), psql.Quote("history_samplecollection", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_samplelocation.bob.go b/db/models/history_samplelocation.bob.go index ded806a4..154f7ee6 100644 --- a/db/models/history_samplelocation.bob.go +++ b/db/models/history_samplelocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -376,7 +376,7 @@ func (s *HistorySamplelocationSetter) Apply(q *dialect.InsertQuery) { return HistorySamplelocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 29) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -821,7 +821,7 @@ func (o *HistorySamplelocation) primaryKeyVals() bob.Expression { } func (o *HistorySamplelocation) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_samplelocation", "objectid"), psql.Quote("history_samplelocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_samplelocation", "objectid"), psql.Quote("history_samplelocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -883,7 +883,7 @@ func (o HistorySamplelocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_samplelocation", "objectid"), psql.Quote("history_samplelocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_samplelocation", "objectid"), psql.Quote("history_samplelocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_servicerequest.bob.go b/db/models/history_servicerequest.bob.go index 32ca4434..11c84daf 100644 --- a/db/models/history_servicerequest.bob.go +++ b/db/models/history_servicerequest.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -996,7 +996,7 @@ func (s *HistoryServicerequestSetter) Apply(q *dialect.InsertQuery) { return HistoryServicerequests.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 91) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -2247,7 +2247,7 @@ func (o *HistoryServicerequest) primaryKeyVals() bob.Expression { } func (o *HistoryServicerequest) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_servicerequest", "objectid"), psql.Quote("history_servicerequest", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_servicerequest", "objectid"), psql.Quote("history_servicerequest", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -2309,7 +2309,7 @@ func (o HistoryServicerequestSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_servicerequest", "objectid"), psql.Quote("history_servicerequest", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_servicerequest", "objectid"), psql.Quote("history_servicerequest", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_speciesabundance.bob.go b/db/models/history_speciesabundance.bob.go index bd527956..c6f952d3 100644 --- a/db/models/history_speciesabundance.bob.go +++ b/db/models/history_speciesabundance.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -426,7 +426,7 @@ func (s *HistorySpeciesabundanceSetter) Apply(q *dialect.InsertQuery) { return HistorySpeciesabundances.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 34) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -936,7 +936,7 @@ func (o *HistorySpeciesabundance) primaryKeyVals() bob.Expression { } func (o *HistorySpeciesabundance) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_speciesabundance", "objectid"), psql.Quote("history_speciesabundance", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_speciesabundance", "objectid"), psql.Quote("history_speciesabundance", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -998,7 +998,7 @@ func (o HistorySpeciesabundanceSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_speciesabundance", "objectid"), psql.Quote("history_speciesabundance", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_speciesabundance", "objectid"), psql.Quote("history_speciesabundance", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_stormdrain.bob.go b/db/models/history_stormdrain.bob.go index 03e8fe48..84d5b54e 100644 --- a/db/models/history_stormdrain.bob.go +++ b/db/models/history_stormdrain.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -326,7 +326,7 @@ func (s *HistoryStormdrainSetter) Apply(q *dialect.InsertQuery) { return HistoryStormdrains.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 24) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -706,7 +706,7 @@ func (o *HistoryStormdrain) primaryKeyVals() bob.Expression { } func (o *HistoryStormdrain) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_stormdrain", "objectid"), psql.Quote("history_stormdrain", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_stormdrain", "objectid"), psql.Quote("history_stormdrain", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -768,7 +768,7 @@ func (o HistoryStormdrainSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_stormdrain", "objectid"), psql.Quote("history_stormdrain", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_stormdrain", "objectid"), psql.Quote("history_stormdrain", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_timecard.bob.go b/db/models/history_timecard.bob.go index 78538bd8..2c7c12f6 100644 --- a/db/models/history_timecard.bob.go +++ b/db/models/history_timecard.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -416,7 +416,7 @@ func (s *HistoryTimecardSetter) Apply(q *dialect.InsertQuery) { return HistoryTimecards.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 33) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -913,7 +913,7 @@ func (o *HistoryTimecard) primaryKeyVals() bob.Expression { } func (o *HistoryTimecard) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_timecard", "objectid"), psql.Quote("history_timecard", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_timecard", "objectid"), psql.Quote("history_timecard", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -975,7 +975,7 @@ func (o HistoryTimecardSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_timecard", "objectid"), psql.Quote("history_timecard", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_timecard", "objectid"), psql.Quote("history_timecard", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_trapdata.bob.go b/db/models/history_trapdata.bob.go index 1904e426..1e3b539f 100644 --- a/db/models/history_trapdata.bob.go +++ b/db/models/history_trapdata.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -556,7 +556,7 @@ func (s *HistoryTrapdatumSetter) Apply(q *dialect.InsertQuery) { return HistoryTrapdata.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 47) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1235,7 +1235,7 @@ func (o *HistoryTrapdatum) primaryKeyVals() bob.Expression { } func (o *HistoryTrapdatum) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_trapdata", "objectid"), psql.Quote("history_trapdata", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_trapdata", "objectid"), psql.Quote("history_trapdata", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1297,7 +1297,7 @@ func (o HistoryTrapdatumSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_trapdata", "objectid"), psql.Quote("history_trapdata", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_trapdata", "objectid"), psql.Quote("history_trapdata", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_traplocation.bob.go b/db/models/history_traplocation.bob.go index c6b4eadf..3e911683 100644 --- a/db/models/history_traplocation.bob.go +++ b/db/models/history_traplocation.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -436,7 +436,7 @@ func (s *HistoryTraplocationSetter) Apply(q *dialect.InsertQuery) { return HistoryTraplocations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 35) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -959,7 +959,7 @@ func (o *HistoryTraplocation) primaryKeyVals() bob.Expression { } func (o *HistoryTraplocation) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_traplocation", "objectid"), psql.Quote("history_traplocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_traplocation", "objectid"), psql.Quote("history_traplocation", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1021,7 +1021,7 @@ func (o HistoryTraplocationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_traplocation", "objectid"), psql.Quote("history_traplocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_traplocation", "objectid"), psql.Quote("history_traplocation", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_treatment.bob.go b/db/models/history_treatment.bob.go index 9b4f55bd..ae1379e9 100644 --- a/db/models/history_treatment.bob.go +++ b/db/models/history_treatment.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -676,7 +676,7 @@ func (s *HistoryTreatmentSetter) Apply(q *dialect.InsertQuery) { return HistoryTreatments.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 59) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -1511,7 +1511,7 @@ func (o *HistoryTreatment) primaryKeyVals() bob.Expression { } func (o *HistoryTreatment) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_treatment", "objectid"), psql.Quote("history_treatment", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_treatment", "objectid"), psql.Quote("history_treatment", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -1573,7 +1573,7 @@ func (o HistoryTreatmentSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_treatment", "objectid"), psql.Quote("history_treatment", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_treatment", "objectid"), psql.Quote("history_treatment", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_treatmentarea.bob.go b/db/models/history_treatmentarea.bob.go index fb72a96d..391b991a 100644 --- a/db/models/history_treatmentarea.bob.go +++ b/db/models/history_treatmentarea.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -316,7 +316,7 @@ func (s *HistoryTreatmentareaSetter) Apply(q *dialect.InsertQuery) { return HistoryTreatmentareas.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 23) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -683,7 +683,7 @@ func (o *HistoryTreatmentarea) primaryKeyVals() bob.Expression { } func (o *HistoryTreatmentarea) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_treatmentarea", "objectid"), psql.Quote("history_treatmentarea", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_treatmentarea", "objectid"), psql.Quote("history_treatmentarea", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -745,7 +745,7 @@ func (o HistoryTreatmentareaSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_treatmentarea", "objectid"), psql.Quote("history_treatmentarea", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_treatmentarea", "objectid"), psql.Quote("history_treatmentarea", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_zones.bob.go b/db/models/history_zones.bob.go index 45d97961..23cb18c3 100644 --- a/db/models/history_zones.bob.go +++ b/db/models/history_zones.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -276,7 +276,7 @@ func (s *HistoryZoneSetter) Apply(q *dialect.InsertQuery) { return HistoryZones.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 19) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -591,7 +591,7 @@ func (o *HistoryZone) primaryKeyVals() bob.Expression { } func (o *HistoryZone) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_zones", "objectid"), psql.Quote("history_zones", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_zones", "objectid"), psql.Quote("history_zones", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -653,7 +653,7 @@ func (o HistoryZoneSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_zones", "objectid"), psql.Quote("history_zones", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_zones", "objectid"), psql.Quote("history_zones", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/history_zones2.bob.go b/db/models/history_zones2.bob.go index 9cda48c2..be659e9f 100644 --- a/db/models/history_zones2.bob.go +++ b/db/models/history_zones2.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -266,7 +266,7 @@ func (s *HistoryZones2Setter) Apply(q *dialect.InsertQuery) { return HistoryZones2s.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 18) if s.OrganizationID.IsValue() { vals[0] = psql.Arg(s.OrganizationID.MustGet()) @@ -568,7 +568,7 @@ func (o *HistoryZones2) primaryKeyVals() bob.Expression { } func (o *HistoryZones2) pkEQ() dialect.Expression { - return psql.Group(psql.Quote("history_zones2", "objectid"), psql.Quote("history_zones2", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_zones2", "objectid"), psql.Quote("history_zones2", "version")).EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -630,7 +630,7 @@ func (o HistoryZones2Slice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Group(psql.Quote("history_zones2", "objectid"), psql.Quote("history_zones2", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Group(psql.Quote("history_zones2", "objectid"), psql.Quote("history_zones2", "version")).In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/notification.bob.go b/db/models/notification.bob.go index 77038401..d0ca6d6c 100644 --- a/db/models/notification.bob.go +++ b/db/models/notification.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -157,7 +157,7 @@ func (s *NotificationSetter) Apply(q *dialect.InsertQuery) { return Notifications.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 7) if s.ID.IsValue() { vals[0] = psql.Arg(s.ID.MustGet()) @@ -310,7 +310,7 @@ func (o *Notification) primaryKeyVals() bob.Expression { } func (o *Notification) pkEQ() dialect.Expression { - return psql.Quote("notification", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("notification", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -371,7 +371,7 @@ func (o NotificationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("notification", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("notification", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/oauth_token.bob.go b/db/models/oauth_token.bob.go index 109ec9ed..9c195a09 100644 --- a/db/models/oauth_token.bob.go +++ b/db/models/oauth_token.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -186,7 +186,7 @@ func (s *OauthTokenSetter) Apply(q *dialect.InsertQuery) { return OauthTokens.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 10) if s.ID.IsValue() { vals[0] = psql.Arg(s.ID.MustGet()) @@ -378,7 +378,7 @@ func (o *OauthToken) primaryKeyVals() bob.Expression { } func (o *OauthToken) pkEQ() dialect.Expression { - return psql.Quote("oauth_token", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("oauth_token", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -439,7 +439,7 @@ func (o OauthTokenSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("oauth_token", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("oauth_token", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/organization.bob.go b/db/models/organization.bob.go index 7d9ca25f..434665bc 100644 --- a/db/models/organization.bob.go +++ b/db/models/organization.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -46,6 +46,7 @@ type OrganizationsQuery = *psql.ViewQuery[*Organization, OrganizationSlice] // organizationR is where relationships are stored. type organizationR struct { + Rodentlocations FieldseekerRodentlocationSlice // fieldseeker.rodentlocation.rodentlocation_organization_id_fkey FieldseekerSyncs FieldseekerSyncSlice // fieldseeker_sync.fieldseeker_sync_organization_id_fkey FSContainerrelates FSContainerrelateSlice // fs_containerrelate.fs_containerrelate_organization_id_fkey FSFieldscoutinglogs FSFieldscoutinglogSlice // fs_fieldscoutinglog.fs_fieldscoutinglog_organization_id_fkey @@ -191,7 +192,7 @@ func (s *OrganizationSetter) Apply(q *dialect.InsertQuery) { return Organizations.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 5) if s.ID.IsValue() { vals[0] = psql.Arg(s.ID.MustGet()) @@ -318,7 +319,7 @@ func (o *Organization) primaryKeyVals() bob.Expression { } func (o *Organization) pkEQ() dialect.Expression { - return psql.Quote("organization", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("organization", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -379,7 +380,7 @@ func (o OrganizationSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("organization", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("organization", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() @@ -495,6 +496,30 @@ func (o OrganizationSlice) ReloadAll(ctx context.Context, exec bob.Executor) err return nil } +// Rodentlocations starts a query for related objects on fieldseeker.rodentlocation +func (o *Organization) Rodentlocations(mods ...bob.Mod[*dialect.SelectQuery]) FieldseekerRodentlocationsQuery { + return FieldseekerRodentlocations.Query(append(mods, + sm.Where(FieldseekerRodentlocations.Columns.OrganizationID.EQ(psql.Arg(o.ID))), + )...) +} + +func (os OrganizationSlice) Rodentlocations(mods ...bob.Mod[*dialect.SelectQuery]) FieldseekerRodentlocationsQuery { + pkID := make(pgtypes.Array[int32], 0, len(os)) + for _, o := range os { + if o == nil { + continue + } + pkID = append(pkID, o.ID) + } + PKArgExpr := psql.Select(sm.Columns( + psql.F("unnest", psql.Cast(psql.Arg(pkID), "integer[]")), + )) + + return FieldseekerRodentlocations.Query(append(mods, + sm.Where(psql.Group(FieldseekerRodentlocations.Columns.OrganizationID).OP("IN", PKArgExpr)), + )...) +} + // FieldseekerSyncs starts a query for related objects on fieldseeker_sync func (o *Organization) FieldseekerSyncs(mods ...bob.Mod[*dialect.SelectQuery]) FieldseekerSyncsQuery { return FieldseekerSyncs.Query(append(mods, @@ -1863,6 +1888,74 @@ func (os OrganizationSlice) User(mods ...bob.Mod[*dialect.SelectQuery]) UsersQue )...) } +func insertOrganizationRodentlocations0(ctx context.Context, exec bob.Executor, fieldseekerRodentlocations1 []*FieldseekerRodentlocationSetter, organization0 *Organization) (FieldseekerRodentlocationSlice, error) { + for i := range fieldseekerRodentlocations1 { + fieldseekerRodentlocations1[i].OrganizationID = omit.From(organization0.ID) + } + + ret, err := FieldseekerRodentlocations.Insert(bob.ToMods(fieldseekerRodentlocations1...)).All(ctx, exec) + if err != nil { + return ret, fmt.Errorf("insertOrganizationRodentlocations0: %w", err) + } + + return ret, nil +} + +func attachOrganizationRodentlocations0(ctx context.Context, exec bob.Executor, count int, fieldseekerRodentlocations1 FieldseekerRodentlocationSlice, organization0 *Organization) (FieldseekerRodentlocationSlice, error) { + setter := &FieldseekerRodentlocationSetter{ + OrganizationID: omit.From(organization0.ID), + } + + err := fieldseekerRodentlocations1.UpdateAll(ctx, exec, *setter) + if err != nil { + return nil, fmt.Errorf("attachOrganizationRodentlocations0: %w", err) + } + + return fieldseekerRodentlocations1, nil +} + +func (organization0 *Organization) InsertRodentlocations(ctx context.Context, exec bob.Executor, related ...*FieldseekerRodentlocationSetter) error { + if len(related) == 0 { + return nil + } + + var err error + + fieldseekerRodentlocations1, err := insertOrganizationRodentlocations0(ctx, exec, related, organization0) + if err != nil { + return err + } + + organization0.R.Rodentlocations = append(organization0.R.Rodentlocations, fieldseekerRodentlocations1...) + + for _, rel := range fieldseekerRodentlocations1 { + rel.R.Organization = organization0 + } + return nil +} + +func (organization0 *Organization) AttachRodentlocations(ctx context.Context, exec bob.Executor, related ...*FieldseekerRodentlocation) error { + if len(related) == 0 { + return nil + } + + var err error + fieldseekerRodentlocations1 := FieldseekerRodentlocationSlice(related) + + _, err = attachOrganizationRodentlocations0(ctx, exec, len(related), fieldseekerRodentlocations1, organization0) + if err != nil { + return err + } + + organization0.R.Rodentlocations = append(organization0.R.Rodentlocations, fieldseekerRodentlocations1...) + + for _, rel := range related { + rel.R.Organization = organization0 + } + + return nil +} + func insertOrganizationFieldseekerSyncs0(ctx context.Context, exec bob.Executor, fieldseekerSyncs1 []*FieldseekerSyncSetter, organization0 *Organization) (FieldseekerSyncSlice, error) { for i := range fieldseekerSyncs1 { fieldseekerSyncs1[i].OrganizationID = omit.From(organization0.ID) @@ -5767,6 +5860,20 @@ func (o *Organization) Preload(name string, retrieved any) error { } switch name { + case "Rodentlocations": + rels, ok := retrieved.(FieldseekerRodentlocationSlice) + if !ok { + return fmt.Errorf("organization cannot load %T as %q", retrieved, name) + } + + o.R.Rodentlocations = rels + + for _, rel := range rels { + if rel != nil { + rel.R.Organization = o + } + } + return nil case "FieldseekerSyncs": rels, ok := retrieved.(FieldseekerSyncSlice) if !ok { @@ -6577,6 +6684,7 @@ func buildOrganizationPreloader() organizationPreloader { } type organizationThenLoader[Q orm.Loadable] struct { + Rodentlocations func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q] FieldseekerSyncs func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q] FSContainerrelates func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q] FSFieldscoutinglogs func(...bob.Mod[*dialect.SelectQuery]) orm.Loader[Q] @@ -6637,6 +6745,9 @@ type organizationThenLoader[Q orm.Loadable] struct { } func buildOrganizationThenLoader[Q orm.Loadable]() organizationThenLoader[Q] { + type RodentlocationsLoadInterface interface { + LoadRodentlocations(context.Context, bob.Executor, ...bob.Mod[*dialect.SelectQuery]) error + } type FieldseekerSyncsLoadInterface interface { LoadFieldseekerSyncs(context.Context, bob.Executor, ...bob.Mod[*dialect.SelectQuery]) error } @@ -6810,6 +6921,12 @@ func buildOrganizationThenLoader[Q orm.Loadable]() organizationThenLoader[Q] { } return organizationThenLoader[Q]{ + Rodentlocations: thenLoadBuilder[Q]( + "Rodentlocations", + func(ctx context.Context, exec bob.Executor, retrieved RodentlocationsLoadInterface, mods ...bob.Mod[*dialect.SelectQuery]) error { + return retrieved.LoadRodentlocations(ctx, exec, mods...) + }, + ), FieldseekerSyncs: thenLoadBuilder[Q]( "FieldseekerSyncs", func(ctx context.Context, exec bob.Executor, retrieved FieldseekerSyncsLoadInterface, mods ...bob.Mod[*dialect.SelectQuery]) error { @@ -7155,6 +7272,67 @@ func buildOrganizationThenLoader[Q orm.Loadable]() organizationThenLoader[Q] { } } +// LoadRodentlocations loads the organization's Rodentlocations into the .R struct +func (o *Organization) LoadRodentlocations(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error { + if o == nil { + return nil + } + + // Reset the relationship + o.R.Rodentlocations = nil + + related, err := o.Rodentlocations(mods...).All(ctx, exec) + if err != nil { + return err + } + + for _, rel := range related { + rel.R.Organization = o + } + + o.R.Rodentlocations = related + return nil +} + +// LoadRodentlocations loads the organization's Rodentlocations into the .R struct +func (os OrganizationSlice) LoadRodentlocations(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error { + if len(os) == 0 { + return nil + } + + fieldseekerRodentlocations, err := os.Rodentlocations(mods...).All(ctx, exec) + if err != nil { + return err + } + + for _, o := range os { + if o == nil { + continue + } + + o.R.Rodentlocations = nil + } + + for _, o := range os { + if o == nil { + continue + } + + for _, rel := range fieldseekerRodentlocations { + + if !(o.ID == rel.OrganizationID) { + continue + } + + rel.R.Organization = o + + o.R.Rodentlocations = append(o.R.Rodentlocations, rel) + } + } + + return nil +} + // LoadFieldseekerSyncs loads the organization's FieldseekerSyncs into the .R struct func (o *Organization) LoadFieldseekerSyncs(ctx context.Context, exec bob.Executor, mods ...bob.Mod[*dialect.SelectQuery]) error { if o == nil { @@ -10637,6 +10815,7 @@ func (os OrganizationSlice) LoadUser(ctx context.Context, exec bob.Executor, mod type organizationJoins[Q dialect.Joinable] struct { typ string + Rodentlocations modAs[Q, fieldseekerRodentlocationColumns] FieldseekerSyncs modAs[Q, fieldseekerSyncColumns] FSContainerrelates modAs[Q, fsContainerrelateColumns] FSFieldscoutinglogs modAs[Q, fsFieldscoutinglogColumns] @@ -10703,6 +10882,20 @@ func (j organizationJoins[Q]) aliasedAs(alias string) organizationJoins[Q] { func buildOrganizationJoins[Q dialect.Joinable](cols organizationColumns, typ string) organizationJoins[Q] { return organizationJoins[Q]{ typ: typ, + Rodentlocations: modAs[Q, fieldseekerRodentlocationColumns]{ + c: FieldseekerRodentlocations.Columns, + f: func(to fieldseekerRodentlocationColumns) bob.Mod[Q] { + mods := make(mods.QueryMods[Q], 0, 1) + + { + mods = append(mods, dialect.Join[Q](typ, FieldseekerRodentlocations.Name().As(to.Alias())).On( + to.OrganizationID.EQ(cols.ID), + )) + } + + return mods + }, + }, FieldseekerSyncs: modAs[Q, fieldseekerSyncColumns]{ c: FieldseekerSyncs.Columns, f: func(to fieldseekerSyncColumns) bob.Mod[Q] { diff --git a/db/models/raster_columns.bob.go b/db/models/raster_columns.bob.go index fb7f2649..53a891f7 100644 --- a/db/models/raster_columns.bob.go +++ b/db/models/raster_columns.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models diff --git a/db/models/raster_overviews.bob.go b/db/models/raster_overviews.bob.go index cfacc9c9..cbe0d219 100644 --- a/db/models/raster_overviews.bob.go +++ b/db/models/raster_overviews.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models diff --git a/db/models/sessions.bob.go b/db/models/sessions.bob.go index 2a97b14f..891888f9 100644 --- a/db/models/sessions.bob.go +++ b/db/models/sessions.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -103,7 +103,7 @@ func (s *SessionSetter) Apply(q *dialect.InsertQuery) { return Sessions.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 3) if s.Token.IsValue() { vals[0] = psql.Arg(s.Token.MustGet()) @@ -204,7 +204,7 @@ func (o *Session) primaryKeyVals() bob.Expression { } func (o *Session) pkEQ() dialect.Expression { - return psql.Quote("sessions", "token").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("sessions", "token").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -264,7 +264,7 @@ func (o SessionSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("sessions", "token").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("sessions", "token").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/spatial_ref_sys.bob.go b/db/models/spatial_ref_sys.bob.go index f8e624a7..cbeb7f3a 100644 --- a/db/models/spatial_ref_sys.bob.go +++ b/db/models/spatial_ref_sys.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -124,7 +124,7 @@ func (s *SpatialRefSySetter) Apply(q *dialect.InsertQuery) { return SpatialRefSys.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 5) if s.Srid.IsValue() { vals[0] = psql.Arg(s.Srid.MustGet()) @@ -251,7 +251,7 @@ func (o *SpatialRefSy) primaryKeyVals() bob.Expression { } func (o *SpatialRefSy) pkEQ() dialect.Expression { - return psql.Quote("spatial_ref_sys", "srid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("spatial_ref_sys", "srid").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -311,7 +311,7 @@ func (o SpatialRefSySlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("spatial_ref_sys", "srid").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("spatial_ref_sys", "srid").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/models/user_.bob.go b/db/models/user_.bob.go index 65fb33e7..873dcc18 100644 --- a/db/models/user_.bob.go +++ b/db/models/user_.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package models @@ -209,7 +209,7 @@ func (s *UserSetter) Apply(q *dialect.InsertQuery) { return Users.BeforeInsertHooks.RunHooks(ctx, exec, s) }) - q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + q.AppendValues(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { vals := make([]bob.Expression, 12) if s.ID.IsValue() { vals[0] = psql.Arg(s.ID.MustGet()) @@ -427,7 +427,7 @@ func (o *User) primaryKeyVals() bob.Expression { } func (o *User) pkEQ() dialect.Expression { - return psql.Quote("user_", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("user_", "id").EQ(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.primaryKeyVals().WriteSQL(ctx, w, d, start) })) } @@ -488,7 +488,7 @@ func (o UserSlice) pkIN() dialect.Expression { return psql.Raw("NULL") } - return psql.Quote("user_", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { + return psql.Quote("user_", "id").In(bob.ExpressionFunc(func(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { pkPairs := make([]bob.Expression, len(o)) for i, row := range o { pkPairs[i] = row.primaryKeyVals() diff --git a/db/sql/oauth_by_user_id.bob.go b/db/sql/oauth_by_user_id.bob.go index 6fe52be6..cf574424 100644 --- a/db/sql/oauth_by_user_id.bob.go +++ b/db/sql/oauth_by_user_id.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql @@ -106,6 +106,6 @@ func (o oauthTokenByUserId) subExpr(from, to int) bob.Expression { return orm.ArgsToExpression(oauthTokenByUserIdSQL, from, to, o.args()) } -func (o oauthTokenByUserId) WriteSQL(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { +func (o oauthTokenByUserId) WriteSQL(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.subExpr(0, len(oauthTokenByUserIdSQL)).WriteSQL(ctx, w, d, start) } diff --git a/db/sql/oauth_by_user_id.bob.sql b/db/sql/oauth_by_user_id.bob.sql index 093d7c45..d11b0598 100644 --- a/db/sql/oauth_by_user_id.bob.sql +++ b/db/sql/oauth_by_user_id.bob.sql @@ -1,4 +1,4 @@ --- Code generated by BobGen psql v0.41.1. DO NOT EDIT. +-- Code generated by BobGen psql v0.42.0. DO NOT EDIT. -- This file is meant to be re-generated in place and/or deleted at any time. -- OauthTokenByUserId diff --git a/db/sql/oauth_by_user_id.bob_test.go b/db/sql/oauth_by_user_id.bob_test.go index 314df39a..7791ade1 100644 --- a/db/sql/oauth_by_user_id.bob_test.go +++ b/db/sql/oauth_by_user_id.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql diff --git a/db/sql/org_by_oauth_id.bob.go b/db/sql/org_by_oauth_id.bob.go index c98fb58a..9644aca5 100644 --- a/db/sql/org_by_oauth_id.bob.go +++ b/db/sql/org_by_oauth_id.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql @@ -91,6 +91,6 @@ func (o orgByOauthId) subExpr(from, to int) bob.Expression { return orm.ArgsToExpression(orgByOauthIdSQL, from, to, o.args()) } -func (o orgByOauthId) WriteSQL(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { +func (o orgByOauthId) WriteSQL(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.subExpr(0, len(orgByOauthIdSQL)).WriteSQL(ctx, w, d, start) } diff --git a/db/sql/org_by_oauth_id.bob.sql b/db/sql/org_by_oauth_id.bob.sql index 0fbd5297..8b79cd87 100644 --- a/db/sql/org_by_oauth_id.bob.sql +++ b/db/sql/org_by_oauth_id.bob.sql @@ -1,4 +1,4 @@ --- Code generated by BobGen psql v0.41.1. DO NOT EDIT. +-- Code generated by BobGen psql v0.42.0. DO NOT EDIT. -- This file is meant to be re-generated in place and/or deleted at any time. -- OrgByOauthId diff --git a/db/sql/org_by_oauth_id.bob_test.go b/db/sql/org_by_oauth_id.bob_test.go index e860db1c..4bc87d96 100644 --- a/db/sql/org_by_oauth_id.bob_test.go +++ b/db/sql/org_by_oauth_id.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql diff --git a/db/sql/test_utils.bob_test.go b/db/sql/test_utils.bob_test.go index dde0c269..4efbfff6 100644 --- a/db/sql/test_utils.bob_test.go +++ b/db/sql/test_utils.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql diff --git a/db/sql/trapcount_by_location_id.bob.go b/db/sql/trapcount_by_location_id.bob.go index 1469e506..787e6354 100644 --- a/db/sql/trapcount_by_location_id.bob.go +++ b/db/sql/trapcount_by_location_id.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql @@ -109,6 +109,6 @@ func (o trapCountByLocationID) subExpr(from, to int) bob.Expression { return orm.ArgsToExpression(trapCountByLocationIDSQL, from, to, o.args()) } -func (o trapCountByLocationID) WriteSQL(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { +func (o trapCountByLocationID) WriteSQL(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.subExpr(0, len(trapCountByLocationIDSQL)).WriteSQL(ctx, w, d, start) } diff --git a/db/sql/trapcount_by_location_id.bob.sql b/db/sql/trapcount_by_location_id.bob.sql index 84025c8e..a7146e63 100644 --- a/db/sql/trapcount_by_location_id.bob.sql +++ b/db/sql/trapcount_by_location_id.bob.sql @@ -1,4 +1,4 @@ --- Code generated by BobGen psql v0.41.1. DO NOT EDIT. +-- Code generated by BobGen psql v0.42.0. DO NOT EDIT. -- This file is meant to be re-generated in place and/or deleted at any time. -- TrapCountByLocationID diff --git a/db/sql/trapcount_by_location_id.bob_test.go b/db/sql/trapcount_by_location_id.bob_test.go index 03dcb09d..4c2dba81 100644 --- a/db/sql/trapcount_by_location_id.bob_test.go +++ b/db/sql/trapcount_by_location_id.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql diff --git a/db/sql/trapdata_by_location_id_recent.bob.go b/db/sql/trapdata_by_location_id_recent.bob.go index 3d19bef1..c075adbf 100644 --- a/db/sql/trapdata_by_location_id_recent.bob.go +++ b/db/sql/trapdata_by_location_id_recent.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql @@ -103,6 +103,6 @@ func (o trapDataByLocationIDRecent) subExpr(from, to int) bob.Expression { return orm.ArgsToExpression(trapDataByLocationIDRecentSQL, from, to, o.args()) } -func (o trapDataByLocationIDRecent) WriteSQL(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { +func (o trapDataByLocationIDRecent) WriteSQL(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.subExpr(0, len(trapDataByLocationIDRecentSQL)).WriteSQL(ctx, w, d, start) } diff --git a/db/sql/trapdata_by_location_id_recent.bob.sql b/db/sql/trapdata_by_location_id_recent.bob.sql index 2c3e2eb1..13a4e4b6 100644 --- a/db/sql/trapdata_by_location_id_recent.bob.sql +++ b/db/sql/trapdata_by_location_id_recent.bob.sql @@ -1,4 +1,4 @@ --- Code generated by BobGen psql v0.41.1. DO NOT EDIT. +-- Code generated by BobGen psql v0.42.0. DO NOT EDIT. -- This file is meant to be re-generated in place and/or deleted at any time. -- TrapDataByLocationIDRecent diff --git a/db/sql/trapdata_by_location_id_recent.bob_test.go b/db/sql/trapdata_by_location_id_recent.bob_test.go index d4735df8..eabf5f20 100644 --- a/db/sql/trapdata_by_location_id_recent.bob_test.go +++ b/db/sql/trapdata_by_location_id_recent.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql diff --git a/db/sql/traplocation_by_source_id.bob.go b/db/sql/traplocation_by_source_id.bob.go index a2284117..ab83f7d8 100644 --- a/db/sql/traplocation_by_source_id.bob.go +++ b/db/sql/traplocation_by_source_id.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql @@ -101,6 +101,6 @@ func (o trapLocationBySourceID) subExpr(from, to int) bob.Expression { return orm.ArgsToExpression(trapLocationBySourceIDSQL, from, to, o.args()) } -func (o trapLocationBySourceID) WriteSQL(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { +func (o trapLocationBySourceID) WriteSQL(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.subExpr(0, len(trapLocationBySourceIDSQL)).WriteSQL(ctx, w, d, start) } diff --git a/db/sql/traplocation_by_source_id.bob.sql b/db/sql/traplocation_by_source_id.bob.sql index 6d60cfd8..6378bbfa 100644 --- a/db/sql/traplocation_by_source_id.bob.sql +++ b/db/sql/traplocation_by_source_id.bob.sql @@ -1,4 +1,4 @@ --- Code generated by BobGen psql v0.41.1. DO NOT EDIT. +-- Code generated by BobGen psql v0.42.0. DO NOT EDIT. -- This file is meant to be re-generated in place and/or deleted at any time. -- TrapLocationBySourceID diff --git a/db/sql/traplocation_by_source_id.bob_test.go b/db/sql/traplocation_by_source_id.bob_test.go index c5f62283..9972836d 100644 --- a/db/sql/traplocation_by_source_id.bob_test.go +++ b/db/sql/traplocation_by_source_id.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql diff --git a/db/sql/update_oauth_org.bob.go b/db/sql/update_oauth_org.bob.go index 7e794bc8..d2ae7c5d 100644 --- a/db/sql/update_oauth_org.bob.go +++ b/db/sql/update_oauth_org.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql @@ -90,6 +90,6 @@ func (o updateOauthTokenOrg) subExpr(from, to int) bob.Expression { return orm.ArgsToExpression(updateOauthTokenOrgSQL, from, to, o.args()) } -func (o updateOauthTokenOrg) WriteSQL(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { +func (o updateOauthTokenOrg) WriteSQL(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.subExpr(0, len(updateOauthTokenOrgSQL)).WriteSQL(ctx, w, d, start) } diff --git a/db/sql/update_oauth_org.bob.sql b/db/sql/update_oauth_org.bob.sql index 965228ee..5f2a3d0d 100644 --- a/db/sql/update_oauth_org.bob.sql +++ b/db/sql/update_oauth_org.bob.sql @@ -1,4 +1,4 @@ --- Code generated by BobGen psql v0.41.1. DO NOT EDIT. +-- Code generated by BobGen psql v0.42.0. DO NOT EDIT. -- This file is meant to be re-generated in place and/or deleted at any time. -- UpdateOauthTokenOrg diff --git a/db/sql/update_oauth_org.bob_test.go b/db/sql/update_oauth_org.bob_test.go index b79c7afe..7c004f41 100644 --- a/db/sql/update_oauth_org.bob_test.go +++ b/db/sql/update_oauth_org.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql diff --git a/db/sql/user_by_username.bob.go b/db/sql/user_by_username.bob.go index e2a40143..5582c154 100644 --- a/db/sql/user_by_username.bob.go +++ b/db/sql/user_by_username.bob.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql @@ -111,6 +111,6 @@ func (o userByUsername) subExpr(from, to int) bob.Expression { return orm.ArgsToExpression(userByUsernameSQL, from, to, o.args()) } -func (o userByUsername) WriteSQL(ctx context.Context, w io.Writer, d bob.Dialect, start int) ([]any, error) { +func (o userByUsername) WriteSQL(ctx context.Context, w io.StringWriter, d bob.Dialect, start int) ([]any, error) { return o.subExpr(0, len(userByUsernameSQL)).WriteSQL(ctx, w, d, start) } diff --git a/db/sql/user_by_username.bob.sql b/db/sql/user_by_username.bob.sql index 9a41ecb8..fd47488e 100644 --- a/db/sql/user_by_username.bob.sql +++ b/db/sql/user_by_username.bob.sql @@ -1,4 +1,4 @@ --- Code generated by BobGen psql v0.41.1. DO NOT EDIT. +-- Code generated by BobGen psql v0.42.0. DO NOT EDIT. -- This file is meant to be re-generated in place and/or deleted at any time. -- UserByUsername diff --git a/db/sql/user_by_username.bob_test.go b/db/sql/user_by_username.bob_test.go index ba9ca8ac..f95d6729 100644 --- a/db/sql/user_by_username.bob_test.go +++ b/db/sql/user_by_username.bob_test.go @@ -1,4 +1,4 @@ -// Code generated by BobGen psql v0.41.1. DO NOT EDIT. +// Code generated by BobGen psql v0.42.0. DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. package sql diff --git a/go.mod b/go.mod index 534f8f22..d143f560 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ require ( github.com/alitto/pond/v2 v2.5.0 github.com/go-chi/chi/v5 v5.2.3 github.com/go-webauthn/webauthn v0.14.0 + github.com/gofrs/uuid/v5 v5.4.0 github.com/golang-jwt/jwt/v5 v5.3.0 github.com/google/go-cmp v0.7.0 github.com/jackc/pgx/v5 v5.7.6 diff --git a/go.sum b/go.sum index 3ccd7dec..42f1ddbe 100644 --- a/go.sum +++ b/go.sum @@ -62,6 +62,8 @@ github.com/go-webauthn/webauthn v0.14.0/go.mod h1:QZzPFH3LJ48u5uEPAu+8/nWJImoLBW github.com/go-webauthn/x v0.1.25 h1:g/0noooIGcz/yCVqebcFgNnGIgBlJIccS+LYAa+0Z88= github.com/go-webauthn/x v0.1.25/go.mod h1:ieblaPY1/BVCV0oQTsA/VAo08/TWayQuJuo5Q+XxmTY= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid/v5 v5.4.0 h1:EfbpCTjqMuGyq5ZJwxqzn3Cbr2d0rUZU7v5ycAk/e/0= +github.com/gofrs/uuid/v5 v5.4.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=