nidus-sync/factory/fs_rodentlocation.bob.go
Eli Ribble e48abb09c0
Go to h3 v4, Add initial h3 aggregation work
This calculates the summary information of data in h3 nodes and puts it
in the database for fast lookup.
2025-11-13 23:49:12 +00:00

2316 lines
71 KiB
Go

// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package factory
import (
"context"
"testing"
"time"
models "github.com/Gleipnir-Technology/nidus-sync/models"
"github.com/aarondl/opt/null"
"github.com/aarondl/opt/omit"
"github.com/aarondl/opt/omitnull"
"github.com/jaswdr/faker/v2"
"github.com/stephenafamo/bob"
)
type FSRodentlocationMod interface {
Apply(context.Context, *FSRodentlocationTemplate)
}
type FSRodentlocationModFunc func(context.Context, *FSRodentlocationTemplate)
func (f FSRodentlocationModFunc) Apply(ctx context.Context, n *FSRodentlocationTemplate) {
f(ctx, n)
}
type FSRodentlocationModSlice []FSRodentlocationMod
func (mods FSRodentlocationModSlice) Apply(ctx context.Context, n *FSRodentlocationTemplate) {
for _, f := range mods {
f.Apply(ctx, n)
}
}
// FSRodentlocationTemplate is an object representing the database table.
// all columns are optional and should be set by mods
type FSRodentlocationTemplate struct {
OrganizationID func() int32
Accessdesc func() null.Val[string]
Active func() null.Val[int16]
Comments func() null.Val[string]
Creationdate func() null.Val[int64]
Creator func() null.Val[string]
Description func() null.Val[string]
Externalid func() null.Val[string]
Editdate func() null.Val[int64]
Editor func() null.Val[string]
Globalid func() string
Habitat func() null.Val[string]
Lastinspectaction func() null.Val[string]
Lastinspectconditions func() null.Val[string]
Lastinspectdate func() null.Val[int64]
Lastinspectrodentevidence func() null.Val[string]
Lastinspectspecies func() null.Val[string]
Locationname func() null.Val[string]
Locationnumber func() null.Val[int64]
Nextactiondatescheduled func() null.Val[int64]
Objectid func() int32
Priority func() null.Val[string]
Symbology func() null.Val[string]
Usetype func() null.Val[string]
Zone func() null.Val[string]
Zone2 func() null.Val[string]
CreatedDate func() null.Val[int64]
CreatedUser func() null.Val[string]
GeometryX func() null.Val[float64]
GeometryY func() null.Val[float64]
LastEditedDate func() null.Val[int64]
LastEditedUser func() null.Val[string]
Jurisdiction func() null.Val[string]
Updated func() time.Time
r fsRodentlocationR
f *Factory
alreadyPersisted bool
}
type fsRodentlocationR struct {
Organization *fsRodentlocationROrganizationR
}
type fsRodentlocationROrganizationR struct {
o *OrganizationTemplate
}
// Apply mods to the FSRodentlocationTemplate
func (o *FSRodentlocationTemplate) Apply(ctx context.Context, mods ...FSRodentlocationMod) {
for _, mod := range mods {
mod.Apply(ctx, o)
}
}
// setModelRels creates and sets the relationships on *models.FSRodentlocation
// according to the relationships in the template. Nothing is inserted into the db
func (t FSRodentlocationTemplate) setModelRels(o *models.FSRodentlocation) {
if t.r.Organization != nil {
rel := t.r.Organization.o.Build()
rel.R.FSRodentlocations = append(rel.R.FSRodentlocations, o)
o.OrganizationID = rel.ID // h2
o.R.Organization = rel
}
}
// BuildSetter returns an *models.FSRodentlocationSetter
// this does nothing with the relationship templates
func (o FSRodentlocationTemplate) BuildSetter() *models.FSRodentlocationSetter {
m := &models.FSRodentlocationSetter{}
if o.OrganizationID != nil {
val := o.OrganizationID()
m.OrganizationID = omit.From(val)
}
if o.Accessdesc != nil {
val := o.Accessdesc()
m.Accessdesc = omitnull.FromNull(val)
}
if o.Active != nil {
val := o.Active()
m.Active = omitnull.FromNull(val)
}
if o.Comments != nil {
val := o.Comments()
m.Comments = 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.Description != nil {
val := o.Description()
m.Description = omitnull.FromNull(val)
}
if o.Externalid != nil {
val := o.Externalid()
m.Externalid = 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.Globalid != nil {
val := o.Globalid()
m.Globalid = omit.From(val)
}
if o.Habitat != nil {
val := o.Habitat()
m.Habitat = omitnull.FromNull(val)
}
if o.Lastinspectaction != nil {
val := o.Lastinspectaction()
m.Lastinspectaction = omitnull.FromNull(val)
}
if o.Lastinspectconditions != nil {
val := o.Lastinspectconditions()
m.Lastinspectconditions = omitnull.FromNull(val)
}
if o.Lastinspectdate != nil {
val := o.Lastinspectdate()
m.Lastinspectdate = omitnull.FromNull(val)
}
if o.Lastinspectrodentevidence != nil {
val := o.Lastinspectrodentevidence()
m.Lastinspectrodentevidence = omitnull.FromNull(val)
}
if o.Lastinspectspecies != nil {
val := o.Lastinspectspecies()
m.Lastinspectspecies = omitnull.FromNull(val)
}
if o.Locationname != nil {
val := o.Locationname()
m.Locationname = omitnull.FromNull(val)
}
if o.Locationnumber != nil {
val := o.Locationnumber()
m.Locationnumber = omitnull.FromNull(val)
}
if o.Nextactiondatescheduled != nil {
val := o.Nextactiondatescheduled()
m.Nextactiondatescheduled = omitnull.FromNull(val)
}
if o.Objectid != nil {
val := o.Objectid()
m.Objectid = omit.From(val)
}
if o.Priority != nil {
val := o.Priority()
m.Priority = omitnull.FromNull(val)
}
if o.Symbology != nil {
val := o.Symbology()
m.Symbology = omitnull.FromNull(val)
}
if o.Usetype != nil {
val := o.Usetype()
m.Usetype = 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.CreatedDate != nil {
val := o.CreatedDate()
m.CreatedDate = omitnull.FromNull(val)
}
if o.CreatedUser != nil {
val := o.CreatedUser()
m.CreatedUser = omitnull.FromNull(val)
}
if o.GeometryX != nil {
val := o.GeometryX()
m.GeometryX = omitnull.FromNull(val)
}
if o.GeometryY != nil {
val := o.GeometryY()
m.GeometryY = omitnull.FromNull(val)
}
if o.LastEditedDate != nil {
val := o.LastEditedDate()
m.LastEditedDate = omitnull.FromNull(val)
}
if o.LastEditedUser != nil {
val := o.LastEditedUser()
m.LastEditedUser = omitnull.FromNull(val)
}
if o.Jurisdiction != nil {
val := o.Jurisdiction()
m.Jurisdiction = omitnull.FromNull(val)
}
if o.Updated != nil {
val := o.Updated()
m.Updated = omit.From(val)
}
return m
}
// BuildManySetter returns an []*models.FSRodentlocationSetter
// this does nothing with the relationship templates
func (o FSRodentlocationTemplate) BuildManySetter(number int) []*models.FSRodentlocationSetter {
m := make([]*models.FSRodentlocationSetter, number)
for i := range m {
m[i] = o.BuildSetter()
}
return m
}
// Build returns an *models.FSRodentlocation
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FSRodentlocationTemplate.Create
func (o FSRodentlocationTemplate) Build() *models.FSRodentlocation {
m := &models.FSRodentlocation{}
if o.OrganizationID != nil {
m.OrganizationID = o.OrganizationID()
}
if o.Accessdesc != nil {
m.Accessdesc = o.Accessdesc()
}
if o.Active != nil {
m.Active = o.Active()
}
if o.Comments != nil {
m.Comments = o.Comments()
}
if o.Creationdate != nil {
m.Creationdate = o.Creationdate()
}
if o.Creator != nil {
m.Creator = o.Creator()
}
if o.Description != nil {
m.Description = o.Description()
}
if o.Externalid != nil {
m.Externalid = o.Externalid()
}
if o.Editdate != nil {
m.Editdate = o.Editdate()
}
if o.Editor != nil {
m.Editor = o.Editor()
}
if o.Globalid != nil {
m.Globalid = o.Globalid()
}
if o.Habitat != nil {
m.Habitat = o.Habitat()
}
if o.Lastinspectaction != nil {
m.Lastinspectaction = o.Lastinspectaction()
}
if o.Lastinspectconditions != nil {
m.Lastinspectconditions = o.Lastinspectconditions()
}
if o.Lastinspectdate != nil {
m.Lastinspectdate = o.Lastinspectdate()
}
if o.Lastinspectrodentevidence != nil {
m.Lastinspectrodentevidence = o.Lastinspectrodentevidence()
}
if o.Lastinspectspecies != nil {
m.Lastinspectspecies = o.Lastinspectspecies()
}
if o.Locationname != nil {
m.Locationname = o.Locationname()
}
if o.Locationnumber != nil {
m.Locationnumber = o.Locationnumber()
}
if o.Nextactiondatescheduled != nil {
m.Nextactiondatescheduled = o.Nextactiondatescheduled()
}
if o.Objectid != nil {
m.Objectid = o.Objectid()
}
if o.Priority != nil {
m.Priority = o.Priority()
}
if o.Symbology != nil {
m.Symbology = o.Symbology()
}
if o.Usetype != nil {
m.Usetype = o.Usetype()
}
if o.Zone != nil {
m.Zone = o.Zone()
}
if o.Zone2 != nil {
m.Zone2 = o.Zone2()
}
if o.CreatedDate != nil {
m.CreatedDate = o.CreatedDate()
}
if o.CreatedUser != nil {
m.CreatedUser = o.CreatedUser()
}
if o.GeometryX != nil {
m.GeometryX = o.GeometryX()
}
if o.GeometryY != nil {
m.GeometryY = o.GeometryY()
}
if o.LastEditedDate != nil {
m.LastEditedDate = o.LastEditedDate()
}
if o.LastEditedUser != nil {
m.LastEditedUser = o.LastEditedUser()
}
if o.Jurisdiction != nil {
m.Jurisdiction = o.Jurisdiction()
}
if o.Updated != nil {
m.Updated = o.Updated()
}
o.setModelRels(m)
return m
}
// BuildMany returns an models.FSRodentlocationSlice
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FSRodentlocationTemplate.CreateMany
func (o FSRodentlocationTemplate) BuildMany(number int) models.FSRodentlocationSlice {
m := make(models.FSRodentlocationSlice, number)
for i := range m {
m[i] = o.Build()
}
return m
}
func ensureCreatableFSRodentlocation(m *models.FSRodentlocationSetter) {
if !(m.OrganizationID.IsValue()) {
val := random_int32(nil)
m.OrganizationID = omit.From(val)
}
if !(m.Globalid.IsValue()) {
val := random_string(nil)
m.Globalid = omit.From(val)
}
if !(m.Objectid.IsValue()) {
val := random_int32(nil)
m.Objectid = omit.From(val)
}
}
// insertOptRels creates and inserts any optional the relationships on *models.FSRodentlocation
// according to the relationships in the template.
// any required relationship should have already exist on the model
func (o *FSRodentlocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FSRodentlocation) error {
var err error
return err
}
// Create builds a fsRodentlocation and inserts it into the database
// Relations objects are also inserted and placed in the .R field
func (o *FSRodentlocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FSRodentlocation, error) {
var err error
opt := o.BuildSetter()
ensureCreatableFSRodentlocation(opt)
if o.r.Organization == nil {
FSRodentlocationMods.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.FSRodentlocations.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 fsRodentlocation and inserts it into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o *FSRodentlocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FSRodentlocation {
m, err := o.Create(ctx, exec)
if err != nil {
panic(err)
}
return m
}
// CreateOrFail builds a fsRodentlocation 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 *FSRodentlocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FSRodentlocation {
tb.Helper()
m, err := o.Create(ctx, exec)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// CreateMany builds multiple fsRodentlocations and inserts them into the database
// Relations objects are also inserted and placed in the .R field
func (o FSRodentlocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FSRodentlocationSlice, error) {
var err error
m := make(models.FSRodentlocationSlice, number)
for i := range m {
m[i], err = o.Create(ctx, exec)
if err != nil {
return nil, err
}
}
return m, nil
}
// MustCreateMany builds multiple fsRodentlocations and inserts them into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o FSRodentlocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FSRodentlocationSlice {
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
panic(err)
}
return m
}
// CreateManyOrFail builds multiple fsRodentlocations 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 FSRodentlocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FSRodentlocationSlice {
tb.Helper()
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// FSRodentlocation has methods that act as mods for the FSRodentlocationTemplate
var FSRodentlocationMods fsRodentlocationMods
type fsRodentlocationMods struct{}
func (m fsRodentlocationMods) RandomizeAllColumns(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModSlice{
FSRodentlocationMods.RandomOrganizationID(f),
FSRodentlocationMods.RandomAccessdesc(f),
FSRodentlocationMods.RandomActive(f),
FSRodentlocationMods.RandomComments(f),
FSRodentlocationMods.RandomCreationdate(f),
FSRodentlocationMods.RandomCreator(f),
FSRodentlocationMods.RandomDescription(f),
FSRodentlocationMods.RandomExternalid(f),
FSRodentlocationMods.RandomEditdate(f),
FSRodentlocationMods.RandomEditor(f),
FSRodentlocationMods.RandomGlobalid(f),
FSRodentlocationMods.RandomHabitat(f),
FSRodentlocationMods.RandomLastinspectaction(f),
FSRodentlocationMods.RandomLastinspectconditions(f),
FSRodentlocationMods.RandomLastinspectdate(f),
FSRodentlocationMods.RandomLastinspectrodentevidence(f),
FSRodentlocationMods.RandomLastinspectspecies(f),
FSRodentlocationMods.RandomLocationname(f),
FSRodentlocationMods.RandomLocationnumber(f),
FSRodentlocationMods.RandomNextactiondatescheduled(f),
FSRodentlocationMods.RandomObjectid(f),
FSRodentlocationMods.RandomPriority(f),
FSRodentlocationMods.RandomSymbology(f),
FSRodentlocationMods.RandomUsetype(f),
FSRodentlocationMods.RandomZone(f),
FSRodentlocationMods.RandomZone2(f),
FSRodentlocationMods.RandomCreatedDate(f),
FSRodentlocationMods.RandomCreatedUser(f),
FSRodentlocationMods.RandomGeometryX(f),
FSRodentlocationMods.RandomGeometryY(f),
FSRodentlocationMods.RandomLastEditedDate(f),
FSRodentlocationMods.RandomLastEditedUser(f),
FSRodentlocationMods.RandomJurisdiction(f),
FSRodentlocationMods.RandomUpdated(f),
}
}
// Set the model columns to this value
func (m fsRodentlocationMods) OrganizationID(val int32) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.OrganizationID = func() int32 { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) OrganizationIDFunc(f func() int32) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.OrganizationID = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetOrganizationID() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomOrganizationID(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.OrganizationID = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) Accessdesc(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Accessdesc = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) AccessdescFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Accessdesc = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetAccessdesc() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomAccessdesc(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Accessdesc = 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 fsRodentlocationMods) RandomAccessdescNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Accessdesc = 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 fsRodentlocationMods) Active(val null.Val[int16]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Active = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) ActiveFunc(f func() null.Val[int16]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Active = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetActive() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomActive(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomActiveNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) Comments(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Comments = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) CommentsFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Comments = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetComments() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomComments(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Comments = 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 fsRodentlocationMods) RandomCommentsNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Comments = 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 fsRodentlocationMods) Creationdate(val null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Creationdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) CreationdateFunc(f func() null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Creationdate = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetCreationdate() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomCreationdate(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Creationdate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsRodentlocationMods) RandomCreationdateNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Creationdate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) Creator(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Creator = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) CreatorFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Creator = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetCreator() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomCreator(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Creator = 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 fsRodentlocationMods) RandomCreatorNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Creator = 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 fsRodentlocationMods) Description(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Description = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) DescriptionFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Description = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetDescription() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomDescription(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Description = 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 fsRodentlocationMods) RandomDescriptionNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Description = 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 fsRodentlocationMods) Externalid(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Externalid = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) ExternalidFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Externalid = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetExternalid() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomExternalid(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Externalid = 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 fsRodentlocationMods) RandomExternalidNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Externalid = 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 fsRodentlocationMods) Editdate(val null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Editdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) EditdateFunc(f func() null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Editdate = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetEditdate() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomEditdate(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Editdate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsRodentlocationMods) RandomEditdateNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Editdate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) Editor(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Editor = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) EditorFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Editor = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetEditor() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomEditor(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Editor = 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 fsRodentlocationMods) RandomEditorNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Editor = 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 fsRodentlocationMods) Globalid(val string) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Globalid = func() string { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) GlobalidFunc(f func() string) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Globalid = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetGlobalid() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomGlobalid(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Globalid = func() string {
return random_string(f)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) Habitat(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Habitat = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) HabitatFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Habitat = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetHabitat() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomHabitat(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Habitat = 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 fsRodentlocationMods) RandomHabitatNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Habitat = 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 fsRodentlocationMods) Lastinspectaction(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectaction = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) LastinspectactionFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectaction = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetLastinspectaction() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectaction = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsRodentlocationMods) RandomLastinspectaction(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectaction = 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 fsRodentlocationMods) RandomLastinspectactionNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectaction = 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 fsRodentlocationMods) Lastinspectconditions(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectconditions = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) LastinspectconditionsFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectconditions = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetLastinspectconditions() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectconditions = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsRodentlocationMods) RandomLastinspectconditions(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectconditions = 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 fsRodentlocationMods) RandomLastinspectconditionsNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectconditions = 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 fsRodentlocationMods) Lastinspectdate(val null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) LastinspectdateFunc(f func() null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectdate = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetLastinspectdate() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectdate = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsRodentlocationMods) RandomLastinspectdate(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectdate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsRodentlocationMods) RandomLastinspectdateNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectdate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) Lastinspectrodentevidence(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectrodentevidence = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) LastinspectrodentevidenceFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectrodentevidence = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetLastinspectrodentevidence() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectrodentevidence = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsRodentlocationMods) RandomLastinspectrodentevidence(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectrodentevidence = 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 fsRodentlocationMods) RandomLastinspectrodentevidenceNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectrodentevidence = 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 fsRodentlocationMods) Lastinspectspecies(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectspecies = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) LastinspectspeciesFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectspecies = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetLastinspectspecies() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectspecies = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsRodentlocationMods) RandomLastinspectspecies(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectspecies = 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 fsRodentlocationMods) RandomLastinspectspeciesNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Lastinspectspecies = 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 fsRodentlocationMods) Locationname(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Locationname = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) LocationnameFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Locationname = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetLocationname() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Locationname = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsRodentlocationMods) RandomLocationname(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Locationname = 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 fsRodentlocationMods) RandomLocationnameNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Locationname = 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 fsRodentlocationMods) Locationnumber(val null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Locationnumber = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) LocationnumberFunc(f func() null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Locationnumber = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetLocationnumber() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomLocationnumber(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Locationnumber = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsRodentlocationMods) RandomLocationnumberNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Locationnumber = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) Nextactiondatescheduled(val null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Nextactiondatescheduled = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) NextactiondatescheduledFunc(f func() null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Nextactiondatescheduled = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetNextactiondatescheduled() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomNextactiondatescheduled(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Nextactiondatescheduled = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsRodentlocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Nextactiondatescheduled = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) Objectid(val int32) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Objectid = func() int32 { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) ObjectidFunc(f func() int32) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Objectid = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetObjectid() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomObjectid(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Objectid = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) Priority(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Priority = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) PriorityFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Priority = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetPriority() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomPriority(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Priority = 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 fsRodentlocationMods) RandomPriorityNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Priority = 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 fsRodentlocationMods) Symbology(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Symbology = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) SymbologyFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Symbology = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetSymbology() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomSymbology(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Symbology = 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 fsRodentlocationMods) RandomSymbologyNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Symbology = 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 fsRodentlocationMods) Usetype(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Usetype = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) UsetypeFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Usetype = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetUsetype() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomUsetype(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Usetype = 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 fsRodentlocationMods) RandomUsetypeNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Usetype = 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 fsRodentlocationMods) Zone(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Zone = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) ZoneFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Zone = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetZone() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomZone(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Zone = 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 fsRodentlocationMods) RandomZoneNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Zone = 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 fsRodentlocationMods) Zone2(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Zone2 = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) Zone2Func(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Zone2 = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetZone2() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomZone2(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Zone2 = 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 fsRodentlocationMods) RandomZone2NotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Zone2 = 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 fsRodentlocationMods) CreatedDate(val null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.CreatedDate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) CreatedDateFunc(f func() null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.CreatedDate = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetCreatedDate() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomCreatedDate(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.CreatedDate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsRodentlocationMods) RandomCreatedDateNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.CreatedDate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) CreatedUser(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.CreatedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) CreatedUserFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.CreatedUser = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetCreatedUser() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomCreatedUser(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.CreatedUser = 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 fsRodentlocationMods) RandomCreatedUserNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.CreatedUser = 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 fsRodentlocationMods) GeometryX(val null.Val[float64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.GeometryX = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) GeometryXFunc(f func() null.Val[float64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.GeometryX = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetGeometryX() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.GeometryX = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsRodentlocationMods) RandomGeometryX(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.GeometryX = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsRodentlocationMods) RandomGeometryXNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.GeometryX = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) GeometryY(val null.Val[float64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.GeometryY = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) GeometryYFunc(f func() null.Val[float64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.GeometryY = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetGeometryY() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.GeometryY = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsRodentlocationMods) RandomGeometryY(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.GeometryY = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsRodentlocationMods) RandomGeometryYNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.GeometryY = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) LastEditedDate(val null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.LastEditedDate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) LastEditedDateFunc(f func() null.Val[int64]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.LastEditedDate = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetLastEditedDate() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomLastEditedDate(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.LastEditedDate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsRodentlocationMods) RandomLastEditedDateNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.LastEditedDate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsRodentlocationMods) LastEditedUser(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.LastEditedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) LastEditedUserFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.LastEditedUser = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetLastEditedUser() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomLastEditedUser(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.LastEditedUser = 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 fsRodentlocationMods) RandomLastEditedUserNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.LastEditedUser = 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 fsRodentlocationMods) Jurisdiction(val null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Jurisdiction = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) JurisdictionFunc(f func() null.Val[string]) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Jurisdiction = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetJurisdiction() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
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 fsRodentlocationMods) RandomJurisdiction(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Jurisdiction = 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 fsRodentlocationMods) RandomJurisdictionNotNull(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Jurisdiction = 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 fsRodentlocationMods) Updated(val time.Time) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Updated = func() time.Time { return val }
})
}
// Set the Column from the function
func (m fsRodentlocationMods) UpdatedFunc(f func() time.Time) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Updated = f
})
}
// Clear any values for the column
func (m fsRodentlocationMods) UnsetUpdated() FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Updated = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
func (m fsRodentlocationMods) RandomUpdated(f *faker.Faker) FSRodentlocationMod {
return FSRodentlocationModFunc(func(_ context.Context, o *FSRodentlocationTemplate) {
o.Updated = func() time.Time {
return random_time_Time(f)
}
})
}
func (m fsRodentlocationMods) WithParentsCascading() FSRodentlocationMod {
return FSRodentlocationModFunc(func(ctx context.Context, o *FSRodentlocationTemplate) {
if isDone, _ := fsRodentlocationWithParentsCascadingCtx.Value(ctx); isDone {
return
}
ctx = fsRodentlocationWithParentsCascadingCtx.WithValue(ctx, true)
{
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
m.WithOrganization(related).Apply(ctx, o)
}
})
}
func (m fsRodentlocationMods) WithOrganization(rel *OrganizationTemplate) FSRodentlocationMod {
return FSRodentlocationModFunc(func(ctx context.Context, o *FSRodentlocationTemplate) {
o.r.Organization = &fsRodentlocationROrganizationR{
o: rel,
}
})
}
func (m fsRodentlocationMods) WithNewOrganization(mods ...OrganizationMod) FSRodentlocationMod {
return FSRodentlocationModFunc(func(ctx context.Context, o *FSRodentlocationTemplate) {
related := o.f.NewOrganizationWithContext(ctx, mods...)
m.WithOrganization(related).Apply(ctx, o)
})
}
func (m fsRodentlocationMods) WithExistingOrganization(em *models.Organization) FSRodentlocationMod {
return FSRodentlocationModFunc(func(ctx context.Context, o *FSRodentlocationTemplate) {
o.r.Organization = &fsRodentlocationROrganizationR{
o: o.f.FromExistingOrganization(em),
}
})
}
func (m fsRodentlocationMods) WithoutOrganization() FSRodentlocationMod {
return FSRodentlocationModFunc(func(ctx context.Context, o *FSRodentlocationTemplate) {
o.r.Organization = nil
})
}