nidus-sync/db/factory/fieldseeker.traplocation.bob.go
Eli Ribble 1aefca2f5d Make GlobalID required for all Fieldseeker tables
I'm pretty sure it has to be there, and it allows me to clean up my
code.
2026-01-05 02:28:28 +00:00

2297 lines
75 KiB
Go

// Code generated by BobGen psql v0.0.4-0.20260105020634-53e08d840e47+dirty. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package factory
import (
"context"
"encoding/json"
"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/google/uuid"
"github.com/jaswdr/faker/v2"
"github.com/stephenafamo/bob"
"github.com/stephenafamo/bob/types"
)
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[string]
Priority func() null.Val[string]
Usetype func() null.Val[string]
Active func() null.Val[int16]
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() 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]
Geometry func() types.JSON[json.RawMessage]
Geospatial func() null.Val[string]
Version func() int32
OrganizationID func() int32
r fieldseekerTraplocationR
f *Factory
alreadyPersisted bool
}
type fieldseekerTraplocationR struct {
Organization *fieldseekerTraplocationROrganizationR
}
type fieldseekerTraplocationROrganizationR struct {
o *OrganizationTemplate
}
// 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) {
if t.r.Organization != nil {
rel := t.r.Organization.o.Build()
rel.R.Traplocations = append(rel.R.Traplocations, o)
o.OrganizationID = rel.ID // h2
o.R.Organization = rel
}
}
// 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 = omit.From(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)
}
if o.Geometry != nil {
val := o.Geometry()
m.Geometry = omit.From(val)
}
if o.Geospatial != nil {
val := o.Geospatial()
m.Geospatial = omitnull.FromNull(val)
}
if o.Version != nil {
val := o.Version()
m.Version = omit.From(val)
}
if o.OrganizationID != nil {
val := o.OrganizationID()
m.OrganizationID = omit.From(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()
}
if o.Geometry != nil {
m.Geometry = o.Geometry()
}
if o.Geospatial != nil {
m.Geospatial = o.Geospatial()
}
if o.Version != nil {
m.Version = o.Version()
}
if o.OrganizationID != nil {
m.OrganizationID = o.OrganizationID()
}
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) {
if !(m.Globalid.IsValue()) {
val := random_uuid_UUID(nil)
m.Globalid = omit.From(val)
}
if !(m.Geometry.IsValue()) {
val := random_types_JSON_json_RawMessage_(nil)
m.Geometry = omit.From(val)
}
if !(m.OrganizationID.IsValue()) {
val := random_int32(nil)
m.OrganizationID = omit.From(val)
}
}
// 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)
if o.r.Organization == nil {
FieldseekerTraplocationMods.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.FieldseekerTraplocations.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 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),
FieldseekerTraplocationMods.RandomGeometry(f),
FieldseekerTraplocationMods.RandomGeospatial(f),
FieldseekerTraplocationMods.RandomVersion(f),
FieldseekerTraplocationMods.RandomOrganizationID(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[string]) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Habitat = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerTraplocationMods) HabitatFunc(f func() null.Val[string]) 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[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) RandomHabitatNotNull(f *faker.Faker) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Habitat = 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) Priority(val null.Val[string]) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Priority = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerTraplocationMods) PriorityFunc(f func() null.Val[string]) 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[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) RandomPriorityNotNull(f *faker.Faker) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Priority = 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) Usetype(val null.Val[string]) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Usetype = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerTraplocationMods) UsetypeFunc(f func() null.Val[string]) 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[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) RandomUsetypeNotNull(f *faker.Faker) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Usetype = 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) Active(val null.Val[int16]) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Active = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fieldseekerTraplocationMods) ActiveFunc(f func() null.Val[int16]) 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[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) RandomActiveNotNull(f *faker.Faker) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Active = 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) 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[string]) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Accessdesc = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerTraplocationMods) AccessdescFunc(f func() null.Val[string]) 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[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) RandomAccessdescNotNull(f *faker.Faker) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
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 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 uuid.UUID) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Globalid = func() uuid.UUID { return val }
})
}
// Set the Column from the function
func (m fieldseekerTraplocationMods) GlobalidFunc(f func() 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
func (m fieldseekerTraplocationMods) RandomGlobalid(f *faker.Faker) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Globalid = func() uuid.UUID {
return random_uuid_UUID(f)
}
})
}
// 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)
}
})
}
// Set the model columns to this value
func (m fieldseekerTraplocationMods) Geometry(val types.JSON[json.RawMessage]) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Geometry = func() types.JSON[json.RawMessage] { return val }
})
}
// Set the Column from the function
func (m fieldseekerTraplocationMods) GeometryFunc(f func() types.JSON[json.RawMessage]) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Geometry = f
})
}
// Clear any values for the column
func (m fieldseekerTraplocationMods) UnsetGeometry() FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Geometry = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
func (m fieldseekerTraplocationMods) RandomGeometry(f *faker.Faker) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Geometry = func() types.JSON[json.RawMessage] {
return random_types_JSON_json_RawMessage_(f)
}
})
}
// Set the model columns to this value
func (m fieldseekerTraplocationMods) Geospatial(val null.Val[string]) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Geospatial = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fieldseekerTraplocationMods) GeospatialFunc(f func() null.Val[string]) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Geospatial = f
})
}
// Clear any values for the column
func (m fieldseekerTraplocationMods) UnsetGeospatial() FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Geospatial = nil
})
}
// Generates a random value 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) RandomGeospatial(f *faker.Faker) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Geospatial = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerTraplocationMods) RandomGeospatialNotNull(f *faker.Faker) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Geospatial = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fieldseekerTraplocationMods) Version(val int32) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Version = func() int32 { return val }
})
}
// Set the Column from the function
func (m fieldseekerTraplocationMods) VersionFunc(f func() int32) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Version = f
})
}
// Clear any values for the column
func (m fieldseekerTraplocationMods) UnsetVersion() FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Version = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
func (m fieldseekerTraplocationMods) RandomVersion(f *faker.Faker) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.Version = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m fieldseekerTraplocationMods) OrganizationID(val int32) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.OrganizationID = func() int32 { return val }
})
}
// Set the Column from the function
func (m fieldseekerTraplocationMods) OrganizationIDFunc(f func() int32) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.OrganizationID = f
})
}
// Clear any values for the column
func (m fieldseekerTraplocationMods) UnsetOrganizationID() FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
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 fieldseekerTraplocationMods) RandomOrganizationID(f *faker.Faker) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
o.OrganizationID = func() int32 {
return random_int32(f)
}
})
}
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)
{
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
m.WithOrganization(related).Apply(ctx, o)
}
})
}
func (m fieldseekerTraplocationMods) WithOrganization(rel *OrganizationTemplate) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(ctx context.Context, o *FieldseekerTraplocationTemplate) {
o.r.Organization = &fieldseekerTraplocationROrganizationR{
o: rel,
}
})
}
func (m fieldseekerTraplocationMods) WithNewOrganization(mods ...OrganizationMod) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(ctx context.Context, o *FieldseekerTraplocationTemplate) {
related := o.f.NewOrganizationWithContext(ctx, mods...)
m.WithOrganization(related).Apply(ctx, o)
})
}
func (m fieldseekerTraplocationMods) WithExistingOrganization(em *models.Organization) FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(ctx context.Context, o *FieldseekerTraplocationTemplate) {
o.r.Organization = &fieldseekerTraplocationROrganizationR{
o: o.f.FromExistingOrganization(em),
}
})
}
func (m fieldseekerTraplocationMods) WithoutOrganization() FieldseekerTraplocationMod {
return FieldseekerTraplocationModFunc(func(ctx context.Context, o *FieldseekerTraplocationTemplate) {
o.r.Organization = nil
})
}