// 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 FieldseekerStormdrainMod interface {
	Apply(context.Context, *FieldseekerStormdrainTemplate)
}

type FieldseekerStormdrainModFunc func(context.Context, *FieldseekerStormdrainTemplate)

func (f FieldseekerStormdrainModFunc) Apply(ctx context.Context, n *FieldseekerStormdrainTemplate) {
	f(ctx, n)
}

type FieldseekerStormdrainModSlice []FieldseekerStormdrainMod

func (mods FieldseekerStormdrainModSlice) Apply(ctx context.Context, n *FieldseekerStormdrainTemplate) {
	for _, f := range mods {
		f.Apply(ctx, n)
	}
}

// FieldseekerStormdrainTemplate is an object representing the database table.
// all columns are optional and should be set by mods
type FieldseekerStormdrainTemplate struct {
	Objectid          func() int64
	Nexttreatmentdate func() null.Val[time.Time]
	Lasttreatdate     func() null.Val[time.Time]
	Lastaction        func() null.Val[string]
	Symbology         func() null.Val[string]
	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]
	Laststatus        func() null.Val[string]
	Zone              func() null.Val[string]
	Zone2             func() null.Val[string]
	Creationdate      func() null.Val[time.Time]
	Creator           func() null.Val[string]
	Editdate          func() null.Val[time.Time]
	Editor            func() null.Val[string]
	Type              func() null.Val[string]
	Jurisdiction      func() null.Val[string]
	Geometry          func() types.JSON[json.RawMessage]
	Geospatial        func() null.Val[string]
	Version           func() int32
	OrganizationID    func() int32

	r fieldseekerStormdrainR
	f *Factory

	alreadyPersisted bool
}

type fieldseekerStormdrainR struct {
	Organization *fieldseekerStormdrainROrganizationR
}

type fieldseekerStormdrainROrganizationR struct {
	o *OrganizationTemplate
}

// Apply mods to the FieldseekerStormdrainTemplate
func (o *FieldseekerStormdrainTemplate) Apply(ctx context.Context, mods ...FieldseekerStormdrainMod) {
	for _, mod := range mods {
		mod.Apply(ctx, o)
	}
}

// setModelRels creates and sets the relationships on *models.FieldseekerStormdrain
// according to the relationships in the template. Nothing is inserted into the db
func (t FieldseekerStormdrainTemplate) setModelRels(o *models.FieldseekerStormdrain) {
	if t.r.Organization != nil {
		rel := t.r.Organization.o.Build()
		rel.R.Stormdrains = append(rel.R.Stormdrains, o)
		o.OrganizationID = rel.ID // h2
		o.R.Organization = rel
	}
}

// BuildSetter returns an *models.FieldseekerStormdrainSetter
// this does nothing with the relationship templates
func (o FieldseekerStormdrainTemplate) BuildSetter() *models.FieldseekerStormdrainSetter {
	m := &models.FieldseekerStormdrainSetter{}

	if o.Objectid != nil {
		val := o.Objectid()
		m.Objectid = omit.From(val)
	}
	if o.Nexttreatmentdate != nil {
		val := o.Nexttreatmentdate()
		m.Nexttreatmentdate = omitnull.FromNull(val)
	}
	if o.Lasttreatdate != nil {
		val := o.Lasttreatdate()
		m.Lasttreatdate = omitnull.FromNull(val)
	}
	if o.Lastaction != nil {
		val := o.Lastaction()
		m.Lastaction = omitnull.FromNull(val)
	}
	if o.Symbology != nil {
		val := o.Symbology()
		m.Symbology = omitnull.FromNull(val)
	}
	if o.Globalid != nil {
		val := o.Globalid()
		m.Globalid = 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.Laststatus != nil {
		val := o.Laststatus()
		m.Laststatus = omitnull.FromNull(val)
	}
	if o.Zone != nil {
		val := o.Zone()
		m.Zone = omitnull.FromNull(val)
	}
	if o.Zone2 != nil {
		val := o.Zone2()
		m.Zone2 = omitnull.FromNull(val)
	}
	if o.Creationdate != nil {
		val := o.Creationdate()
		m.Creationdate = omitnull.FromNull(val)
	}
	if o.Creator != nil {
		val := o.Creator()
		m.Creator = omitnull.FromNull(val)
	}
	if o.Editdate != nil {
		val := o.Editdate()
		m.Editdate = omitnull.FromNull(val)
	}
	if o.Editor != nil {
		val := o.Editor()
		m.Editor = omitnull.FromNull(val)
	}
	if o.Type != nil {
		val := o.Type()
		m.Type = omitnull.FromNull(val)
	}
	if o.Jurisdiction != nil {
		val := o.Jurisdiction()
		m.Jurisdiction = omitnull.FromNull(val)
	}
	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.FieldseekerStormdrainSetter
// this does nothing with the relationship templates
func (o FieldseekerStormdrainTemplate) BuildManySetter(number int) []*models.FieldseekerStormdrainSetter {
	m := make([]*models.FieldseekerStormdrainSetter, number)

	for i := range m {
		m[i] = o.BuildSetter()
	}

	return m
}

// Build returns an *models.FieldseekerStormdrain
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FieldseekerStormdrainTemplate.Create
func (o FieldseekerStormdrainTemplate) Build() *models.FieldseekerStormdrain {
	m := &models.FieldseekerStormdrain{}

	if o.Objectid != nil {
		m.Objectid = o.Objectid()
	}
	if o.Nexttreatmentdate != nil {
		m.Nexttreatmentdate = o.Nexttreatmentdate()
	}
	if o.Lasttreatdate != nil {
		m.Lasttreatdate = o.Lasttreatdate()
	}
	if o.Lastaction != nil {
		m.Lastaction = o.Lastaction()
	}
	if o.Symbology != nil {
		m.Symbology = o.Symbology()
	}
	if o.Globalid != nil {
		m.Globalid = o.Globalid()
	}
	if o.CreatedUser != nil {
		m.CreatedUser = o.CreatedUser()
	}
	if o.CreatedDate != nil {
		m.CreatedDate = o.CreatedDate()
	}
	if o.LastEditedUser != nil {
		m.LastEditedUser = o.LastEditedUser()
	}
	if o.LastEditedDate != nil {
		m.LastEditedDate = o.LastEditedDate()
	}
	if o.Laststatus != nil {
		m.Laststatus = o.Laststatus()
	}
	if o.Zone != nil {
		m.Zone = o.Zone()
	}
	if o.Zone2 != nil {
		m.Zone2 = o.Zone2()
	}
	if o.Creationdate != nil {
		m.Creationdate = o.Creationdate()
	}
	if o.Creator != nil {
		m.Creator = o.Creator()
	}
	if o.Editdate != nil {
		m.Editdate = o.Editdate()
	}
	if o.Editor != nil {
		m.Editor = o.Editor()
	}
	if o.Type != nil {
		m.Type = o.Type()
	}
	if o.Jurisdiction != nil {
		m.Jurisdiction = o.Jurisdiction()
	}
	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.FieldseekerStormdrainSlice
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FieldseekerStormdrainTemplate.CreateMany
func (o FieldseekerStormdrainTemplate) BuildMany(number int) models.FieldseekerStormdrainSlice {
	m := make(models.FieldseekerStormdrainSlice, number)

	for i := range m {
		m[i] = o.Build()
	}

	return m
}

func ensureCreatableFieldseekerStormdrain(m *models.FieldseekerStormdrainSetter) {
	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.FieldseekerStormdrain
// according to the relationships in the template.
// any required relationship should have already exist on the model
func (o *FieldseekerStormdrainTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerStormdrain) error {
	var err error

	return err
}

// Create builds a fieldseekerStormdrain and inserts it into the database
// Relations objects are also inserted and placed in the .R field
func (o *FieldseekerStormdrainTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerStormdrain, error) {
	var err error
	opt := o.BuildSetter()
	ensureCreatableFieldseekerStormdrain(opt)

	if o.r.Organization == nil {
		FieldseekerStormdrainMods.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.FieldseekerStormdrains.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 fieldseekerStormdrain and inserts it into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o *FieldseekerStormdrainTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerStormdrain {
	m, err := o.Create(ctx, exec)
	if err != nil {
		panic(err)
	}
	return m
}

// CreateOrFail builds a fieldseekerStormdrain and inserts it into the database
// Relations objects are also inserted and placed in the .R field
// It calls `tb.Fatal(err)` on the test/benchmark if an error occurs
func (o *FieldseekerStormdrainTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerStormdrain {
	tb.Helper()
	m, err := o.Create(ctx, exec)
	if err != nil {
		tb.Fatal(err)
		return nil
	}
	return m
}

// CreateMany builds multiple fieldseekerStormdrains and inserts them into the database
// Relations objects are also inserted and placed in the .R field
func (o FieldseekerStormdrainTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerStormdrainSlice, error) {
	var err error
	m := make(models.FieldseekerStormdrainSlice, number)

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

	return m, nil
}

// MustCreateMany builds multiple fieldseekerStormdrains and inserts them into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o FieldseekerStormdrainTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerStormdrainSlice {
	m, err := o.CreateMany(ctx, exec, number)
	if err != nil {
		panic(err)
	}
	return m
}

// CreateManyOrFail builds multiple fieldseekerStormdrains and inserts them into the database
// Relations objects are also inserted and placed in the .R field
// It calls `tb.Fatal(err)` on the test/benchmark if an error occurs
func (o FieldseekerStormdrainTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerStormdrainSlice {
	tb.Helper()
	m, err := o.CreateMany(ctx, exec, number)
	if err != nil {
		tb.Fatal(err)
		return nil
	}
	return m
}

// FieldseekerStormdrain has methods that act as mods for the FieldseekerStormdrainTemplate
var FieldseekerStormdrainMods fieldseekerStormdrainMods

type fieldseekerStormdrainMods struct{}

func (m fieldseekerStormdrainMods) RandomizeAllColumns(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModSlice{
		FieldseekerStormdrainMods.RandomObjectid(f),
		FieldseekerStormdrainMods.RandomNexttreatmentdate(f),
		FieldseekerStormdrainMods.RandomLasttreatdate(f),
		FieldseekerStormdrainMods.RandomLastaction(f),
		FieldseekerStormdrainMods.RandomSymbology(f),
		FieldseekerStormdrainMods.RandomGlobalid(f),
		FieldseekerStormdrainMods.RandomCreatedUser(f),
		FieldseekerStormdrainMods.RandomCreatedDate(f),
		FieldseekerStormdrainMods.RandomLastEditedUser(f),
		FieldseekerStormdrainMods.RandomLastEditedDate(f),
		FieldseekerStormdrainMods.RandomLaststatus(f),
		FieldseekerStormdrainMods.RandomZone(f),
		FieldseekerStormdrainMods.RandomZone2(f),
		FieldseekerStormdrainMods.RandomCreationdate(f),
		FieldseekerStormdrainMods.RandomCreator(f),
		FieldseekerStormdrainMods.RandomEditdate(f),
		FieldseekerStormdrainMods.RandomEditor(f),
		FieldseekerStormdrainMods.RandomType(f),
		FieldseekerStormdrainMods.RandomJurisdiction(f),
		FieldseekerStormdrainMods.RandomGeometry(f),
		FieldseekerStormdrainMods.RandomGeospatial(f),
		FieldseekerStormdrainMods.RandomVersion(f),
		FieldseekerStormdrainMods.RandomOrganizationID(f),
	}
}

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Objectid(val int64) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Objectid = func() int64 { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) ObjectidFunc(f func() int64) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Objectid = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetObjectid() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Objectid = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
func (m fieldseekerStormdrainMods) RandomObjectid(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Objectid = func() int64 {
			return random_int64(f)
		}
	})
}

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Nexttreatmentdate(val null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Nexttreatmentdate = func() null.Val[time.Time] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) NexttreatmentdateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Nexttreatmentdate = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetNexttreatmentdate() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Nexttreatmentdate = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomNexttreatmentdate(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Nexttreatmentdate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomNexttreatmentdateNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Nexttreatmentdate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Lasttreatdate(val null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Lasttreatdate = func() null.Val[time.Time] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) LasttreatdateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Lasttreatdate = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetLasttreatdate() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Lasttreatdate = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomLasttreatdate(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Lasttreatdate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomLasttreatdateNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Lasttreatdate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Lastaction(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Lastaction = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) LastactionFunc(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Lastaction = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetLastaction() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Lastaction = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomLastaction(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Lastaction = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomLastactionNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Lastaction = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Symbology(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Symbology = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) SymbologyFunc(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Symbology = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetSymbology() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Symbology = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomSymbology(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Symbology = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomSymbologyNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Symbology = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Globalid(val uuid.UUID) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Globalid = func() uuid.UUID { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) GlobalidFunc(f func() uuid.UUID) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Globalid = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetGlobalid() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Globalid = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
func (m fieldseekerStormdrainMods) RandomGlobalid(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Globalid = func() uuid.UUID {
			return random_uuid_UUID(f)
		}
	})
}

// Set the model columns to this value
func (m fieldseekerStormdrainMods) CreatedUser(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.CreatedUser = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.CreatedUser = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetCreatedUser() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.CreatedUser = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomCreatedUser(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.CreatedUser = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.CreatedUser = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) CreatedDate(val null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.CreatedDate = func() null.Val[time.Time] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.CreatedDate = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetCreatedDate() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.CreatedDate = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomCreatedDate(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.CreatedDate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.CreatedDate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) LastEditedUser(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.LastEditedUser = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.LastEditedUser = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetLastEditedUser() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.LastEditedUser = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomLastEditedUser(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.LastEditedUser = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.LastEditedUser = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) LastEditedDate(val null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.LastEditedDate = func() null.Val[time.Time] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.LastEditedDate = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetLastEditedDate() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.LastEditedDate = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomLastEditedDate(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.LastEditedDate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.LastEditedDate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Laststatus(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Laststatus = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) LaststatusFunc(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Laststatus = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetLaststatus() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Laststatus = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomLaststatus(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Laststatus = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomLaststatusNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Laststatus = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Zone(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Zone = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) ZoneFunc(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Zone = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetZone() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Zone = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomZone(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Zone = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomZoneNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Zone = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Zone2(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Zone2 = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) Zone2Func(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Zone2 = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetZone2() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Zone2 = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomZone2(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Zone2 = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomZone2NotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Zone2 = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Creationdate(val null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Creationdate = func() null.Val[time.Time] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Creationdate = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetCreationdate() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Creationdate = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomCreationdate(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Creationdate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Creationdate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Creator(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Creator = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) CreatorFunc(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Creator = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetCreator() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Creator = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomCreator(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Creator = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Creator = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Editdate(val null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Editdate = func() null.Val[time.Time] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Editdate = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetEditdate() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Editdate = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomEditdate(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Editdate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Editdate = func() null.Val[time.Time] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Editor(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Editor = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) EditorFunc(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Editor = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetEditor() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Editor = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomEditor(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Editor = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomEditorNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Editor = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Type(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Type = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) TypeFunc(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Type = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetType() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Type = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomType(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Type = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomTypeNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Type = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Jurisdiction(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Jurisdiction = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) JurisdictionFunc(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Jurisdiction = f
	})
}

// Clear any values for the column
func (m fieldseekerStormdrainMods) UnsetJurisdiction() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Jurisdiction = nil
	})
}

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fieldseekerStormdrainMods) RandomJurisdiction(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Jurisdiction = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fieldseekerStormdrainMods) RandomJurisdictionNotNull(f *faker.Faker) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Jurisdiction = func() null.Val[string] {
			if f == nil {
				f = &defaultFaker
			}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Geometry(val types.JSON[json.RawMessage]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Geometry = func() types.JSON[json.RawMessage] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) GeometryFunc(f func() types.JSON[json.RawMessage]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Geometry = f
	})
}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) Geospatial(val null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Geospatial = func() null.Val[string] { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) GeospatialFunc(f func() null.Val[string]) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Geospatial = f
	})
}

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

// Set the Column from the function
func (m fieldseekerStormdrainMods) VersionFunc(f func() int32) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.Version = f
	})
}

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

// Set the model columns to this value
func (m fieldseekerStormdrainMods) OrganizationID(val int32) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.OrganizationID = func() int32 { return val }
	})
}

// Set the Column from the function
func (m fieldseekerStormdrainMods) OrganizationIDFunc(f func() int32) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(_ context.Context, o *FieldseekerStormdrainTemplate) {
		o.OrganizationID = f
	})
}

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

func (m fieldseekerStormdrainMods) WithParentsCascading() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(ctx context.Context, o *FieldseekerStormdrainTemplate) {
		if isDone, _ := fieldseekerStormdrainWithParentsCascadingCtx.Value(ctx); isDone {
			return
		}
		ctx = fieldseekerStormdrainWithParentsCascadingCtx.WithValue(ctx, true)
		{

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

func (m fieldseekerStormdrainMods) WithOrganization(rel *OrganizationTemplate) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(ctx context.Context, o *FieldseekerStormdrainTemplate) {
		o.r.Organization = &fieldseekerStormdrainROrganizationR{
			o: rel,
		}
	})
}

func (m fieldseekerStormdrainMods) WithNewOrganization(mods ...OrganizationMod) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(ctx context.Context, o *FieldseekerStormdrainTemplate) {
		related := o.f.NewOrganizationWithContext(ctx, mods...)

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

func (m fieldseekerStormdrainMods) WithExistingOrganization(em *models.Organization) FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(ctx context.Context, o *FieldseekerStormdrainTemplate) {
		o.r.Organization = &fieldseekerStormdrainROrganizationR{
			o: o.f.FromExistingOrganization(em),
		}
	})
}

func (m fieldseekerStormdrainMods) WithoutOrganization() FieldseekerStormdrainMod {
	return FieldseekerStormdrainModFunc(func(ctx context.Context, o *FieldseekerStormdrainTemplate) {
		o.r.Organization = nil
	})
}
