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

1944 lines
59 KiB
Go

// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package factory
import (
"context"
"testing"
"time"
models "github.com/Gleipnir-Technology/nidus-sync/models"
"github.com/aarondl/opt/null"
"github.com/aarondl/opt/omit"
"github.com/aarondl/opt/omitnull"
"github.com/jaswdr/faker/v2"
"github.com/stephenafamo/bob"
)
type FSSamplelocationMod interface {
Apply(context.Context, *FSSamplelocationTemplate)
}
type FSSamplelocationModFunc func(context.Context, *FSSamplelocationTemplate)
func (f FSSamplelocationModFunc) Apply(ctx context.Context, n *FSSamplelocationTemplate) {
f(ctx, n)
}
type FSSamplelocationModSlice []FSSamplelocationMod
func (mods FSSamplelocationModSlice) Apply(ctx context.Context, n *FSSamplelocationTemplate) {
for _, f := range mods {
f.Apply(ctx, n)
}
}
// FSSamplelocationTemplate is an object representing the database table.
// all columns are optional and should be set by mods
type FSSamplelocationTemplate struct {
OrganizationID func() int32
Accessdesc func() null.Val[string]
Active func() null.Val[int16]
Comments func() null.Val[string]
Creationdate func() null.Val[int64]
Creator func() null.Val[string]
Description func() null.Val[string]
Externalid func() null.Val[string]
Editdate func() null.Val[int64]
Editor func() null.Val[string]
Gatewaysync func() null.Val[int16]
Globalid func() string
Habitat func() null.Val[string]
Locationnumber func() null.Val[int64]
Name func() null.Val[string]
Nextactiondatescheduled func() null.Val[int64]
Objectid func() int32
Priority func() null.Val[string]
Usetype func() null.Val[string]
Zone func() null.Val[string]
Zone2 func() null.Val[string]
CreatedDate func() null.Val[int64]
CreatedUser func() null.Val[string]
GeometryX func() null.Val[float64]
GeometryY func() null.Val[float64]
LastEditedDate func() null.Val[int64]
LastEditedUser func() null.Val[string]
Updated func() time.Time
r fsSamplelocationR
f *Factory
alreadyPersisted bool
}
type fsSamplelocationR struct {
Organization *fsSamplelocationROrganizationR
}
type fsSamplelocationROrganizationR struct {
o *OrganizationTemplate
}
// Apply mods to the FSSamplelocationTemplate
func (o *FSSamplelocationTemplate) Apply(ctx context.Context, mods ...FSSamplelocationMod) {
for _, mod := range mods {
mod.Apply(ctx, o)
}
}
// setModelRels creates and sets the relationships on *models.FSSamplelocation
// according to the relationships in the template. Nothing is inserted into the db
func (t FSSamplelocationTemplate) setModelRels(o *models.FSSamplelocation) {
if t.r.Organization != nil {
rel := t.r.Organization.o.Build()
rel.R.FSSamplelocations = append(rel.R.FSSamplelocations, o)
o.OrganizationID = rel.ID // h2
o.R.Organization = rel
}
}
// BuildSetter returns an *models.FSSamplelocationSetter
// this does nothing with the relationship templates
func (o FSSamplelocationTemplate) BuildSetter() *models.FSSamplelocationSetter {
m := &models.FSSamplelocationSetter{}
if o.OrganizationID != nil {
val := o.OrganizationID()
m.OrganizationID = omit.From(val)
}
if o.Accessdesc != nil {
val := o.Accessdesc()
m.Accessdesc = omitnull.FromNull(val)
}
if o.Active != nil {
val := o.Active()
m.Active = omitnull.FromNull(val)
}
if o.Comments != nil {
val := o.Comments()
m.Comments = omitnull.FromNull(val)
}
if o.Creationdate != nil {
val := o.Creationdate()
m.Creationdate = omitnull.FromNull(val)
}
if o.Creator != nil {
val := o.Creator()
m.Creator = omitnull.FromNull(val)
}
if o.Description != nil {
val := o.Description()
m.Description = omitnull.FromNull(val)
}
if o.Externalid != nil {
val := o.Externalid()
m.Externalid = omitnull.FromNull(val)
}
if o.Editdate != nil {
val := o.Editdate()
m.Editdate = omitnull.FromNull(val)
}
if o.Editor != nil {
val := o.Editor()
m.Editor = omitnull.FromNull(val)
}
if o.Gatewaysync != nil {
val := o.Gatewaysync()
m.Gatewaysync = omitnull.FromNull(val)
}
if o.Globalid != nil {
val := o.Globalid()
m.Globalid = omit.From(val)
}
if o.Habitat != nil {
val := o.Habitat()
m.Habitat = omitnull.FromNull(val)
}
if o.Locationnumber != nil {
val := o.Locationnumber()
m.Locationnumber = omitnull.FromNull(val)
}
if o.Name != nil {
val := o.Name()
m.Name = omitnull.FromNull(val)
}
if o.Nextactiondatescheduled != nil {
val := o.Nextactiondatescheduled()
m.Nextactiondatescheduled = omitnull.FromNull(val)
}
if o.Objectid != nil {
val := o.Objectid()
m.Objectid = omit.From(val)
}
if o.Priority != nil {
val := o.Priority()
m.Priority = omitnull.FromNull(val)
}
if o.Usetype != nil {
val := o.Usetype()
m.Usetype = omitnull.FromNull(val)
}
if o.Zone != nil {
val := o.Zone()
m.Zone = omitnull.FromNull(val)
}
if o.Zone2 != nil {
val := o.Zone2()
m.Zone2 = omitnull.FromNull(val)
}
if o.CreatedDate != nil {
val := o.CreatedDate()
m.CreatedDate = omitnull.FromNull(val)
}
if o.CreatedUser != nil {
val := o.CreatedUser()
m.CreatedUser = omitnull.FromNull(val)
}
if o.GeometryX != nil {
val := o.GeometryX()
m.GeometryX = omitnull.FromNull(val)
}
if o.GeometryY != nil {
val := o.GeometryY()
m.GeometryY = omitnull.FromNull(val)
}
if o.LastEditedDate != nil {
val := o.LastEditedDate()
m.LastEditedDate = omitnull.FromNull(val)
}
if o.LastEditedUser != nil {
val := o.LastEditedUser()
m.LastEditedUser = omitnull.FromNull(val)
}
if o.Updated != nil {
val := o.Updated()
m.Updated = omit.From(val)
}
return m
}
// BuildManySetter returns an []*models.FSSamplelocationSetter
// this does nothing with the relationship templates
func (o FSSamplelocationTemplate) BuildManySetter(number int) []*models.FSSamplelocationSetter {
m := make([]*models.FSSamplelocationSetter, number)
for i := range m {
m[i] = o.BuildSetter()
}
return m
}
// Build returns an *models.FSSamplelocation
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FSSamplelocationTemplate.Create
func (o FSSamplelocationTemplate) Build() *models.FSSamplelocation {
m := &models.FSSamplelocation{}
if o.OrganizationID != nil {
m.OrganizationID = o.OrganizationID()
}
if o.Accessdesc != nil {
m.Accessdesc = o.Accessdesc()
}
if o.Active != nil {
m.Active = o.Active()
}
if o.Comments != nil {
m.Comments = o.Comments()
}
if o.Creationdate != nil {
m.Creationdate = o.Creationdate()
}
if o.Creator != nil {
m.Creator = o.Creator()
}
if o.Description != nil {
m.Description = o.Description()
}
if o.Externalid != nil {
m.Externalid = o.Externalid()
}
if o.Editdate != nil {
m.Editdate = o.Editdate()
}
if o.Editor != nil {
m.Editor = o.Editor()
}
if o.Gatewaysync != nil {
m.Gatewaysync = o.Gatewaysync()
}
if o.Globalid != nil {
m.Globalid = o.Globalid()
}
if o.Habitat != nil {
m.Habitat = o.Habitat()
}
if o.Locationnumber != nil {
m.Locationnumber = o.Locationnumber()
}
if o.Name != nil {
m.Name = o.Name()
}
if o.Nextactiondatescheduled != nil {
m.Nextactiondatescheduled = o.Nextactiondatescheduled()
}
if o.Objectid != nil {
m.Objectid = o.Objectid()
}
if o.Priority != nil {
m.Priority = o.Priority()
}
if o.Usetype != nil {
m.Usetype = o.Usetype()
}
if o.Zone != nil {
m.Zone = o.Zone()
}
if o.Zone2 != nil {
m.Zone2 = o.Zone2()
}
if o.CreatedDate != nil {
m.CreatedDate = o.CreatedDate()
}
if o.CreatedUser != nil {
m.CreatedUser = o.CreatedUser()
}
if o.GeometryX != nil {
m.GeometryX = o.GeometryX()
}
if o.GeometryY != nil {
m.GeometryY = o.GeometryY()
}
if o.LastEditedDate != nil {
m.LastEditedDate = o.LastEditedDate()
}
if o.LastEditedUser != nil {
m.LastEditedUser = o.LastEditedUser()
}
if o.Updated != nil {
m.Updated = o.Updated()
}
o.setModelRels(m)
return m
}
// BuildMany returns an models.FSSamplelocationSlice
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FSSamplelocationTemplate.CreateMany
func (o FSSamplelocationTemplate) BuildMany(number int) models.FSSamplelocationSlice {
m := make(models.FSSamplelocationSlice, number)
for i := range m {
m[i] = o.Build()
}
return m
}
func ensureCreatableFSSamplelocation(m *models.FSSamplelocationSetter) {
if !(m.OrganizationID.IsValue()) {
val := random_int32(nil)
m.OrganizationID = omit.From(val)
}
if !(m.Globalid.IsValue()) {
val := random_string(nil)
m.Globalid = omit.From(val)
}
if !(m.Objectid.IsValue()) {
val := random_int32(nil)
m.Objectid = omit.From(val)
}
}
// insertOptRels creates and inserts any optional the relationships on *models.FSSamplelocation
// according to the relationships in the template.
// any required relationship should have already exist on the model
func (o *FSSamplelocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FSSamplelocation) error {
var err error
return err
}
// Create builds a fsSamplelocation and inserts it into the database
// Relations objects are also inserted and placed in the .R field
func (o *FSSamplelocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FSSamplelocation, error) {
var err error
opt := o.BuildSetter()
ensureCreatableFSSamplelocation(opt)
if o.r.Organization == nil {
FSSamplelocationMods.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.FSSamplelocations.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 fsSamplelocation and inserts it into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o *FSSamplelocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FSSamplelocation {
m, err := o.Create(ctx, exec)
if err != nil {
panic(err)
}
return m
}
// CreateOrFail builds a fsSamplelocation 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 *FSSamplelocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FSSamplelocation {
tb.Helper()
m, err := o.Create(ctx, exec)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// CreateMany builds multiple fsSamplelocations and inserts them into the database
// Relations objects are also inserted and placed in the .R field
func (o FSSamplelocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FSSamplelocationSlice, error) {
var err error
m := make(models.FSSamplelocationSlice, number)
for i := range m {
m[i], err = o.Create(ctx, exec)
if err != nil {
return nil, err
}
}
return m, nil
}
// MustCreateMany builds multiple fsSamplelocations and inserts them into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o FSSamplelocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FSSamplelocationSlice {
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
panic(err)
}
return m
}
// CreateManyOrFail builds multiple fsSamplelocations 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 FSSamplelocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FSSamplelocationSlice {
tb.Helper()
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// FSSamplelocation has methods that act as mods for the FSSamplelocationTemplate
var FSSamplelocationMods fsSamplelocationMods
type fsSamplelocationMods struct{}
func (m fsSamplelocationMods) RandomizeAllColumns(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModSlice{
FSSamplelocationMods.RandomOrganizationID(f),
FSSamplelocationMods.RandomAccessdesc(f),
FSSamplelocationMods.RandomActive(f),
FSSamplelocationMods.RandomComments(f),
FSSamplelocationMods.RandomCreationdate(f),
FSSamplelocationMods.RandomCreator(f),
FSSamplelocationMods.RandomDescription(f),
FSSamplelocationMods.RandomExternalid(f),
FSSamplelocationMods.RandomEditdate(f),
FSSamplelocationMods.RandomEditor(f),
FSSamplelocationMods.RandomGatewaysync(f),
FSSamplelocationMods.RandomGlobalid(f),
FSSamplelocationMods.RandomHabitat(f),
FSSamplelocationMods.RandomLocationnumber(f),
FSSamplelocationMods.RandomName(f),
FSSamplelocationMods.RandomNextactiondatescheduled(f),
FSSamplelocationMods.RandomObjectid(f),
FSSamplelocationMods.RandomPriority(f),
FSSamplelocationMods.RandomUsetype(f),
FSSamplelocationMods.RandomZone(f),
FSSamplelocationMods.RandomZone2(f),
FSSamplelocationMods.RandomCreatedDate(f),
FSSamplelocationMods.RandomCreatedUser(f),
FSSamplelocationMods.RandomGeometryX(f),
FSSamplelocationMods.RandomGeometryY(f),
FSSamplelocationMods.RandomLastEditedDate(f),
FSSamplelocationMods.RandomLastEditedUser(f),
FSSamplelocationMods.RandomUpdated(f),
}
}
// Set the model columns to this value
func (m fsSamplelocationMods) OrganizationID(val int32) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.OrganizationID = func() int32 { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) OrganizationIDFunc(f func() int32) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.OrganizationID = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetOrganizationID() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomOrganizationID(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.OrganizationID = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m fsSamplelocationMods) Accessdesc(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Accessdesc = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) AccessdescFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Accessdesc = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetAccessdesc() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomAccessdesc(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomAccessdescNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Active(val null.Val[int16]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Active = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) ActiveFunc(f func() null.Val[int16]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Active = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetActive() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomActive(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomActiveNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Comments(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Comments = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) CommentsFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Comments = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetComments() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomComments(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomCommentsNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Creationdate(val null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Creationdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) CreationdateFunc(f func() null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Creationdate = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetCreationdate() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomCreationdate(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomCreationdateNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Creator(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Creator = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) CreatorFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Creator = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetCreator() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomCreator(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomCreatorNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Description(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Description = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) DescriptionFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Description = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetDescription() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomDescription(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomDescriptionNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Externalid(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Externalid = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) ExternalidFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Externalid = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetExternalid() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomExternalid(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomExternalidNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Editdate(val null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Editdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) EditdateFunc(f func() null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Editdate = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetEditdate() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomEditdate(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomEditdateNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Editor(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Editor = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) EditorFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Editor = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetEditor() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomEditor(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomEditorNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Gatewaysync(val null.Val[int16]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Gatewaysync = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) GatewaysyncFunc(f func() null.Val[int16]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Gatewaysync = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetGatewaysync() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomGatewaysync(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomGatewaysyncNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Globalid(val string) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Globalid = func() string { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) GlobalidFunc(f func() string) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Globalid = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetGlobalid() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Globalid = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
func (m fsSamplelocationMods) RandomGlobalid(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Globalid = func() string {
return random_string(f)
}
})
}
// Set the model columns to this value
func (m fsSamplelocationMods) Habitat(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Habitat = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) HabitatFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Habitat = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetHabitat() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomHabitat(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomHabitatNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Locationnumber(val null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Locationnumber = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) LocationnumberFunc(f func() null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Locationnumber = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetLocationnumber() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomLocationnumber(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomLocationnumberNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Name(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Name = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) NameFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Name = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetName() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomName(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomNameNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Nextactiondatescheduled(val null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Nextactiondatescheduled = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) NextactiondatescheduledFunc(f func() null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Nextactiondatescheduled = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetNextactiondatescheduled() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomNextactiondatescheduled(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Objectid(val int32) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Objectid = func() int32 { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) ObjectidFunc(f func() int32) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Objectid = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetObjectid() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomObjectid(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Objectid = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m fsSamplelocationMods) Priority(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Priority = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) PriorityFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Priority = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetPriority() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomPriority(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomPriorityNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Usetype(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Usetype = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) UsetypeFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Usetype = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetUsetype() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomUsetype(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomUsetypeNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Zone(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Zone = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) ZoneFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Zone = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetZone() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomZone(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomZoneNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Zone2(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Zone2 = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) Zone2Func(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Zone2 = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetZone2() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomZone2(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomZone2NotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) CreatedDate(val null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.CreatedDate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) CreatedDateFunc(f func() null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.CreatedDate = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetCreatedDate() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomCreatedDate(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomCreatedDateNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) CreatedUser(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.CreatedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) CreatedUserFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.CreatedUser = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetCreatedUser() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomCreatedUser(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomCreatedUserNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) GeometryX(val null.Val[float64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.GeometryX = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) GeometryXFunc(f func() null.Val[float64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.GeometryX = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetGeometryX() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomGeometryX(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomGeometryXNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) GeometryY(val null.Val[float64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.GeometryY = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) GeometryYFunc(f func() null.Val[float64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.GeometryY = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetGeometryY() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomGeometryY(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomGeometryYNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) LastEditedDate(val null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.LastEditedDate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) LastEditedDateFunc(f func() null.Val[int64]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.LastEditedDate = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetLastEditedDate() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomLastEditedDate(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomLastEditedDateNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) LastEditedUser(val null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.LastEditedUser = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) LastEditedUserFunc(f func() null.Val[string]) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.LastEditedUser = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetLastEditedUser() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomLastEditedUser(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) RandomLastEditedUserNotNull(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
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 fsSamplelocationMods) Updated(val time.Time) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Updated = func() time.Time { return val }
})
}
// Set the Column from the function
func (m fsSamplelocationMods) UpdatedFunc(f func() time.Time) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Updated = f
})
}
// Clear any values for the column
func (m fsSamplelocationMods) UnsetUpdated() FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Updated = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
func (m fsSamplelocationMods) RandomUpdated(f *faker.Faker) FSSamplelocationMod {
return FSSamplelocationModFunc(func(_ context.Context, o *FSSamplelocationTemplate) {
o.Updated = func() time.Time {
return random_time_Time(f)
}
})
}
func (m fsSamplelocationMods) WithParentsCascading() FSSamplelocationMod {
return FSSamplelocationModFunc(func(ctx context.Context, o *FSSamplelocationTemplate) {
if isDone, _ := fsSamplelocationWithParentsCascadingCtx.Value(ctx); isDone {
return
}
ctx = fsSamplelocationWithParentsCascadingCtx.WithValue(ctx, true)
{
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
m.WithOrganization(related).Apply(ctx, o)
}
})
}
func (m fsSamplelocationMods) WithOrganization(rel *OrganizationTemplate) FSSamplelocationMod {
return FSSamplelocationModFunc(func(ctx context.Context, o *FSSamplelocationTemplate) {
o.r.Organization = &fsSamplelocationROrganizationR{
o: rel,
}
})
}
func (m fsSamplelocationMods) WithNewOrganization(mods ...OrganizationMod) FSSamplelocationMod {
return FSSamplelocationModFunc(func(ctx context.Context, o *FSSamplelocationTemplate) {
related := o.f.NewOrganizationWithContext(ctx, mods...)
m.WithOrganization(related).Apply(ctx, o)
})
}
func (m fsSamplelocationMods) WithExistingOrganization(em *models.Organization) FSSamplelocationMod {
return FSSamplelocationModFunc(func(ctx context.Context, o *FSSamplelocationTemplate) {
o.r.Organization = &fsSamplelocationROrganizationR{
o: o.f.FromExistingOrganization(em),
}
})
}
func (m fsSamplelocationMods) WithoutOrganization() FSSamplelocationMod {
return FSSamplelocationModFunc(func(ctx context.Context, o *FSSamplelocationTemplate) {
o.r.Organization = nil
})
}