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