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

package factory

import (
	"context"
	"encoding/json"
	"testing"
	"time"

	"github.com/Gleipnir-Technology/bob"
	"github.com/Gleipnir-Technology/bob/types"
	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"
)

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[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]
	Creationdate            func() null.Val[time.Time]
	Creator                 func() null.Val[string]
	Editdate                func() null.Val[time.Time]
	Editor                  func() null.Val[string]
	Geometry                func() types.JSON[json.RawMessage]
	Geospatial              func() null.Val[string]
	Version                 func() int32
	OrganizationID          func() int32

	r fieldseekerSamplelocationR
	f *Factory

	alreadyPersisted bool
}

type fieldseekerSamplelocationR struct {
	Organization *fieldseekerSamplelocationROrganizationR
}

type fieldseekerSamplelocationROrganizationR struct {
	o *OrganizationTemplate
}

// 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) {
	if t.r.Organization != nil {
		rel := t.r.Organization.o.Build()
		rel.R.Samplelocations = append(rel.R.Samplelocations, o)
		o.OrganizationID = rel.ID // h2
		o.R.Organization = rel
	}
}

// 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 = 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.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.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.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()
	}
	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.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) {
	if !(m.Objectid.IsValue()) {
		val := random_int64(nil)
		m.Objectid = omit.From(val)
	}
	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.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)

	if o.r.Organization == nil {
		FieldseekerSamplelocationMods.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.FieldseekerSamplelocations.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 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),
		FieldseekerSamplelocationMods.RandomGeometry(f),
		FieldseekerSamplelocationMods.RandomGeospatial(f),
		FieldseekerSamplelocationMods.RandomVersion(f),
		FieldseekerSamplelocationMods.RandomOrganizationID(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[string]) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Habitat = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerSamplelocationMods) HabitatFunc(f func() null.Val[string]) 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[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) RandomHabitatNotNull(f *faker.Faker) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		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 fieldseekerSamplelocationMods) Priority(val null.Val[string]) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Priority = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerSamplelocationMods) PriorityFunc(f func() null.Val[string]) 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[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) RandomPriorityNotNull(f *faker.Faker) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		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 fieldseekerSamplelocationMods) Usetype(val null.Val[string]) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Usetype = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerSamplelocationMods) UsetypeFunc(f func() null.Val[string]) 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[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) RandomUsetypeNotNull(f *faker.Faker) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		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 fieldseekerSamplelocationMods) Active(val null.Val[int16]) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Active = func() null.Val[int16] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerSamplelocationMods) ActiveFunc(f func() null.Val[int16]) 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[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) RandomActiveNotNull(f *faker.Faker) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		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 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 uuid.UUID) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Globalid = func() uuid.UUID { return val }
	})
}

// Set the Column from the function
func (m fieldseekerSamplelocationMods) GlobalidFunc(f func() 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
func (m fieldseekerSamplelocationMods) RandomGlobalid(f *faker.Faker) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Globalid = func() uuid.UUID {
			return random_uuid_UUID(f)
		}
	})
}

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

// Set the model columns to this value
func (m fieldseekerSamplelocationMods) Geometry(val types.JSON[json.RawMessage]) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Geometry = func() types.JSON[json.RawMessage] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerSamplelocationMods) GeometryFunc(f func() types.JSON[json.RawMessage]) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Geometry = f
	})
}

// Clear any values for the column
func (m fieldseekerSamplelocationMods) UnsetGeometry() FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		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 fieldseekerSamplelocationMods) RandomGeometry(f *faker.Faker) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Geometry = func() types.JSON[json.RawMessage] {
			return random_types_JSON_json_RawMessage_(f)
		}
	})
}

// Set the model columns to this value
func (m fieldseekerSamplelocationMods) Geospatial(val null.Val[string]) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Geospatial = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerSamplelocationMods) GeospatialFunc(f func() null.Val[string]) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Geospatial = f
	})
}

// Clear any values for the column
func (m fieldseekerSamplelocationMods) UnsetGeospatial() FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		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 fieldseekerSamplelocationMods) RandomGeospatial(f *faker.Faker) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		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 fieldseekerSamplelocationMods) RandomGeospatialNotNull(f *faker.Faker) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		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 fieldseekerSamplelocationMods) Version(val int32) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Version = func() int32 { return val }
	})
}

// Set the Column from the function
func (m fieldseekerSamplelocationMods) VersionFunc(f func() int32) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Version = f
	})
}

// Clear any values for the column
func (m fieldseekerSamplelocationMods) UnsetVersion() FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		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 fieldseekerSamplelocationMods) RandomVersion(f *faker.Faker) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.Version = func() int32 {
			return random_int32(f)
		}
	})
}

// Set the model columns to this value
func (m fieldseekerSamplelocationMods) OrganizationID(val int32) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.OrganizationID = func() int32 { return val }
	})
}

// Set the Column from the function
func (m fieldseekerSamplelocationMods) OrganizationIDFunc(f func() int32) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.OrganizationID = f
	})
}

// Clear any values for the column
func (m fieldseekerSamplelocationMods) UnsetOrganizationID() FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		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 fieldseekerSamplelocationMods) RandomOrganizationID(f *faker.Faker) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(_ context.Context, o *FieldseekerSamplelocationTemplate) {
		o.OrganizationID = func() int32 {
			return random_int32(f)
		}
	})
}

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

			related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
			m.WithOrganization(related).Apply(ctx, o)
		}
	})
}

func (m fieldseekerSamplelocationMods) WithOrganization(rel *OrganizationTemplate) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(ctx context.Context, o *FieldseekerSamplelocationTemplate) {
		o.r.Organization = &fieldseekerSamplelocationROrganizationR{
			o: rel,
		}
	})
}

func (m fieldseekerSamplelocationMods) WithNewOrganization(mods ...OrganizationMod) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(ctx context.Context, o *FieldseekerSamplelocationTemplate) {
		related := o.f.NewOrganizationWithContext(ctx, mods...)

		m.WithOrganization(related).Apply(ctx, o)
	})
}

func (m fieldseekerSamplelocationMods) WithExistingOrganization(em *models.Organization) FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(ctx context.Context, o *FieldseekerSamplelocationTemplate) {
		o.r.Organization = &fieldseekerSamplelocationROrganizationR{
			o: o.f.FromExistingOrganization(em),
		}
	})
}

func (m fieldseekerSamplelocationMods) WithoutOrganization() FieldseekerSamplelocationMod {
	return FieldseekerSamplelocationModFunc(func(ctx context.Context, o *FieldseekerSamplelocationTemplate) {
		o.r.Organization = nil
	})
}
