nidus-sync/db/factory/history_traplocation.bob.go
Eli Ribble 41587c3694
Move database logic into separate subdirectory
I'm trying to see if this speeds up builds a bit. May not without a
module boundary, but for now it's nice organization to have as the
program grows.
2025-11-24 18:08:31 +00:00

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