nidus-sync/factory/history_rodentlocation.bob.go
Eli Ribble b0432f3243
Add statistics on the sync and save org ID with fieldseeker tables
We need the org ID so that we can avoid bleedover between different
organizations.
2025-11-07 09:30:31 +00:00

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