nidus-sync/factory/history_linelocation.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

3516 lines
112 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 HistoryLinelocationMod interface {
Apply(context.Context, *HistoryLinelocationTemplate)
}
type HistoryLinelocationModFunc func(context.Context, *HistoryLinelocationTemplate)
func (f HistoryLinelocationModFunc) Apply(ctx context.Context, n *HistoryLinelocationTemplate) {
f(ctx, n)
}
type HistoryLinelocationModSlice []HistoryLinelocationMod
func (mods HistoryLinelocationModSlice) Apply(ctx context.Context, n *HistoryLinelocationTemplate) {
for _, f := range mods {
f.Apply(ctx, n)
}
}
// HistoryLinelocationTemplate is an object representing the database table.
// all columns are optional and should be set by mods
type HistoryLinelocationTemplate struct {
OrganizationID func() int32
Accessdesc func() null.Val[string]
Acres func() null.Val[float64]
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]
Hectares func() null.Val[float64]
Jurisdiction func() null.Val[string]
Larvinspectinterval func() null.Val[int16]
Lastinspectactiontaken func() null.Val[string]
Lastinspectactivity func() null.Val[string]
Lastinspectavglarvae func() null.Val[float64]
Lastinspectavgpupae func() null.Val[float64]
Lastinspectbreeding func() null.Val[string]
Lastinspectconditions func() null.Val[string]
Lastinspectdate func() null.Val[int64]
Lastinspectfieldspecies func() null.Val[string]
Lastinspectlstages func() null.Val[string]
Lasttreatactivity func() null.Val[string]
Lasttreatdate func() null.Val[int64]
Lasttreatproduct func() null.Val[string]
Lasttreatqty func() null.Val[float64]
Lasttreatqtyunit func() null.Val[string]
LengthFT func() null.Val[float64]
LengthMeters func() null.Val[float64]
Locationnumber func() null.Val[int64]
Name func() null.Val[string]
Nextactiondatescheduled func() null.Val[int64]
Objectid func() int32
Priority func() null.Val[string]
Symbology func() null.Val[string]
ShapeLength func() null.Val[float64]
Usetype func() null.Val[string]
Waterorigin func() null.Val[string]
WidthFT func() null.Val[float64]
WidthMeters func() null.Val[float64]
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]
Version func() int32
r historyLinelocationR
f *Factory
alreadyPersisted bool
}
type historyLinelocationR struct {
Organization *historyLinelocationROrganizationR
}
type historyLinelocationROrganizationR struct {
o *OrganizationTemplate
}
// Apply mods to the HistoryLinelocationTemplate
func (o *HistoryLinelocationTemplate) Apply(ctx context.Context, mods ...HistoryLinelocationMod) {
for _, mod := range mods {
mod.Apply(ctx, o)
}
}
// setModelRels creates and sets the relationships on *models.HistoryLinelocation
// according to the relationships in the template. Nothing is inserted into the db
func (t HistoryLinelocationTemplate) setModelRels(o *models.HistoryLinelocation) {
if t.r.Organization != nil {
rel := t.r.Organization.o.Build()
rel.R.HistoryLinelocations = append(rel.R.HistoryLinelocations, o)
o.OrganizationID = rel.ID // h2
o.R.Organization = rel
}
}
// BuildSetter returns an *models.HistoryLinelocationSetter
// this does nothing with the relationship templates
func (o HistoryLinelocationTemplate) BuildSetter() *models.HistoryLinelocationSetter {
m := &models.HistoryLinelocationSetter{}
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.Acres != nil {
val := o.Acres()
m.Acres = 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.Hectares != nil {
val := o.Hectares()
m.Hectares = omitnull.FromNull(val)
}
if o.Jurisdiction != nil {
val := o.Jurisdiction()
m.Jurisdiction = omitnull.FromNull(val)
}
if o.Larvinspectinterval != nil {
val := o.Larvinspectinterval()
m.Larvinspectinterval = omitnull.FromNull(val)
}
if o.Lastinspectactiontaken != nil {
val := o.Lastinspectactiontaken()
m.Lastinspectactiontaken = omitnull.FromNull(val)
}
if o.Lastinspectactivity != nil {
val := o.Lastinspectactivity()
m.Lastinspectactivity = omitnull.FromNull(val)
}
if o.Lastinspectavglarvae != nil {
val := o.Lastinspectavglarvae()
m.Lastinspectavglarvae = omitnull.FromNull(val)
}
if o.Lastinspectavgpupae != nil {
val := o.Lastinspectavgpupae()
m.Lastinspectavgpupae = omitnull.FromNull(val)
}
if o.Lastinspectbreeding != nil {
val := o.Lastinspectbreeding()
m.Lastinspectbreeding = 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.Lastinspectfieldspecies != nil {
val := o.Lastinspectfieldspecies()
m.Lastinspectfieldspecies = omitnull.FromNull(val)
}
if o.Lastinspectlstages != nil {
val := o.Lastinspectlstages()
m.Lastinspectlstages = omitnull.FromNull(val)
}
if o.Lasttreatactivity != nil {
val := o.Lasttreatactivity()
m.Lasttreatactivity = omitnull.FromNull(val)
}
if o.Lasttreatdate != nil {
val := o.Lasttreatdate()
m.Lasttreatdate = omitnull.FromNull(val)
}
if o.Lasttreatproduct != nil {
val := o.Lasttreatproduct()
m.Lasttreatproduct = omitnull.FromNull(val)
}
if o.Lasttreatqty != nil {
val := o.Lasttreatqty()
m.Lasttreatqty = omitnull.FromNull(val)
}
if o.Lasttreatqtyunit != nil {
val := o.Lasttreatqtyunit()
m.Lasttreatqtyunit = omitnull.FromNull(val)
}
if o.LengthFT != nil {
val := o.LengthFT()
m.LengthFT = omitnull.FromNull(val)
}
if o.LengthMeters != nil {
val := o.LengthMeters()
m.LengthMeters = omitnull.FromNull(val)
}
if o.Locationnumber != nil {
val := o.Locationnumber()
m.Locationnumber = omitnull.FromNull(val)
}
if o.Name != nil {
val := o.Name()
m.Name = 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.ShapeLength != nil {
val := o.ShapeLength()
m.ShapeLength = omitnull.FromNull(val)
}
if o.Usetype != nil {
val := o.Usetype()
m.Usetype = omitnull.FromNull(val)
}
if o.Waterorigin != nil {
val := o.Waterorigin()
m.Waterorigin = omitnull.FromNull(val)
}
if o.WidthFT != nil {
val := o.WidthFT()
m.WidthFT = omitnull.FromNull(val)
}
if o.WidthMeters != nil {
val := o.WidthMeters()
m.WidthMeters = 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.Version != nil {
val := o.Version()
m.Version = omit.From(val)
}
return m
}
// BuildManySetter returns an []*models.HistoryLinelocationSetter
// this does nothing with the relationship templates
func (o HistoryLinelocationTemplate) BuildManySetter(number int) []*models.HistoryLinelocationSetter {
m := make([]*models.HistoryLinelocationSetter, number)
for i := range m {
m[i] = o.BuildSetter()
}
return m
}
// Build returns an *models.HistoryLinelocation
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use HistoryLinelocationTemplate.Create
func (o HistoryLinelocationTemplate) Build() *models.HistoryLinelocation {
m := &models.HistoryLinelocation{}
if o.OrganizationID != nil {
m.OrganizationID = o.OrganizationID()
}
if o.Accessdesc != nil {
m.Accessdesc = o.Accessdesc()
}
if o.Acres != nil {
m.Acres = o.Acres()
}
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.Hectares != nil {
m.Hectares = o.Hectares()
}
if o.Jurisdiction != nil {
m.Jurisdiction = o.Jurisdiction()
}
if o.Larvinspectinterval != nil {
m.Larvinspectinterval = o.Larvinspectinterval()
}
if o.Lastinspectactiontaken != nil {
m.Lastinspectactiontaken = o.Lastinspectactiontaken()
}
if o.Lastinspectactivity != nil {
m.Lastinspectactivity = o.Lastinspectactivity()
}
if o.Lastinspectavglarvae != nil {
m.Lastinspectavglarvae = o.Lastinspectavglarvae()
}
if o.Lastinspectavgpupae != nil {
m.Lastinspectavgpupae = o.Lastinspectavgpupae()
}
if o.Lastinspectbreeding != nil {
m.Lastinspectbreeding = o.Lastinspectbreeding()
}
if o.Lastinspectconditions != nil {
m.Lastinspectconditions = o.Lastinspectconditions()
}
if o.Lastinspectdate != nil {
m.Lastinspectdate = o.Lastinspectdate()
}
if o.Lastinspectfieldspecies != nil {
m.Lastinspectfieldspecies = o.Lastinspectfieldspecies()
}
if o.Lastinspectlstages != nil {
m.Lastinspectlstages = o.Lastinspectlstages()
}
if o.Lasttreatactivity != nil {
m.Lasttreatactivity = o.Lasttreatactivity()
}
if o.Lasttreatdate != nil {
m.Lasttreatdate = o.Lasttreatdate()
}
if o.Lasttreatproduct != nil {
m.Lasttreatproduct = o.Lasttreatproduct()
}
if o.Lasttreatqty != nil {
m.Lasttreatqty = o.Lasttreatqty()
}
if o.Lasttreatqtyunit != nil {
m.Lasttreatqtyunit = o.Lasttreatqtyunit()
}
if o.LengthFT != nil {
m.LengthFT = o.LengthFT()
}
if o.LengthMeters != nil {
m.LengthMeters = o.LengthMeters()
}
if o.Locationnumber != nil {
m.Locationnumber = o.Locationnumber()
}
if o.Name != nil {
m.Name = o.Name()
}
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.ShapeLength != nil {
m.ShapeLength = o.ShapeLength()
}
if o.Usetype != nil {
m.Usetype = o.Usetype()
}
if o.Waterorigin != nil {
m.Waterorigin = o.Waterorigin()
}
if o.WidthFT != nil {
m.WidthFT = o.WidthFT()
}
if o.WidthMeters != nil {
m.WidthMeters = o.WidthMeters()
}
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.Version != nil {
m.Version = o.Version()
}
o.setModelRels(m)
return m
}
// BuildMany returns an models.HistoryLinelocationSlice
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use HistoryLinelocationTemplate.CreateMany
func (o HistoryLinelocationTemplate) BuildMany(number int) models.HistoryLinelocationSlice {
m := make(models.HistoryLinelocationSlice, number)
for i := range m {
m[i] = o.Build()
}
return m
}
func ensureCreatableHistoryLinelocation(m *models.HistoryLinelocationSetter) {
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.HistoryLinelocation
// according to the relationships in the template.
// any required relationship should have already exist on the model
func (o *HistoryLinelocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.HistoryLinelocation) error {
var err error
return err
}
// Create builds a historyLinelocation and inserts it into the database
// Relations objects are also inserted and placed in the .R field
func (o *HistoryLinelocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.HistoryLinelocation, error) {
var err error
opt := o.BuildSetter()
ensureCreatableHistoryLinelocation(opt)
if o.r.Organization == nil {
HistoryLinelocationMods.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.HistoryLinelocations.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 historyLinelocation and inserts it into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o *HistoryLinelocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.HistoryLinelocation {
m, err := o.Create(ctx, exec)
if err != nil {
panic(err)
}
return m
}
// CreateOrFail builds a historyLinelocation 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 *HistoryLinelocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.HistoryLinelocation {
tb.Helper()
m, err := o.Create(ctx, exec)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// CreateMany builds multiple historyLinelocations and inserts them into the database
// Relations objects are also inserted and placed in the .R field
func (o HistoryLinelocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.HistoryLinelocationSlice, error) {
var err error
m := make(models.HistoryLinelocationSlice, number)
for i := range m {
m[i], err = o.Create(ctx, exec)
if err != nil {
return nil, err
}
}
return m, nil
}
// MustCreateMany builds multiple historyLinelocations and inserts them into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o HistoryLinelocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.HistoryLinelocationSlice {
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
panic(err)
}
return m
}
// CreateManyOrFail builds multiple historyLinelocations 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 HistoryLinelocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.HistoryLinelocationSlice {
tb.Helper()
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// HistoryLinelocation has methods that act as mods for the HistoryLinelocationTemplate
var HistoryLinelocationMods historyLinelocationMods
type historyLinelocationMods struct{}
func (m historyLinelocationMods) RandomizeAllColumns(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModSlice{
HistoryLinelocationMods.RandomOrganizationID(f),
HistoryLinelocationMods.RandomAccessdesc(f),
HistoryLinelocationMods.RandomAcres(f),
HistoryLinelocationMods.RandomActive(f),
HistoryLinelocationMods.RandomComments(f),
HistoryLinelocationMods.RandomCreationdate(f),
HistoryLinelocationMods.RandomCreator(f),
HistoryLinelocationMods.RandomDescription(f),
HistoryLinelocationMods.RandomExternalid(f),
HistoryLinelocationMods.RandomEditdate(f),
HistoryLinelocationMods.RandomEditor(f),
HistoryLinelocationMods.RandomGlobalid(f),
HistoryLinelocationMods.RandomHabitat(f),
HistoryLinelocationMods.RandomHectares(f),
HistoryLinelocationMods.RandomJurisdiction(f),
HistoryLinelocationMods.RandomLarvinspectinterval(f),
HistoryLinelocationMods.RandomLastinspectactiontaken(f),
HistoryLinelocationMods.RandomLastinspectactivity(f),
HistoryLinelocationMods.RandomLastinspectavglarvae(f),
HistoryLinelocationMods.RandomLastinspectavgpupae(f),
HistoryLinelocationMods.RandomLastinspectbreeding(f),
HistoryLinelocationMods.RandomLastinspectconditions(f),
HistoryLinelocationMods.RandomLastinspectdate(f),
HistoryLinelocationMods.RandomLastinspectfieldspecies(f),
HistoryLinelocationMods.RandomLastinspectlstages(f),
HistoryLinelocationMods.RandomLasttreatactivity(f),
HistoryLinelocationMods.RandomLasttreatdate(f),
HistoryLinelocationMods.RandomLasttreatproduct(f),
HistoryLinelocationMods.RandomLasttreatqty(f),
HistoryLinelocationMods.RandomLasttreatqtyunit(f),
HistoryLinelocationMods.RandomLengthFT(f),
HistoryLinelocationMods.RandomLengthMeters(f),
HistoryLinelocationMods.RandomLocationnumber(f),
HistoryLinelocationMods.RandomName(f),
HistoryLinelocationMods.RandomNextactiondatescheduled(f),
HistoryLinelocationMods.RandomObjectid(f),
HistoryLinelocationMods.RandomPriority(f),
HistoryLinelocationMods.RandomSymbology(f),
HistoryLinelocationMods.RandomShapeLength(f),
HistoryLinelocationMods.RandomUsetype(f),
HistoryLinelocationMods.RandomWaterorigin(f),
HistoryLinelocationMods.RandomWidthFT(f),
HistoryLinelocationMods.RandomWidthMeters(f),
HistoryLinelocationMods.RandomZone(f),
HistoryLinelocationMods.RandomZone2(f),
HistoryLinelocationMods.RandomCreated(f),
HistoryLinelocationMods.RandomCreatedDate(f),
HistoryLinelocationMods.RandomCreatedUser(f),
HistoryLinelocationMods.RandomGeometryX(f),
HistoryLinelocationMods.RandomGeometryY(f),
HistoryLinelocationMods.RandomLastEditedDate(f),
HistoryLinelocationMods.RandomLastEditedUser(f),
HistoryLinelocationMods.RandomVersion(f),
}
}
// Set the model columns to this value
func (m historyLinelocationMods) OrganizationID(val int32) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.OrganizationID = func() int32 { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) OrganizationIDFunc(f func() int32) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.OrganizationID = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetOrganizationID() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomOrganizationID(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.OrganizationID = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m historyLinelocationMods) Accessdesc(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Accessdesc = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) AccessdescFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Accessdesc = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetAccessdesc() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomAccessdesc(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomAccessdescNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Acres(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Acres = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) AcresFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Acres = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetAcres() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Acres = 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 historyLinelocationMods) RandomAcres(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Acres = 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 historyLinelocationMods) RandomAcresNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Acres = 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 historyLinelocationMods) Active(val null.Val[int16]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Active = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) ActiveFunc(f func() null.Val[int16]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Active = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetActive() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomActive(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomActiveNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Comments(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Comments = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) CommentsFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Comments = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetComments() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomComments(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomCommentsNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Creationdate(val null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Creationdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) CreationdateFunc(f func() null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Creationdate = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetCreationdate() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomCreationdate(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomCreationdateNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Creator(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Creator = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) CreatorFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Creator = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetCreator() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomCreator(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomCreatorNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Description(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Description = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) DescriptionFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Description = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetDescription() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomDescription(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomDescriptionNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Externalid(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Externalid = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) ExternalidFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Externalid = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetExternalid() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomExternalid(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomExternalidNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Editdate(val null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Editdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) EditdateFunc(f func() null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Editdate = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetEditdate() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomEditdate(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomEditdateNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Editor(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Editor = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) EditorFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Editor = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetEditor() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomEditor(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomEditorNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Globalid(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Globalid = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) GlobalidFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Globalid = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetGlobalid() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomGlobalid(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomGlobalidNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Habitat(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Habitat = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) HabitatFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Habitat = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetHabitat() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomHabitat(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomHabitatNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Hectares(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Hectares = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) HectaresFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Hectares = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetHectares() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Hectares = 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 historyLinelocationMods) RandomHectares(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Hectares = 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 historyLinelocationMods) RandomHectaresNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Hectares = 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 historyLinelocationMods) Jurisdiction(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Jurisdiction = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) JurisdictionFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Jurisdiction = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetJurisdiction() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomJurisdiction(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomJurisdictionNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Larvinspectinterval(val null.Val[int16]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Larvinspectinterval = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LarvinspectintervalFunc(f func() null.Val[int16]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Larvinspectinterval = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLarvinspectinterval() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Larvinspectinterval = 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 historyLinelocationMods) RandomLarvinspectinterval(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Larvinspectinterval = 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 historyLinelocationMods) RandomLarvinspectintervalNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Larvinspectinterval = 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 historyLinelocationMods) Lastinspectactiontaken(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectactiontaken = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LastinspectactiontakenFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectactiontaken = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLastinspectactiontaken() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectactiontaken = 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 historyLinelocationMods) RandomLastinspectactiontaken(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectactiontaken = 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 historyLinelocationMods) RandomLastinspectactiontakenNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectactiontaken = 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 historyLinelocationMods) Lastinspectactivity(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectactivity = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LastinspectactivityFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectactivity = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLastinspectactivity() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectactivity = 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 historyLinelocationMods) RandomLastinspectactivity(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectactivity = 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 historyLinelocationMods) RandomLastinspectactivityNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectactivity = 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 historyLinelocationMods) Lastinspectavglarvae(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectavglarvae = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LastinspectavglarvaeFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectavglarvae = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLastinspectavglarvae() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectavglarvae = 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 historyLinelocationMods) RandomLastinspectavglarvae(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectavglarvae = 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 historyLinelocationMods) RandomLastinspectavglarvaeNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectavglarvae = 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 historyLinelocationMods) Lastinspectavgpupae(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectavgpupae = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LastinspectavgpupaeFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectavgpupae = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLastinspectavgpupae() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectavgpupae = 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 historyLinelocationMods) RandomLastinspectavgpupae(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectavgpupae = 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 historyLinelocationMods) RandomLastinspectavgpupaeNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectavgpupae = 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 historyLinelocationMods) Lastinspectbreeding(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectbreeding = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LastinspectbreedingFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectbreeding = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLastinspectbreeding() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectbreeding = 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 historyLinelocationMods) RandomLastinspectbreeding(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectbreeding = 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 historyLinelocationMods) RandomLastinspectbreedingNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectbreeding = 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 historyLinelocationMods) Lastinspectconditions(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectconditions = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LastinspectconditionsFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectconditions = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLastinspectconditions() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomLastinspectconditions(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomLastinspectconditionsNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Lastinspectdate(val null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LastinspectdateFunc(f func() null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectdate = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLastinspectdate() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomLastinspectdate(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomLastinspectdateNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Lastinspectfieldspecies(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectfieldspecies = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LastinspectfieldspeciesFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectfieldspecies = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLastinspectfieldspecies() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectfieldspecies = 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 historyLinelocationMods) RandomLastinspectfieldspecies(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectfieldspecies = 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 historyLinelocationMods) RandomLastinspectfieldspeciesNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectfieldspecies = 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 historyLinelocationMods) Lastinspectlstages(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectlstages = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LastinspectlstagesFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectlstages = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLastinspectlstages() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectlstages = 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 historyLinelocationMods) RandomLastinspectlstages(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectlstages = 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 historyLinelocationMods) RandomLastinspectlstagesNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lastinspectlstages = 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 historyLinelocationMods) Lasttreatactivity(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatactivity = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LasttreatactivityFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatactivity = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLasttreatactivity() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatactivity = 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 historyLinelocationMods) RandomLasttreatactivity(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatactivity = 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 historyLinelocationMods) RandomLasttreatactivityNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatactivity = 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 historyLinelocationMods) Lasttreatdate(val null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LasttreatdateFunc(f func() null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatdate = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLasttreatdate() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatdate = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historyLinelocationMods) RandomLasttreatdate(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatdate = 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 historyLinelocationMods) RandomLasttreatdateNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatdate = 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 historyLinelocationMods) Lasttreatproduct(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatproduct = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LasttreatproductFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatproduct = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLasttreatproduct() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatproduct = 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 historyLinelocationMods) RandomLasttreatproduct(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatproduct = 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 historyLinelocationMods) RandomLasttreatproductNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatproduct = 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 historyLinelocationMods) Lasttreatqty(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatqty = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LasttreatqtyFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatqty = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLasttreatqty() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatqty = 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 historyLinelocationMods) RandomLasttreatqty(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatqty = 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 historyLinelocationMods) RandomLasttreatqtyNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatqty = 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 historyLinelocationMods) Lasttreatqtyunit(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatqtyunit = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LasttreatqtyunitFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatqtyunit = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLasttreatqtyunit() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatqtyunit = 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 historyLinelocationMods) RandomLasttreatqtyunit(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatqtyunit = 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 historyLinelocationMods) RandomLasttreatqtyunitNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Lasttreatqtyunit = 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 historyLinelocationMods) LengthFT(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LengthFT = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LengthFTFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LengthFT = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLengthFT() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LengthFT = 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 historyLinelocationMods) RandomLengthFT(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LengthFT = 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 historyLinelocationMods) RandomLengthFTNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LengthFT = 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 historyLinelocationMods) LengthMeters(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LengthMeters = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LengthMetersFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LengthMeters = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLengthMeters() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LengthMeters = 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 historyLinelocationMods) RandomLengthMeters(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LengthMeters = 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 historyLinelocationMods) RandomLengthMetersNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LengthMeters = 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 historyLinelocationMods) Locationnumber(val null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Locationnumber = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LocationnumberFunc(f func() null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Locationnumber = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLocationnumber() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomLocationnumber(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomLocationnumberNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Name(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Name = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) NameFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Name = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetName() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Name = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m historyLinelocationMods) RandomName(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Name = 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 historyLinelocationMods) RandomNameNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Name = 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 historyLinelocationMods) Nextactiondatescheduled(val null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Nextactiondatescheduled = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) NextactiondatescheduledFunc(f func() null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Nextactiondatescheduled = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetNextactiondatescheduled() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomNextactiondatescheduled(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Objectid(val int32) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Objectid = func() int32 { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) ObjectidFunc(f func() int32) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Objectid = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetObjectid() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomObjectid(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Objectid = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m historyLinelocationMods) Priority(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Priority = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) PriorityFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Priority = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetPriority() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomPriority(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomPriorityNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Symbology(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Symbology = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) SymbologyFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Symbology = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetSymbology() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomSymbology(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomSymbologyNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) ShapeLength(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.ShapeLength = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) ShapeLengthFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.ShapeLength = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetShapeLength() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.ShapeLength = 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 historyLinelocationMods) RandomShapeLength(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.ShapeLength = 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 historyLinelocationMods) RandomShapeLengthNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.ShapeLength = 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 historyLinelocationMods) Usetype(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Usetype = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) UsetypeFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Usetype = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetUsetype() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomUsetype(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomUsetypeNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Waterorigin(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Waterorigin = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) WateroriginFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Waterorigin = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetWaterorigin() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Waterorigin = 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 historyLinelocationMods) RandomWaterorigin(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Waterorigin = 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 historyLinelocationMods) RandomWateroriginNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Waterorigin = 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 historyLinelocationMods) WidthFT(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.WidthFT = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) WidthFTFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.WidthFT = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetWidthFT() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.WidthFT = 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 historyLinelocationMods) RandomWidthFT(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.WidthFT = 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 historyLinelocationMods) RandomWidthFTNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.WidthFT = 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 historyLinelocationMods) WidthMeters(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.WidthMeters = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) WidthMetersFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.WidthMeters = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetWidthMeters() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.WidthMeters = 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 historyLinelocationMods) RandomWidthMeters(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.WidthMeters = 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 historyLinelocationMods) RandomWidthMetersNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.WidthMeters = 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 historyLinelocationMods) Zone(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Zone = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) ZoneFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Zone = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetZone() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomZone(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomZoneNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Zone2(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Zone2 = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) Zone2Func(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Zone2 = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetZone2() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomZone2(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomZone2NotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Created(val null.Val[time.Time]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Created = func() null.Val[time.Time] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) CreatedFunc(f func() null.Val[time.Time]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Created = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetCreated() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomCreated(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomCreatedNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) CreatedDate(val null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.CreatedDate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) CreatedDateFunc(f func() null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.CreatedDate = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetCreatedDate() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomCreatedDate(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomCreatedDateNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) CreatedUser(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.CreatedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) CreatedUserFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.CreatedUser = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetCreatedUser() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomCreatedUser(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomCreatedUserNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) GeometryX(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.GeometryX = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) GeometryXFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.GeometryX = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetGeometryX() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomGeometryX(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomGeometryXNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) GeometryY(val null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.GeometryY = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) GeometryYFunc(f func() null.Val[float64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.GeometryY = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetGeometryY() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomGeometryY(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomGeometryYNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) LastEditedDate(val null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LastEditedDate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LastEditedDateFunc(f func() null.Val[int64]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LastEditedDate = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLastEditedDate() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomLastEditedDate(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomLastEditedDateNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) LastEditedUser(val null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LastEditedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) LastEditedUserFunc(f func() null.Val[string]) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.LastEditedUser = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetLastEditedUser() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomLastEditedUser(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomLastEditedUserNotNull(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) Version(val int32) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Version = func() int32 { return val }
})
}
// Set the Column from the function
func (m historyLinelocationMods) VersionFunc(f func() int32) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Version = f
})
}
// Clear any values for the column
func (m historyLinelocationMods) UnsetVersion() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
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 historyLinelocationMods) RandomVersion(f *faker.Faker) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(_ context.Context, o *HistoryLinelocationTemplate) {
o.Version = func() int32 {
return random_int32(f)
}
})
}
func (m historyLinelocationMods) WithParentsCascading() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(ctx context.Context, o *HistoryLinelocationTemplate) {
if isDone, _ := historyLinelocationWithParentsCascadingCtx.Value(ctx); isDone {
return
}
ctx = historyLinelocationWithParentsCascadingCtx.WithValue(ctx, true)
{
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
m.WithOrganization(related).Apply(ctx, o)
}
})
}
func (m historyLinelocationMods) WithOrganization(rel *OrganizationTemplate) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(ctx context.Context, o *HistoryLinelocationTemplate) {
o.r.Organization = &historyLinelocationROrganizationR{
o: rel,
}
})
}
func (m historyLinelocationMods) WithNewOrganization(mods ...OrganizationMod) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(ctx context.Context, o *HistoryLinelocationTemplate) {
related := o.f.NewOrganizationWithContext(ctx, mods...)
m.WithOrganization(related).Apply(ctx, o)
})
}
func (m historyLinelocationMods) WithExistingOrganization(em *models.Organization) HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(ctx context.Context, o *HistoryLinelocationTemplate) {
o.r.Organization = &historyLinelocationROrganizationR{
o: o.f.FromExistingOrganization(em),
}
})
}
func (m historyLinelocationMods) WithoutOrganization() HistoryLinelocationMod {
return HistoryLinelocationModFunc(func(ctx context.Context, o *HistoryLinelocationTemplate) {
o.r.Organization = nil
})
}