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

2316 lines
68 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 FSTraplocationMod interface {
Apply(context.Context, *FSTraplocationTemplate)
}
type FSTraplocationModFunc func(context.Context, *FSTraplocationTemplate)
func (f FSTraplocationModFunc) Apply(ctx context.Context, n *FSTraplocationTemplate) {
f(ctx, n)
}
type FSTraplocationModSlice []FSTraplocationMod
func (mods FSTraplocationModSlice) Apply(ctx context.Context, n *FSTraplocationTemplate) {
for _, f := range mods {
f.Apply(ctx, n)
}
}
// FSTraplocationTemplate is an object representing the database table.
// all columns are optional and should be set by mods
type FSTraplocationTemplate struct {
OrganizationID func() int32
Accessdesc func() null.Val[string]
Active func() null.Val[int16]
Comments func() null.Val[string]
Creationdate func() null.Val[int64]
Creator func() null.Val[string]
Description func() null.Val[string]
Externalid func() null.Val[string]
Editdate func() null.Val[int64]
Editor func() null.Val[string]
Gatewaysync func() null.Val[int16]
Globalid func() string
Habitat func() null.Val[string]
Locationnumber func() null.Val[int64]
Name func() null.Val[string]
Nextactiondatescheduled func() null.Val[int64]
Objectid func() int32
Priority func() null.Val[string]
Usetype func() null.Val[string]
Zone func() null.Val[string]
Zone2 func() null.Val[string]
CreatedDate func() null.Val[int64]
CreatedUser func() null.Val[string]
GeometryX func() null.Val[float64]
GeometryY func() null.Val[float64]
LastEditedDate func() null.Val[int64]
LastEditedUser func() null.Val[string]
Route func() null.Val[int64]
RouteOrder func() null.Val[int64]
SetDow func() null.Val[int64]
Vectorsurvsiteid func() null.Val[string]
H3R7 func() null.Val[string]
H3R8 func() null.Val[string]
Updated func() time.Time
r fsTraplocationR
f *Factory
alreadyPersisted bool
}
type fsTraplocationR struct {
Organization *fsTraplocationROrganizationR
}
type fsTraplocationROrganizationR struct {
o *OrganizationTemplate
}
// Apply mods to the FSTraplocationTemplate
func (o *FSTraplocationTemplate) Apply(ctx context.Context, mods ...FSTraplocationMod) {
for _, mod := range mods {
mod.Apply(ctx, o)
}
}
// setModelRels creates and sets the relationships on *models.FSTraplocation
// according to the relationships in the template. Nothing is inserted into the db
func (t FSTraplocationTemplate) setModelRels(o *models.FSTraplocation) {
if t.r.Organization != nil {
rel := t.r.Organization.o.Build()
rel.R.FSTraplocations = append(rel.R.FSTraplocations, o)
o.OrganizationID = rel.ID // h2
o.R.Organization = rel
}
}
// BuildSetter returns an *models.FSTraplocationSetter
// this does nothing with the relationship templates
func (o FSTraplocationTemplate) BuildSetter() *models.FSTraplocationSetter {
m := &models.FSTraplocationSetter{}
if o.OrganizationID != nil {
val := o.OrganizationID()
m.OrganizationID = omit.From(val)
}
if o.Accessdesc != nil {
val := o.Accessdesc()
m.Accessdesc = omitnull.FromNull(val)
}
if o.Active != nil {
val := o.Active()
m.Active = omitnull.FromNull(val)
}
if o.Comments != nil {
val := o.Comments()
m.Comments = omitnull.FromNull(val)
}
if o.Creationdate != nil {
val := o.Creationdate()
m.Creationdate = omitnull.FromNull(val)
}
if o.Creator != nil {
val := o.Creator()
m.Creator = omitnull.FromNull(val)
}
if o.Description != nil {
val := o.Description()
m.Description = omitnull.FromNull(val)
}
if o.Externalid != nil {
val := o.Externalid()
m.Externalid = omitnull.FromNull(val)
}
if o.Editdate != nil {
val := o.Editdate()
m.Editdate = omitnull.FromNull(val)
}
if o.Editor != nil {
val := o.Editor()
m.Editor = omitnull.FromNull(val)
}
if o.Gatewaysync != nil {
val := o.Gatewaysync()
m.Gatewaysync = omitnull.FromNull(val)
}
if o.Globalid != nil {
val := o.Globalid()
m.Globalid = omit.From(val)
}
if o.Habitat != nil {
val := o.Habitat()
m.Habitat = omitnull.FromNull(val)
}
if o.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.Usetype != nil {
val := o.Usetype()
m.Usetype = omitnull.FromNull(val)
}
if o.Zone != nil {
val := o.Zone()
m.Zone = omitnull.FromNull(val)
}
if o.Zone2 != nil {
val := o.Zone2()
m.Zone2 = omitnull.FromNull(val)
}
if o.CreatedDate != nil {
val := o.CreatedDate()
m.CreatedDate = omitnull.FromNull(val)
}
if o.CreatedUser != nil {
val := o.CreatedUser()
m.CreatedUser = omitnull.FromNull(val)
}
if o.GeometryX != nil {
val := o.GeometryX()
m.GeometryX = omitnull.FromNull(val)
}
if o.GeometryY != nil {
val := o.GeometryY()
m.GeometryY = omitnull.FromNull(val)
}
if o.LastEditedDate != nil {
val := o.LastEditedDate()
m.LastEditedDate = omitnull.FromNull(val)
}
if o.LastEditedUser != nil {
val := o.LastEditedUser()
m.LastEditedUser = omitnull.FromNull(val)
}
if o.Route != nil {
val := o.Route()
m.Route = omitnull.FromNull(val)
}
if o.RouteOrder != nil {
val := o.RouteOrder()
m.RouteOrder = omitnull.FromNull(val)
}
if o.SetDow != nil {
val := o.SetDow()
m.SetDow = omitnull.FromNull(val)
}
if o.Vectorsurvsiteid != nil {
val := o.Vectorsurvsiteid()
m.Vectorsurvsiteid = omitnull.FromNull(val)
}
if o.H3R7 != nil {
val := o.H3R7()
m.H3R7 = omitnull.FromNull(val)
}
if o.H3R8 != nil {
val := o.H3R8()
m.H3R8 = omitnull.FromNull(val)
}
if o.Updated != nil {
val := o.Updated()
m.Updated = omit.From(val)
}
return m
}
// BuildManySetter returns an []*models.FSTraplocationSetter
// this does nothing with the relationship templates
func (o FSTraplocationTemplate) BuildManySetter(number int) []*models.FSTraplocationSetter {
m := make([]*models.FSTraplocationSetter, number)
for i := range m {
m[i] = o.BuildSetter()
}
return m
}
// Build returns an *models.FSTraplocation
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FSTraplocationTemplate.Create
func (o FSTraplocationTemplate) Build() *models.FSTraplocation {
m := &models.FSTraplocation{}
if o.OrganizationID != nil {
m.OrganizationID = o.OrganizationID()
}
if o.Accessdesc != nil {
m.Accessdesc = o.Accessdesc()
}
if o.Active != nil {
m.Active = o.Active()
}
if o.Comments != nil {
m.Comments = o.Comments()
}
if o.Creationdate != nil {
m.Creationdate = o.Creationdate()
}
if o.Creator != nil {
m.Creator = o.Creator()
}
if o.Description != nil {
m.Description = o.Description()
}
if o.Externalid != nil {
m.Externalid = o.Externalid()
}
if o.Editdate != nil {
m.Editdate = o.Editdate()
}
if o.Editor != nil {
m.Editor = o.Editor()
}
if o.Gatewaysync != nil {
m.Gatewaysync = o.Gatewaysync()
}
if o.Globalid != nil {
m.Globalid = o.Globalid()
}
if o.Habitat != nil {
m.Habitat = o.Habitat()
}
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.Usetype != nil {
m.Usetype = o.Usetype()
}
if o.Zone != nil {
m.Zone = o.Zone()
}
if o.Zone2 != nil {
m.Zone2 = o.Zone2()
}
if o.CreatedDate != nil {
m.CreatedDate = o.CreatedDate()
}
if o.CreatedUser != nil {
m.CreatedUser = o.CreatedUser()
}
if o.GeometryX != nil {
m.GeometryX = o.GeometryX()
}
if o.GeometryY != nil {
m.GeometryY = o.GeometryY()
}
if o.LastEditedDate != nil {
m.LastEditedDate = o.LastEditedDate()
}
if o.LastEditedUser != nil {
m.LastEditedUser = o.LastEditedUser()
}
if o.Route != nil {
m.Route = o.Route()
}
if o.RouteOrder != nil {
m.RouteOrder = o.RouteOrder()
}
if o.SetDow != nil {
m.SetDow = o.SetDow()
}
if o.Vectorsurvsiteid != nil {
m.Vectorsurvsiteid = o.Vectorsurvsiteid()
}
if o.H3R7 != nil {
m.H3R7 = o.H3R7()
}
if o.H3R8 != nil {
m.H3R8 = o.H3R8()
}
if o.Updated != nil {
m.Updated = o.Updated()
}
o.setModelRels(m)
return m
}
// BuildMany returns an models.FSTraplocationSlice
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FSTraplocationTemplate.CreateMany
func (o FSTraplocationTemplate) BuildMany(number int) models.FSTraplocationSlice {
m := make(models.FSTraplocationSlice, number)
for i := range m {
m[i] = o.Build()
}
return m
}
func ensureCreatableFSTraplocation(m *models.FSTraplocationSetter) {
if !(m.OrganizationID.IsValue()) {
val := random_int32(nil)
m.OrganizationID = omit.From(val)
}
if !(m.Globalid.IsValue()) {
val := random_string(nil)
m.Globalid = omit.From(val)
}
if !(m.Objectid.IsValue()) {
val := random_int32(nil)
m.Objectid = omit.From(val)
}
}
// insertOptRels creates and inserts any optional the relationships on *models.FSTraplocation
// according to the relationships in the template.
// any required relationship should have already exist on the model
func (o *FSTraplocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FSTraplocation) error {
var err error
return err
}
// Create builds a fsTraplocation and inserts it into the database
// Relations objects are also inserted and placed in the .R field
func (o *FSTraplocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FSTraplocation, error) {
var err error
opt := o.BuildSetter()
ensureCreatableFSTraplocation(opt)
if o.r.Organization == nil {
FSTraplocationMods.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.FSTraplocations.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 fsTraplocation and inserts it into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o *FSTraplocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FSTraplocation {
m, err := o.Create(ctx, exec)
if err != nil {
panic(err)
}
return m
}
// CreateOrFail builds a fsTraplocation 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 *FSTraplocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FSTraplocation {
tb.Helper()
m, err := o.Create(ctx, exec)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// CreateMany builds multiple fsTraplocations and inserts them into the database
// Relations objects are also inserted and placed in the .R field
func (o FSTraplocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FSTraplocationSlice, error) {
var err error
m := make(models.FSTraplocationSlice, number)
for i := range m {
m[i], err = o.Create(ctx, exec)
if err != nil {
return nil, err
}
}
return m, nil
}
// MustCreateMany builds multiple fsTraplocations and inserts them into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o FSTraplocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FSTraplocationSlice {
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
panic(err)
}
return m
}
// CreateManyOrFail builds multiple fsTraplocations 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 FSTraplocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FSTraplocationSlice {
tb.Helper()
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// FSTraplocation has methods that act as mods for the FSTraplocationTemplate
var FSTraplocationMods fsTraplocationMods
type fsTraplocationMods struct{}
func (m fsTraplocationMods) RandomizeAllColumns(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModSlice{
FSTraplocationMods.RandomOrganizationID(f),
FSTraplocationMods.RandomAccessdesc(f),
FSTraplocationMods.RandomActive(f),
FSTraplocationMods.RandomComments(f),
FSTraplocationMods.RandomCreationdate(f),
FSTraplocationMods.RandomCreator(f),
FSTraplocationMods.RandomDescription(f),
FSTraplocationMods.RandomExternalid(f),
FSTraplocationMods.RandomEditdate(f),
FSTraplocationMods.RandomEditor(f),
FSTraplocationMods.RandomGatewaysync(f),
FSTraplocationMods.RandomGlobalid(f),
FSTraplocationMods.RandomHabitat(f),
FSTraplocationMods.RandomLocationnumber(f),
FSTraplocationMods.RandomName(f),
FSTraplocationMods.RandomNextactiondatescheduled(f),
FSTraplocationMods.RandomObjectid(f),
FSTraplocationMods.RandomPriority(f),
FSTraplocationMods.RandomUsetype(f),
FSTraplocationMods.RandomZone(f),
FSTraplocationMods.RandomZone2(f),
FSTraplocationMods.RandomCreatedDate(f),
FSTraplocationMods.RandomCreatedUser(f),
FSTraplocationMods.RandomGeometryX(f),
FSTraplocationMods.RandomGeometryY(f),
FSTraplocationMods.RandomLastEditedDate(f),
FSTraplocationMods.RandomLastEditedUser(f),
FSTraplocationMods.RandomRoute(f),
FSTraplocationMods.RandomRouteOrder(f),
FSTraplocationMods.RandomSetDow(f),
FSTraplocationMods.RandomVectorsurvsiteid(f),
FSTraplocationMods.RandomH3R7(f),
FSTraplocationMods.RandomH3R8(f),
FSTraplocationMods.RandomUpdated(f),
}
}
// Set the model columns to this value
func (m fsTraplocationMods) OrganizationID(val int32) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.OrganizationID = func() int32 { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) OrganizationIDFunc(f func() int32) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.OrganizationID = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetOrganizationID() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomOrganizationID(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.OrganizationID = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m fsTraplocationMods) Accessdesc(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Accessdesc = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) AccessdescFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Accessdesc = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetAccessdesc() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomAccessdesc(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomAccessdescNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Active(val null.Val[int16]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Active = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) ActiveFunc(f func() null.Val[int16]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Active = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetActive() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomActive(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomActiveNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Comments(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Comments = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) CommentsFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Comments = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetComments() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomComments(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomCommentsNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Creationdate(val null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Creationdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) CreationdateFunc(f func() null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Creationdate = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetCreationdate() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomCreationdate(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomCreationdateNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Creator(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Creator = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) CreatorFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Creator = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetCreator() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomCreator(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomCreatorNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Description(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Description = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) DescriptionFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Description = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetDescription() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomDescription(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomDescriptionNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Externalid(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Externalid = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) ExternalidFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Externalid = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetExternalid() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomExternalid(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomExternalidNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Editdate(val null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Editdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) EditdateFunc(f func() null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Editdate = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetEditdate() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomEditdate(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomEditdateNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Editor(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Editor = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) EditorFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Editor = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetEditor() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomEditor(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomEditorNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Gatewaysync(val null.Val[int16]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Gatewaysync = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) GatewaysyncFunc(f func() null.Val[int16]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Gatewaysync = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetGatewaysync() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Gatewaysync = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsTraplocationMods) RandomGatewaysync(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Gatewaysync = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsTraplocationMods) RandomGatewaysyncNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Gatewaysync = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsTraplocationMods) Globalid(val string) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Globalid = func() string { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) GlobalidFunc(f func() string) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Globalid = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetGlobalid() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Globalid = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
func (m fsTraplocationMods) RandomGlobalid(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Globalid = func() string {
return random_string(f)
}
})
}
// Set the model columns to this value
func (m fsTraplocationMods) Habitat(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Habitat = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) HabitatFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Habitat = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetHabitat() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomHabitat(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomHabitatNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Locationnumber(val null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Locationnumber = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) LocationnumberFunc(f func() null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Locationnumber = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetLocationnumber() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomLocationnumber(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomLocationnumberNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Name(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Name = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) NameFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Name = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetName() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomName(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomNameNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Nextactiondatescheduled(val null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Nextactiondatescheduled = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) NextactiondatescheduledFunc(f func() null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Nextactiondatescheduled = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetNextactiondatescheduled() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomNextactiondatescheduled(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Objectid(val int32) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Objectid = func() int32 { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) ObjectidFunc(f func() int32) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Objectid = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetObjectid() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomObjectid(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Objectid = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m fsTraplocationMods) Priority(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Priority = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) PriorityFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Priority = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetPriority() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomPriority(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomPriorityNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Usetype(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Usetype = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) UsetypeFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Usetype = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetUsetype() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomUsetype(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomUsetypeNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Zone(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Zone = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) ZoneFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Zone = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetZone() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomZone(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomZoneNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Zone2(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Zone2 = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) Zone2Func(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Zone2 = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetZone2() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomZone2(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomZone2NotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) CreatedDate(val null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.CreatedDate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) CreatedDateFunc(f func() null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.CreatedDate = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetCreatedDate() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomCreatedDate(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomCreatedDateNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) CreatedUser(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.CreatedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) CreatedUserFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.CreatedUser = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetCreatedUser() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomCreatedUser(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomCreatedUserNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) GeometryX(val null.Val[float64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.GeometryX = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) GeometryXFunc(f func() null.Val[float64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.GeometryX = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetGeometryX() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomGeometryX(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomGeometryXNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) GeometryY(val null.Val[float64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.GeometryY = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) GeometryYFunc(f func() null.Val[float64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.GeometryY = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetGeometryY() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomGeometryY(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomGeometryYNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) LastEditedDate(val null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.LastEditedDate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) LastEditedDateFunc(f func() null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.LastEditedDate = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetLastEditedDate() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomLastEditedDate(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomLastEditedDateNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) LastEditedUser(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.LastEditedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) LastEditedUserFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.LastEditedUser = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetLastEditedUser() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomLastEditedUser(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) RandomLastEditedUserNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
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 fsTraplocationMods) Route(val null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Route = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) RouteFunc(f func() null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Route = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetRoute() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Route = 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 fsTraplocationMods) RandomRoute(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Route = 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 fsTraplocationMods) RandomRouteNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Route = 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 fsTraplocationMods) RouteOrder(val null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.RouteOrder = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) RouteOrderFunc(f func() null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.RouteOrder = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetRouteOrder() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.RouteOrder = 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 fsTraplocationMods) RandomRouteOrder(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.RouteOrder = 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 fsTraplocationMods) RandomRouteOrderNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.RouteOrder = 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 fsTraplocationMods) SetDow(val null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.SetDow = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) SetDowFunc(f func() null.Val[int64]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.SetDow = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetSetDow() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.SetDow = 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 fsTraplocationMods) RandomSetDow(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.SetDow = 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 fsTraplocationMods) RandomSetDowNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.SetDow = 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 fsTraplocationMods) Vectorsurvsiteid(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Vectorsurvsiteid = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) VectorsurvsiteidFunc(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Vectorsurvsiteid = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetVectorsurvsiteid() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Vectorsurvsiteid = 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 fsTraplocationMods) RandomVectorsurvsiteid(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Vectorsurvsiteid = 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 fsTraplocationMods) RandomVectorsurvsiteidNotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Vectorsurvsiteid = 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 fsTraplocationMods) H3R7(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.H3R7 = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) H3R7Func(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.H3R7 = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetH3R7() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.H3R7 = 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 fsTraplocationMods) RandomH3R7(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.H3R7 = 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 fsTraplocationMods) RandomH3R7NotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.H3R7 = 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 fsTraplocationMods) H3R8(val null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.H3R8 = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) H3R8Func(f func() null.Val[string]) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.H3R8 = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetH3R8() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.H3R8 = 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 fsTraplocationMods) RandomH3R8(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.H3R8 = 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 fsTraplocationMods) RandomH3R8NotNull(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.H3R8 = 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 fsTraplocationMods) Updated(val time.Time) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Updated = func() time.Time { return val }
})
}
// Set the Column from the function
func (m fsTraplocationMods) UpdatedFunc(f func() time.Time) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Updated = f
})
}
// Clear any values for the column
func (m fsTraplocationMods) UnsetUpdated() FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Updated = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
func (m fsTraplocationMods) RandomUpdated(f *faker.Faker) FSTraplocationMod {
return FSTraplocationModFunc(func(_ context.Context, o *FSTraplocationTemplate) {
o.Updated = func() time.Time {
return random_time_Time(f)
}
})
}
func (m fsTraplocationMods) WithParentsCascading() FSTraplocationMod {
return FSTraplocationModFunc(func(ctx context.Context, o *FSTraplocationTemplate) {
if isDone, _ := fsTraplocationWithParentsCascadingCtx.Value(ctx); isDone {
return
}
ctx = fsTraplocationWithParentsCascadingCtx.WithValue(ctx, true)
{
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
m.WithOrganization(related).Apply(ctx, o)
}
})
}
func (m fsTraplocationMods) WithOrganization(rel *OrganizationTemplate) FSTraplocationMod {
return FSTraplocationModFunc(func(ctx context.Context, o *FSTraplocationTemplate) {
o.r.Organization = &fsTraplocationROrganizationR{
o: rel,
}
})
}
func (m fsTraplocationMods) WithNewOrganization(mods ...OrganizationMod) FSTraplocationMod {
return FSTraplocationModFunc(func(ctx context.Context, o *FSTraplocationTemplate) {
related := o.f.NewOrganizationWithContext(ctx, mods...)
m.WithOrganization(related).Apply(ctx, o)
})
}
func (m fsTraplocationMods) WithExistingOrganization(em *models.Organization) FSTraplocationMod {
return FSTraplocationModFunc(func(ctx context.Context, o *FSTraplocationTemplate) {
o.r.Organization = &fsTraplocationROrganizationR{
o: o.f.FromExistingOrganization(em),
}
})
}
func (m fsTraplocationMods) WithoutOrganization() FSTraplocationMod {
return FSTraplocationModFunc(func(ctx context.Context, o *FSTraplocationTemplate) {
o.r.Organization = nil
})
}