// 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 FSInspectionsampledetailMod interface { Apply(context.Context, *FSInspectionsampledetailTemplate) } type FSInspectionsampledetailModFunc func(context.Context, *FSInspectionsampledetailTemplate) func (f FSInspectionsampledetailModFunc) Apply(ctx context.Context, n *FSInspectionsampledetailTemplate) { f(ctx, n) } type FSInspectionsampledetailModSlice []FSInspectionsampledetailMod func (mods FSInspectionsampledetailModSlice) Apply(ctx context.Context, n *FSInspectionsampledetailTemplate) { for _, f := range mods { f.Apply(ctx, n) } } // FSInspectionsampledetailTemplate is an object representing the database table. // all columns are optional and should be set by mods type FSInspectionsampledetailTemplate struct { OrganizationID func() int32 Comments func() null.Val[string] Creationdate func() null.Val[int64] Creator func() null.Val[string] Editdate func() null.Val[int64] Editor func() null.Val[string] Fadultact func() null.Val[string] Fdomstage func() null.Val[string] Feggcount func() null.Val[int16] Fieldspecies func() null.Val[string] Flarvcount func() null.Val[int16] Flstages func() null.Val[string] Fpupcount func() null.Val[int16] Globalid func() string InspsampleID func() null.Val[string] Labspecies func() null.Val[string] Ldomstage func() null.Val[string] Leggcount func() null.Val[int16] Llarvcount func() null.Val[int16] Lpupcount func() null.Val[int16] Objectid func() int32 Processed func() null.Val[int16] 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 fsInspectionsampledetailR f *Factory alreadyPersisted bool } type fsInspectionsampledetailR struct { Organization *fsInspectionsampledetailROrganizationR } type fsInspectionsampledetailROrganizationR struct { o *OrganizationTemplate } // Apply mods to the FSInspectionsampledetailTemplate func (o *FSInspectionsampledetailTemplate) Apply(ctx context.Context, mods ...FSInspectionsampledetailMod) { for _, mod := range mods { mod.Apply(ctx, o) } } // setModelRels creates and sets the relationships on *models.FSInspectionsampledetail // according to the relationships in the template. Nothing is inserted into the db func (t FSInspectionsampledetailTemplate) setModelRels(o *models.FSInspectionsampledetail) { if t.r.Organization != nil { rel := t.r.Organization.o.Build() rel.R.FSInspectionsampledetails = append(rel.R.FSInspectionsampledetails, o) o.OrganizationID = rel.ID // h2 o.R.Organization = rel } } // BuildSetter returns an *models.FSInspectionsampledetailSetter // this does nothing with the relationship templates func (o FSInspectionsampledetailTemplate) BuildSetter() *models.FSInspectionsampledetailSetter { m := &models.FSInspectionsampledetailSetter{} if o.OrganizationID != nil { val := o.OrganizationID() m.OrganizationID = omit.From(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.Editdate != nil { val := o.Editdate() m.Editdate = omitnull.FromNull(val) } if o.Editor != nil { val := o.Editor() m.Editor = omitnull.FromNull(val) } if o.Fadultact != nil { val := o.Fadultact() m.Fadultact = omitnull.FromNull(val) } if o.Fdomstage != nil { val := o.Fdomstage() m.Fdomstage = omitnull.FromNull(val) } if o.Feggcount != nil { val := o.Feggcount() m.Feggcount = omitnull.FromNull(val) } if o.Fieldspecies != nil { val := o.Fieldspecies() m.Fieldspecies = omitnull.FromNull(val) } if o.Flarvcount != nil { val := o.Flarvcount() m.Flarvcount = omitnull.FromNull(val) } if o.Flstages != nil { val := o.Flstages() m.Flstages = omitnull.FromNull(val) } if o.Fpupcount != nil { val := o.Fpupcount() m.Fpupcount = omitnull.FromNull(val) } if o.Globalid != nil { val := o.Globalid() m.Globalid = omit.From(val) } if o.InspsampleID != nil { val := o.InspsampleID() m.InspsampleID = omitnull.FromNull(val) } if o.Labspecies != nil { val := o.Labspecies() m.Labspecies = omitnull.FromNull(val) } if o.Ldomstage != nil { val := o.Ldomstage() m.Ldomstage = omitnull.FromNull(val) } if o.Leggcount != nil { val := o.Leggcount() m.Leggcount = omitnull.FromNull(val) } if o.Llarvcount != nil { val := o.Llarvcount() m.Llarvcount = omitnull.FromNull(val) } if o.Lpupcount != nil { val := o.Lpupcount() m.Lpupcount = omitnull.FromNull(val) } if o.Objectid != nil { val := o.Objectid() m.Objectid = omit.From(val) } if o.Processed != nil { val := o.Processed() m.Processed = 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.FSInspectionsampledetailSetter // this does nothing with the relationship templates func (o FSInspectionsampledetailTemplate) BuildManySetter(number int) []*models.FSInspectionsampledetailSetter { m := make([]*models.FSInspectionsampledetailSetter, number) for i := range m { m[i] = o.BuildSetter() } return m } // Build returns an *models.FSInspectionsampledetail // Related objects are also created and placed in the .R field // NOTE: Objects are not inserted into the database. Use FSInspectionsampledetailTemplate.Create func (o FSInspectionsampledetailTemplate) Build() *models.FSInspectionsampledetail { m := &models.FSInspectionsampledetail{} if o.OrganizationID != nil { m.OrganizationID = o.OrganizationID() } 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.Editdate != nil { m.Editdate = o.Editdate() } if o.Editor != nil { m.Editor = o.Editor() } if o.Fadultact != nil { m.Fadultact = o.Fadultact() } if o.Fdomstage != nil { m.Fdomstage = o.Fdomstage() } if o.Feggcount != nil { m.Feggcount = o.Feggcount() } if o.Fieldspecies != nil { m.Fieldspecies = o.Fieldspecies() } if o.Flarvcount != nil { m.Flarvcount = o.Flarvcount() } if o.Flstages != nil { m.Flstages = o.Flstages() } if o.Fpupcount != nil { m.Fpupcount = o.Fpupcount() } if o.Globalid != nil { m.Globalid = o.Globalid() } if o.InspsampleID != nil { m.InspsampleID = o.InspsampleID() } if o.Labspecies != nil { m.Labspecies = o.Labspecies() } if o.Ldomstage != nil { m.Ldomstage = o.Ldomstage() } if o.Leggcount != nil { m.Leggcount = o.Leggcount() } if o.Llarvcount != nil { m.Llarvcount = o.Llarvcount() } if o.Lpupcount != nil { m.Lpupcount = o.Lpupcount() } if o.Objectid != nil { m.Objectid = o.Objectid() } if o.Processed != nil { m.Processed = o.Processed() } 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.FSInspectionsampledetailSlice // Related objects are also created and placed in the .R field // NOTE: Objects are not inserted into the database. Use FSInspectionsampledetailTemplate.CreateMany func (o FSInspectionsampledetailTemplate) BuildMany(number int) models.FSInspectionsampledetailSlice { m := make(models.FSInspectionsampledetailSlice, number) for i := range m { m[i] = o.Build() } return m } func ensureCreatableFSInspectionsampledetail(m *models.FSInspectionsampledetailSetter) { 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.FSInspectionsampledetail // according to the relationships in the template. // any required relationship should have already exist on the model func (o *FSInspectionsampledetailTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FSInspectionsampledetail) error { var err error return err } // Create builds a fsInspectionsampledetail and inserts it into the database // Relations objects are also inserted and placed in the .R field func (o *FSInspectionsampledetailTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FSInspectionsampledetail, error) { var err error opt := o.BuildSetter() ensureCreatableFSInspectionsampledetail(opt) if o.r.Organization == nil { FSInspectionsampledetailMods.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.FSInspectionsampledetails.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 fsInspectionsampledetail and inserts it into the database // Relations objects are also inserted and placed in the .R field // panics if an error occurs func (o *FSInspectionsampledetailTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FSInspectionsampledetail { m, err := o.Create(ctx, exec) if err != nil { panic(err) } return m } // CreateOrFail builds a fsInspectionsampledetail 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 *FSInspectionsampledetailTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FSInspectionsampledetail { tb.Helper() m, err := o.Create(ctx, exec) if err != nil { tb.Fatal(err) return nil } return m } // CreateMany builds multiple fsInspectionsampledetails and inserts them into the database // Relations objects are also inserted and placed in the .R field func (o FSInspectionsampledetailTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FSInspectionsampledetailSlice, error) { var err error m := make(models.FSInspectionsampledetailSlice, number) for i := range m { m[i], err = o.Create(ctx, exec) if err != nil { return nil, err } } return m, nil } // MustCreateMany builds multiple fsInspectionsampledetails and inserts them into the database // Relations objects are also inserted and placed in the .R field // panics if an error occurs func (o FSInspectionsampledetailTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FSInspectionsampledetailSlice { m, err := o.CreateMany(ctx, exec, number) if err != nil { panic(err) } return m } // CreateManyOrFail builds multiple fsInspectionsampledetails 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 FSInspectionsampledetailTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FSInspectionsampledetailSlice { tb.Helper() m, err := o.CreateMany(ctx, exec, number) if err != nil { tb.Fatal(err) return nil } return m } // FSInspectionsampledetail has methods that act as mods for the FSInspectionsampledetailTemplate var FSInspectionsampledetailMods fsInspectionsampledetailMods type fsInspectionsampledetailMods struct{} func (m fsInspectionsampledetailMods) RandomizeAllColumns(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModSlice{ FSInspectionsampledetailMods.RandomOrganizationID(f), FSInspectionsampledetailMods.RandomComments(f), FSInspectionsampledetailMods.RandomCreationdate(f), FSInspectionsampledetailMods.RandomCreator(f), FSInspectionsampledetailMods.RandomEditdate(f), FSInspectionsampledetailMods.RandomEditor(f), FSInspectionsampledetailMods.RandomFadultact(f), FSInspectionsampledetailMods.RandomFdomstage(f), FSInspectionsampledetailMods.RandomFeggcount(f), FSInspectionsampledetailMods.RandomFieldspecies(f), FSInspectionsampledetailMods.RandomFlarvcount(f), FSInspectionsampledetailMods.RandomFlstages(f), FSInspectionsampledetailMods.RandomFpupcount(f), FSInspectionsampledetailMods.RandomGlobalid(f), FSInspectionsampledetailMods.RandomInspsampleID(f), FSInspectionsampledetailMods.RandomLabspecies(f), FSInspectionsampledetailMods.RandomLdomstage(f), FSInspectionsampledetailMods.RandomLeggcount(f), FSInspectionsampledetailMods.RandomLlarvcount(f), FSInspectionsampledetailMods.RandomLpupcount(f), FSInspectionsampledetailMods.RandomObjectid(f), FSInspectionsampledetailMods.RandomProcessed(f), FSInspectionsampledetailMods.RandomCreatedDate(f), FSInspectionsampledetailMods.RandomCreatedUser(f), FSInspectionsampledetailMods.RandomGeometryX(f), FSInspectionsampledetailMods.RandomGeometryY(f), FSInspectionsampledetailMods.RandomLastEditedDate(f), FSInspectionsampledetailMods.RandomLastEditedUser(f), FSInspectionsampledetailMods.RandomUpdated(f), } } // Set the model columns to this value func (m fsInspectionsampledetailMods) OrganizationID(val int32) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.OrganizationID = func() int32 { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) OrganizationIDFunc(f func() int32) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.OrganizationID = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetOrganizationID() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomOrganizationID(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.OrganizationID = func() int32 { return random_int32(f) } }) } // Set the model columns to this value func (m fsInspectionsampledetailMods) Comments(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Comments = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) CommentsFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Comments = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetComments() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomComments(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomCommentsNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) Creationdate(val null.Val[int64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Creationdate = func() null.Val[int64] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) CreationdateFunc(f func() null.Val[int64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Creationdate = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetCreationdate() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomCreationdate(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomCreationdateNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) Creator(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Creator = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) CreatorFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Creator = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetCreator() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomCreator(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomCreatorNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) Editdate(val null.Val[int64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Editdate = func() null.Val[int64] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) EditdateFunc(f func() null.Val[int64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Editdate = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetEditdate() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomEditdate(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomEditdateNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) Editor(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Editor = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) EditorFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Editor = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetEditor() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomEditor(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomEditorNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) Fadultact(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fadultact = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) FadultactFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fadultact = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetFadultact() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fadultact = 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 fsInspectionsampledetailMods) RandomFadultact(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fadultact = 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 fsInspectionsampledetailMods) RandomFadultactNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fadultact = 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 fsInspectionsampledetailMods) Fdomstage(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fdomstage = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) FdomstageFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fdomstage = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetFdomstage() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fdomstage = 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 fsInspectionsampledetailMods) RandomFdomstage(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fdomstage = 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 fsInspectionsampledetailMods) RandomFdomstageNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fdomstage = 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 fsInspectionsampledetailMods) Feggcount(val null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Feggcount = func() null.Val[int16] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) FeggcountFunc(f func() null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Feggcount = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetFeggcount() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Feggcount = 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 fsInspectionsampledetailMods) RandomFeggcount(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Feggcount = 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 fsInspectionsampledetailMods) RandomFeggcountNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Feggcount = 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 fsInspectionsampledetailMods) Fieldspecies(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fieldspecies = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) FieldspeciesFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fieldspecies = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetFieldspecies() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fieldspecies = 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 fsInspectionsampledetailMods) RandomFieldspecies(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fieldspecies = 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 fsInspectionsampledetailMods) RandomFieldspeciesNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fieldspecies = 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 fsInspectionsampledetailMods) Flarvcount(val null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Flarvcount = func() null.Val[int16] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) FlarvcountFunc(f func() null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Flarvcount = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetFlarvcount() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Flarvcount = 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 fsInspectionsampledetailMods) RandomFlarvcount(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Flarvcount = 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 fsInspectionsampledetailMods) RandomFlarvcountNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Flarvcount = 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 fsInspectionsampledetailMods) Flstages(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Flstages = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) FlstagesFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Flstages = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetFlstages() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Flstages = 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 fsInspectionsampledetailMods) RandomFlstages(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Flstages = 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 fsInspectionsampledetailMods) RandomFlstagesNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Flstages = 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 fsInspectionsampledetailMods) Fpupcount(val null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fpupcount = func() null.Val[int16] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) FpupcountFunc(f func() null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fpupcount = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetFpupcount() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fpupcount = 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 fsInspectionsampledetailMods) RandomFpupcount(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fpupcount = 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 fsInspectionsampledetailMods) RandomFpupcountNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Fpupcount = 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 fsInspectionsampledetailMods) Globalid(val string) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Globalid = func() string { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) GlobalidFunc(f func() string) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Globalid = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetGlobalid() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomGlobalid(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Globalid = func() string { return random_string(f) } }) } // Set the model columns to this value func (m fsInspectionsampledetailMods) InspsampleID(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.InspsampleID = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) InspsampleIDFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.InspsampleID = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetInspsampleID() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.InspsampleID = 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 fsInspectionsampledetailMods) RandomInspsampleID(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.InspsampleID = 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 fsInspectionsampledetailMods) RandomInspsampleIDNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.InspsampleID = 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 fsInspectionsampledetailMods) Labspecies(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Labspecies = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) LabspeciesFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Labspecies = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetLabspecies() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Labspecies = 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 fsInspectionsampledetailMods) RandomLabspecies(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Labspecies = 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 fsInspectionsampledetailMods) RandomLabspeciesNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Labspecies = 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 fsInspectionsampledetailMods) Ldomstage(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Ldomstage = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) LdomstageFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Ldomstage = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetLdomstage() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Ldomstage = 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 fsInspectionsampledetailMods) RandomLdomstage(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Ldomstage = 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 fsInspectionsampledetailMods) RandomLdomstageNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Ldomstage = 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 fsInspectionsampledetailMods) Leggcount(val null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Leggcount = func() null.Val[int16] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) LeggcountFunc(f func() null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Leggcount = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetLeggcount() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Leggcount = 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 fsInspectionsampledetailMods) RandomLeggcount(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Leggcount = 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 fsInspectionsampledetailMods) RandomLeggcountNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Leggcount = 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 fsInspectionsampledetailMods) Llarvcount(val null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Llarvcount = func() null.Val[int16] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) LlarvcountFunc(f func() null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Llarvcount = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetLlarvcount() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Llarvcount = 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 fsInspectionsampledetailMods) RandomLlarvcount(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Llarvcount = 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 fsInspectionsampledetailMods) RandomLlarvcountNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Llarvcount = 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 fsInspectionsampledetailMods) Lpupcount(val null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Lpupcount = func() null.Val[int16] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) LpupcountFunc(f func() null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Lpupcount = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetLpupcount() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Lpupcount = 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 fsInspectionsampledetailMods) RandomLpupcount(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Lpupcount = 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 fsInspectionsampledetailMods) RandomLpupcountNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Lpupcount = 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 fsInspectionsampledetailMods) Objectid(val int32) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Objectid = func() int32 { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) ObjectidFunc(f func() int32) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Objectid = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetObjectid() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomObjectid(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Objectid = func() int32 { return random_int32(f) } }) } // Set the model columns to this value func (m fsInspectionsampledetailMods) Processed(val null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Processed = func() null.Val[int16] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) ProcessedFunc(f func() null.Val[int16]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Processed = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetProcessed() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Processed = 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 fsInspectionsampledetailMods) RandomProcessed(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Processed = 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 fsInspectionsampledetailMods) RandomProcessedNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Processed = 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 fsInspectionsampledetailMods) CreatedDate(val null.Val[int64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.CreatedDate = func() null.Val[int64] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) CreatedDateFunc(f func() null.Val[int64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.CreatedDate = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetCreatedDate() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomCreatedDate(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomCreatedDateNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) CreatedUser(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.CreatedUser = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) CreatedUserFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.CreatedUser = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetCreatedUser() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomCreatedUser(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomCreatedUserNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) GeometryX(val null.Val[float64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.GeometryX = func() null.Val[float64] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) GeometryXFunc(f func() null.Val[float64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.GeometryX = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetGeometryX() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomGeometryX(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomGeometryXNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) GeometryY(val null.Val[float64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.GeometryY = func() null.Val[float64] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) GeometryYFunc(f func() null.Val[float64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.GeometryY = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetGeometryY() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomGeometryY(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomGeometryYNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) LastEditedDate(val null.Val[int64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.LastEditedDate = func() null.Val[int64] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) LastEditedDateFunc(f func() null.Val[int64]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.LastEditedDate = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetLastEditedDate() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomLastEditedDate(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomLastEditedDateNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) LastEditedUser(val null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.LastEditedUser = func() null.Val[string] { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) LastEditedUserFunc(f func() null.Val[string]) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.LastEditedUser = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetLastEditedUser() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomLastEditedUser(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomLastEditedUserNotNull(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) Updated(val time.Time) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Updated = func() time.Time { return val } }) } // Set the Column from the function func (m fsInspectionsampledetailMods) UpdatedFunc(f func() time.Time) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Updated = f }) } // Clear any values for the column func (m fsInspectionsampledetailMods) UnsetUpdated() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { 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 fsInspectionsampledetailMods) RandomUpdated(f *faker.Faker) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(_ context.Context, o *FSInspectionsampledetailTemplate) { o.Updated = func() time.Time { return random_time_Time(f) } }) } func (m fsInspectionsampledetailMods) WithParentsCascading() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(ctx context.Context, o *FSInspectionsampledetailTemplate) { if isDone, _ := fsInspectionsampledetailWithParentsCascadingCtx.Value(ctx); isDone { return } ctx = fsInspectionsampledetailWithParentsCascadingCtx.WithValue(ctx, true) { related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading()) m.WithOrganization(related).Apply(ctx, o) } }) } func (m fsInspectionsampledetailMods) WithOrganization(rel *OrganizationTemplate) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(ctx context.Context, o *FSInspectionsampledetailTemplate) { o.r.Organization = &fsInspectionsampledetailROrganizationR{ o: rel, } }) } func (m fsInspectionsampledetailMods) WithNewOrganization(mods ...OrganizationMod) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(ctx context.Context, o *FSInspectionsampledetailTemplate) { related := o.f.NewOrganizationWithContext(ctx, mods...) m.WithOrganization(related).Apply(ctx, o) }) } func (m fsInspectionsampledetailMods) WithExistingOrganization(em *models.Organization) FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(ctx context.Context, o *FSInspectionsampledetailTemplate) { o.r.Organization = &fsInspectionsampledetailROrganizationR{ o: o.f.FromExistingOrganization(em), } }) } func (m fsInspectionsampledetailMods) WithoutOrganization() FSInspectionsampledetailMod { return FSInspectionsampledetailModFunc(func(ctx context.Context, o *FSInspectionsampledetailTemplate) { o.r.Organization = nil }) }