2025-11-07 08:34:32 +00:00
|
|
|
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
|
|
|
|
// This file is meant to be re-generated in place and/or deleted at any time.
|
|
|
|
|
|
|
|
|
|
package factory
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
"testing"
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
models "github.com/Gleipnir-Technology/nidus-sync/models"
|
|
|
|
|
"github.com/aarondl/opt/null"
|
|
|
|
|
"github.com/aarondl/opt/omit"
|
|
|
|
|
"github.com/aarondl/opt/omitnull"
|
|
|
|
|
"github.com/jaswdr/faker/v2"
|
|
|
|
|
"github.com/stephenafamo/bob"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type FSSamplecollectionMod interface {
|
|
|
|
|
Apply(context.Context, *FSSamplecollectionTemplate)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type FSSamplecollectionModFunc func(context.Context, *FSSamplecollectionTemplate)
|
|
|
|
|
|
|
|
|
|
func (f FSSamplecollectionModFunc) Apply(ctx context.Context, n *FSSamplecollectionTemplate) {
|
|
|
|
|
f(ctx, n)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type FSSamplecollectionModSlice []FSSamplecollectionMod
|
|
|
|
|
|
|
|
|
|
func (mods FSSamplecollectionModSlice) Apply(ctx context.Context, n *FSSamplecollectionTemplate) {
|
|
|
|
|
for _, f := range mods {
|
|
|
|
|
f.Apply(ctx, n)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FSSamplecollectionTemplate is an object representing the database table.
|
|
|
|
|
// all columns are optional and should be set by mods
|
|
|
|
|
type FSSamplecollectionTemplate struct {
|
2025-11-07 09:30:31 +00:00
|
|
|
OrganizationID func() int32
|
2025-11-07 08:34:32 +00:00
|
|
|
Activity func() null.Val[string]
|
|
|
|
|
Avetemp func() null.Val[float64]
|
|
|
|
|
Chickenid func() null.Val[string]
|
|
|
|
|
Comments func() null.Val[string]
|
|
|
|
|
Creationdate func() null.Val[int64]
|
|
|
|
|
Creator func() null.Val[string]
|
|
|
|
|
Datesent func() null.Val[int64]
|
|
|
|
|
Datetested func() null.Val[int64]
|
|
|
|
|
Diseasepos func() null.Val[string]
|
|
|
|
|
Diseasetested func() null.Val[string]
|
|
|
|
|
Enddatetime func() null.Val[int64]
|
|
|
|
|
Editdate func() null.Val[int64]
|
|
|
|
|
Editor func() null.Val[string]
|
|
|
|
|
Fieldtech func() null.Val[string]
|
|
|
|
|
Flockid func() null.Val[string]
|
|
|
|
|
Gatewaysync func() null.Val[int16]
|
2025-11-13 23:48:41 +00:00
|
|
|
Globalid func() string
|
2025-11-07 08:34:32 +00:00
|
|
|
Lab func() null.Val[string]
|
|
|
|
|
Locationname func() null.Val[string]
|
|
|
|
|
LocID func() null.Val[string]
|
|
|
|
|
Objectid func() int32
|
|
|
|
|
Processed func() null.Val[int16]
|
|
|
|
|
Raingauge func() null.Val[float64]
|
|
|
|
|
Recordstatus func() null.Val[int16]
|
|
|
|
|
Reviewed func() null.Val[int16]
|
|
|
|
|
Reviewedby func() null.Val[string]
|
|
|
|
|
Revieweddate func() null.Val[int64]
|
|
|
|
|
Samplecond func() null.Val[string]
|
|
|
|
|
Samplecount func() null.Val[int16]
|
|
|
|
|
Sampleid func() null.Val[string]
|
|
|
|
|
Sampletype func() null.Val[string]
|
|
|
|
|
Sex func() null.Val[string]
|
|
|
|
|
Sitecond func() null.Val[string]
|
|
|
|
|
Species func() null.Val[string]
|
|
|
|
|
Startdatetime func() null.Val[int64]
|
|
|
|
|
Survtech func() null.Val[string]
|
|
|
|
|
Testmethod func() null.Val[string]
|
|
|
|
|
Testtech func() null.Val[string]
|
|
|
|
|
Winddir func() null.Val[string]
|
|
|
|
|
Windspeed func() null.Val[float64]
|
|
|
|
|
Zone func() null.Val[string]
|
|
|
|
|
Zone2 func() null.Val[string]
|
|
|
|
|
CreatedDate func() null.Val[int64]
|
|
|
|
|
CreatedUser func() null.Val[string]
|
|
|
|
|
GeometryX func() null.Val[float64]
|
|
|
|
|
GeometryY func() null.Val[float64]
|
|
|
|
|
LastEditedDate func() null.Val[int64]
|
|
|
|
|
LastEditedUser func() null.Val[string]
|
|
|
|
|
Updated func() time.Time
|
|
|
|
|
|
|
|
|
|
r fsSamplecollectionR
|
|
|
|
|
f *Factory
|
|
|
|
|
|
|
|
|
|
alreadyPersisted bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type fsSamplecollectionR struct {
|
|
|
|
|
Organization *fsSamplecollectionROrganizationR
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type fsSamplecollectionROrganizationR struct {
|
|
|
|
|
o *OrganizationTemplate
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Apply mods to the FSSamplecollectionTemplate
|
|
|
|
|
func (o *FSSamplecollectionTemplate) Apply(ctx context.Context, mods ...FSSamplecollectionMod) {
|
|
|
|
|
for _, mod := range mods {
|
|
|
|
|
mod.Apply(ctx, o)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// setModelRels creates and sets the relationships on *models.FSSamplecollection
|
|
|
|
|
// according to the relationships in the template. Nothing is inserted into the db
|
|
|
|
|
func (t FSSamplecollectionTemplate) setModelRels(o *models.FSSamplecollection) {
|
|
|
|
|
if t.r.Organization != nil {
|
|
|
|
|
rel := t.r.Organization.o.Build()
|
|
|
|
|
rel.R.FSSamplecollections = append(rel.R.FSSamplecollections, o)
|
2025-11-07 09:30:31 +00:00
|
|
|
o.OrganizationID = rel.ID // h2
|
2025-11-07 08:34:32 +00:00
|
|
|
o.R.Organization = rel
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BuildSetter returns an *models.FSSamplecollectionSetter
|
|
|
|
|
// this does nothing with the relationship templates
|
|
|
|
|
func (o FSSamplecollectionTemplate) BuildSetter() *models.FSSamplecollectionSetter {
|
|
|
|
|
m := &models.FSSamplecollectionSetter{}
|
|
|
|
|
|
|
|
|
|
if o.OrganizationID != nil {
|
|
|
|
|
val := o.OrganizationID()
|
2025-11-07 09:30:31 +00:00
|
|
|
m.OrganizationID = omit.From(val)
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
if o.Activity != nil {
|
|
|
|
|
val := o.Activity()
|
|
|
|
|
m.Activity = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Avetemp != nil {
|
|
|
|
|
val := o.Avetemp()
|
|
|
|
|
m.Avetemp = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Chickenid != nil {
|
|
|
|
|
val := o.Chickenid()
|
|
|
|
|
m.Chickenid = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Comments != nil {
|
|
|
|
|
val := o.Comments()
|
|
|
|
|
m.Comments = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Creationdate != nil {
|
|
|
|
|
val := o.Creationdate()
|
|
|
|
|
m.Creationdate = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Creator != nil {
|
|
|
|
|
val := o.Creator()
|
|
|
|
|
m.Creator = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Datesent != nil {
|
|
|
|
|
val := o.Datesent()
|
|
|
|
|
m.Datesent = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Datetested != nil {
|
|
|
|
|
val := o.Datetested()
|
|
|
|
|
m.Datetested = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Diseasepos != nil {
|
|
|
|
|
val := o.Diseasepos()
|
|
|
|
|
m.Diseasepos = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Diseasetested != nil {
|
|
|
|
|
val := o.Diseasetested()
|
|
|
|
|
m.Diseasetested = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Enddatetime != nil {
|
|
|
|
|
val := o.Enddatetime()
|
|
|
|
|
m.Enddatetime = 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.Fieldtech != nil {
|
|
|
|
|
val := o.Fieldtech()
|
|
|
|
|
m.Fieldtech = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Flockid != nil {
|
|
|
|
|
val := o.Flockid()
|
|
|
|
|
m.Flockid = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Gatewaysync != nil {
|
|
|
|
|
val := o.Gatewaysync()
|
|
|
|
|
m.Gatewaysync = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Globalid != nil {
|
|
|
|
|
val := o.Globalid()
|
2025-11-13 23:48:41 +00:00
|
|
|
m.Globalid = omit.From(val)
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
if o.Lab != nil {
|
|
|
|
|
val := o.Lab()
|
|
|
|
|
m.Lab = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Locationname != nil {
|
|
|
|
|
val := o.Locationname()
|
|
|
|
|
m.Locationname = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.LocID != nil {
|
|
|
|
|
val := o.LocID()
|
|
|
|
|
m.LocID = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Objectid != nil {
|
|
|
|
|
val := o.Objectid()
|
|
|
|
|
m.Objectid = omit.From(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Processed != nil {
|
|
|
|
|
val := o.Processed()
|
|
|
|
|
m.Processed = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Raingauge != nil {
|
|
|
|
|
val := o.Raingauge()
|
|
|
|
|
m.Raingauge = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Recordstatus != nil {
|
|
|
|
|
val := o.Recordstatus()
|
|
|
|
|
m.Recordstatus = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Reviewed != nil {
|
|
|
|
|
val := o.Reviewed()
|
|
|
|
|
m.Reviewed = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Reviewedby != nil {
|
|
|
|
|
val := o.Reviewedby()
|
|
|
|
|
m.Reviewedby = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Revieweddate != nil {
|
|
|
|
|
val := o.Revieweddate()
|
|
|
|
|
m.Revieweddate = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Samplecond != nil {
|
|
|
|
|
val := o.Samplecond()
|
|
|
|
|
m.Samplecond = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Samplecount != nil {
|
|
|
|
|
val := o.Samplecount()
|
|
|
|
|
m.Samplecount = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Sampleid != nil {
|
|
|
|
|
val := o.Sampleid()
|
|
|
|
|
m.Sampleid = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Sampletype != nil {
|
|
|
|
|
val := o.Sampletype()
|
|
|
|
|
m.Sampletype = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Sex != nil {
|
|
|
|
|
val := o.Sex()
|
|
|
|
|
m.Sex = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Sitecond != nil {
|
|
|
|
|
val := o.Sitecond()
|
|
|
|
|
m.Sitecond = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Species != nil {
|
|
|
|
|
val := o.Species()
|
|
|
|
|
m.Species = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Startdatetime != nil {
|
|
|
|
|
val := o.Startdatetime()
|
|
|
|
|
m.Startdatetime = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Survtech != nil {
|
|
|
|
|
val := o.Survtech()
|
|
|
|
|
m.Survtech = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Testmethod != nil {
|
|
|
|
|
val := o.Testmethod()
|
|
|
|
|
m.Testmethod = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Testtech != nil {
|
|
|
|
|
val := o.Testtech()
|
|
|
|
|
m.Testtech = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Winddir != nil {
|
|
|
|
|
val := o.Winddir()
|
|
|
|
|
m.Winddir = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Windspeed != nil {
|
|
|
|
|
val := o.Windspeed()
|
|
|
|
|
m.Windspeed = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Zone != nil {
|
|
|
|
|
val := o.Zone()
|
|
|
|
|
m.Zone = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Zone2 != nil {
|
|
|
|
|
val := o.Zone2()
|
|
|
|
|
m.Zone2 = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.CreatedDate != nil {
|
|
|
|
|
val := o.CreatedDate()
|
|
|
|
|
m.CreatedDate = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.CreatedUser != nil {
|
|
|
|
|
val := o.CreatedUser()
|
|
|
|
|
m.CreatedUser = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.GeometryX != nil {
|
|
|
|
|
val := o.GeometryX()
|
|
|
|
|
m.GeometryX = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.GeometryY != nil {
|
|
|
|
|
val := o.GeometryY()
|
|
|
|
|
m.GeometryY = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.LastEditedDate != nil {
|
|
|
|
|
val := o.LastEditedDate()
|
|
|
|
|
m.LastEditedDate = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.LastEditedUser != nil {
|
|
|
|
|
val := o.LastEditedUser()
|
|
|
|
|
m.LastEditedUser = omitnull.FromNull(val)
|
|
|
|
|
}
|
|
|
|
|
if o.Updated != nil {
|
|
|
|
|
val := o.Updated()
|
|
|
|
|
m.Updated = omit.From(val)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BuildManySetter returns an []*models.FSSamplecollectionSetter
|
|
|
|
|
// this does nothing with the relationship templates
|
|
|
|
|
func (o FSSamplecollectionTemplate) BuildManySetter(number int) []*models.FSSamplecollectionSetter {
|
|
|
|
|
m := make([]*models.FSSamplecollectionSetter, number)
|
|
|
|
|
|
|
|
|
|
for i := range m {
|
|
|
|
|
m[i] = o.BuildSetter()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Build returns an *models.FSSamplecollection
|
|
|
|
|
// Related objects are also created and placed in the .R field
|
|
|
|
|
// NOTE: Objects are not inserted into the database. Use FSSamplecollectionTemplate.Create
|
|
|
|
|
func (o FSSamplecollectionTemplate) Build() *models.FSSamplecollection {
|
|
|
|
|
m := &models.FSSamplecollection{}
|
|
|
|
|
|
|
|
|
|
if o.OrganizationID != nil {
|
|
|
|
|
m.OrganizationID = o.OrganizationID()
|
|
|
|
|
}
|
|
|
|
|
if o.Activity != nil {
|
|
|
|
|
m.Activity = o.Activity()
|
|
|
|
|
}
|
|
|
|
|
if o.Avetemp != nil {
|
|
|
|
|
m.Avetemp = o.Avetemp()
|
|
|
|
|
}
|
|
|
|
|
if o.Chickenid != nil {
|
|
|
|
|
m.Chickenid = o.Chickenid()
|
|
|
|
|
}
|
|
|
|
|
if o.Comments != nil {
|
|
|
|
|
m.Comments = o.Comments()
|
|
|
|
|
}
|
|
|
|
|
if o.Creationdate != nil {
|
|
|
|
|
m.Creationdate = o.Creationdate()
|
|
|
|
|
}
|
|
|
|
|
if o.Creator != nil {
|
|
|
|
|
m.Creator = o.Creator()
|
|
|
|
|
}
|
|
|
|
|
if o.Datesent != nil {
|
|
|
|
|
m.Datesent = o.Datesent()
|
|
|
|
|
}
|
|
|
|
|
if o.Datetested != nil {
|
|
|
|
|
m.Datetested = o.Datetested()
|
|
|
|
|
}
|
|
|
|
|
if o.Diseasepos != nil {
|
|
|
|
|
m.Diseasepos = o.Diseasepos()
|
|
|
|
|
}
|
|
|
|
|
if o.Diseasetested != nil {
|
|
|
|
|
m.Diseasetested = o.Diseasetested()
|
|
|
|
|
}
|
|
|
|
|
if o.Enddatetime != nil {
|
|
|
|
|
m.Enddatetime = o.Enddatetime()
|
|
|
|
|
}
|
|
|
|
|
if o.Editdate != nil {
|
|
|
|
|
m.Editdate = o.Editdate()
|
|
|
|
|
}
|
|
|
|
|
if o.Editor != nil {
|
|
|
|
|
m.Editor = o.Editor()
|
|
|
|
|
}
|
|
|
|
|
if o.Fieldtech != nil {
|
|
|
|
|
m.Fieldtech = o.Fieldtech()
|
|
|
|
|
}
|
|
|
|
|
if o.Flockid != nil {
|
|
|
|
|
m.Flockid = o.Flockid()
|
|
|
|
|
}
|
|
|
|
|
if o.Gatewaysync != nil {
|
|
|
|
|
m.Gatewaysync = o.Gatewaysync()
|
|
|
|
|
}
|
|
|
|
|
if o.Globalid != nil {
|
|
|
|
|
m.Globalid = o.Globalid()
|
|
|
|
|
}
|
|
|
|
|
if o.Lab != nil {
|
|
|
|
|
m.Lab = o.Lab()
|
|
|
|
|
}
|
|
|
|
|
if o.Locationname != nil {
|
|
|
|
|
m.Locationname = o.Locationname()
|
|
|
|
|
}
|
|
|
|
|
if o.LocID != nil {
|
|
|
|
|
m.LocID = o.LocID()
|
|
|
|
|
}
|
|
|
|
|
if o.Objectid != nil {
|
|
|
|
|
m.Objectid = o.Objectid()
|
|
|
|
|
}
|
|
|
|
|
if o.Processed != nil {
|
|
|
|
|
m.Processed = o.Processed()
|
|
|
|
|
}
|
|
|
|
|
if o.Raingauge != nil {
|
|
|
|
|
m.Raingauge = o.Raingauge()
|
|
|
|
|
}
|
|
|
|
|
if o.Recordstatus != nil {
|
|
|
|
|
m.Recordstatus = o.Recordstatus()
|
|
|
|
|
}
|
|
|
|
|
if o.Reviewed != nil {
|
|
|
|
|
m.Reviewed = o.Reviewed()
|
|
|
|
|
}
|
|
|
|
|
if o.Reviewedby != nil {
|
|
|
|
|
m.Reviewedby = o.Reviewedby()
|
|
|
|
|
}
|
|
|
|
|
if o.Revieweddate != nil {
|
|
|
|
|
m.Revieweddate = o.Revieweddate()
|
|
|
|
|
}
|
|
|
|
|
if o.Samplecond != nil {
|
|
|
|
|
m.Samplecond = o.Samplecond()
|
|
|
|
|
}
|
|
|
|
|
if o.Samplecount != nil {
|
|
|
|
|
m.Samplecount = o.Samplecount()
|
|
|
|
|
}
|
|
|
|
|
if o.Sampleid != nil {
|
|
|
|
|
m.Sampleid = o.Sampleid()
|
|
|
|
|
}
|
|
|
|
|
if o.Sampletype != nil {
|
|
|
|
|
m.Sampletype = o.Sampletype()
|
|
|
|
|
}
|
|
|
|
|
if o.Sex != nil {
|
|
|
|
|
m.Sex = o.Sex()
|
|
|
|
|
}
|
|
|
|
|
if o.Sitecond != nil {
|
|
|
|
|
m.Sitecond = o.Sitecond()
|
|
|
|
|
}
|
|
|
|
|
if o.Species != nil {
|
|
|
|
|
m.Species = o.Species()
|
|
|
|
|
}
|
|
|
|
|
if o.Startdatetime != nil {
|
|
|
|
|
m.Startdatetime = o.Startdatetime()
|
|
|
|
|
}
|
|
|
|
|
if o.Survtech != nil {
|
|
|
|
|
m.Survtech = o.Survtech()
|
|
|
|
|
}
|
|
|
|
|
if o.Testmethod != nil {
|
|
|
|
|
m.Testmethod = o.Testmethod()
|
|
|
|
|
}
|
|
|
|
|
if o.Testtech != nil {
|
|
|
|
|
m.Testtech = o.Testtech()
|
|
|
|
|
}
|
|
|
|
|
if o.Winddir != nil {
|
|
|
|
|
m.Winddir = o.Winddir()
|
|
|
|
|
}
|
|
|
|
|
if o.Windspeed != nil {
|
|
|
|
|
m.Windspeed = o.Windspeed()
|
|
|
|
|
}
|
|
|
|
|
if o.Zone != nil {
|
|
|
|
|
m.Zone = o.Zone()
|
|
|
|
|
}
|
|
|
|
|
if o.Zone2 != nil {
|
|
|
|
|
m.Zone2 = o.Zone2()
|
|
|
|
|
}
|
|
|
|
|
if o.CreatedDate != nil {
|
|
|
|
|
m.CreatedDate = o.CreatedDate()
|
|
|
|
|
}
|
|
|
|
|
if o.CreatedUser != nil {
|
|
|
|
|
m.CreatedUser = o.CreatedUser()
|
|
|
|
|
}
|
|
|
|
|
if o.GeometryX != nil {
|
|
|
|
|
m.GeometryX = o.GeometryX()
|
|
|
|
|
}
|
|
|
|
|
if o.GeometryY != nil {
|
|
|
|
|
m.GeometryY = o.GeometryY()
|
|
|
|
|
}
|
|
|
|
|
if o.LastEditedDate != nil {
|
|
|
|
|
m.LastEditedDate = o.LastEditedDate()
|
|
|
|
|
}
|
|
|
|
|
if o.LastEditedUser != nil {
|
|
|
|
|
m.LastEditedUser = o.LastEditedUser()
|
|
|
|
|
}
|
|
|
|
|
if o.Updated != nil {
|
|
|
|
|
m.Updated = o.Updated()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
o.setModelRels(m)
|
|
|
|
|
|
|
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// BuildMany returns an models.FSSamplecollectionSlice
|
|
|
|
|
// Related objects are also created and placed in the .R field
|
|
|
|
|
// NOTE: Objects are not inserted into the database. Use FSSamplecollectionTemplate.CreateMany
|
|
|
|
|
func (o FSSamplecollectionTemplate) BuildMany(number int) models.FSSamplecollectionSlice {
|
|
|
|
|
m := make(models.FSSamplecollectionSlice, number)
|
|
|
|
|
|
|
|
|
|
for i := range m {
|
|
|
|
|
m[i] = o.Build()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func ensureCreatableFSSamplecollection(m *models.FSSamplecollectionSetter) {
|
2025-11-07 09:30:31 +00:00
|
|
|
if !(m.OrganizationID.IsValue()) {
|
|
|
|
|
val := random_int32(nil)
|
|
|
|
|
m.OrganizationID = omit.From(val)
|
|
|
|
|
}
|
2025-11-13 23:48:41 +00:00
|
|
|
if !(m.Globalid.IsValue()) {
|
|
|
|
|
val := random_string(nil)
|
|
|
|
|
m.Globalid = omit.From(val)
|
|
|
|
|
}
|
2025-11-07 08:34:32 +00:00
|
|
|
if !(m.Objectid.IsValue()) {
|
|
|
|
|
val := random_int32(nil)
|
|
|
|
|
m.Objectid = omit.From(val)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// insertOptRels creates and inserts any optional the relationships on *models.FSSamplecollection
|
|
|
|
|
// according to the relationships in the template.
|
|
|
|
|
// any required relationship should have already exist on the model
|
|
|
|
|
func (o *FSSamplecollectionTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FSSamplecollection) error {
|
|
|
|
|
var err error
|
|
|
|
|
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Create builds a fsSamplecollection and inserts it into the database
|
|
|
|
|
// Relations objects are also inserted and placed in the .R field
|
|
|
|
|
func (o *FSSamplecollectionTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FSSamplecollection, error) {
|
|
|
|
|
var err error
|
|
|
|
|
opt := o.BuildSetter()
|
|
|
|
|
ensureCreatableFSSamplecollection(opt)
|
|
|
|
|
|
2025-11-07 09:30:31 +00:00
|
|
|
if o.r.Organization == nil {
|
|
|
|
|
FSSamplecollectionMods.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)
|
|
|
|
|
|
2025-11-07 08:34:32 +00:00
|
|
|
m, err := models.FSSamplecollections.Insert(opt).One(ctx, exec)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-07 09:30:31 +00:00
|
|
|
m.R.Organization = rel0
|
|
|
|
|
|
2025-11-07 08:34:32 +00:00
|
|
|
if err := o.insertOptRels(ctx, exec, m); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return m, err
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MustCreate builds a fsSamplecollection and inserts it into the database
|
|
|
|
|
// Relations objects are also inserted and placed in the .R field
|
|
|
|
|
// panics if an error occurs
|
|
|
|
|
func (o *FSSamplecollectionTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FSSamplecollection {
|
|
|
|
|
m, err := o.Create(ctx, exec)
|
|
|
|
|
if err != nil {
|
|
|
|
|
panic(err)
|
|
|
|
|
}
|
|
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CreateOrFail builds a fsSamplecollection 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 *FSSamplecollectionTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FSSamplecollection {
|
|
|
|
|
tb.Helper()
|
|
|
|
|
m, err := o.Create(ctx, exec)
|
|
|
|
|
if err != nil {
|
|
|
|
|
tb.Fatal(err)
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CreateMany builds multiple fsSamplecollections and inserts them into the database
|
|
|
|
|
// Relations objects are also inserted and placed in the .R field
|
|
|
|
|
func (o FSSamplecollectionTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FSSamplecollectionSlice, error) {
|
|
|
|
|
var err error
|
|
|
|
|
m := make(models.FSSamplecollectionSlice, number)
|
|
|
|
|
|
|
|
|
|
for i := range m {
|
|
|
|
|
m[i], err = o.Create(ctx, exec)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return m, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MustCreateMany builds multiple fsSamplecollections and inserts them into the database
|
|
|
|
|
// Relations objects are also inserted and placed in the .R field
|
|
|
|
|
// panics if an error occurs
|
|
|
|
|
func (o FSSamplecollectionTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FSSamplecollectionSlice {
|
|
|
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
|
|
|
if err != nil {
|
|
|
|
|
panic(err)
|
|
|
|
|
}
|
|
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CreateManyOrFail builds multiple fsSamplecollections 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 FSSamplecollectionTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FSSamplecollectionSlice {
|
|
|
|
|
tb.Helper()
|
|
|
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
|
|
|
if err != nil {
|
|
|
|
|
tb.Fatal(err)
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
return m
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// FSSamplecollection has methods that act as mods for the FSSamplecollectionTemplate
|
|
|
|
|
var FSSamplecollectionMods fsSamplecollectionMods
|
|
|
|
|
|
|
|
|
|
type fsSamplecollectionMods struct{}
|
|
|
|
|
|
|
|
|
|
func (m fsSamplecollectionMods) RandomizeAllColumns(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModSlice{
|
|
|
|
|
FSSamplecollectionMods.RandomOrganizationID(f),
|
|
|
|
|
FSSamplecollectionMods.RandomActivity(f),
|
|
|
|
|
FSSamplecollectionMods.RandomAvetemp(f),
|
|
|
|
|
FSSamplecollectionMods.RandomChickenid(f),
|
|
|
|
|
FSSamplecollectionMods.RandomComments(f),
|
|
|
|
|
FSSamplecollectionMods.RandomCreationdate(f),
|
|
|
|
|
FSSamplecollectionMods.RandomCreator(f),
|
|
|
|
|
FSSamplecollectionMods.RandomDatesent(f),
|
|
|
|
|
FSSamplecollectionMods.RandomDatetested(f),
|
|
|
|
|
FSSamplecollectionMods.RandomDiseasepos(f),
|
|
|
|
|
FSSamplecollectionMods.RandomDiseasetested(f),
|
|
|
|
|
FSSamplecollectionMods.RandomEnddatetime(f),
|
|
|
|
|
FSSamplecollectionMods.RandomEditdate(f),
|
|
|
|
|
FSSamplecollectionMods.RandomEditor(f),
|
|
|
|
|
FSSamplecollectionMods.RandomFieldtech(f),
|
|
|
|
|
FSSamplecollectionMods.RandomFlockid(f),
|
|
|
|
|
FSSamplecollectionMods.RandomGatewaysync(f),
|
|
|
|
|
FSSamplecollectionMods.RandomGlobalid(f),
|
|
|
|
|
FSSamplecollectionMods.RandomLab(f),
|
|
|
|
|
FSSamplecollectionMods.RandomLocationname(f),
|
|
|
|
|
FSSamplecollectionMods.RandomLocID(f),
|
|
|
|
|
FSSamplecollectionMods.RandomObjectid(f),
|
|
|
|
|
FSSamplecollectionMods.RandomProcessed(f),
|
|
|
|
|
FSSamplecollectionMods.RandomRaingauge(f),
|
|
|
|
|
FSSamplecollectionMods.RandomRecordstatus(f),
|
|
|
|
|
FSSamplecollectionMods.RandomReviewed(f),
|
|
|
|
|
FSSamplecollectionMods.RandomReviewedby(f),
|
|
|
|
|
FSSamplecollectionMods.RandomRevieweddate(f),
|
|
|
|
|
FSSamplecollectionMods.RandomSamplecond(f),
|
|
|
|
|
FSSamplecollectionMods.RandomSamplecount(f),
|
|
|
|
|
FSSamplecollectionMods.RandomSampleid(f),
|
|
|
|
|
FSSamplecollectionMods.RandomSampletype(f),
|
|
|
|
|
FSSamplecollectionMods.RandomSex(f),
|
|
|
|
|
FSSamplecollectionMods.RandomSitecond(f),
|
|
|
|
|
FSSamplecollectionMods.RandomSpecies(f),
|
|
|
|
|
FSSamplecollectionMods.RandomStartdatetime(f),
|
|
|
|
|
FSSamplecollectionMods.RandomSurvtech(f),
|
|
|
|
|
FSSamplecollectionMods.RandomTestmethod(f),
|
|
|
|
|
FSSamplecollectionMods.RandomTesttech(f),
|
|
|
|
|
FSSamplecollectionMods.RandomWinddir(f),
|
|
|
|
|
FSSamplecollectionMods.RandomWindspeed(f),
|
|
|
|
|
FSSamplecollectionMods.RandomZone(f),
|
|
|
|
|
FSSamplecollectionMods.RandomZone2(f),
|
|
|
|
|
FSSamplecollectionMods.RandomCreatedDate(f),
|
|
|
|
|
FSSamplecollectionMods.RandomCreatedUser(f),
|
|
|
|
|
FSSamplecollectionMods.RandomGeometryX(f),
|
|
|
|
|
FSSamplecollectionMods.RandomGeometryY(f),
|
|
|
|
|
FSSamplecollectionMods.RandomLastEditedDate(f),
|
|
|
|
|
FSSamplecollectionMods.RandomLastEditedUser(f),
|
|
|
|
|
FSSamplecollectionMods.RandomUpdated(f),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
2025-11-07 09:30:31 +00:00
|
|
|
func (m fsSamplecollectionMods) OrganizationID(val int32) FSSamplecollectionMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
2025-11-07 09:30:31 +00:00
|
|
|
o.OrganizationID = func() int32 { return val }
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
2025-11-07 09:30:31 +00:00
|
|
|
func (m fsSamplecollectionMods) OrganizationIDFunc(f func() int32) FSSamplecollectionMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.OrganizationID = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetOrganizationID() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomOrganizationID(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
2025-11-07 09:30:31 +00:00
|
|
|
o.OrganizationID = func() int32 {
|
|
|
|
|
return random_int32(f)
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Activity(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Activity = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) ActivityFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Activity = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetActivity() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Activity = 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 fsSamplecollectionMods) RandomActivity(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Activity = 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 fsSamplecollectionMods) RandomActivityNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Activity = 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 fsSamplecollectionMods) Avetemp(val null.Val[float64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Avetemp = func() null.Val[float64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) AvetempFunc(f func() null.Val[float64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Avetemp = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetAvetemp() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Avetemp = 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 fsSamplecollectionMods) RandomAvetemp(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Avetemp = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomAvetempNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Avetemp = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Chickenid(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Chickenid = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) ChickenidFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Chickenid = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetChickenid() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Chickenid = 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 fsSamplecollectionMods) RandomChickenid(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Chickenid = 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 fsSamplecollectionMods) RandomChickenidNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Chickenid = 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 fsSamplecollectionMods) Comments(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Comments = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) CommentsFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Comments = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetComments() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomComments(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Comments = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomCommentsNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Comments = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Creationdate(val null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Creationdate = func() null.Val[int64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) CreationdateFunc(f func() null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Creationdate = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetCreationdate() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomCreationdate(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Creationdate = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomCreationdateNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Creationdate = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Creator(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Creator = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) CreatorFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Creator = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetCreator() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomCreator(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Creator = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomCreatorNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Creator = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Datesent(val null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Datesent = func() null.Val[int64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) DatesentFunc(f func() null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Datesent = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetDatesent() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomDatesent(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Datesent = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomDatesentNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Datesent = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Datetested(val null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Datetested = func() null.Val[int64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) DatetestedFunc(f func() null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Datetested = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetDatetested() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomDatetested(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Datetested = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomDatetestedNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Datetested = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Diseasepos(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Diseasepos = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) DiseaseposFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Diseasepos = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetDiseasepos() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomDiseasepos(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Diseasepos = 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 fsSamplecollectionMods) RandomDiseaseposNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Diseasepos = 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 fsSamplecollectionMods) Diseasetested(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Diseasetested = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) DiseasetestedFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Diseasetested = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetDiseasetested() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomDiseasetested(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Diseasetested = 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 fsSamplecollectionMods) RandomDiseasetestedNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Diseasetested = 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 fsSamplecollectionMods) Enddatetime(val null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Enddatetime = func() null.Val[int64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) EnddatetimeFunc(f func() null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Enddatetime = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetEnddatetime() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Enddatetime = 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 fsSamplecollectionMods) RandomEnddatetime(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Enddatetime = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomEnddatetimeNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Enddatetime = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Editdate(val null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Editdate = func() null.Val[int64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) EditdateFunc(f func() null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Editdate = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetEditdate() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomEditdate(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Editdate = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomEditdateNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Editdate = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Editor(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Editor = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) EditorFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Editor = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetEditor() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomEditor(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Editor = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomEditorNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Editor = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Fieldtech(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Fieldtech = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) FieldtechFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Fieldtech = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetFieldtech() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Fieldtech = 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 fsSamplecollectionMods) RandomFieldtech(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Fieldtech = 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 fsSamplecollectionMods) RandomFieldtechNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Fieldtech = 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 fsSamplecollectionMods) Flockid(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Flockid = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) FlockidFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Flockid = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetFlockid() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Flockid = 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 fsSamplecollectionMods) RandomFlockid(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Flockid = 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 fsSamplecollectionMods) RandomFlockidNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Flockid = 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 fsSamplecollectionMods) Gatewaysync(val null.Val[int16]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Gatewaysync = func() null.Val[int16] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) GatewaysyncFunc(f func() null.Val[int16]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Gatewaysync = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetGatewaysync() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomGatewaysync(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomGatewaysyncNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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
|
2025-11-13 23:48:41 +00:00
|
|
|
func (m fsSamplecollectionMods) Globalid(val string) FSSamplecollectionMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
2025-11-13 23:48:41 +00:00
|
|
|
o.Globalid = func() string { return val }
|
2025-11-07 08:34:32 +00:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
2025-11-13 23:48:41 +00:00
|
|
|
func (m fsSamplecollectionMods) GlobalidFunc(f func() string) FSSamplecollectionMod {
|
2025-11-07 08:34:32 +00:00
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Globalid = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetGlobalid() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomGlobalid(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
2025-11-13 23:48:41 +00:00
|
|
|
o.Globalid = func() string {
|
|
|
|
|
return random_string(f)
|
2025-11-07 08:34:32 +00:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Lab(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Lab = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) LabFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Lab = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetLab() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomLab(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Lab = 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 fsSamplecollectionMods) RandomLabNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Lab = 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 fsSamplecollectionMods) Locationname(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Locationname = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) LocationnameFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Locationname = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetLocationname() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Locationname = 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 fsSamplecollectionMods) RandomLocationname(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Locationname = 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 fsSamplecollectionMods) RandomLocationnameNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Locationname = 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 fsSamplecollectionMods) LocID(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LocID = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) LocIDFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LocID = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetLocID() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LocID = 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 fsSamplecollectionMods) RandomLocID(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LocID = 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 fsSamplecollectionMods) RandomLocIDNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LocID = 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 fsSamplecollectionMods) Objectid(val int32) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Objectid = func() int32 { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) ObjectidFunc(f func() int32) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Objectid = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetObjectid() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomObjectid(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Objectid = func() int32 {
|
|
|
|
|
return random_int32(f)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Processed(val null.Val[int16]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Processed = func() null.Val[int16] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) ProcessedFunc(f func() null.Val[int16]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Processed = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetProcessed() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomProcessed(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomProcessedNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) Raingauge(val null.Val[float64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Raingauge = func() null.Val[float64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) RaingaugeFunc(f func() null.Val[float64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Raingauge = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetRaingauge() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Raingauge = 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 fsSamplecollectionMods) RandomRaingauge(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Raingauge = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomRaingaugeNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Raingauge = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Recordstatus(val null.Val[int16]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Recordstatus = func() null.Val[int16] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) RecordstatusFunc(f func() null.Val[int16]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Recordstatus = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetRecordstatus() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Recordstatus = 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 fsSamplecollectionMods) RandomRecordstatus(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Recordstatus = 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 fsSamplecollectionMods) RandomRecordstatusNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Recordstatus = 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 fsSamplecollectionMods) Reviewed(val null.Val[int16]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Reviewed = func() null.Val[int16] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) ReviewedFunc(f func() null.Val[int16]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Reviewed = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetReviewed() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Reviewed = 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 fsSamplecollectionMods) RandomReviewed(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Reviewed = 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 fsSamplecollectionMods) RandomReviewedNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Reviewed = 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 fsSamplecollectionMods) Reviewedby(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Reviewedby = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) ReviewedbyFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Reviewedby = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetReviewedby() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Reviewedby = 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 fsSamplecollectionMods) RandomReviewedby(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Reviewedby = 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 fsSamplecollectionMods) RandomReviewedbyNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Reviewedby = 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 fsSamplecollectionMods) Revieweddate(val null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Revieweddate = func() null.Val[int64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) RevieweddateFunc(f func() null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Revieweddate = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetRevieweddate() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Revieweddate = 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 fsSamplecollectionMods) RandomRevieweddate(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Revieweddate = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomRevieweddateNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Revieweddate = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Samplecond(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Samplecond = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) SamplecondFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Samplecond = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetSamplecond() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Samplecond = 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 fsSamplecollectionMods) RandomSamplecond(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Samplecond = 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 fsSamplecollectionMods) RandomSamplecondNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Samplecond = 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 fsSamplecollectionMods) Samplecount(val null.Val[int16]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Samplecount = func() null.Val[int16] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) SamplecountFunc(f func() null.Val[int16]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Samplecount = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetSamplecount() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Samplecount = 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 fsSamplecollectionMods) RandomSamplecount(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Samplecount = 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 fsSamplecollectionMods) RandomSamplecountNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Samplecount = 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 fsSamplecollectionMods) Sampleid(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sampleid = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) SampleidFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sampleid = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetSampleid() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomSampleid(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sampleid = 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 fsSamplecollectionMods) RandomSampleidNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sampleid = 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 fsSamplecollectionMods) Sampletype(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sampletype = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) SampletypeFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sampletype = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetSampletype() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sampletype = 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 fsSamplecollectionMods) RandomSampletype(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sampletype = 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 fsSamplecollectionMods) RandomSampletypeNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sampletype = 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 fsSamplecollectionMods) Sex(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sex = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) SexFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sex = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetSex() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sex = 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 fsSamplecollectionMods) RandomSex(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sex = 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 fsSamplecollectionMods) RandomSexNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sex = 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 fsSamplecollectionMods) Sitecond(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sitecond = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) SitecondFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sitecond = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetSitecond() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sitecond = 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 fsSamplecollectionMods) RandomSitecond(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sitecond = 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 fsSamplecollectionMods) RandomSitecondNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Sitecond = 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 fsSamplecollectionMods) Species(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Species = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) SpeciesFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Species = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetSpecies() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Species = 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 fsSamplecollectionMods) RandomSpecies(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Species = 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 fsSamplecollectionMods) RandomSpeciesNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Species = 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 fsSamplecollectionMods) Startdatetime(val null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Startdatetime = func() null.Val[int64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) StartdatetimeFunc(f func() null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Startdatetime = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetStartdatetime() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Startdatetime = 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 fsSamplecollectionMods) RandomStartdatetime(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Startdatetime = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomStartdatetimeNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Startdatetime = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Survtech(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Survtech = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) SurvtechFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Survtech = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetSurvtech() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomSurvtech(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Survtech = 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 fsSamplecollectionMods) RandomSurvtechNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Survtech = 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 fsSamplecollectionMods) Testmethod(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Testmethod = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) TestmethodFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Testmethod = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetTestmethod() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomTestmethod(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Testmethod = 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 fsSamplecollectionMods) RandomTestmethodNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Testmethod = 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 fsSamplecollectionMods) Testtech(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Testtech = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) TesttechFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Testtech = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetTesttech() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomTesttech(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Testtech = 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 fsSamplecollectionMods) RandomTesttechNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Testtech = 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 fsSamplecollectionMods) Winddir(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Winddir = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) WinddirFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Winddir = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetWinddir() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Winddir = 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 fsSamplecollectionMods) RandomWinddir(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Winddir = 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 fsSamplecollectionMods) RandomWinddirNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Winddir = 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 fsSamplecollectionMods) Windspeed(val null.Val[float64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Windspeed = func() null.Val[float64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) WindspeedFunc(f func() null.Val[float64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Windspeed = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetWindspeed() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Windspeed = 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 fsSamplecollectionMods) RandomWindspeed(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Windspeed = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomWindspeedNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Windspeed = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Zone(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Zone = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) ZoneFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Zone = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetZone() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Zone = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomZone(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Zone = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomZoneNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Zone = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Zone2(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Zone2 = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) Zone2Func(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Zone2 = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetZone2() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Zone2 = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomZone2(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Zone2 = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomZone2NotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Zone2 = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) CreatedDate(val null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.CreatedDate = func() null.Val[int64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) CreatedDateFunc(f func() null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.CreatedDate = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetCreatedDate() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomCreatedDate(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.CreatedDate = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomCreatedDateNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.CreatedDate = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) CreatedUser(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.CreatedUser = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) CreatedUserFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.CreatedUser = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetCreatedUser() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomCreatedUser(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.CreatedUser = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomCreatedUserNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.CreatedUser = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) GeometryX(val null.Val[float64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.GeometryX = func() null.Val[float64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) GeometryXFunc(f func() null.Val[float64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.GeometryX = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetGeometryX() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.GeometryX = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomGeometryX(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.GeometryX = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomGeometryXNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.GeometryX = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) GeometryY(val null.Val[float64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.GeometryY = func() null.Val[float64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) GeometryYFunc(f func() null.Val[float64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.GeometryY = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetGeometryY() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.GeometryY = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is sometimes null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomGeometryY(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.GeometryY = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomGeometryYNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.GeometryY = func() null.Val[float64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_float64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) LastEditedDate(val null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LastEditedDate = func() null.Val[int64] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) LastEditedDateFunc(f func() null.Val[int64]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LastEditedDate = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetLastEditedDate() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomLastEditedDate(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LastEditedDate = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomLastEditedDateNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LastEditedDate = func() null.Val[int64] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_int64(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) LastEditedUser(val null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LastEditedUser = func() null.Val[string] { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) LastEditedUserFunc(f func() null.Val[string]) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LastEditedUser = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetLastEditedUser() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
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 fsSamplecollectionMods) RandomLastEditedUser(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LastEditedUser = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
// The generated value is never null
|
|
|
|
|
func (m fsSamplecollectionMods) RandomLastEditedUserNotNull(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.LastEditedUser = func() null.Val[string] {
|
|
|
|
|
if f == nil {
|
|
|
|
|
f = &defaultFaker
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val := random_string(f)
|
|
|
|
|
return null.From(val)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the model columns to this value
|
|
|
|
|
func (m fsSamplecollectionMods) Updated(val time.Time) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Updated = func() time.Time { return val }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Set the Column from the function
|
|
|
|
|
func (m fsSamplecollectionMods) UpdatedFunc(f func() time.Time) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Updated = f
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Clear any values for the column
|
|
|
|
|
func (m fsSamplecollectionMods) UnsetUpdated() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Updated = nil
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Generates a random value for the column using the given faker
|
|
|
|
|
// if faker is nil, a default faker is used
|
|
|
|
|
func (m fsSamplecollectionMods) RandomUpdated(f *faker.Faker) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(_ context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.Updated = func() time.Time {
|
|
|
|
|
return random_time_Time(f)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m fsSamplecollectionMods) WithParentsCascading() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(ctx context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
if isDone, _ := fsSamplecollectionWithParentsCascadingCtx.Value(ctx); isDone {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
ctx = fsSamplecollectionWithParentsCascadingCtx.WithValue(ctx, true)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
|
|
|
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m fsSamplecollectionMods) WithOrganization(rel *OrganizationTemplate) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(ctx context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.r.Organization = &fsSamplecollectionROrganizationR{
|
|
|
|
|
o: rel,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m fsSamplecollectionMods) WithNewOrganization(mods ...OrganizationMod) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(ctx context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
related := o.f.NewOrganizationWithContext(ctx, mods...)
|
|
|
|
|
|
|
|
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m fsSamplecollectionMods) WithExistingOrganization(em *models.Organization) FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(ctx context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.r.Organization = &fsSamplecollectionROrganizationR{
|
|
|
|
|
o: o.f.FromExistingOrganization(em),
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m fsSamplecollectionMods) WithoutOrganization() FSSamplecollectionMod {
|
|
|
|
|
return FSSamplecollectionModFunc(func(ctx context.Context, o *FSSamplecollectionTemplate) {
|
|
|
|
|
o.r.Organization = nil
|
|
|
|
|
})
|
|
|
|
|
}
|