1987 lines
72 KiB
Go
1987 lines
72 KiB
Go
// Code generated by BobGen psql v0.0.4-0.20260105020634-53e08d840e47+dirty. DO NOT EDIT.
|
|
// This file is meant to be re-generated in place and/or deleted at any time.
|
|
|
|
package factory
|
|
|
|
import (
|
|
"context"
|
|
"encoding/json"
|
|
"testing"
|
|
"time"
|
|
|
|
models "github.com/Gleipnir-Technology/nidus-sync/db/models"
|
|
"github.com/aarondl/opt/null"
|
|
"github.com/aarondl/opt/omit"
|
|
"github.com/aarondl/opt/omitnull"
|
|
"github.com/google/uuid"
|
|
"github.com/jaswdr/faker/v2"
|
|
"github.com/stephenafamo/bob"
|
|
"github.com/stephenafamo/bob/types"
|
|
)
|
|
|
|
type FieldseekerInspectionsampledetailMod interface {
|
|
Apply(context.Context, *FieldseekerInspectionsampledetailTemplate)
|
|
}
|
|
|
|
type FieldseekerInspectionsampledetailModFunc func(context.Context, *FieldseekerInspectionsampledetailTemplate)
|
|
|
|
func (f FieldseekerInspectionsampledetailModFunc) Apply(ctx context.Context, n *FieldseekerInspectionsampledetailTemplate) {
|
|
f(ctx, n)
|
|
}
|
|
|
|
type FieldseekerInspectionsampledetailModSlice []FieldseekerInspectionsampledetailMod
|
|
|
|
func (mods FieldseekerInspectionsampledetailModSlice) Apply(ctx context.Context, n *FieldseekerInspectionsampledetailTemplate) {
|
|
for _, f := range mods {
|
|
f.Apply(ctx, n)
|
|
}
|
|
}
|
|
|
|
// FieldseekerInspectionsampledetailTemplate is an object representing the database table.
|
|
// all columns are optional and should be set by mods
|
|
type FieldseekerInspectionsampledetailTemplate struct {
|
|
Objectid func() int64
|
|
InspsampleID func() null.Val[uuid.UUID]
|
|
Fieldspecies func() null.Val[string]
|
|
Flarvcount func() null.Val[int16]
|
|
Fpupcount func() null.Val[int16]
|
|
Feggcount func() null.Val[int16]
|
|
Flstages func() null.Val[string]
|
|
Fdomstage func() null.Val[string]
|
|
Fadultact func() null.Val[string]
|
|
Labspecies func() null.Val[string]
|
|
Llarvcount func() null.Val[int16]
|
|
Lpupcount func() null.Val[int16]
|
|
Leggcount func() null.Val[int16]
|
|
Ldomstage func() null.Val[string]
|
|
Comments func() null.Val[string]
|
|
Globalid func() uuid.UUID
|
|
CreatedUser func() null.Val[string]
|
|
CreatedDate func() null.Val[time.Time]
|
|
LastEditedUser func() null.Val[string]
|
|
LastEditedDate func() null.Val[time.Time]
|
|
Processed func() null.Val[int16]
|
|
Creationdate func() null.Val[time.Time]
|
|
Creator func() null.Val[string]
|
|
Editdate func() null.Val[time.Time]
|
|
Editor func() null.Val[string]
|
|
Geometry func() types.JSON[json.RawMessage]
|
|
Geospatial func() null.Val[string]
|
|
Version func() int32
|
|
OrganizationID func() int32
|
|
|
|
r fieldseekerInspectionsampledetailR
|
|
f *Factory
|
|
|
|
alreadyPersisted bool
|
|
}
|
|
|
|
type fieldseekerInspectionsampledetailR struct {
|
|
Organization *fieldseekerInspectionsampledetailROrganizationR
|
|
}
|
|
|
|
type fieldseekerInspectionsampledetailROrganizationR struct {
|
|
o *OrganizationTemplate
|
|
}
|
|
|
|
// Apply mods to the FieldseekerInspectionsampledetailTemplate
|
|
func (o *FieldseekerInspectionsampledetailTemplate) Apply(ctx context.Context, mods ...FieldseekerInspectionsampledetailMod) {
|
|
for _, mod := range mods {
|
|
mod.Apply(ctx, o)
|
|
}
|
|
}
|
|
|
|
// setModelRels creates and sets the relationships on *models.FieldseekerInspectionsampledetail
|
|
// according to the relationships in the template. Nothing is inserted into the db
|
|
func (t FieldseekerInspectionsampledetailTemplate) setModelRels(o *models.FieldseekerInspectionsampledetail) {
|
|
if t.r.Organization != nil {
|
|
rel := t.r.Organization.o.Build()
|
|
rel.R.Inspectionsampledetails = append(rel.R.Inspectionsampledetails, o)
|
|
o.OrganizationID = rel.ID // h2
|
|
o.R.Organization = rel
|
|
}
|
|
}
|
|
|
|
// BuildSetter returns an *models.FieldseekerInspectionsampledetailSetter
|
|
// this does nothing with the relationship templates
|
|
func (o FieldseekerInspectionsampledetailTemplate) BuildSetter() *models.FieldseekerInspectionsampledetailSetter {
|
|
m := &models.FieldseekerInspectionsampledetailSetter{}
|
|
|
|
if o.Objectid != nil {
|
|
val := o.Objectid()
|
|
m.Objectid = omit.From(val)
|
|
}
|
|
if o.InspsampleID != nil {
|
|
val := o.InspsampleID()
|
|
m.InspsampleID = 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.Fpupcount != nil {
|
|
val := o.Fpupcount()
|
|
m.Fpupcount = omitnull.FromNull(val)
|
|
}
|
|
if o.Feggcount != nil {
|
|
val := o.Feggcount()
|
|
m.Feggcount = omitnull.FromNull(val)
|
|
}
|
|
if o.Flstages != nil {
|
|
val := o.Flstages()
|
|
m.Flstages = omitnull.FromNull(val)
|
|
}
|
|
if o.Fdomstage != nil {
|
|
val := o.Fdomstage()
|
|
m.Fdomstage = omitnull.FromNull(val)
|
|
}
|
|
if o.Fadultact != nil {
|
|
val := o.Fadultact()
|
|
m.Fadultact = omitnull.FromNull(val)
|
|
}
|
|
if o.Labspecies != nil {
|
|
val := o.Labspecies()
|
|
m.Labspecies = 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.Leggcount != nil {
|
|
val := o.Leggcount()
|
|
m.Leggcount = omitnull.FromNull(val)
|
|
}
|
|
if o.Ldomstage != nil {
|
|
val := o.Ldomstage()
|
|
m.Ldomstage = omitnull.FromNull(val)
|
|
}
|
|
if o.Comments != nil {
|
|
val := o.Comments()
|
|
m.Comments = omitnull.FromNull(val)
|
|
}
|
|
if o.Globalid != nil {
|
|
val := o.Globalid()
|
|
m.Globalid = omit.From(val)
|
|
}
|
|
if o.CreatedUser != nil {
|
|
val := o.CreatedUser()
|
|
m.CreatedUser = omitnull.FromNull(val)
|
|
}
|
|
if o.CreatedDate != nil {
|
|
val := o.CreatedDate()
|
|
m.CreatedDate = omitnull.FromNull(val)
|
|
}
|
|
if o.LastEditedUser != nil {
|
|
val := o.LastEditedUser()
|
|
m.LastEditedUser = omitnull.FromNull(val)
|
|
}
|
|
if o.LastEditedDate != nil {
|
|
val := o.LastEditedDate()
|
|
m.LastEditedDate = omitnull.FromNull(val)
|
|
}
|
|
if o.Processed != nil {
|
|
val := o.Processed()
|
|
m.Processed = 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.Geometry != nil {
|
|
val := o.Geometry()
|
|
m.Geometry = omit.From(val)
|
|
}
|
|
if o.Geospatial != nil {
|
|
val := o.Geospatial()
|
|
m.Geospatial = omitnull.FromNull(val)
|
|
}
|
|
if o.Version != nil {
|
|
val := o.Version()
|
|
m.Version = omit.From(val)
|
|
}
|
|
if o.OrganizationID != nil {
|
|
val := o.OrganizationID()
|
|
m.OrganizationID = omit.From(val)
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildManySetter returns an []*models.FieldseekerInspectionsampledetailSetter
|
|
// this does nothing with the relationship templates
|
|
func (o FieldseekerInspectionsampledetailTemplate) BuildManySetter(number int) []*models.FieldseekerInspectionsampledetailSetter {
|
|
m := make([]*models.FieldseekerInspectionsampledetailSetter, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.BuildSetter()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// Build returns an *models.FieldseekerInspectionsampledetail
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use FieldseekerInspectionsampledetailTemplate.Create
|
|
func (o FieldseekerInspectionsampledetailTemplate) Build() *models.FieldseekerInspectionsampledetail {
|
|
m := &models.FieldseekerInspectionsampledetail{}
|
|
|
|
if o.Objectid != nil {
|
|
m.Objectid = o.Objectid()
|
|
}
|
|
if o.InspsampleID != nil {
|
|
m.InspsampleID = o.InspsampleID()
|
|
}
|
|
if o.Fieldspecies != nil {
|
|
m.Fieldspecies = o.Fieldspecies()
|
|
}
|
|
if o.Flarvcount != nil {
|
|
m.Flarvcount = o.Flarvcount()
|
|
}
|
|
if o.Fpupcount != nil {
|
|
m.Fpupcount = o.Fpupcount()
|
|
}
|
|
if o.Feggcount != nil {
|
|
m.Feggcount = o.Feggcount()
|
|
}
|
|
if o.Flstages != nil {
|
|
m.Flstages = o.Flstages()
|
|
}
|
|
if o.Fdomstage != nil {
|
|
m.Fdomstage = o.Fdomstage()
|
|
}
|
|
if o.Fadultact != nil {
|
|
m.Fadultact = o.Fadultact()
|
|
}
|
|
if o.Labspecies != nil {
|
|
m.Labspecies = o.Labspecies()
|
|
}
|
|
if o.Llarvcount != nil {
|
|
m.Llarvcount = o.Llarvcount()
|
|
}
|
|
if o.Lpupcount != nil {
|
|
m.Lpupcount = o.Lpupcount()
|
|
}
|
|
if o.Leggcount != nil {
|
|
m.Leggcount = o.Leggcount()
|
|
}
|
|
if o.Ldomstage != nil {
|
|
m.Ldomstage = o.Ldomstage()
|
|
}
|
|
if o.Comments != nil {
|
|
m.Comments = o.Comments()
|
|
}
|
|
if o.Globalid != nil {
|
|
m.Globalid = o.Globalid()
|
|
}
|
|
if o.CreatedUser != nil {
|
|
m.CreatedUser = o.CreatedUser()
|
|
}
|
|
if o.CreatedDate != nil {
|
|
m.CreatedDate = o.CreatedDate()
|
|
}
|
|
if o.LastEditedUser != nil {
|
|
m.LastEditedUser = o.LastEditedUser()
|
|
}
|
|
if o.LastEditedDate != nil {
|
|
m.LastEditedDate = o.LastEditedDate()
|
|
}
|
|
if o.Processed != nil {
|
|
m.Processed = o.Processed()
|
|
}
|
|
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.Geometry != nil {
|
|
m.Geometry = o.Geometry()
|
|
}
|
|
if o.Geospatial != nil {
|
|
m.Geospatial = o.Geospatial()
|
|
}
|
|
if o.Version != nil {
|
|
m.Version = o.Version()
|
|
}
|
|
if o.OrganizationID != nil {
|
|
m.OrganizationID = o.OrganizationID()
|
|
}
|
|
|
|
o.setModelRels(m)
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildMany returns an models.FieldseekerInspectionsampledetailSlice
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use FieldseekerInspectionsampledetailTemplate.CreateMany
|
|
func (o FieldseekerInspectionsampledetailTemplate) BuildMany(number int) models.FieldseekerInspectionsampledetailSlice {
|
|
m := make(models.FieldseekerInspectionsampledetailSlice, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.Build()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
func ensureCreatableFieldseekerInspectionsampledetail(m *models.FieldseekerInspectionsampledetailSetter) {
|
|
if !(m.Globalid.IsValue()) {
|
|
val := random_uuid_UUID(nil)
|
|
m.Globalid = omit.From(val)
|
|
}
|
|
if !(m.Geometry.IsValue()) {
|
|
val := random_types_JSON_json_RawMessage_(nil)
|
|
m.Geometry = omit.From(val)
|
|
}
|
|
if !(m.OrganizationID.IsValue()) {
|
|
val := random_int32(nil)
|
|
m.OrganizationID = omit.From(val)
|
|
}
|
|
}
|
|
|
|
// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerInspectionsampledetail
|
|
// according to the relationships in the template.
|
|
// any required relationship should have already exist on the model
|
|
func (o *FieldseekerInspectionsampledetailTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerInspectionsampledetail) error {
|
|
var err error
|
|
|
|
return err
|
|
}
|
|
|
|
// Create builds a fieldseekerInspectionsampledetail and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o *FieldseekerInspectionsampledetailTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerInspectionsampledetail, error) {
|
|
var err error
|
|
opt := o.BuildSetter()
|
|
ensureCreatableFieldseekerInspectionsampledetail(opt)
|
|
|
|
if o.r.Organization == nil {
|
|
FieldseekerInspectionsampledetailMods.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.FieldseekerInspectionsampledetails.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 fieldseekerInspectionsampledetail and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o *FieldseekerInspectionsampledetailTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerInspectionsampledetail {
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateOrFail builds a fieldseekerInspectionsampledetail 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 *FieldseekerInspectionsampledetailTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerInspectionsampledetail {
|
|
tb.Helper()
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateMany builds multiple fieldseekerInspectionsampledetails and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o FieldseekerInspectionsampledetailTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerInspectionsampledetailSlice, error) {
|
|
var err error
|
|
m := make(models.FieldseekerInspectionsampledetailSlice, number)
|
|
|
|
for i := range m {
|
|
m[i], err = o.Create(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
|
|
return m, nil
|
|
}
|
|
|
|
// MustCreateMany builds multiple fieldseekerInspectionsampledetails and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o FieldseekerInspectionsampledetailTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerInspectionsampledetailSlice {
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateManyOrFail builds multiple fieldseekerInspectionsampledetails 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 FieldseekerInspectionsampledetailTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerInspectionsampledetailSlice {
|
|
tb.Helper()
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// FieldseekerInspectionsampledetail has methods that act as mods for the FieldseekerInspectionsampledetailTemplate
|
|
var FieldseekerInspectionsampledetailMods fieldseekerInspectionsampledetailMods
|
|
|
|
type fieldseekerInspectionsampledetailMods struct{}
|
|
|
|
func (m fieldseekerInspectionsampledetailMods) RandomizeAllColumns(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModSlice{
|
|
FieldseekerInspectionsampledetailMods.RandomObjectid(f),
|
|
FieldseekerInspectionsampledetailMods.RandomInspsampleID(f),
|
|
FieldseekerInspectionsampledetailMods.RandomFieldspecies(f),
|
|
FieldseekerInspectionsampledetailMods.RandomFlarvcount(f),
|
|
FieldseekerInspectionsampledetailMods.RandomFpupcount(f),
|
|
FieldseekerInspectionsampledetailMods.RandomFeggcount(f),
|
|
FieldseekerInspectionsampledetailMods.RandomFlstages(f),
|
|
FieldseekerInspectionsampledetailMods.RandomFdomstage(f),
|
|
FieldseekerInspectionsampledetailMods.RandomFadultact(f),
|
|
FieldseekerInspectionsampledetailMods.RandomLabspecies(f),
|
|
FieldseekerInspectionsampledetailMods.RandomLlarvcount(f),
|
|
FieldseekerInspectionsampledetailMods.RandomLpupcount(f),
|
|
FieldseekerInspectionsampledetailMods.RandomLeggcount(f),
|
|
FieldseekerInspectionsampledetailMods.RandomLdomstage(f),
|
|
FieldseekerInspectionsampledetailMods.RandomComments(f),
|
|
FieldseekerInspectionsampledetailMods.RandomGlobalid(f),
|
|
FieldseekerInspectionsampledetailMods.RandomCreatedUser(f),
|
|
FieldseekerInspectionsampledetailMods.RandomCreatedDate(f),
|
|
FieldseekerInspectionsampledetailMods.RandomLastEditedUser(f),
|
|
FieldseekerInspectionsampledetailMods.RandomLastEditedDate(f),
|
|
FieldseekerInspectionsampledetailMods.RandomProcessed(f),
|
|
FieldseekerInspectionsampledetailMods.RandomCreationdate(f),
|
|
FieldseekerInspectionsampledetailMods.RandomCreator(f),
|
|
FieldseekerInspectionsampledetailMods.RandomEditdate(f),
|
|
FieldseekerInspectionsampledetailMods.RandomEditor(f),
|
|
FieldseekerInspectionsampledetailMods.RandomGeometry(f),
|
|
FieldseekerInspectionsampledetailMods.RandomGeospatial(f),
|
|
FieldseekerInspectionsampledetailMods.RandomVersion(f),
|
|
FieldseekerInspectionsampledetailMods.RandomOrganizationID(f),
|
|
}
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Objectid(val int64) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Objectid = func() int64 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) ObjectidFunc(f func() int64) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Objectid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetObjectid() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomObjectid(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Objectid = func() int64 {
|
|
return random_int64(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) InspsampleID(val null.Val[uuid.UUID]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.InspsampleID = func() null.Val[uuid.UUID] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) InspsampleIDFunc(f func() null.Val[uuid.UUID]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.InspsampleID = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetInspsampleID() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomInspsampleID(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.InspsampleID = func() null.Val[uuid.UUID] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_uuid_UUID(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomInspsampleIDNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.InspsampleID = func() null.Val[uuid.UUID] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_uuid_UUID(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Fieldspecies(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fieldspecies = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) FieldspeciesFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fieldspecies = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetFieldspecies() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomFieldspecies(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fieldspecies = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomFieldspeciesNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fieldspecies = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Flarvcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Flarvcount = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) FlarvcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Flarvcount = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetFlarvcount() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomFlarvcount(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomFlarvcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) Fpupcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fpupcount = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) FpupcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fpupcount = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetFpupcount() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomFpupcount(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomFpupcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) Feggcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Feggcount = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) FeggcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Feggcount = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetFeggcount() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomFeggcount(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomFeggcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) Flstages(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Flstages = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) FlstagesFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Flstages = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetFlstages() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomFlstages(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Flstages = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomFlstagesNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Flstages = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Fdomstage(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fdomstage = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) FdomstageFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fdomstage = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetFdomstage() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomFdomstage(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fdomstage = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomFdomstageNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fdomstage = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Fadultact(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fadultact = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) FadultactFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fadultact = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetFadultact() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomFadultact(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fadultact = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomFadultactNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Fadultact = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Labspecies(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Labspecies = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) LabspeciesFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Labspecies = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetLabspecies() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomLabspecies(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Labspecies = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "50")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomLabspeciesNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Labspecies = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "50")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Llarvcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Llarvcount = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) LlarvcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Llarvcount = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetLlarvcount() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomLlarvcount(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomLlarvcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) Lpupcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Lpupcount = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) LpupcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Lpupcount = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetLpupcount() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomLpupcount(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomLpupcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) Leggcount(val null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Leggcount = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) LeggcountFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Leggcount = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetLeggcount() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomLeggcount(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomLeggcountNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) Ldomstage(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Ldomstage = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) LdomstageFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Ldomstage = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetLdomstage() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomLdomstage(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Ldomstage = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomLdomstageNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Ldomstage = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "25")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Comments(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Comments = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) CommentsFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Comments = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetComments() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomComments(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Comments = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "250")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Comments = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "250")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Globalid(val uuid.UUID) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Globalid = func() uuid.UUID { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) GlobalidFunc(f func() uuid.UUID) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Globalid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetGlobalid() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomGlobalid(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Globalid = func() uuid.UUID {
|
|
return random_uuid_UUID(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) CreatedUser(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.CreatedUser = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.CreatedUser = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetCreatedUser() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomCreatedUser(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.CreatedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.CreatedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) CreatedDate(val null.Val[time.Time]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.CreatedDate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.CreatedDate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetCreatedDate() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomCreatedDate(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.CreatedDate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.CreatedDate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) LastEditedUser(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.LastEditedUser = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.LastEditedUser = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetLastEditedUser() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomLastEditedUser(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.LastEditedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.LastEditedUser = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "255")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) LastEditedDate(val null.Val[time.Time]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.LastEditedDate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.LastEditedDate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetLastEditedDate() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomLastEditedDate(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.LastEditedDate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.LastEditedDate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Processed(val null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Processed = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) ProcessedFunc(f func() null.Val[int16]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Processed = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetProcessed() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomProcessed(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomProcessedNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) Creationdate(val null.Val[time.Time]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Creationdate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Creationdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetCreationdate() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomCreationdate(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Creationdate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Creationdate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Creator(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Creator = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) CreatorFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Creator = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetCreator() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomCreator(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Creator = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Creator = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Editdate(val null.Val[time.Time]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Editdate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Editdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetEditdate() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomEditdate(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Editdate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Editdate = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Editor(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Editor = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) EditorFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Editor = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetEditor() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomEditor(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Editor = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerInspectionsampledetailMods) RandomEditorNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Editor = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Geometry(val types.JSON[json.RawMessage]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Geometry = func() types.JSON[json.RawMessage] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) GeometryFunc(f func() types.JSON[json.RawMessage]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Geometry = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetGeometry() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Geometry = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
func (m fieldseekerInspectionsampledetailMods) RandomGeometry(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Geometry = func() types.JSON[json.RawMessage] {
|
|
return random_types_JSON_json_RawMessage_(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) Geospatial(val null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Geospatial = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) GeospatialFunc(f func() null.Val[string]) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Geospatial = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetGeospatial() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Geospatial = 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 fieldseekerInspectionsampledetailMods) RandomGeospatial(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Geospatial = 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 fieldseekerInspectionsampledetailMods) RandomGeospatialNotNull(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Geospatial = 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 fieldseekerInspectionsampledetailMods) Version(val int32) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Version = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) VersionFunc(f func() int32) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Version = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetVersion() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Version = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
func (m fieldseekerInspectionsampledetailMods) RandomVersion(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.Version = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerInspectionsampledetailMods) OrganizationID(val int32) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.OrganizationID = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerInspectionsampledetailMods) OrganizationIDFunc(f func() int32) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.OrganizationID = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerInspectionsampledetailMods) UnsetOrganizationID() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
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 fieldseekerInspectionsampledetailMods) RandomOrganizationID(f *faker.Faker) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(_ context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.OrganizationID = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerInspectionsampledetailMods) WithParentsCascading() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(ctx context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
if isDone, _ := fieldseekerInspectionsampledetailWithParentsCascadingCtx.Value(ctx); isDone {
|
|
return
|
|
}
|
|
ctx = fieldseekerInspectionsampledetailWithParentsCascadingCtx.WithValue(ctx, true)
|
|
{
|
|
|
|
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerInspectionsampledetailMods) WithOrganization(rel *OrganizationTemplate) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(ctx context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.r.Organization = &fieldseekerInspectionsampledetailROrganizationR{
|
|
o: rel,
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerInspectionsampledetailMods) WithNewOrganization(mods ...OrganizationMod) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(ctx context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
related := o.f.NewOrganizationWithContext(ctx, mods...)
|
|
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerInspectionsampledetailMods) WithExistingOrganization(em *models.Organization) FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(ctx context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.r.Organization = &fieldseekerInspectionsampledetailROrganizationR{
|
|
o: o.f.FromExistingOrganization(em),
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerInspectionsampledetailMods) WithoutOrganization() FieldseekerInspectionsampledetailMod {
|
|
return FieldseekerInspectionsampledetailModFunc(func(ctx context.Context, o *FieldseekerInspectionsampledetailTemplate) {
|
|
o.r.Organization = nil
|
|
})
|
|
}
|