This is an intermediate step between shifting from the old fs_* prefixed table names to an entire fieldseeker schema. At this point we have both, and we aren't doing much with the new schema but compiling.
2060 lines
70 KiB
Go
2060 lines
70 KiB
Go
// Code generated by BobGen psql v0.42.0. 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"
|
|
|
|
enums "github.com/Gleipnir-Technology/nidus-sync/db/enums"
|
|
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/gofrs/uuid/v5"
|
|
"github.com/jaswdr/faker/v2"
|
|
"github.com/stephenafamo/bob"
|
|
)
|
|
|
|
type FieldseekerTraplocationMod interface {
|
|
Apply(context.Context, *FieldseekerTraplocationTemplate)
|
|
}
|
|
|
|
type FieldseekerTraplocationModFunc func(context.Context, *FieldseekerTraplocationTemplate)
|
|
|
|
func (f FieldseekerTraplocationModFunc) Apply(ctx context.Context, n *FieldseekerTraplocationTemplate) {
|
|
f(ctx, n)
|
|
}
|
|
|
|
type FieldseekerTraplocationModSlice []FieldseekerTraplocationMod
|
|
|
|
func (mods FieldseekerTraplocationModSlice) Apply(ctx context.Context, n *FieldseekerTraplocationTemplate) {
|
|
for _, f := range mods {
|
|
f.Apply(ctx, n)
|
|
}
|
|
}
|
|
|
|
// FieldseekerTraplocationTemplate is an object representing the database table.
|
|
// all columns are optional and should be set by mods
|
|
type FieldseekerTraplocationTemplate struct {
|
|
Objectid func() int64
|
|
Name func() null.Val[string]
|
|
Zone func() null.Val[string]
|
|
Habitat func() null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e]
|
|
Priority func() null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B]
|
|
Usetype func() null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2]
|
|
Active func() null.Val[enums.FieldseekerTraplocationNotinuitFEnum]
|
|
Description func() null.Val[string]
|
|
Accessdesc func() null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0]
|
|
Comments func() null.Val[string]
|
|
Externalid func() null.Val[string]
|
|
Nextactiondatescheduled func() null.Val[time.Time]
|
|
Zone2 func() null.Val[string]
|
|
Locationnumber func() null.Val[int32]
|
|
Globalid func() null.Val[uuid.UUID]
|
|
CreatedUser func() null.Val[string]
|
|
CreatedDate func() null.Val[time.Time]
|
|
LastEditedUser func() null.Val[string]
|
|
LastEditedDate func() null.Val[time.Time]
|
|
Gatewaysync func() null.Val[int16]
|
|
Route func() null.Val[int32]
|
|
SetDow func() null.Val[int32]
|
|
RouteOrder func() null.Val[int32]
|
|
Vectorsurvsiteid func() null.Val[string]
|
|
Creationdate func() null.Val[time.Time]
|
|
Creator func() null.Val[string]
|
|
Editdate func() null.Val[time.Time]
|
|
Editor func() null.Val[string]
|
|
H3R7 func() null.Val[string]
|
|
H3R8 func() null.Val[string]
|
|
|
|
f *Factory
|
|
|
|
alreadyPersisted bool
|
|
}
|
|
|
|
// Apply mods to the FieldseekerTraplocationTemplate
|
|
func (o *FieldseekerTraplocationTemplate) Apply(ctx context.Context, mods ...FieldseekerTraplocationMod) {
|
|
for _, mod := range mods {
|
|
mod.Apply(ctx, o)
|
|
}
|
|
}
|
|
|
|
// setModelRels creates and sets the relationships on *models.FieldseekerTraplocation
|
|
// according to the relationships in the template. Nothing is inserted into the db
|
|
func (t FieldseekerTraplocationTemplate) setModelRels(o *models.FieldseekerTraplocation) {}
|
|
|
|
// BuildSetter returns an *models.FieldseekerTraplocationSetter
|
|
// this does nothing with the relationship templates
|
|
func (o FieldseekerTraplocationTemplate) BuildSetter() *models.FieldseekerTraplocationSetter {
|
|
m := &models.FieldseekerTraplocationSetter{}
|
|
|
|
if o.Objectid != nil {
|
|
val := o.Objectid()
|
|
m.Objectid = omit.From(val)
|
|
}
|
|
if o.Name != nil {
|
|
val := o.Name()
|
|
m.Name = omitnull.FromNull(val)
|
|
}
|
|
if o.Zone != nil {
|
|
val := o.Zone()
|
|
m.Zone = omitnull.FromNull(val)
|
|
}
|
|
if o.Habitat != nil {
|
|
val := o.Habitat()
|
|
m.Habitat = omitnull.FromNull(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.Active != nil {
|
|
val := o.Active()
|
|
m.Active = omitnull.FromNull(val)
|
|
}
|
|
if o.Description != nil {
|
|
val := o.Description()
|
|
m.Description = omitnull.FromNull(val)
|
|
}
|
|
if o.Accessdesc != nil {
|
|
val := o.Accessdesc()
|
|
m.Accessdesc = omitnull.FromNull(val)
|
|
}
|
|
if o.Comments != nil {
|
|
val := o.Comments()
|
|
m.Comments = omitnull.FromNull(val)
|
|
}
|
|
if o.Externalid != nil {
|
|
val := o.Externalid()
|
|
m.Externalid = omitnull.FromNull(val)
|
|
}
|
|
if o.Nextactiondatescheduled != nil {
|
|
val := o.Nextactiondatescheduled()
|
|
m.Nextactiondatescheduled = omitnull.FromNull(val)
|
|
}
|
|
if o.Zone2 != nil {
|
|
val := o.Zone2()
|
|
m.Zone2 = omitnull.FromNull(val)
|
|
}
|
|
if o.Locationnumber != nil {
|
|
val := o.Locationnumber()
|
|
m.Locationnumber = omitnull.FromNull(val)
|
|
}
|
|
if o.Globalid != nil {
|
|
val := o.Globalid()
|
|
m.Globalid = omitnull.FromNull(val)
|
|
}
|
|
if o.CreatedUser != nil {
|
|
val := o.CreatedUser()
|
|
m.CreatedUser = omitnull.FromNull(val)
|
|
}
|
|
if o.CreatedDate != nil {
|
|
val := o.CreatedDate()
|
|
m.CreatedDate = omitnull.FromNull(val)
|
|
}
|
|
if o.LastEditedUser != nil {
|
|
val := o.LastEditedUser()
|
|
m.LastEditedUser = omitnull.FromNull(val)
|
|
}
|
|
if o.LastEditedDate != nil {
|
|
val := o.LastEditedDate()
|
|
m.LastEditedDate = omitnull.FromNull(val)
|
|
}
|
|
if o.Gatewaysync != nil {
|
|
val := o.Gatewaysync()
|
|
m.Gatewaysync = omitnull.FromNull(val)
|
|
}
|
|
if o.Route != nil {
|
|
val := o.Route()
|
|
m.Route = omitnull.FromNull(val)
|
|
}
|
|
if o.SetDow != nil {
|
|
val := o.SetDow()
|
|
m.SetDow = omitnull.FromNull(val)
|
|
}
|
|
if o.RouteOrder != nil {
|
|
val := o.RouteOrder()
|
|
m.RouteOrder = omitnull.FromNull(val)
|
|
}
|
|
if o.Vectorsurvsiteid != nil {
|
|
val := o.Vectorsurvsiteid()
|
|
m.Vectorsurvsiteid = 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.Editdate != nil {
|
|
val := o.Editdate()
|
|
m.Editdate = omitnull.FromNull(val)
|
|
}
|
|
if o.Editor != nil {
|
|
val := o.Editor()
|
|
m.Editor = 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)
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildManySetter returns an []*models.FieldseekerTraplocationSetter
|
|
// this does nothing with the relationship templates
|
|
func (o FieldseekerTraplocationTemplate) BuildManySetter(number int) []*models.FieldseekerTraplocationSetter {
|
|
m := make([]*models.FieldseekerTraplocationSetter, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.BuildSetter()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// Build returns an *models.FieldseekerTraplocation
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use FieldseekerTraplocationTemplate.Create
|
|
func (o FieldseekerTraplocationTemplate) Build() *models.FieldseekerTraplocation {
|
|
m := &models.FieldseekerTraplocation{}
|
|
|
|
if o.Objectid != nil {
|
|
m.Objectid = o.Objectid()
|
|
}
|
|
if o.Name != nil {
|
|
m.Name = o.Name()
|
|
}
|
|
if o.Zone != nil {
|
|
m.Zone = o.Zone()
|
|
}
|
|
if o.Habitat != nil {
|
|
m.Habitat = o.Habitat()
|
|
}
|
|
if o.Priority != nil {
|
|
m.Priority = o.Priority()
|
|
}
|
|
if o.Usetype != nil {
|
|
m.Usetype = o.Usetype()
|
|
}
|
|
if o.Active != nil {
|
|
m.Active = o.Active()
|
|
}
|
|
if o.Description != nil {
|
|
m.Description = o.Description()
|
|
}
|
|
if o.Accessdesc != nil {
|
|
m.Accessdesc = o.Accessdesc()
|
|
}
|
|
if o.Comments != nil {
|
|
m.Comments = o.Comments()
|
|
}
|
|
if o.Externalid != nil {
|
|
m.Externalid = o.Externalid()
|
|
}
|
|
if o.Nextactiondatescheduled != nil {
|
|
m.Nextactiondatescheduled = o.Nextactiondatescheduled()
|
|
}
|
|
if o.Zone2 != nil {
|
|
m.Zone2 = o.Zone2()
|
|
}
|
|
if o.Locationnumber != nil {
|
|
m.Locationnumber = o.Locationnumber()
|
|
}
|
|
if o.Globalid != nil {
|
|
m.Globalid = o.Globalid()
|
|
}
|
|
if o.CreatedUser != nil {
|
|
m.CreatedUser = o.CreatedUser()
|
|
}
|
|
if o.CreatedDate != nil {
|
|
m.CreatedDate = o.CreatedDate()
|
|
}
|
|
if o.LastEditedUser != nil {
|
|
m.LastEditedUser = o.LastEditedUser()
|
|
}
|
|
if o.LastEditedDate != nil {
|
|
m.LastEditedDate = o.LastEditedDate()
|
|
}
|
|
if o.Gatewaysync != nil {
|
|
m.Gatewaysync = o.Gatewaysync()
|
|
}
|
|
if o.Route != nil {
|
|
m.Route = o.Route()
|
|
}
|
|
if o.SetDow != nil {
|
|
m.SetDow = o.SetDow()
|
|
}
|
|
if o.RouteOrder != nil {
|
|
m.RouteOrder = o.RouteOrder()
|
|
}
|
|
if o.Vectorsurvsiteid != nil {
|
|
m.Vectorsurvsiteid = o.Vectorsurvsiteid()
|
|
}
|
|
if o.Creationdate != nil {
|
|
m.Creationdate = o.Creationdate()
|
|
}
|
|
if o.Creator != nil {
|
|
m.Creator = o.Creator()
|
|
}
|
|
if o.Editdate != nil {
|
|
m.Editdate = o.Editdate()
|
|
}
|
|
if o.Editor != nil {
|
|
m.Editor = o.Editor()
|
|
}
|
|
if o.H3R7 != nil {
|
|
m.H3R7 = o.H3R7()
|
|
}
|
|
if o.H3R8 != nil {
|
|
m.H3R8 = o.H3R8()
|
|
}
|
|
|
|
o.setModelRels(m)
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildMany returns an models.FieldseekerTraplocationSlice
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use FieldseekerTraplocationTemplate.CreateMany
|
|
func (o FieldseekerTraplocationTemplate) BuildMany(number int) models.FieldseekerTraplocationSlice {
|
|
m := make(models.FieldseekerTraplocationSlice, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.Build()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
func ensureCreatableFieldseekerTraplocation(m *models.FieldseekerTraplocationSetter) {
|
|
}
|
|
|
|
// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerTraplocation
|
|
// according to the relationships in the template.
|
|
// any required relationship should have already exist on the model
|
|
func (o *FieldseekerTraplocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerTraplocation) error {
|
|
var err error
|
|
|
|
return err
|
|
}
|
|
|
|
// Create builds a fieldseekerTraplocation and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o *FieldseekerTraplocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerTraplocation, error) {
|
|
var err error
|
|
opt := o.BuildSetter()
|
|
ensureCreatableFieldseekerTraplocation(opt)
|
|
|
|
m, err := models.FieldseekerTraplocations.Insert(opt).One(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if err := o.insertOptRels(ctx, exec, m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, err
|
|
}
|
|
|
|
// MustCreate builds a fieldseekerTraplocation and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o *FieldseekerTraplocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerTraplocation {
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateOrFail builds a fieldseekerTraplocation 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 *FieldseekerTraplocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerTraplocation {
|
|
tb.Helper()
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateMany builds multiple fieldseekerTraplocations and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o FieldseekerTraplocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerTraplocationSlice, error) {
|
|
var err error
|
|
m := make(models.FieldseekerTraplocationSlice, number)
|
|
|
|
for i := range m {
|
|
m[i], err = o.Create(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
|
|
return m, nil
|
|
}
|
|
|
|
// MustCreateMany builds multiple fieldseekerTraplocations and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o FieldseekerTraplocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerTraplocationSlice {
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateManyOrFail builds multiple fieldseekerTraplocations 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 FieldseekerTraplocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerTraplocationSlice {
|
|
tb.Helper()
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// FieldseekerTraplocation has methods that act as mods for the FieldseekerTraplocationTemplate
|
|
var FieldseekerTraplocationMods fieldseekerTraplocationMods
|
|
|
|
type fieldseekerTraplocationMods struct{}
|
|
|
|
func (m fieldseekerTraplocationMods) RandomizeAllColumns(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModSlice{
|
|
FieldseekerTraplocationMods.RandomObjectid(f),
|
|
FieldseekerTraplocationMods.RandomName(f),
|
|
FieldseekerTraplocationMods.RandomZone(f),
|
|
FieldseekerTraplocationMods.RandomHabitat(f),
|
|
FieldseekerTraplocationMods.RandomPriority(f),
|
|
FieldseekerTraplocationMods.RandomUsetype(f),
|
|
FieldseekerTraplocationMods.RandomActive(f),
|
|
FieldseekerTraplocationMods.RandomDescription(f),
|
|
FieldseekerTraplocationMods.RandomAccessdesc(f),
|
|
FieldseekerTraplocationMods.RandomComments(f),
|
|
FieldseekerTraplocationMods.RandomExternalid(f),
|
|
FieldseekerTraplocationMods.RandomNextactiondatescheduled(f),
|
|
FieldseekerTraplocationMods.RandomZone2(f),
|
|
FieldseekerTraplocationMods.RandomLocationnumber(f),
|
|
FieldseekerTraplocationMods.RandomGlobalid(f),
|
|
FieldseekerTraplocationMods.RandomCreatedUser(f),
|
|
FieldseekerTraplocationMods.RandomCreatedDate(f),
|
|
FieldseekerTraplocationMods.RandomLastEditedUser(f),
|
|
FieldseekerTraplocationMods.RandomLastEditedDate(f),
|
|
FieldseekerTraplocationMods.RandomGatewaysync(f),
|
|
FieldseekerTraplocationMods.RandomRoute(f),
|
|
FieldseekerTraplocationMods.RandomSetDow(f),
|
|
FieldseekerTraplocationMods.RandomRouteOrder(f),
|
|
FieldseekerTraplocationMods.RandomVectorsurvsiteid(f),
|
|
FieldseekerTraplocationMods.RandomCreationdate(f),
|
|
FieldseekerTraplocationMods.RandomCreator(f),
|
|
FieldseekerTraplocationMods.RandomEditdate(f),
|
|
FieldseekerTraplocationMods.RandomEditor(f),
|
|
FieldseekerTraplocationMods.RandomH3R7(f),
|
|
FieldseekerTraplocationMods.RandomH3R8(f),
|
|
}
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Objectid(val int64) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Objectid = func() int64 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) ObjectidFunc(f func() int64) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Objectid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetObjectid() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomObjectid(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Objectid = func() int64 {
|
|
return random_int64(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Name(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Name = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) NameFunc(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Name = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetName() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomName(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Name = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
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 fieldseekerTraplocationMods) RandomNameNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Name = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Zone(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Zone = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) ZoneFunc(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Zone = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetZone() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomZone(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Zone = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
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 fieldseekerTraplocationMods) RandomZoneNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Zone = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Habitat(val null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Habitat = func() null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e] {
|
|
return val
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) HabitatFunc(f func() null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Habitat = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetHabitat() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomHabitat(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Habitat = func() null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e(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 fieldseekerTraplocationMods) RandomHabitatNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Habitat = func() null.Val[enums.FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerTraplocationTraplocationHabitat5c349680f5ff40b1aeca88c17993e(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Priority(val null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Priority = func() null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B] {
|
|
return val
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) PriorityFunc(f func() null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Priority = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetPriority() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomPriority(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Priority = func() null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B(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 fieldseekerTraplocationMods) RandomPriorityNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Priority = func() null.Val[enums.FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerTraplocationTraplocationPriority680FB011063B41D59F39271C959B(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Usetype(val null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Usetype = func() null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2] {
|
|
return val
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) UsetypeFunc(f func() null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Usetype = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetUsetype() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomUsetype(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Usetype = func() null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2(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 fieldseekerTraplocationMods) RandomUsetypeNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Usetype = func() null.Val[enums.FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerTraplocationTraplocationUsetype5e0eff9231fb404c98cc53c1d49a2(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Active(val null.Val[enums.FieldseekerTraplocationNotinuitFEnum]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Active = func() null.Val[enums.FieldseekerTraplocationNotinuitFEnum] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) ActiveFunc(f func() null.Val[enums.FieldseekerTraplocationNotinuitFEnum]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Active = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetActive() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomActive(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Active = func() null.Val[enums.FieldseekerTraplocationNotinuitFEnum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerTraplocationNotinuitFEnum(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 fieldseekerTraplocationMods) RandomActiveNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Active = func() null.Val[enums.FieldseekerTraplocationNotinuitFEnum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerTraplocationNotinuitFEnum(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Description(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Description = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) DescriptionFunc(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Description = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetDescription() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomDescription(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Description = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "250")
|
|
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 fieldseekerTraplocationMods) RandomDescriptionNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Description = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "250")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Accessdesc(val null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Accessdesc = func() null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) AccessdescFunc(f func() null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Accessdesc = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetAccessdesc() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomAccessdesc(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Accessdesc = func() null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0(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 fieldseekerTraplocationMods) RandomAccessdescNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Accessdesc = func() null.Val[enums.FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerTraplocationTraplocationAccessdesc154CBD1045244e3a8ca0F0(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Comments(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Comments = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) CommentsFunc(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Comments = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetComments() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomComments(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Comments = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "250")
|
|
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 fieldseekerTraplocationMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Comments = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "250")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Externalid(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Externalid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) ExternalidFunc(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Externalid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetExternalid() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomExternalid(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Externalid = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "50")
|
|
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 fieldseekerTraplocationMods) RandomExternalidNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Externalid = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "50")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Nextactiondatescheduled(val null.Val[time.Time]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Nextactiondatescheduled = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) NextactiondatescheduledFunc(f func() null.Val[time.Time]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Nextactiondatescheduled = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetNextactiondatescheduled() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomNextactiondatescheduled(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Nextactiondatescheduled = 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 fieldseekerTraplocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Nextactiondatescheduled = 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 fieldseekerTraplocationMods) Zone2(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Zone2 = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) Zone2Func(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Zone2 = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetZone2() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomZone2(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Zone2 = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
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 fieldseekerTraplocationMods) RandomZone2NotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Zone2 = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Locationnumber(val null.Val[int32]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Locationnumber = func() null.Val[int32] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) LocationnumberFunc(f func() null.Val[int32]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Locationnumber = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetLocationnumber() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomLocationnumber(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Locationnumber = func() null.Val[int32] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_int32(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 fieldseekerTraplocationMods) RandomLocationnumberNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Locationnumber = func() null.Val[int32] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_int32(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Globalid(val null.Val[uuid.UUID]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Globalid = func() null.Val[uuid.UUID] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Globalid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetGlobalid() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomGlobalid(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Globalid = func() null.Val[uuid.UUID] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_uuid_UUID(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 fieldseekerTraplocationMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Globalid = func() null.Val[uuid.UUID] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_uuid_UUID(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) CreatedUser(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.CreatedUser = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.CreatedUser = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetCreatedUser() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomCreatedUser(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.CreatedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
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 fieldseekerTraplocationMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.CreatedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) CreatedDate(val null.Val[time.Time]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.CreatedDate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.CreatedDate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetCreatedDate() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomCreatedDate(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.CreatedDate = 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 fieldseekerTraplocationMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.CreatedDate = 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 fieldseekerTraplocationMods) LastEditedUser(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.LastEditedUser = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.LastEditedUser = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetLastEditedUser() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomLastEditedUser(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.LastEditedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
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 fieldseekerTraplocationMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.LastEditedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) LastEditedDate(val null.Val[time.Time]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.LastEditedDate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.LastEditedDate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetLastEditedDate() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomLastEditedDate(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.LastEditedDate = 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 fieldseekerTraplocationMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.LastEditedDate = 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 fieldseekerTraplocationMods) Gatewaysync(val null.Val[int16]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Gatewaysync = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) GatewaysyncFunc(f func() null.Val[int16]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Gatewaysync = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetGatewaysync() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomGatewaysync(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomGatewaysyncNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) Route(val null.Val[int32]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Route = func() null.Val[int32] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) RouteFunc(f func() null.Val[int32]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Route = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetRoute() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomRoute(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Route = func() null.Val[int32] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_int32(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 fieldseekerTraplocationMods) RandomRouteNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Route = func() null.Val[int32] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_int32(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) SetDow(val null.Val[int32]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.SetDow = func() null.Val[int32] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) SetDowFunc(f func() null.Val[int32]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.SetDow = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetSetDow() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomSetDow(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.SetDow = func() null.Val[int32] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_int32(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 fieldseekerTraplocationMods) RandomSetDowNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.SetDow = func() null.Val[int32] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_int32(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) RouteOrder(val null.Val[int32]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.RouteOrder = func() null.Val[int32] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) RouteOrderFunc(f func() null.Val[int32]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.RouteOrder = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetRouteOrder() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomRouteOrder(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.RouteOrder = func() null.Val[int32] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_int32(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 fieldseekerTraplocationMods) RandomRouteOrderNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.RouteOrder = func() null.Val[int32] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_int32(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Vectorsurvsiteid(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Vectorsurvsiteid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) VectorsurvsiteidFunc(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Vectorsurvsiteid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetVectorsurvsiteid() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomVectorsurvsiteid(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Vectorsurvsiteid = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "50")
|
|
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 fieldseekerTraplocationMods) RandomVectorsurvsiteidNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Vectorsurvsiteid = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "50")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Creationdate(val null.Val[time.Time]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Creationdate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Creationdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetCreationdate() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomCreationdate(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Creationdate = 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 fieldseekerTraplocationMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Creationdate = 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 fieldseekerTraplocationMods) Creator(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Creator = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) CreatorFunc(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Creator = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetCreator() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomCreator(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Creator = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
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 fieldseekerTraplocationMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Creator = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) Editdate(val null.Val[time.Time]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Editdate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Editdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetEditdate() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomEditdate(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Editdate = 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 fieldseekerTraplocationMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Editdate = 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 fieldseekerTraplocationMods) Editor(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Editor = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) EditorFunc(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Editor = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetEditor() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomEditor(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Editor = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
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 fieldseekerTraplocationMods) RandomEditorNotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.Editor = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) H3R7(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.H3R7 = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) H3R7Func(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.H3R7 = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetH3R7() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomH3R7(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.H3R7 = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
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 fieldseekerTraplocationMods) RandomH3R7NotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.H3R7 = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerTraplocationMods) H3R8(val null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.H3R8 = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerTraplocationMods) H3R8Func(f func() null.Val[string]) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.H3R8 = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerTraplocationMods) UnsetH3R8() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
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 fieldseekerTraplocationMods) RandomH3R8(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.H3R8 = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
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 fieldseekerTraplocationMods) RandomH3R8NotNull(f *faker.Faker) FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(_ context.Context, o *FieldseekerTraplocationTemplate) {
|
|
o.H3R8 = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerTraplocationMods) WithParentsCascading() FieldseekerTraplocationMod {
|
|
return FieldseekerTraplocationModFunc(func(ctx context.Context, o *FieldseekerTraplocationTemplate) {
|
|
if isDone, _ := fieldseekerTraplocationWithParentsCascadingCtx.Value(ctx); isDone {
|
|
return
|
|
}
|
|
ctx = fieldseekerTraplocationWithParentsCascadingCtx.WithValue(ctx, true)
|
|
})
|
|
}
|