This is an intermediate step between shifting from the old fs_* prefixed table names to an entire fieldseeker schema. At this point we have both, and we aren't doing much with the new schema but compiling.
1932 lines
61 KiB
Go
1932 lines
61 KiB
Go
// Code generated by BobGen psql v0.42.0. DO NOT EDIT.
|
|
// This file is meant to be re-generated in place and/or deleted at any time.
|
|
|
|
package factory
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
"time"
|
|
|
|
enums "github.com/Gleipnir-Technology/nidus-sync/db/enums"
|
|
models "github.com/Gleipnir-Technology/nidus-sync/db/models"
|
|
"github.com/aarondl/opt/null"
|
|
"github.com/aarondl/opt/omit"
|
|
"github.com/aarondl/opt/omitnull"
|
|
"github.com/gofrs/uuid/v5"
|
|
"github.com/jaswdr/faker/v2"
|
|
"github.com/stephenafamo/bob"
|
|
)
|
|
|
|
type FieldseekerPoolMod interface {
|
|
Apply(context.Context, *FieldseekerPoolTemplate)
|
|
}
|
|
|
|
type FieldseekerPoolModFunc func(context.Context, *FieldseekerPoolTemplate)
|
|
|
|
func (f FieldseekerPoolModFunc) Apply(ctx context.Context, n *FieldseekerPoolTemplate) {
|
|
f(ctx, n)
|
|
}
|
|
|
|
type FieldseekerPoolModSlice []FieldseekerPoolMod
|
|
|
|
func (mods FieldseekerPoolModSlice) Apply(ctx context.Context, n *FieldseekerPoolTemplate) {
|
|
for _, f := range mods {
|
|
f.Apply(ctx, n)
|
|
}
|
|
}
|
|
|
|
// FieldseekerPoolTemplate is an object representing the database table.
|
|
// all columns are optional and should be set by mods
|
|
type FieldseekerPoolTemplate struct {
|
|
Objectid func() int64
|
|
TrapdataID func() null.Val[uuid.UUID]
|
|
Datesent func() null.Val[time.Time]
|
|
Survtech func() null.Val[string]
|
|
Datetested func() null.Val[time.Time]
|
|
Testtech func() null.Val[string]
|
|
Comments func() null.Val[string]
|
|
Sampleid func() null.Val[string]
|
|
Processed func() null.Val[enums.FieldseekerPoolNotinuitFEnum]
|
|
LabID func() null.Val[uuid.UUID]
|
|
Testmethod func() null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum]
|
|
Diseasetested func() null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum]
|
|
Diseasepos func() null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum]
|
|
Globalid func() null.Val[uuid.UUID]
|
|
CreatedUser func() null.Val[string]
|
|
CreatedDate func() null.Val[time.Time]
|
|
LastEditedUser func() null.Val[string]
|
|
LastEditedDate func() null.Val[time.Time]
|
|
Lab func() null.Val[enums.FieldseekerPoolMosquitolabnameEnum]
|
|
Poolyear func() null.Val[int16]
|
|
Gatewaysync func() null.Val[int16]
|
|
Vectorsurvcollectionid func() null.Val[string]
|
|
Vectorsurvpoolid func() null.Val[string]
|
|
Vectorsurvtrapdataid func() null.Val[string]
|
|
Creationdate func() null.Val[time.Time]
|
|
Creator func() null.Val[string]
|
|
Editdate func() null.Val[time.Time]
|
|
Editor func() null.Val[string]
|
|
|
|
f *Factory
|
|
|
|
alreadyPersisted bool
|
|
}
|
|
|
|
// Apply mods to the FieldseekerPoolTemplate
|
|
func (o *FieldseekerPoolTemplate) Apply(ctx context.Context, mods ...FieldseekerPoolMod) {
|
|
for _, mod := range mods {
|
|
mod.Apply(ctx, o)
|
|
}
|
|
}
|
|
|
|
// setModelRels creates and sets the relationships on *models.FieldseekerPool
|
|
// according to the relationships in the template. Nothing is inserted into the db
|
|
func (t FieldseekerPoolTemplate) setModelRels(o *models.FieldseekerPool) {}
|
|
|
|
// BuildSetter returns an *models.FieldseekerPoolSetter
|
|
// this does nothing with the relationship templates
|
|
func (o FieldseekerPoolTemplate) BuildSetter() *models.FieldseekerPoolSetter {
|
|
m := &models.FieldseekerPoolSetter{}
|
|
|
|
if o.Objectid != nil {
|
|
val := o.Objectid()
|
|
m.Objectid = omit.From(val)
|
|
}
|
|
if o.TrapdataID != nil {
|
|
val := o.TrapdataID()
|
|
m.TrapdataID = omitnull.FromNull(val)
|
|
}
|
|
if o.Datesent != nil {
|
|
val := o.Datesent()
|
|
m.Datesent = omitnull.FromNull(val)
|
|
}
|
|
if o.Survtech != nil {
|
|
val := o.Survtech()
|
|
m.Survtech = omitnull.FromNull(val)
|
|
}
|
|
if o.Datetested != nil {
|
|
val := o.Datetested()
|
|
m.Datetested = omitnull.FromNull(val)
|
|
}
|
|
if o.Testtech != nil {
|
|
val := o.Testtech()
|
|
m.Testtech = omitnull.FromNull(val)
|
|
}
|
|
if o.Comments != nil {
|
|
val := o.Comments()
|
|
m.Comments = omitnull.FromNull(val)
|
|
}
|
|
if o.Sampleid != nil {
|
|
val := o.Sampleid()
|
|
m.Sampleid = omitnull.FromNull(val)
|
|
}
|
|
if o.Processed != nil {
|
|
val := o.Processed()
|
|
m.Processed = omitnull.FromNull(val)
|
|
}
|
|
if o.LabID != nil {
|
|
val := o.LabID()
|
|
m.LabID = omitnull.FromNull(val)
|
|
}
|
|
if o.Testmethod != nil {
|
|
val := o.Testmethod()
|
|
m.Testmethod = omitnull.FromNull(val)
|
|
}
|
|
if o.Diseasetested != nil {
|
|
val := o.Diseasetested()
|
|
m.Diseasetested = omitnull.FromNull(val)
|
|
}
|
|
if o.Diseasepos != nil {
|
|
val := o.Diseasepos()
|
|
m.Diseasepos = omitnull.FromNull(val)
|
|
}
|
|
if o.Globalid != nil {
|
|
val := o.Globalid()
|
|
m.Globalid = omitnull.FromNull(val)
|
|
}
|
|
if o.CreatedUser != nil {
|
|
val := o.CreatedUser()
|
|
m.CreatedUser = omitnull.FromNull(val)
|
|
}
|
|
if o.CreatedDate != nil {
|
|
val := o.CreatedDate()
|
|
m.CreatedDate = omitnull.FromNull(val)
|
|
}
|
|
if o.LastEditedUser != nil {
|
|
val := o.LastEditedUser()
|
|
m.LastEditedUser = omitnull.FromNull(val)
|
|
}
|
|
if o.LastEditedDate != nil {
|
|
val := o.LastEditedDate()
|
|
m.LastEditedDate = omitnull.FromNull(val)
|
|
}
|
|
if o.Lab != nil {
|
|
val := o.Lab()
|
|
m.Lab = omitnull.FromNull(val)
|
|
}
|
|
if o.Poolyear != nil {
|
|
val := o.Poolyear()
|
|
m.Poolyear = omitnull.FromNull(val)
|
|
}
|
|
if o.Gatewaysync != nil {
|
|
val := o.Gatewaysync()
|
|
m.Gatewaysync = omitnull.FromNull(val)
|
|
}
|
|
if o.Vectorsurvcollectionid != nil {
|
|
val := o.Vectorsurvcollectionid()
|
|
m.Vectorsurvcollectionid = omitnull.FromNull(val)
|
|
}
|
|
if o.Vectorsurvpoolid != nil {
|
|
val := o.Vectorsurvpoolid()
|
|
m.Vectorsurvpoolid = omitnull.FromNull(val)
|
|
}
|
|
if o.Vectorsurvtrapdataid != nil {
|
|
val := o.Vectorsurvtrapdataid()
|
|
m.Vectorsurvtrapdataid = 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)
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildManySetter returns an []*models.FieldseekerPoolSetter
|
|
// this does nothing with the relationship templates
|
|
func (o FieldseekerPoolTemplate) BuildManySetter(number int) []*models.FieldseekerPoolSetter {
|
|
m := make([]*models.FieldseekerPoolSetter, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.BuildSetter()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// Build returns an *models.FieldseekerPool
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use FieldseekerPoolTemplate.Create
|
|
func (o FieldseekerPoolTemplate) Build() *models.FieldseekerPool {
|
|
m := &models.FieldseekerPool{}
|
|
|
|
if o.Objectid != nil {
|
|
m.Objectid = o.Objectid()
|
|
}
|
|
if o.TrapdataID != nil {
|
|
m.TrapdataID = o.TrapdataID()
|
|
}
|
|
if o.Datesent != nil {
|
|
m.Datesent = o.Datesent()
|
|
}
|
|
if o.Survtech != nil {
|
|
m.Survtech = o.Survtech()
|
|
}
|
|
if o.Datetested != nil {
|
|
m.Datetested = o.Datetested()
|
|
}
|
|
if o.Testtech != nil {
|
|
m.Testtech = o.Testtech()
|
|
}
|
|
if o.Comments != nil {
|
|
m.Comments = o.Comments()
|
|
}
|
|
if o.Sampleid != nil {
|
|
m.Sampleid = o.Sampleid()
|
|
}
|
|
if o.Processed != nil {
|
|
m.Processed = o.Processed()
|
|
}
|
|
if o.LabID != nil {
|
|
m.LabID = o.LabID()
|
|
}
|
|
if o.Testmethod != nil {
|
|
m.Testmethod = o.Testmethod()
|
|
}
|
|
if o.Diseasetested != nil {
|
|
m.Diseasetested = o.Diseasetested()
|
|
}
|
|
if o.Diseasepos != nil {
|
|
m.Diseasepos = o.Diseasepos()
|
|
}
|
|
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.Lab != nil {
|
|
m.Lab = o.Lab()
|
|
}
|
|
if o.Poolyear != nil {
|
|
m.Poolyear = o.Poolyear()
|
|
}
|
|
if o.Gatewaysync != nil {
|
|
m.Gatewaysync = o.Gatewaysync()
|
|
}
|
|
if o.Vectorsurvcollectionid != nil {
|
|
m.Vectorsurvcollectionid = o.Vectorsurvcollectionid()
|
|
}
|
|
if o.Vectorsurvpoolid != nil {
|
|
m.Vectorsurvpoolid = o.Vectorsurvpoolid()
|
|
}
|
|
if o.Vectorsurvtrapdataid != nil {
|
|
m.Vectorsurvtrapdataid = o.Vectorsurvtrapdataid()
|
|
}
|
|
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()
|
|
}
|
|
|
|
o.setModelRels(m)
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildMany returns an models.FieldseekerPoolSlice
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use FieldseekerPoolTemplate.CreateMany
|
|
func (o FieldseekerPoolTemplate) BuildMany(number int) models.FieldseekerPoolSlice {
|
|
m := make(models.FieldseekerPoolSlice, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.Build()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
func ensureCreatableFieldseekerPool(m *models.FieldseekerPoolSetter) {
|
|
}
|
|
|
|
// insertOptRels creates and inserts any optional the relationships on *models.FieldseekerPool
|
|
// according to the relationships in the template.
|
|
// any required relationship should have already exist on the model
|
|
func (o *FieldseekerPoolTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FieldseekerPool) error {
|
|
var err error
|
|
|
|
return err
|
|
}
|
|
|
|
// Create builds a fieldseekerPool and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o *FieldseekerPoolTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FieldseekerPool, error) {
|
|
var err error
|
|
opt := o.BuildSetter()
|
|
ensureCreatableFieldseekerPool(opt)
|
|
|
|
m, err := models.FieldseekerPools.Insert(opt).One(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
if err := o.insertOptRels(ctx, exec, m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, err
|
|
}
|
|
|
|
// MustCreate builds a fieldseekerPool and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o *FieldseekerPoolTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FieldseekerPool {
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateOrFail builds a fieldseekerPool 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 *FieldseekerPoolTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FieldseekerPool {
|
|
tb.Helper()
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateMany builds multiple fieldseekerPools and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o FieldseekerPoolTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FieldseekerPoolSlice, error) {
|
|
var err error
|
|
m := make(models.FieldseekerPoolSlice, number)
|
|
|
|
for i := range m {
|
|
m[i], err = o.Create(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
|
|
return m, nil
|
|
}
|
|
|
|
// MustCreateMany builds multiple fieldseekerPools and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o FieldseekerPoolTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FieldseekerPoolSlice {
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateManyOrFail builds multiple fieldseekerPools 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 FieldseekerPoolTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FieldseekerPoolSlice {
|
|
tb.Helper()
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// FieldseekerPool has methods that act as mods for the FieldseekerPoolTemplate
|
|
var FieldseekerPoolMods fieldseekerPoolMods
|
|
|
|
type fieldseekerPoolMods struct{}
|
|
|
|
func (m fieldseekerPoolMods) RandomizeAllColumns(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModSlice{
|
|
FieldseekerPoolMods.RandomObjectid(f),
|
|
FieldseekerPoolMods.RandomTrapdataID(f),
|
|
FieldseekerPoolMods.RandomDatesent(f),
|
|
FieldseekerPoolMods.RandomSurvtech(f),
|
|
FieldseekerPoolMods.RandomDatetested(f),
|
|
FieldseekerPoolMods.RandomTesttech(f),
|
|
FieldseekerPoolMods.RandomComments(f),
|
|
FieldseekerPoolMods.RandomSampleid(f),
|
|
FieldseekerPoolMods.RandomProcessed(f),
|
|
FieldseekerPoolMods.RandomLabID(f),
|
|
FieldseekerPoolMods.RandomTestmethod(f),
|
|
FieldseekerPoolMods.RandomDiseasetested(f),
|
|
FieldseekerPoolMods.RandomDiseasepos(f),
|
|
FieldseekerPoolMods.RandomGlobalid(f),
|
|
FieldseekerPoolMods.RandomCreatedUser(f),
|
|
FieldseekerPoolMods.RandomCreatedDate(f),
|
|
FieldseekerPoolMods.RandomLastEditedUser(f),
|
|
FieldseekerPoolMods.RandomLastEditedDate(f),
|
|
FieldseekerPoolMods.RandomLab(f),
|
|
FieldseekerPoolMods.RandomPoolyear(f),
|
|
FieldseekerPoolMods.RandomGatewaysync(f),
|
|
FieldseekerPoolMods.RandomVectorsurvcollectionid(f),
|
|
FieldseekerPoolMods.RandomVectorsurvpoolid(f),
|
|
FieldseekerPoolMods.RandomVectorsurvtrapdataid(f),
|
|
FieldseekerPoolMods.RandomCreationdate(f),
|
|
FieldseekerPoolMods.RandomCreator(f),
|
|
FieldseekerPoolMods.RandomEditdate(f),
|
|
FieldseekerPoolMods.RandomEditor(f),
|
|
}
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerPoolMods) Objectid(val int64) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Objectid = func() int64 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) ObjectidFunc(f func() int64) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Objectid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetObjectid() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomObjectid(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Objectid = func() int64 {
|
|
return random_int64(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerPoolMods) TrapdataID(val null.Val[uuid.UUID]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.TrapdataID = func() null.Val[uuid.UUID] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) TrapdataIDFunc(f func() null.Val[uuid.UUID]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.TrapdataID = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetTrapdataID() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.TrapdataID = 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 fieldseekerPoolMods) RandomTrapdataID(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.TrapdataID = 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 fieldseekerPoolMods) RandomTrapdataIDNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.TrapdataID = 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 fieldseekerPoolMods) Datesent(val null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Datesent = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) DatesentFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Datesent = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetDatesent() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Datesent = 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 fieldseekerPoolMods) RandomDatesent(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Datesent = 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 fieldseekerPoolMods) RandomDatesentNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Datesent = 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 fieldseekerPoolMods) Survtech(val null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Survtech = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) SurvtechFunc(f func() null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Survtech = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetSurvtech() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Survtech = 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 fieldseekerPoolMods) RandomSurvtech(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Survtech = 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 fieldseekerPoolMods) RandomSurvtechNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Survtech = 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 fieldseekerPoolMods) Datetested(val null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Datetested = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) DatetestedFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Datetested = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetDatetested() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Datetested = 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 fieldseekerPoolMods) RandomDatetested(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Datetested = 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 fieldseekerPoolMods) RandomDatetestedNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Datetested = 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 fieldseekerPoolMods) Testtech(val null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Testtech = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) TesttechFunc(f func() null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Testtech = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetTesttech() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Testtech = 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 fieldseekerPoolMods) RandomTesttech(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Testtech = 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 fieldseekerPoolMods) RandomTesttechNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Testtech = 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 fieldseekerPoolMods) Comments(val null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Comments = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) CommentsFunc(f func() null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Comments = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetComments() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomComments(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomCommentsNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) Sampleid(val null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Sampleid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) SampleidFunc(f func() null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Sampleid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetSampleid() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Sampleid = 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 fieldseekerPoolMods) RandomSampleid(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Sampleid = 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 fieldseekerPoolMods) RandomSampleidNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Sampleid = 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 fieldseekerPoolMods) Processed(val null.Val[enums.FieldseekerPoolNotinuitFEnum]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Processed = func() null.Val[enums.FieldseekerPoolNotinuitFEnum] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) ProcessedFunc(f func() null.Val[enums.FieldseekerPoolNotinuitFEnum]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Processed = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetProcessed() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomProcessed(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Processed = func() null.Val[enums.FieldseekerPoolNotinuitFEnum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerPoolNotinuitFEnum(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 fieldseekerPoolMods) RandomProcessedNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Processed = func() null.Val[enums.FieldseekerPoolNotinuitFEnum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerPoolNotinuitFEnum(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerPoolMods) LabID(val null.Val[uuid.UUID]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.LabID = func() null.Val[uuid.UUID] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) LabIDFunc(f func() null.Val[uuid.UUID]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.LabID = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetLabID() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.LabID = 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 fieldseekerPoolMods) RandomLabID(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.LabID = 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 fieldseekerPoolMods) RandomLabIDNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.LabID = 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 fieldseekerPoolMods) Testmethod(val null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Testmethod = func() null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) TestmethodFunc(f func() null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Testmethod = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetTestmethod() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Testmethod = 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 fieldseekerPoolMods) RandomTestmethod(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Testmethod = func() null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum(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 fieldseekerPoolMods) RandomTestmethodNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Testmethod = func() null.Val[enums.FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerPoolPoolTestmethod670efbfba86d41ba8e2d3cab5d749e7fEnum(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerPoolMods) Diseasetested(val null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Diseasetested = func() null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum] {
|
|
return val
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) DiseasetestedFunc(f func() null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Diseasetested = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetDiseasetested() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Diseasetested = 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 fieldseekerPoolMods) RandomDiseasetested(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Diseasetested = func() null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum(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 fieldseekerPoolMods) RandomDiseasetestedNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Diseasetested = func() null.Val[enums.FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerPoolPoolDiseasetested0f02232949c04c7e8de820b9b515ed97Enum(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerPoolMods) Diseasepos(val null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Diseasepos = func() null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) DiseaseposFunc(f func() null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Diseasepos = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetDiseasepos() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Diseasepos = 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 fieldseekerPoolMods) RandomDiseasepos(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Diseasepos = func() null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum(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 fieldseekerPoolMods) RandomDiseaseposNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Diseasepos = func() null.Val[enums.FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerPoolPoolDiseasepos6889f8dd00074874aa726907e78497faEnum(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerPoolMods) Globalid(val null.Val[uuid.UUID]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Globalid = func() null.Val[uuid.UUID] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) GlobalidFunc(f func() null.Val[uuid.UUID]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Globalid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetGlobalid() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Globalid = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is sometimes null
|
|
func (m fieldseekerPoolMods) RandomGlobalid(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Globalid = func() null.Val[uuid.UUID] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_uuid_UUID(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerPoolMods) RandomGlobalidNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Globalid = func() null.Val[uuid.UUID] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_uuid_UUID(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerPoolMods) CreatedUser(val null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.CreatedUser = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) CreatedUserFunc(f func() null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.CreatedUser = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetCreatedUser() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomCreatedUser(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomCreatedUserNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) CreatedDate(val null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.CreatedDate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) CreatedDateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.CreatedDate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetCreatedDate() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomCreatedDate(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomCreatedDateNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) LastEditedUser(val null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.LastEditedUser = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) LastEditedUserFunc(f func() null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.LastEditedUser = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetLastEditedUser() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomLastEditedUser(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomLastEditedUserNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) LastEditedDate(val null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.LastEditedDate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) LastEditedDateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.LastEditedDate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetLastEditedDate() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomLastEditedDate(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomLastEditedDateNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) Lab(val null.Val[enums.FieldseekerPoolMosquitolabnameEnum]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Lab = func() null.Val[enums.FieldseekerPoolMosquitolabnameEnum] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) LabFunc(f func() null.Val[enums.FieldseekerPoolMosquitolabnameEnum]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Lab = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetLab() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Lab = 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 fieldseekerPoolMods) RandomLab(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Lab = func() null.Val[enums.FieldseekerPoolMosquitolabnameEnum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerPoolMosquitolabnameEnum(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 fieldseekerPoolMods) RandomLabNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Lab = func() null.Val[enums.FieldseekerPoolMosquitolabnameEnum] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_enums_FieldseekerPoolMosquitolabnameEnum(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerPoolMods) Poolyear(val null.Val[int16]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Poolyear = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) PoolyearFunc(f func() null.Val[int16]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Poolyear = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetPoolyear() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Poolyear = 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 fieldseekerPoolMods) RandomPoolyear(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Poolyear = 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 fieldseekerPoolMods) RandomPoolyearNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Poolyear = 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 fieldseekerPoolMods) Gatewaysync(val null.Val[int16]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Gatewaysync = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) GatewaysyncFunc(f func() null.Val[int16]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Gatewaysync = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetGatewaysync() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Gatewaysync = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is sometimes null
|
|
func (m fieldseekerPoolMods) RandomGatewaysync(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Gatewaysync = func() null.Val[int16] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_int16(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m fieldseekerPoolMods) RandomGatewaysyncNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Gatewaysync = func() null.Val[int16] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_int16(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fieldseekerPoolMods) Vectorsurvcollectionid(val null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvcollectionid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) VectorsurvcollectionidFunc(f func() null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvcollectionid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetVectorsurvcollectionid() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvcollectionid = 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 fieldseekerPoolMods) RandomVectorsurvcollectionid(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvcollectionid = 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 fieldseekerPoolMods) RandomVectorsurvcollectionidNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvcollectionid = 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 fieldseekerPoolMods) Vectorsurvpoolid(val null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvpoolid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) VectorsurvpoolidFunc(f func() null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvpoolid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetVectorsurvpoolid() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvpoolid = 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 fieldseekerPoolMods) RandomVectorsurvpoolid(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvpoolid = 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 fieldseekerPoolMods) RandomVectorsurvpoolidNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvpoolid = 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 fieldseekerPoolMods) Vectorsurvtrapdataid(val null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvtrapdataid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) VectorsurvtrapdataidFunc(f func() null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvtrapdataid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetVectorsurvtrapdataid() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvtrapdataid = 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 fieldseekerPoolMods) RandomVectorsurvtrapdataid(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvtrapdataid = 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 fieldseekerPoolMods) RandomVectorsurvtrapdataidNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Vectorsurvtrapdataid = 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 fieldseekerPoolMods) Creationdate(val null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Creationdate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) CreationdateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Creationdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetCreationdate() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomCreationdate(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomCreationdateNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) Creator(val null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Creator = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) CreatorFunc(f func() null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Creator = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetCreator() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomCreator(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomCreatorNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) Editdate(val null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Editdate = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) EditdateFunc(f func() null.Val[time.Time]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Editdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetEditdate() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomEditdate(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomEditdateNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) Editor(val null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Editor = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fieldseekerPoolMods) EditorFunc(f func() null.Val[string]) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Editor = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fieldseekerPoolMods) UnsetEditor() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomEditor(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
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 fieldseekerPoolMods) RandomEditorNotNull(f *faker.Faker) FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(_ context.Context, o *FieldseekerPoolTemplate) {
|
|
o.Editor = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f, "128")
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fieldseekerPoolMods) WithParentsCascading() FieldseekerPoolMod {
|
|
return FieldseekerPoolModFunc(func(ctx context.Context, o *FieldseekerPoolTemplate) {
|
|
if isDone, _ := fieldseekerPoolWithParentsCascadingCtx.Value(ctx); isDone {
|
|
return
|
|
}
|
|
ctx = fieldseekerPoolWithParentsCascadingCtx.WithValue(ctx, true)
|
|
})
|
|
}
|