We need the org ID so that we can avoid bleedover between different organizations.
3144 lines
95 KiB
Go
3144 lines
95 KiB
Go
// Code generated by BobGen psql v0.41.1. DO NOT EDIT.
|
|
// This file is meant to be re-generated in place and/or deleted at any time.
|
|
|
|
package factory
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
"time"
|
|
|
|
models "github.com/Gleipnir-Technology/nidus-sync/models"
|
|
"github.com/aarondl/opt/null"
|
|
"github.com/aarondl/opt/omit"
|
|
"github.com/aarondl/opt/omitnull"
|
|
"github.com/jaswdr/faker/v2"
|
|
"github.com/stephenafamo/bob"
|
|
)
|
|
|
|
type HistoryTrapdatumMod interface {
|
|
Apply(context.Context, *HistoryTrapdatumTemplate)
|
|
}
|
|
|
|
type HistoryTrapdatumModFunc func(context.Context, *HistoryTrapdatumTemplate)
|
|
|
|
func (f HistoryTrapdatumModFunc) Apply(ctx context.Context, n *HistoryTrapdatumTemplate) {
|
|
f(ctx, n)
|
|
}
|
|
|
|
type HistoryTrapdatumModSlice []HistoryTrapdatumMod
|
|
|
|
func (mods HistoryTrapdatumModSlice) Apply(ctx context.Context, n *HistoryTrapdatumTemplate) {
|
|
for _, f := range mods {
|
|
f.Apply(ctx, n)
|
|
}
|
|
}
|
|
|
|
// HistoryTrapdatumTemplate is an object representing the database table.
|
|
// all columns are optional and should be set by mods
|
|
type HistoryTrapdatumTemplate struct {
|
|
OrganizationID func() int32
|
|
Avetemp func() null.Val[float64]
|
|
Comments func() null.Val[string]
|
|
Creationdate func() null.Val[int64]
|
|
Creator func() null.Val[string]
|
|
Enddatetime func() null.Val[int64]
|
|
Editdate func() null.Val[int64]
|
|
Editor func() null.Val[string]
|
|
Fieldtech func() null.Val[string]
|
|
Field func() null.Val[int64]
|
|
Gatewaysync func() null.Val[int16]
|
|
Globalid func() null.Val[string]
|
|
Idbytech func() null.Val[string]
|
|
Locationname func() null.Val[string]
|
|
LocID func() null.Val[string]
|
|
LR func() null.Val[int16]
|
|
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]
|
|
Sitecond func() null.Val[string]
|
|
Sortbytech func() null.Val[string]
|
|
Srid func() null.Val[string]
|
|
Startdatetime func() null.Val[int64]
|
|
Trapactivitytype func() null.Val[string]
|
|
Trapcondition func() null.Val[string]
|
|
Trapnights func() null.Val[int16]
|
|
Traptype func() null.Val[string]
|
|
Voltage func() null.Val[float64]
|
|
Winddir func() null.Val[string]
|
|
Windspeed func() null.Val[float64]
|
|
Zone func() null.Val[string]
|
|
Zone2 func() null.Val[string]
|
|
Created func() null.Val[time.Time]
|
|
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]
|
|
Lure func() null.Val[string]
|
|
Vectorsurvtrapdataid func() null.Val[string]
|
|
Vectorsurvtraplocationid func() null.Val[string]
|
|
Version func() int32
|
|
|
|
r historyTrapdatumR
|
|
f *Factory
|
|
|
|
alreadyPersisted bool
|
|
}
|
|
|
|
type historyTrapdatumR struct {
|
|
Organization *historyTrapdatumROrganizationR
|
|
}
|
|
|
|
type historyTrapdatumROrganizationR struct {
|
|
o *OrganizationTemplate
|
|
}
|
|
|
|
// Apply mods to the HistoryTrapdatumTemplate
|
|
func (o *HistoryTrapdatumTemplate) Apply(ctx context.Context, mods ...HistoryTrapdatumMod) {
|
|
for _, mod := range mods {
|
|
mod.Apply(ctx, o)
|
|
}
|
|
}
|
|
|
|
// setModelRels creates and sets the relationships on *models.HistoryTrapdatum
|
|
// according to the relationships in the template. Nothing is inserted into the db
|
|
func (t HistoryTrapdatumTemplate) setModelRels(o *models.HistoryTrapdatum) {
|
|
if t.r.Organization != nil {
|
|
rel := t.r.Organization.o.Build()
|
|
rel.R.HistoryTrapdata = append(rel.R.HistoryTrapdata, o)
|
|
o.OrganizationID = rel.ID // h2
|
|
o.R.Organization = rel
|
|
}
|
|
}
|
|
|
|
// BuildSetter returns an *models.HistoryTrapdatumSetter
|
|
// this does nothing with the relationship templates
|
|
func (o HistoryTrapdatumTemplate) BuildSetter() *models.HistoryTrapdatumSetter {
|
|
m := &models.HistoryTrapdatumSetter{}
|
|
|
|
if o.OrganizationID != nil {
|
|
val := o.OrganizationID()
|
|
m.OrganizationID = omit.From(val)
|
|
}
|
|
if o.Avetemp != nil {
|
|
val := o.Avetemp()
|
|
m.Avetemp = 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.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.Field != nil {
|
|
val := o.Field()
|
|
m.Field = 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.Idbytech != nil {
|
|
val := o.Idbytech()
|
|
m.Idbytech = 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.LR != nil {
|
|
val := o.LR()
|
|
m.LR = 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.Sitecond != nil {
|
|
val := o.Sitecond()
|
|
m.Sitecond = omitnull.FromNull(val)
|
|
}
|
|
if o.Sortbytech != nil {
|
|
val := o.Sortbytech()
|
|
m.Sortbytech = omitnull.FromNull(val)
|
|
}
|
|
if o.Srid != nil {
|
|
val := o.Srid()
|
|
m.Srid = omitnull.FromNull(val)
|
|
}
|
|
if o.Startdatetime != nil {
|
|
val := o.Startdatetime()
|
|
m.Startdatetime = omitnull.FromNull(val)
|
|
}
|
|
if o.Trapactivitytype != nil {
|
|
val := o.Trapactivitytype()
|
|
m.Trapactivitytype = omitnull.FromNull(val)
|
|
}
|
|
if o.Trapcondition != nil {
|
|
val := o.Trapcondition()
|
|
m.Trapcondition = omitnull.FromNull(val)
|
|
}
|
|
if o.Trapnights != nil {
|
|
val := o.Trapnights()
|
|
m.Trapnights = omitnull.FromNull(val)
|
|
}
|
|
if o.Traptype != nil {
|
|
val := o.Traptype()
|
|
m.Traptype = omitnull.FromNull(val)
|
|
}
|
|
if o.Voltage != nil {
|
|
val := o.Voltage()
|
|
m.Voltage = omitnull.FromNull(val)
|
|
}
|
|
if o.Winddir != nil {
|
|
val := o.Winddir()
|
|
m.Winddir = omitnull.FromNull(val)
|
|
}
|
|
if o.Windspeed != nil {
|
|
val := o.Windspeed()
|
|
m.Windspeed = omitnull.FromNull(val)
|
|
}
|
|
if o.Zone != nil {
|
|
val := o.Zone()
|
|
m.Zone = omitnull.FromNull(val)
|
|
}
|
|
if o.Zone2 != nil {
|
|
val := o.Zone2()
|
|
m.Zone2 = omitnull.FromNull(val)
|
|
}
|
|
if o.Created != nil {
|
|
val := o.Created()
|
|
m.Created = omitnull.FromNull(val)
|
|
}
|
|
if o.CreatedDate != nil {
|
|
val := o.CreatedDate()
|
|
m.CreatedDate = omitnull.FromNull(val)
|
|
}
|
|
if o.CreatedUser != nil {
|
|
val := o.CreatedUser()
|
|
m.CreatedUser = omitnull.FromNull(val)
|
|
}
|
|
if o.GeometryX != nil {
|
|
val := o.GeometryX()
|
|
m.GeometryX = omitnull.FromNull(val)
|
|
}
|
|
if o.GeometryY != nil {
|
|
val := o.GeometryY()
|
|
m.GeometryY = omitnull.FromNull(val)
|
|
}
|
|
if o.LastEditedDate != nil {
|
|
val := o.LastEditedDate()
|
|
m.LastEditedDate = omitnull.FromNull(val)
|
|
}
|
|
if o.LastEditedUser != nil {
|
|
val := o.LastEditedUser()
|
|
m.LastEditedUser = omitnull.FromNull(val)
|
|
}
|
|
if o.Lure != nil {
|
|
val := o.Lure()
|
|
m.Lure = omitnull.FromNull(val)
|
|
}
|
|
if o.Vectorsurvtrapdataid != nil {
|
|
val := o.Vectorsurvtrapdataid()
|
|
m.Vectorsurvtrapdataid = omitnull.FromNull(val)
|
|
}
|
|
if o.Vectorsurvtraplocationid != nil {
|
|
val := o.Vectorsurvtraplocationid()
|
|
m.Vectorsurvtraplocationid = omitnull.FromNull(val)
|
|
}
|
|
if o.Version != nil {
|
|
val := o.Version()
|
|
m.Version = omit.From(val)
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildManySetter returns an []*models.HistoryTrapdatumSetter
|
|
// this does nothing with the relationship templates
|
|
func (o HistoryTrapdatumTemplate) BuildManySetter(number int) []*models.HistoryTrapdatumSetter {
|
|
m := make([]*models.HistoryTrapdatumSetter, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.BuildSetter()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// Build returns an *models.HistoryTrapdatum
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use HistoryTrapdatumTemplate.Create
|
|
func (o HistoryTrapdatumTemplate) Build() *models.HistoryTrapdatum {
|
|
m := &models.HistoryTrapdatum{}
|
|
|
|
if o.OrganizationID != nil {
|
|
m.OrganizationID = o.OrganizationID()
|
|
}
|
|
if o.Avetemp != nil {
|
|
m.Avetemp = o.Avetemp()
|
|
}
|
|
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.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.Field != nil {
|
|
m.Field = o.Field()
|
|
}
|
|
if o.Gatewaysync != nil {
|
|
m.Gatewaysync = o.Gatewaysync()
|
|
}
|
|
if o.Globalid != nil {
|
|
m.Globalid = o.Globalid()
|
|
}
|
|
if o.Idbytech != nil {
|
|
m.Idbytech = o.Idbytech()
|
|
}
|
|
if o.Locationname != nil {
|
|
m.Locationname = o.Locationname()
|
|
}
|
|
if o.LocID != nil {
|
|
m.LocID = o.LocID()
|
|
}
|
|
if o.LR != nil {
|
|
m.LR = o.LR()
|
|
}
|
|
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.Sitecond != nil {
|
|
m.Sitecond = o.Sitecond()
|
|
}
|
|
if o.Sortbytech != nil {
|
|
m.Sortbytech = o.Sortbytech()
|
|
}
|
|
if o.Srid != nil {
|
|
m.Srid = o.Srid()
|
|
}
|
|
if o.Startdatetime != nil {
|
|
m.Startdatetime = o.Startdatetime()
|
|
}
|
|
if o.Trapactivitytype != nil {
|
|
m.Trapactivitytype = o.Trapactivitytype()
|
|
}
|
|
if o.Trapcondition != nil {
|
|
m.Trapcondition = o.Trapcondition()
|
|
}
|
|
if o.Trapnights != nil {
|
|
m.Trapnights = o.Trapnights()
|
|
}
|
|
if o.Traptype != nil {
|
|
m.Traptype = o.Traptype()
|
|
}
|
|
if o.Voltage != nil {
|
|
m.Voltage = o.Voltage()
|
|
}
|
|
if o.Winddir != nil {
|
|
m.Winddir = o.Winddir()
|
|
}
|
|
if o.Windspeed != nil {
|
|
m.Windspeed = o.Windspeed()
|
|
}
|
|
if o.Zone != nil {
|
|
m.Zone = o.Zone()
|
|
}
|
|
if o.Zone2 != nil {
|
|
m.Zone2 = o.Zone2()
|
|
}
|
|
if o.Created != nil {
|
|
m.Created = o.Created()
|
|
}
|
|
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.Lure != nil {
|
|
m.Lure = o.Lure()
|
|
}
|
|
if o.Vectorsurvtrapdataid != nil {
|
|
m.Vectorsurvtrapdataid = o.Vectorsurvtrapdataid()
|
|
}
|
|
if o.Vectorsurvtraplocationid != nil {
|
|
m.Vectorsurvtraplocationid = o.Vectorsurvtraplocationid()
|
|
}
|
|
if o.Version != nil {
|
|
m.Version = o.Version()
|
|
}
|
|
|
|
o.setModelRels(m)
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildMany returns an models.HistoryTrapdatumSlice
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use HistoryTrapdatumTemplate.CreateMany
|
|
func (o HistoryTrapdatumTemplate) BuildMany(number int) models.HistoryTrapdatumSlice {
|
|
m := make(models.HistoryTrapdatumSlice, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.Build()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
func ensureCreatableHistoryTrapdatum(m *models.HistoryTrapdatumSetter) {
|
|
if !(m.OrganizationID.IsValue()) {
|
|
val := random_int32(nil)
|
|
m.OrganizationID = omit.From(val)
|
|
}
|
|
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.HistoryTrapdatum
|
|
// according to the relationships in the template.
|
|
// any required relationship should have already exist on the model
|
|
func (o *HistoryTrapdatumTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.HistoryTrapdatum) error {
|
|
var err error
|
|
|
|
return err
|
|
}
|
|
|
|
// Create builds a historyTrapdatum and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o *HistoryTrapdatumTemplate) Create(ctx context.Context, exec bob.Executor) (*models.HistoryTrapdatum, error) {
|
|
var err error
|
|
opt := o.BuildSetter()
|
|
ensureCreatableHistoryTrapdatum(opt)
|
|
|
|
if o.r.Organization == nil {
|
|
HistoryTrapdatumMods.WithNewOrganization().Apply(ctx, o)
|
|
}
|
|
|
|
var rel0 *models.Organization
|
|
|
|
if o.r.Organization.o.alreadyPersisted {
|
|
rel0 = o.r.Organization.o.Build()
|
|
} else {
|
|
rel0, err = o.r.Organization.o.Create(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
|
|
opt.OrganizationID = omit.From(rel0.ID)
|
|
|
|
m, err := models.HistoryTrapdata.Insert(opt).One(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
m.R.Organization = rel0
|
|
|
|
if err := o.insertOptRels(ctx, exec, m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, err
|
|
}
|
|
|
|
// MustCreate builds a historyTrapdatum and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o *HistoryTrapdatumTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.HistoryTrapdatum {
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateOrFail builds a historyTrapdatum 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 *HistoryTrapdatumTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.HistoryTrapdatum {
|
|
tb.Helper()
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateMany builds multiple historyTrapdata and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o HistoryTrapdatumTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.HistoryTrapdatumSlice, error) {
|
|
var err error
|
|
m := make(models.HistoryTrapdatumSlice, number)
|
|
|
|
for i := range m {
|
|
m[i], err = o.Create(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
|
|
return m, nil
|
|
}
|
|
|
|
// MustCreateMany builds multiple historyTrapdata and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o HistoryTrapdatumTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.HistoryTrapdatumSlice {
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateManyOrFail builds multiple historyTrapdata 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 HistoryTrapdatumTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.HistoryTrapdatumSlice {
|
|
tb.Helper()
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// HistoryTrapdatum has methods that act as mods for the HistoryTrapdatumTemplate
|
|
var HistoryTrapdatumMods historyTrapdatumMods
|
|
|
|
type historyTrapdatumMods struct{}
|
|
|
|
func (m historyTrapdatumMods) RandomizeAllColumns(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModSlice{
|
|
HistoryTrapdatumMods.RandomOrganizationID(f),
|
|
HistoryTrapdatumMods.RandomAvetemp(f),
|
|
HistoryTrapdatumMods.RandomComments(f),
|
|
HistoryTrapdatumMods.RandomCreationdate(f),
|
|
HistoryTrapdatumMods.RandomCreator(f),
|
|
HistoryTrapdatumMods.RandomEnddatetime(f),
|
|
HistoryTrapdatumMods.RandomEditdate(f),
|
|
HistoryTrapdatumMods.RandomEditor(f),
|
|
HistoryTrapdatumMods.RandomFieldtech(f),
|
|
HistoryTrapdatumMods.RandomField(f),
|
|
HistoryTrapdatumMods.RandomGatewaysync(f),
|
|
HistoryTrapdatumMods.RandomGlobalid(f),
|
|
HistoryTrapdatumMods.RandomIdbytech(f),
|
|
HistoryTrapdatumMods.RandomLocationname(f),
|
|
HistoryTrapdatumMods.RandomLocID(f),
|
|
HistoryTrapdatumMods.RandomLR(f),
|
|
HistoryTrapdatumMods.RandomObjectid(f),
|
|
HistoryTrapdatumMods.RandomProcessed(f),
|
|
HistoryTrapdatumMods.RandomRaingauge(f),
|
|
HistoryTrapdatumMods.RandomRecordstatus(f),
|
|
HistoryTrapdatumMods.RandomReviewed(f),
|
|
HistoryTrapdatumMods.RandomReviewedby(f),
|
|
HistoryTrapdatumMods.RandomRevieweddate(f),
|
|
HistoryTrapdatumMods.RandomSitecond(f),
|
|
HistoryTrapdatumMods.RandomSortbytech(f),
|
|
HistoryTrapdatumMods.RandomSrid(f),
|
|
HistoryTrapdatumMods.RandomStartdatetime(f),
|
|
HistoryTrapdatumMods.RandomTrapactivitytype(f),
|
|
HistoryTrapdatumMods.RandomTrapcondition(f),
|
|
HistoryTrapdatumMods.RandomTrapnights(f),
|
|
HistoryTrapdatumMods.RandomTraptype(f),
|
|
HistoryTrapdatumMods.RandomVoltage(f),
|
|
HistoryTrapdatumMods.RandomWinddir(f),
|
|
HistoryTrapdatumMods.RandomWindspeed(f),
|
|
HistoryTrapdatumMods.RandomZone(f),
|
|
HistoryTrapdatumMods.RandomZone2(f),
|
|
HistoryTrapdatumMods.RandomCreated(f),
|
|
HistoryTrapdatumMods.RandomCreatedDate(f),
|
|
HistoryTrapdatumMods.RandomCreatedUser(f),
|
|
HistoryTrapdatumMods.RandomGeometryX(f),
|
|
HistoryTrapdatumMods.RandomGeometryY(f),
|
|
HistoryTrapdatumMods.RandomLastEditedDate(f),
|
|
HistoryTrapdatumMods.RandomLastEditedUser(f),
|
|
HistoryTrapdatumMods.RandomLure(f),
|
|
HistoryTrapdatumMods.RandomVectorsurvtrapdataid(f),
|
|
HistoryTrapdatumMods.RandomVectorsurvtraplocationid(f),
|
|
HistoryTrapdatumMods.RandomVersion(f),
|
|
}
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m historyTrapdatumMods) OrganizationID(val int32) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.OrganizationID = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) OrganizationIDFunc(f func() int32) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.OrganizationID = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetOrganizationID() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomOrganizationID(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.OrganizationID = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m historyTrapdatumMods) Avetemp(val null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Avetemp = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) AvetempFunc(f func() null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Avetemp = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetAvetemp() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomAvetemp(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomAvetempNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Comments(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Comments = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) CommentsFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Comments = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetComments() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomComments(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomCommentsNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Creationdate(val null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Creationdate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) CreationdateFunc(f func() null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Creationdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetCreationdate() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomCreationdate(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomCreationdateNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Creator(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Creator = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) CreatorFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Creator = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetCreator() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomCreator(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomCreatorNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Enddatetime(val null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Enddatetime = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) EnddatetimeFunc(f func() null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Enddatetime = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetEnddatetime() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomEnddatetime(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomEnddatetimeNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Editdate(val null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Editdate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) EditdateFunc(f func() null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Editdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetEditdate() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomEditdate(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomEditdateNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Editor(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Editor = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) EditorFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Editor = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetEditor() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomEditor(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomEditorNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Fieldtech(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Fieldtech = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) FieldtechFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Fieldtech = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetFieldtech() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomFieldtech(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomFieldtechNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Field(val null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Field = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) FieldFunc(f func() null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Field = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetField() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Field = 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 historyTrapdatumMods) RandomField(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Field = 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 historyTrapdatumMods) RandomFieldNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Field = 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 historyTrapdatumMods) Gatewaysync(val null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Gatewaysync = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) GatewaysyncFunc(f func() null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Gatewaysync = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetGatewaysync() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomGatewaysync(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomGatewaysyncNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Globalid(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Globalid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) GlobalidFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Globalid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetGlobalid() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomGlobalid(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomGlobalidNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Idbytech(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Idbytech = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) IdbytechFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Idbytech = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetIdbytech() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Idbytech = 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 historyTrapdatumMods) RandomIdbytech(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Idbytech = 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 historyTrapdatumMods) RandomIdbytechNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Idbytech = 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 historyTrapdatumMods) Locationname(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Locationname = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) LocationnameFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Locationname = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetLocationname() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomLocationname(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomLocationnameNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) LocID(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.LocID = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) LocIDFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.LocID = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetLocID() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomLocID(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomLocIDNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) LR(val null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.LR = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) LRFunc(f func() null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.LR = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetLR() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.LR = 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 historyTrapdatumMods) RandomLR(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.LR = 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 historyTrapdatumMods) RandomLRNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.LR = 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 historyTrapdatumMods) Objectid(val int32) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Objectid = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) ObjectidFunc(f func() int32) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Objectid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetObjectid() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomObjectid(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Objectid = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m historyTrapdatumMods) Processed(val null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Processed = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) ProcessedFunc(f func() null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Processed = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetProcessed() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomProcessed(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomProcessedNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Raingauge(val null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Raingauge = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) RaingaugeFunc(f func() null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Raingauge = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetRaingauge() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomRaingauge(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomRaingaugeNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Recordstatus(val null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Recordstatus = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) RecordstatusFunc(f func() null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Recordstatus = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetRecordstatus() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomRecordstatus(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomRecordstatusNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Reviewed(val null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Reviewed = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) ReviewedFunc(f func() null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Reviewed = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetReviewed() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomReviewed(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomReviewedNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Reviewedby(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Reviewedby = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) ReviewedbyFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Reviewedby = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetReviewedby() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomReviewedby(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomReviewedbyNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Revieweddate(val null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Revieweddate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) RevieweddateFunc(f func() null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Revieweddate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetRevieweddate() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomRevieweddate(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomRevieweddateNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Sitecond(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Sitecond = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) SitecondFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Sitecond = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetSitecond() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomSitecond(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomSitecondNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Sortbytech(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Sortbytech = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) SortbytechFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Sortbytech = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetSortbytech() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Sortbytech = 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 historyTrapdatumMods) RandomSortbytech(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Sortbytech = 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 historyTrapdatumMods) RandomSortbytechNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Sortbytech = 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 historyTrapdatumMods) Srid(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Srid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) SridFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Srid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetSrid() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Srid = 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 historyTrapdatumMods) RandomSrid(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Srid = 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 historyTrapdatumMods) RandomSridNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Srid = 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 historyTrapdatumMods) Startdatetime(val null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Startdatetime = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) StartdatetimeFunc(f func() null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Startdatetime = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetStartdatetime() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomStartdatetime(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomStartdatetimeNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Trapactivitytype(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapactivitytype = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) TrapactivitytypeFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapactivitytype = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetTrapactivitytype() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapactivitytype = 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 historyTrapdatumMods) RandomTrapactivitytype(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapactivitytype = 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 historyTrapdatumMods) RandomTrapactivitytypeNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapactivitytype = 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 historyTrapdatumMods) Trapcondition(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapcondition = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) TrapconditionFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapcondition = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetTrapcondition() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapcondition = 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 historyTrapdatumMods) RandomTrapcondition(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapcondition = 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 historyTrapdatumMods) RandomTrapconditionNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapcondition = 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 historyTrapdatumMods) Trapnights(val null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapnights = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) TrapnightsFunc(f func() null.Val[int16]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapnights = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetTrapnights() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapnights = 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 historyTrapdatumMods) RandomTrapnights(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapnights = 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 historyTrapdatumMods) RandomTrapnightsNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Trapnights = 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 historyTrapdatumMods) Traptype(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Traptype = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) TraptypeFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Traptype = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetTraptype() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Traptype = 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 historyTrapdatumMods) RandomTraptype(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Traptype = 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 historyTrapdatumMods) RandomTraptypeNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Traptype = 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 historyTrapdatumMods) Voltage(val null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Voltage = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) VoltageFunc(f func() null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Voltage = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetVoltage() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Voltage = 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 historyTrapdatumMods) RandomVoltage(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Voltage = 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 historyTrapdatumMods) RandomVoltageNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Voltage = 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 historyTrapdatumMods) Winddir(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Winddir = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) WinddirFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Winddir = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetWinddir() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomWinddir(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomWinddirNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Windspeed(val null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Windspeed = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) WindspeedFunc(f func() null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Windspeed = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetWindspeed() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomWindspeed(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomWindspeedNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Zone(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Zone = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) ZoneFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Zone = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetZone() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomZone(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomZoneNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Zone2(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Zone2 = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) Zone2Func(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Zone2 = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetZone2() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomZone2(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomZone2NotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Zone2 = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m historyTrapdatumMods) Created(val null.Val[time.Time]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Created = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) CreatedFunc(f func() null.Val[time.Time]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Created = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetCreated() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomCreated(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomCreatedNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Created = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m historyTrapdatumMods) CreatedDate(val null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.CreatedDate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) CreatedDateFunc(f func() null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.CreatedDate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetCreatedDate() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomCreatedDate(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomCreatedDateNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) CreatedUser(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.CreatedUser = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) CreatedUserFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.CreatedUser = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetCreatedUser() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomCreatedUser(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomCreatedUserNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) GeometryX(val null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.GeometryX = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) GeometryXFunc(f func() null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.GeometryX = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetGeometryX() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomGeometryX(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomGeometryXNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) GeometryY(val null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.GeometryY = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) GeometryYFunc(f func() null.Val[float64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.GeometryY = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetGeometryY() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomGeometryY(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomGeometryYNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) LastEditedDate(val null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.LastEditedDate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) LastEditedDateFunc(f func() null.Val[int64]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.LastEditedDate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetLastEditedDate() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomLastEditedDate(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomLastEditedDateNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) LastEditedUser(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.LastEditedUser = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) LastEditedUserFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.LastEditedUser = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetLastEditedUser() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomLastEditedUser(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomLastEditedUserNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) Lure(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Lure = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) LureFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Lure = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetLure() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Lure = 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 historyTrapdatumMods) RandomLure(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Lure = 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 historyTrapdatumMods) RandomLureNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Lure = 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 historyTrapdatumMods) Vectorsurvtrapdataid(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Vectorsurvtrapdataid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) VectorsurvtrapdataidFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Vectorsurvtrapdataid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetVectorsurvtrapdataid() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Vectorsurvtrapdataid = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is sometimes null
|
|
func (m historyTrapdatumMods) RandomVectorsurvtrapdataid(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Vectorsurvtrapdataid = 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 historyTrapdatumMods) RandomVectorsurvtrapdataidNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Vectorsurvtrapdataid = 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 historyTrapdatumMods) Vectorsurvtraplocationid(val null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Vectorsurvtraplocationid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) VectorsurvtraplocationidFunc(f func() null.Val[string]) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Vectorsurvtraplocationid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetVectorsurvtraplocationid() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Vectorsurvtraplocationid = 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 historyTrapdatumMods) RandomVectorsurvtraplocationid(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Vectorsurvtraplocationid = 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 historyTrapdatumMods) RandomVectorsurvtraplocationidNotNull(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Vectorsurvtraplocationid = 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 historyTrapdatumMods) Version(val int32) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Version = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTrapdatumMods) VersionFunc(f func() int32) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Version = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTrapdatumMods) UnsetVersion() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
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 historyTrapdatumMods) RandomVersion(f *faker.Faker) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(_ context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.Version = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m historyTrapdatumMods) WithParentsCascading() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(ctx context.Context, o *HistoryTrapdatumTemplate) {
|
|
if isDone, _ := historyTrapdatumWithParentsCascadingCtx.Value(ctx); isDone {
|
|
return
|
|
}
|
|
ctx = historyTrapdatumWithParentsCascadingCtx.WithValue(ctx, true)
|
|
{
|
|
|
|
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m historyTrapdatumMods) WithOrganization(rel *OrganizationTemplate) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(ctx context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.r.Organization = &historyTrapdatumROrganizationR{
|
|
o: rel,
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m historyTrapdatumMods) WithNewOrganization(mods ...OrganizationMod) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(ctx context.Context, o *HistoryTrapdatumTemplate) {
|
|
related := o.f.NewOrganizationWithContext(ctx, mods...)
|
|
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
})
|
|
}
|
|
|
|
func (m historyTrapdatumMods) WithExistingOrganization(em *models.Organization) HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(ctx context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.r.Organization = &historyTrapdatumROrganizationR{
|
|
o: o.f.FromExistingOrganization(em),
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m historyTrapdatumMods) WithoutOrganization() HistoryTrapdatumMod {
|
|
return HistoryTrapdatumModFunc(func(ctx context.Context, o *HistoryTrapdatumTemplate) {
|
|
o.r.Organization = nil
|
|
})
|
|
}
|