3888 lines
117 KiB
Go
3888 lines
117 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 HistoryTreatmentMod interface {
|
|
Apply(context.Context, *HistoryTreatmentTemplate)
|
|
}
|
|
|
|
type HistoryTreatmentModFunc func(context.Context, *HistoryTreatmentTemplate)
|
|
|
|
func (f HistoryTreatmentModFunc) Apply(ctx context.Context, n *HistoryTreatmentTemplate) {
|
|
f(ctx, n)
|
|
}
|
|
|
|
type HistoryTreatmentModSlice []HistoryTreatmentMod
|
|
|
|
func (mods HistoryTreatmentModSlice) Apply(ctx context.Context, n *HistoryTreatmentTemplate) {
|
|
for _, f := range mods {
|
|
f.Apply(ctx, n)
|
|
}
|
|
}
|
|
|
|
// HistoryTreatmentTemplate is an object representing the database table.
|
|
// all columns are optional and should be set by mods
|
|
type HistoryTreatmentTemplate struct {
|
|
OrganizationID func() int32
|
|
Activity func() null.Val[string]
|
|
Areaunit func() null.Val[string]
|
|
Avetemp func() null.Val[float64]
|
|
Barrierrouteid func() null.Val[string]
|
|
Cbcount func() null.Val[int16]
|
|
Comments func() null.Val[string]
|
|
Containercount func() null.Val[int16]
|
|
Creationdate func() null.Val[int64]
|
|
Creator func() null.Val[string]
|
|
Enddatetime func() null.Val[int64]
|
|
Equiptype func() null.Val[string]
|
|
Editdate func() null.Val[int64]
|
|
Editor func() null.Val[string]
|
|
Fieldtech func() null.Val[string]
|
|
Flowrate func() null.Val[float64]
|
|
Globalid func() null.Val[string]
|
|
Habitat func() null.Val[string]
|
|
InspID func() null.Val[string]
|
|
Invloc func() null.Val[string]
|
|
Linelocid func() null.Val[string]
|
|
Locationname func() null.Val[string]
|
|
Method func() null.Val[string]
|
|
Objectid func() int32
|
|
Pointlocid func() null.Val[string]
|
|
Polygonlocid func() null.Val[string]
|
|
Product func() null.Val[string]
|
|
Ptaid func() null.Val[string]
|
|
Qty func() null.Val[float64]
|
|
Qtyunit func() null.Val[string]
|
|
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]
|
|
Sdid func() null.Val[string]
|
|
Sitecond func() null.Val[string]
|
|
Srid func() null.Val[string]
|
|
Startdatetime func() null.Val[int64]
|
|
Targetspecies func() null.Val[string]
|
|
Tirecount func() null.Val[int16]
|
|
Treatacres func() null.Val[float64]
|
|
Treatarea func() null.Val[float64]
|
|
Treathectares func() null.Val[float64]
|
|
Treatmenthours func() null.Val[float64]
|
|
Treatmentlength func() null.Val[float64]
|
|
Treatmentlengthunits func() null.Val[string]
|
|
Totalcostprodcut func() null.Val[float64]
|
|
Ulvrouteid func() null.Val[string]
|
|
Warningoverride func() null.Val[int16]
|
|
Winddir func() null.Val[string]
|
|
Windspeed func() null.Val[float64]
|
|
Zone func() null.Val[string]
|
|
Zone2 func() null.Val[string]
|
|
GeometryX func() null.Val[float64]
|
|
GeometryY func() null.Val[float64]
|
|
TempSitecond func() null.Val[string]
|
|
Version func() int32
|
|
Created func() null.Val[time.Time]
|
|
|
|
r historyTreatmentR
|
|
f *Factory
|
|
|
|
alreadyPersisted bool
|
|
}
|
|
|
|
type historyTreatmentR struct {
|
|
Organization *historyTreatmentROrganizationR
|
|
}
|
|
|
|
type historyTreatmentROrganizationR struct {
|
|
o *OrganizationTemplate
|
|
}
|
|
|
|
// Apply mods to the HistoryTreatmentTemplate
|
|
func (o *HistoryTreatmentTemplate) Apply(ctx context.Context, mods ...HistoryTreatmentMod) {
|
|
for _, mod := range mods {
|
|
mod.Apply(ctx, o)
|
|
}
|
|
}
|
|
|
|
// setModelRels creates and sets the relationships on *models.HistoryTreatment
|
|
// according to the relationships in the template. Nothing is inserted into the db
|
|
func (t HistoryTreatmentTemplate) setModelRels(o *models.HistoryTreatment) {
|
|
if t.r.Organization != nil {
|
|
rel := t.r.Organization.o.Build()
|
|
rel.R.HistoryTreatments = append(rel.R.HistoryTreatments, o)
|
|
o.OrganizationID = rel.ID // h2
|
|
o.R.Organization = rel
|
|
}
|
|
}
|
|
|
|
// BuildSetter returns an *models.HistoryTreatmentSetter
|
|
// this does nothing with the relationship templates
|
|
func (o HistoryTreatmentTemplate) BuildSetter() *models.HistoryTreatmentSetter {
|
|
m := &models.HistoryTreatmentSetter{}
|
|
|
|
if o.OrganizationID != nil {
|
|
val := o.OrganizationID()
|
|
m.OrganizationID = omit.From(val)
|
|
}
|
|
if o.Activity != nil {
|
|
val := o.Activity()
|
|
m.Activity = omitnull.FromNull(val)
|
|
}
|
|
if o.Areaunit != nil {
|
|
val := o.Areaunit()
|
|
m.Areaunit = omitnull.FromNull(val)
|
|
}
|
|
if o.Avetemp != nil {
|
|
val := o.Avetemp()
|
|
m.Avetemp = omitnull.FromNull(val)
|
|
}
|
|
if o.Barrierrouteid != nil {
|
|
val := o.Barrierrouteid()
|
|
m.Barrierrouteid = omitnull.FromNull(val)
|
|
}
|
|
if o.Cbcount != nil {
|
|
val := o.Cbcount()
|
|
m.Cbcount = omitnull.FromNull(val)
|
|
}
|
|
if o.Comments != nil {
|
|
val := o.Comments()
|
|
m.Comments = omitnull.FromNull(val)
|
|
}
|
|
if o.Containercount != nil {
|
|
val := o.Containercount()
|
|
m.Containercount = 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.Equiptype != nil {
|
|
val := o.Equiptype()
|
|
m.Equiptype = 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.Flowrate != nil {
|
|
val := o.Flowrate()
|
|
m.Flowrate = omitnull.FromNull(val)
|
|
}
|
|
if o.Globalid != nil {
|
|
val := o.Globalid()
|
|
m.Globalid = omitnull.FromNull(val)
|
|
}
|
|
if o.Habitat != nil {
|
|
val := o.Habitat()
|
|
m.Habitat = omitnull.FromNull(val)
|
|
}
|
|
if o.InspID != nil {
|
|
val := o.InspID()
|
|
m.InspID = omitnull.FromNull(val)
|
|
}
|
|
if o.Invloc != nil {
|
|
val := o.Invloc()
|
|
m.Invloc = omitnull.FromNull(val)
|
|
}
|
|
if o.Linelocid != nil {
|
|
val := o.Linelocid()
|
|
m.Linelocid = omitnull.FromNull(val)
|
|
}
|
|
if o.Locationname != nil {
|
|
val := o.Locationname()
|
|
m.Locationname = omitnull.FromNull(val)
|
|
}
|
|
if o.Method != nil {
|
|
val := o.Method()
|
|
m.Method = omitnull.FromNull(val)
|
|
}
|
|
if o.Objectid != nil {
|
|
val := o.Objectid()
|
|
m.Objectid = omit.From(val)
|
|
}
|
|
if o.Pointlocid != nil {
|
|
val := o.Pointlocid()
|
|
m.Pointlocid = omitnull.FromNull(val)
|
|
}
|
|
if o.Polygonlocid != nil {
|
|
val := o.Polygonlocid()
|
|
m.Polygonlocid = omitnull.FromNull(val)
|
|
}
|
|
if o.Product != nil {
|
|
val := o.Product()
|
|
m.Product = omitnull.FromNull(val)
|
|
}
|
|
if o.Ptaid != nil {
|
|
val := o.Ptaid()
|
|
m.Ptaid = omitnull.FromNull(val)
|
|
}
|
|
if o.Qty != nil {
|
|
val := o.Qty()
|
|
m.Qty = omitnull.FromNull(val)
|
|
}
|
|
if o.Qtyunit != nil {
|
|
val := o.Qtyunit()
|
|
m.Qtyunit = 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.Sdid != nil {
|
|
val := o.Sdid()
|
|
m.Sdid = omitnull.FromNull(val)
|
|
}
|
|
if o.Sitecond != nil {
|
|
val := o.Sitecond()
|
|
m.Sitecond = 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.Targetspecies != nil {
|
|
val := o.Targetspecies()
|
|
m.Targetspecies = omitnull.FromNull(val)
|
|
}
|
|
if o.Tirecount != nil {
|
|
val := o.Tirecount()
|
|
m.Tirecount = omitnull.FromNull(val)
|
|
}
|
|
if o.Treatacres != nil {
|
|
val := o.Treatacres()
|
|
m.Treatacres = omitnull.FromNull(val)
|
|
}
|
|
if o.Treatarea != nil {
|
|
val := o.Treatarea()
|
|
m.Treatarea = omitnull.FromNull(val)
|
|
}
|
|
if o.Treathectares != nil {
|
|
val := o.Treathectares()
|
|
m.Treathectares = omitnull.FromNull(val)
|
|
}
|
|
if o.Treatmenthours != nil {
|
|
val := o.Treatmenthours()
|
|
m.Treatmenthours = omitnull.FromNull(val)
|
|
}
|
|
if o.Treatmentlength != nil {
|
|
val := o.Treatmentlength()
|
|
m.Treatmentlength = omitnull.FromNull(val)
|
|
}
|
|
if o.Treatmentlengthunits != nil {
|
|
val := o.Treatmentlengthunits()
|
|
m.Treatmentlengthunits = omitnull.FromNull(val)
|
|
}
|
|
if o.Totalcostprodcut != nil {
|
|
val := o.Totalcostprodcut()
|
|
m.Totalcostprodcut = omitnull.FromNull(val)
|
|
}
|
|
if o.Ulvrouteid != nil {
|
|
val := o.Ulvrouteid()
|
|
m.Ulvrouteid = omitnull.FromNull(val)
|
|
}
|
|
if o.Warningoverride != nil {
|
|
val := o.Warningoverride()
|
|
m.Warningoverride = 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.GeometryX != nil {
|
|
val := o.GeometryX()
|
|
m.GeometryX = omitnull.FromNull(val)
|
|
}
|
|
if o.GeometryY != nil {
|
|
val := o.GeometryY()
|
|
m.GeometryY = omitnull.FromNull(val)
|
|
}
|
|
if o.TempSitecond != nil {
|
|
val := o.TempSitecond()
|
|
m.TempSitecond = omitnull.FromNull(val)
|
|
}
|
|
if o.Version != nil {
|
|
val := o.Version()
|
|
m.Version = omit.From(val)
|
|
}
|
|
if o.Created != nil {
|
|
val := o.Created()
|
|
m.Created = omitnull.FromNull(val)
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildManySetter returns an []*models.HistoryTreatmentSetter
|
|
// this does nothing with the relationship templates
|
|
func (o HistoryTreatmentTemplate) BuildManySetter(number int) []*models.HistoryTreatmentSetter {
|
|
m := make([]*models.HistoryTreatmentSetter, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.BuildSetter()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// Build returns an *models.HistoryTreatment
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use HistoryTreatmentTemplate.Create
|
|
func (o HistoryTreatmentTemplate) Build() *models.HistoryTreatment {
|
|
m := &models.HistoryTreatment{}
|
|
|
|
if o.OrganizationID != nil {
|
|
m.OrganizationID = o.OrganizationID()
|
|
}
|
|
if o.Activity != nil {
|
|
m.Activity = o.Activity()
|
|
}
|
|
if o.Areaunit != nil {
|
|
m.Areaunit = o.Areaunit()
|
|
}
|
|
if o.Avetemp != nil {
|
|
m.Avetemp = o.Avetemp()
|
|
}
|
|
if o.Barrierrouteid != nil {
|
|
m.Barrierrouteid = o.Barrierrouteid()
|
|
}
|
|
if o.Cbcount != nil {
|
|
m.Cbcount = o.Cbcount()
|
|
}
|
|
if o.Comments != nil {
|
|
m.Comments = o.Comments()
|
|
}
|
|
if o.Containercount != nil {
|
|
m.Containercount = o.Containercount()
|
|
}
|
|
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.Equiptype != nil {
|
|
m.Equiptype = o.Equiptype()
|
|
}
|
|
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.Flowrate != nil {
|
|
m.Flowrate = o.Flowrate()
|
|
}
|
|
if o.Globalid != nil {
|
|
m.Globalid = o.Globalid()
|
|
}
|
|
if o.Habitat != nil {
|
|
m.Habitat = o.Habitat()
|
|
}
|
|
if o.InspID != nil {
|
|
m.InspID = o.InspID()
|
|
}
|
|
if o.Invloc != nil {
|
|
m.Invloc = o.Invloc()
|
|
}
|
|
if o.Linelocid != nil {
|
|
m.Linelocid = o.Linelocid()
|
|
}
|
|
if o.Locationname != nil {
|
|
m.Locationname = o.Locationname()
|
|
}
|
|
if o.Method != nil {
|
|
m.Method = o.Method()
|
|
}
|
|
if o.Objectid != nil {
|
|
m.Objectid = o.Objectid()
|
|
}
|
|
if o.Pointlocid != nil {
|
|
m.Pointlocid = o.Pointlocid()
|
|
}
|
|
if o.Polygonlocid != nil {
|
|
m.Polygonlocid = o.Polygonlocid()
|
|
}
|
|
if o.Product != nil {
|
|
m.Product = o.Product()
|
|
}
|
|
if o.Ptaid != nil {
|
|
m.Ptaid = o.Ptaid()
|
|
}
|
|
if o.Qty != nil {
|
|
m.Qty = o.Qty()
|
|
}
|
|
if o.Qtyunit != nil {
|
|
m.Qtyunit = o.Qtyunit()
|
|
}
|
|
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.Sdid != nil {
|
|
m.Sdid = o.Sdid()
|
|
}
|
|
if o.Sitecond != nil {
|
|
m.Sitecond = o.Sitecond()
|
|
}
|
|
if o.Srid != nil {
|
|
m.Srid = o.Srid()
|
|
}
|
|
if o.Startdatetime != nil {
|
|
m.Startdatetime = o.Startdatetime()
|
|
}
|
|
if o.Targetspecies != nil {
|
|
m.Targetspecies = o.Targetspecies()
|
|
}
|
|
if o.Tirecount != nil {
|
|
m.Tirecount = o.Tirecount()
|
|
}
|
|
if o.Treatacres != nil {
|
|
m.Treatacres = o.Treatacres()
|
|
}
|
|
if o.Treatarea != nil {
|
|
m.Treatarea = o.Treatarea()
|
|
}
|
|
if o.Treathectares != nil {
|
|
m.Treathectares = o.Treathectares()
|
|
}
|
|
if o.Treatmenthours != nil {
|
|
m.Treatmenthours = o.Treatmenthours()
|
|
}
|
|
if o.Treatmentlength != nil {
|
|
m.Treatmentlength = o.Treatmentlength()
|
|
}
|
|
if o.Treatmentlengthunits != nil {
|
|
m.Treatmentlengthunits = o.Treatmentlengthunits()
|
|
}
|
|
if o.Totalcostprodcut != nil {
|
|
m.Totalcostprodcut = o.Totalcostprodcut()
|
|
}
|
|
if o.Ulvrouteid != nil {
|
|
m.Ulvrouteid = o.Ulvrouteid()
|
|
}
|
|
if o.Warningoverride != nil {
|
|
m.Warningoverride = o.Warningoverride()
|
|
}
|
|
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.GeometryX != nil {
|
|
m.GeometryX = o.GeometryX()
|
|
}
|
|
if o.GeometryY != nil {
|
|
m.GeometryY = o.GeometryY()
|
|
}
|
|
if o.TempSitecond != nil {
|
|
m.TempSitecond = o.TempSitecond()
|
|
}
|
|
if o.Version != nil {
|
|
m.Version = o.Version()
|
|
}
|
|
if o.Created != nil {
|
|
m.Created = o.Created()
|
|
}
|
|
|
|
o.setModelRels(m)
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildMany returns an models.HistoryTreatmentSlice
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use HistoryTreatmentTemplate.CreateMany
|
|
func (o HistoryTreatmentTemplate) BuildMany(number int) models.HistoryTreatmentSlice {
|
|
m := make(models.HistoryTreatmentSlice, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.Build()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
func ensureCreatableHistoryTreatment(m *models.HistoryTreatmentSetter) {
|
|
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.HistoryTreatment
|
|
// according to the relationships in the template.
|
|
// any required relationship should have already exist on the model
|
|
func (o *HistoryTreatmentTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.HistoryTreatment) error {
|
|
var err error
|
|
|
|
return err
|
|
}
|
|
|
|
// Create builds a historyTreatment and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o *HistoryTreatmentTemplate) Create(ctx context.Context, exec bob.Executor) (*models.HistoryTreatment, error) {
|
|
var err error
|
|
opt := o.BuildSetter()
|
|
ensureCreatableHistoryTreatment(opt)
|
|
|
|
if o.r.Organization == nil {
|
|
HistoryTreatmentMods.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.HistoryTreatments.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 historyTreatment and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o *HistoryTreatmentTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.HistoryTreatment {
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateOrFail builds a historyTreatment 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 *HistoryTreatmentTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.HistoryTreatment {
|
|
tb.Helper()
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateMany builds multiple historyTreatments and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o HistoryTreatmentTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.HistoryTreatmentSlice, error) {
|
|
var err error
|
|
m := make(models.HistoryTreatmentSlice, number)
|
|
|
|
for i := range m {
|
|
m[i], err = o.Create(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
|
|
return m, nil
|
|
}
|
|
|
|
// MustCreateMany builds multiple historyTreatments and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o HistoryTreatmentTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.HistoryTreatmentSlice {
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateManyOrFail builds multiple historyTreatments 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 HistoryTreatmentTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.HistoryTreatmentSlice {
|
|
tb.Helper()
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// HistoryTreatment has methods that act as mods for the HistoryTreatmentTemplate
|
|
var HistoryTreatmentMods historyTreatmentMods
|
|
|
|
type historyTreatmentMods struct{}
|
|
|
|
func (m historyTreatmentMods) RandomizeAllColumns(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModSlice{
|
|
HistoryTreatmentMods.RandomOrganizationID(f),
|
|
HistoryTreatmentMods.RandomActivity(f),
|
|
HistoryTreatmentMods.RandomAreaunit(f),
|
|
HistoryTreatmentMods.RandomAvetemp(f),
|
|
HistoryTreatmentMods.RandomBarrierrouteid(f),
|
|
HistoryTreatmentMods.RandomCbcount(f),
|
|
HistoryTreatmentMods.RandomComments(f),
|
|
HistoryTreatmentMods.RandomContainercount(f),
|
|
HistoryTreatmentMods.RandomCreationdate(f),
|
|
HistoryTreatmentMods.RandomCreator(f),
|
|
HistoryTreatmentMods.RandomEnddatetime(f),
|
|
HistoryTreatmentMods.RandomEquiptype(f),
|
|
HistoryTreatmentMods.RandomEditdate(f),
|
|
HistoryTreatmentMods.RandomEditor(f),
|
|
HistoryTreatmentMods.RandomFieldtech(f),
|
|
HistoryTreatmentMods.RandomFlowrate(f),
|
|
HistoryTreatmentMods.RandomGlobalid(f),
|
|
HistoryTreatmentMods.RandomHabitat(f),
|
|
HistoryTreatmentMods.RandomInspID(f),
|
|
HistoryTreatmentMods.RandomInvloc(f),
|
|
HistoryTreatmentMods.RandomLinelocid(f),
|
|
HistoryTreatmentMods.RandomLocationname(f),
|
|
HistoryTreatmentMods.RandomMethod(f),
|
|
HistoryTreatmentMods.RandomObjectid(f),
|
|
HistoryTreatmentMods.RandomPointlocid(f),
|
|
HistoryTreatmentMods.RandomPolygonlocid(f),
|
|
HistoryTreatmentMods.RandomProduct(f),
|
|
HistoryTreatmentMods.RandomPtaid(f),
|
|
HistoryTreatmentMods.RandomQty(f),
|
|
HistoryTreatmentMods.RandomQtyunit(f),
|
|
HistoryTreatmentMods.RandomRaingauge(f),
|
|
HistoryTreatmentMods.RandomRecordstatus(f),
|
|
HistoryTreatmentMods.RandomReviewed(f),
|
|
HistoryTreatmentMods.RandomReviewedby(f),
|
|
HistoryTreatmentMods.RandomRevieweddate(f),
|
|
HistoryTreatmentMods.RandomSdid(f),
|
|
HistoryTreatmentMods.RandomSitecond(f),
|
|
HistoryTreatmentMods.RandomSrid(f),
|
|
HistoryTreatmentMods.RandomStartdatetime(f),
|
|
HistoryTreatmentMods.RandomTargetspecies(f),
|
|
HistoryTreatmentMods.RandomTirecount(f),
|
|
HistoryTreatmentMods.RandomTreatacres(f),
|
|
HistoryTreatmentMods.RandomTreatarea(f),
|
|
HistoryTreatmentMods.RandomTreathectares(f),
|
|
HistoryTreatmentMods.RandomTreatmenthours(f),
|
|
HistoryTreatmentMods.RandomTreatmentlength(f),
|
|
HistoryTreatmentMods.RandomTreatmentlengthunits(f),
|
|
HistoryTreatmentMods.RandomTotalcostprodcut(f),
|
|
HistoryTreatmentMods.RandomUlvrouteid(f),
|
|
HistoryTreatmentMods.RandomWarningoverride(f),
|
|
HistoryTreatmentMods.RandomWinddir(f),
|
|
HistoryTreatmentMods.RandomWindspeed(f),
|
|
HistoryTreatmentMods.RandomZone(f),
|
|
HistoryTreatmentMods.RandomZone2(f),
|
|
HistoryTreatmentMods.RandomGeometryX(f),
|
|
HistoryTreatmentMods.RandomGeometryY(f),
|
|
HistoryTreatmentMods.RandomTempSitecond(f),
|
|
HistoryTreatmentMods.RandomVersion(f),
|
|
HistoryTreatmentMods.RandomCreated(f),
|
|
}
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m historyTreatmentMods) OrganizationID(val int32) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.OrganizationID = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) OrganizationIDFunc(f func() int32) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.OrganizationID = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetOrganizationID() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomOrganizationID(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.OrganizationID = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m historyTreatmentMods) Activity(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Activity = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) ActivityFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Activity = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetActivity() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Activity = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is sometimes null
|
|
func (m historyTreatmentMods) RandomActivity(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Activity = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
// The generated value is never null
|
|
func (m historyTreatmentMods) RandomActivityNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Activity = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m historyTreatmentMods) Areaunit(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Areaunit = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) AreaunitFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Areaunit = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetAreaunit() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Areaunit = 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 historyTreatmentMods) RandomAreaunit(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Areaunit = 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 historyTreatmentMods) RandomAreaunitNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Areaunit = 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 historyTreatmentMods) Avetemp(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Avetemp = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) AvetempFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Avetemp = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetAvetemp() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomAvetemp(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomAvetempNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Barrierrouteid(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Barrierrouteid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) BarrierrouteidFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Barrierrouteid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetBarrierrouteid() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Barrierrouteid = 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 historyTreatmentMods) RandomBarrierrouteid(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Barrierrouteid = 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 historyTreatmentMods) RandomBarrierrouteidNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Barrierrouteid = 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 historyTreatmentMods) Cbcount(val null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Cbcount = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) CbcountFunc(f func() null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Cbcount = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetCbcount() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Cbcount = 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 historyTreatmentMods) RandomCbcount(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Cbcount = 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 historyTreatmentMods) RandomCbcountNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Cbcount = 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 historyTreatmentMods) Comments(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Comments = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) CommentsFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Comments = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetComments() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomComments(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomCommentsNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Containercount(val null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Containercount = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) ContainercountFunc(f func() null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Containercount = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetContainercount() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Containercount = 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 historyTreatmentMods) RandomContainercount(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Containercount = 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 historyTreatmentMods) RandomContainercountNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Containercount = 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 historyTreatmentMods) Creationdate(val null.Val[int64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Creationdate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) CreationdateFunc(f func() null.Val[int64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Creationdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetCreationdate() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomCreationdate(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomCreationdateNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Creator(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Creator = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) CreatorFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Creator = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetCreator() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomCreator(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomCreatorNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Enddatetime(val null.Val[int64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Enddatetime = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) EnddatetimeFunc(f func() null.Val[int64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Enddatetime = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetEnddatetime() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomEnddatetime(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomEnddatetimeNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Equiptype(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Equiptype = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) EquiptypeFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Equiptype = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetEquiptype() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Equiptype = 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 historyTreatmentMods) RandomEquiptype(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Equiptype = 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 historyTreatmentMods) RandomEquiptypeNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Equiptype = 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 historyTreatmentMods) Editdate(val null.Val[int64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Editdate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) EditdateFunc(f func() null.Val[int64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Editdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetEditdate() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomEditdate(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomEditdateNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Editor(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Editor = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) EditorFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Editor = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetEditor() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomEditor(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomEditorNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Fieldtech(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Fieldtech = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) FieldtechFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Fieldtech = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetFieldtech() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomFieldtech(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomFieldtechNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Flowrate(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Flowrate = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) FlowrateFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Flowrate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetFlowrate() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Flowrate = 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 historyTreatmentMods) RandomFlowrate(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Flowrate = 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 historyTreatmentMods) RandomFlowrateNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Flowrate = 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 historyTreatmentMods) Globalid(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Globalid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) GlobalidFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Globalid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetGlobalid() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomGlobalid(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomGlobalidNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Habitat(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Habitat = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) HabitatFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Habitat = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetHabitat() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Habitat = 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 historyTreatmentMods) RandomHabitat(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Habitat = 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 historyTreatmentMods) RandomHabitatNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Habitat = 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 historyTreatmentMods) InspID(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.InspID = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) InspIDFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.InspID = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetInspID() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.InspID = 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 historyTreatmentMods) RandomInspID(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.InspID = 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 historyTreatmentMods) RandomInspIDNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.InspID = 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 historyTreatmentMods) Invloc(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Invloc = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) InvlocFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Invloc = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetInvloc() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Invloc = 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 historyTreatmentMods) RandomInvloc(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Invloc = 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 historyTreatmentMods) RandomInvlocNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Invloc = 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 historyTreatmentMods) Linelocid(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Linelocid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) LinelocidFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Linelocid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetLinelocid() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Linelocid = 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 historyTreatmentMods) RandomLinelocid(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Linelocid = 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 historyTreatmentMods) RandomLinelocidNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Linelocid = 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 historyTreatmentMods) Locationname(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Locationname = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) LocationnameFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Locationname = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetLocationname() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomLocationname(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomLocationnameNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Method(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Method = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) MethodFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Method = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetMethod() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Method = 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 historyTreatmentMods) RandomMethod(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Method = 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 historyTreatmentMods) RandomMethodNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Method = 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 historyTreatmentMods) Objectid(val int32) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Objectid = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) ObjectidFunc(f func() int32) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Objectid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetObjectid() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomObjectid(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Objectid = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m historyTreatmentMods) Pointlocid(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Pointlocid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) PointlocidFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Pointlocid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetPointlocid() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Pointlocid = 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 historyTreatmentMods) RandomPointlocid(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Pointlocid = 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 historyTreatmentMods) RandomPointlocidNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Pointlocid = 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 historyTreatmentMods) Polygonlocid(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Polygonlocid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) PolygonlocidFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Polygonlocid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetPolygonlocid() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Polygonlocid = 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 historyTreatmentMods) RandomPolygonlocid(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Polygonlocid = 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 historyTreatmentMods) RandomPolygonlocidNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Polygonlocid = 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 historyTreatmentMods) Product(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Product = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) ProductFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Product = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetProduct() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Product = 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 historyTreatmentMods) RandomProduct(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Product = 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 historyTreatmentMods) RandomProductNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Product = 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 historyTreatmentMods) Ptaid(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Ptaid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) PtaidFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Ptaid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetPtaid() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Ptaid = 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 historyTreatmentMods) RandomPtaid(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Ptaid = 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 historyTreatmentMods) RandomPtaidNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Ptaid = 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 historyTreatmentMods) Qty(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Qty = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) QtyFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Qty = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetQty() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Qty = 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 historyTreatmentMods) RandomQty(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Qty = 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 historyTreatmentMods) RandomQtyNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Qty = 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 historyTreatmentMods) Qtyunit(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Qtyunit = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) QtyunitFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Qtyunit = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetQtyunit() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Qtyunit = 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 historyTreatmentMods) RandomQtyunit(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Qtyunit = 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 historyTreatmentMods) RandomQtyunitNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Qtyunit = 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 historyTreatmentMods) Raingauge(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Raingauge = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) RaingaugeFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Raingauge = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetRaingauge() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomRaingauge(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomRaingaugeNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Recordstatus(val null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Recordstatus = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) RecordstatusFunc(f func() null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Recordstatus = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetRecordstatus() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomRecordstatus(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomRecordstatusNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Reviewed(val null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Reviewed = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) ReviewedFunc(f func() null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Reviewed = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetReviewed() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomReviewed(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomReviewedNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Reviewedby(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Reviewedby = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) ReviewedbyFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Reviewedby = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetReviewedby() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomReviewedby(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomReviewedbyNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Revieweddate(val null.Val[int64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Revieweddate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) RevieweddateFunc(f func() null.Val[int64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Revieweddate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetRevieweddate() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomRevieweddate(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomRevieweddateNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Sdid(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Sdid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) SdidFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Sdid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetSdid() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Sdid = 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 historyTreatmentMods) RandomSdid(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Sdid = 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 historyTreatmentMods) RandomSdidNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Sdid = 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 historyTreatmentMods) Sitecond(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Sitecond = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) SitecondFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Sitecond = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetSitecond() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomSitecond(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomSitecondNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Srid(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Srid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) SridFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Srid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetSrid() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomSrid(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomSridNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Startdatetime(val null.Val[int64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Startdatetime = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) StartdatetimeFunc(f func() null.Val[int64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Startdatetime = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetStartdatetime() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomStartdatetime(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomStartdatetimeNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Targetspecies(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Targetspecies = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) TargetspeciesFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Targetspecies = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetTargetspecies() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Targetspecies = 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 historyTreatmentMods) RandomTargetspecies(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Targetspecies = 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 historyTreatmentMods) RandomTargetspeciesNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Targetspecies = 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 historyTreatmentMods) Tirecount(val null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Tirecount = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) TirecountFunc(f func() null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Tirecount = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetTirecount() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Tirecount = 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 historyTreatmentMods) RandomTirecount(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Tirecount = 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 historyTreatmentMods) RandomTirecountNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Tirecount = 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 historyTreatmentMods) Treatacres(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatacres = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) TreatacresFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatacres = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetTreatacres() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatacres = 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 historyTreatmentMods) RandomTreatacres(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatacres = 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 historyTreatmentMods) RandomTreatacresNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatacres = 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 historyTreatmentMods) Treatarea(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatarea = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) TreatareaFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatarea = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetTreatarea() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatarea = 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 historyTreatmentMods) RandomTreatarea(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatarea = 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 historyTreatmentMods) RandomTreatareaNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatarea = 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 historyTreatmentMods) Treathectares(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treathectares = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) TreathectaresFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treathectares = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetTreathectares() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treathectares = 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 historyTreatmentMods) RandomTreathectares(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treathectares = 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 historyTreatmentMods) RandomTreathectaresNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treathectares = 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 historyTreatmentMods) Treatmenthours(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmenthours = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) TreatmenthoursFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmenthours = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetTreatmenthours() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmenthours = 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 historyTreatmentMods) RandomTreatmenthours(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmenthours = 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 historyTreatmentMods) RandomTreatmenthoursNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmenthours = 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 historyTreatmentMods) Treatmentlength(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmentlength = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) TreatmentlengthFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmentlength = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetTreatmentlength() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmentlength = 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 historyTreatmentMods) RandomTreatmentlength(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmentlength = 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 historyTreatmentMods) RandomTreatmentlengthNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmentlength = 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 historyTreatmentMods) Treatmentlengthunits(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmentlengthunits = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) TreatmentlengthunitsFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmentlengthunits = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetTreatmentlengthunits() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmentlengthunits = 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 historyTreatmentMods) RandomTreatmentlengthunits(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmentlengthunits = 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 historyTreatmentMods) RandomTreatmentlengthunitsNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Treatmentlengthunits = 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 historyTreatmentMods) Totalcostprodcut(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Totalcostprodcut = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) TotalcostprodcutFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Totalcostprodcut = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetTotalcostprodcut() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Totalcostprodcut = 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 historyTreatmentMods) RandomTotalcostprodcut(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Totalcostprodcut = 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 historyTreatmentMods) RandomTotalcostprodcutNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Totalcostprodcut = 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 historyTreatmentMods) Ulvrouteid(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Ulvrouteid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) UlvrouteidFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Ulvrouteid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetUlvrouteid() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Ulvrouteid = 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 historyTreatmentMods) RandomUlvrouteid(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Ulvrouteid = 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 historyTreatmentMods) RandomUlvrouteidNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Ulvrouteid = 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 historyTreatmentMods) Warningoverride(val null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Warningoverride = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) WarningoverrideFunc(f func() null.Val[int16]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Warningoverride = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetWarningoverride() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Warningoverride = 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 historyTreatmentMods) RandomWarningoverride(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Warningoverride = 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 historyTreatmentMods) RandomWarningoverrideNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Warningoverride = 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 historyTreatmentMods) Winddir(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Winddir = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) WinddirFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Winddir = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetWinddir() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomWinddir(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomWinddirNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Windspeed(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Windspeed = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) WindspeedFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Windspeed = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetWindspeed() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomWindspeed(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomWindspeedNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Zone(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Zone = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) ZoneFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Zone = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetZone() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomZone(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomZoneNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) Zone2(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Zone2 = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) Zone2Func(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Zone2 = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetZone2() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomZone2(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomZone2NotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) GeometryX(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.GeometryX = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) GeometryXFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.GeometryX = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetGeometryX() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomGeometryX(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomGeometryXNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) GeometryY(val null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.GeometryY = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) GeometryYFunc(f func() null.Val[float64]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.GeometryY = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetGeometryY() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomGeometryY(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomGeometryYNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) TempSitecond(val null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.TempSitecond = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) TempSitecondFunc(f func() null.Val[string]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.TempSitecond = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetTempSitecond() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.TempSitecond = 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 historyTreatmentMods) RandomTempSitecond(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.TempSitecond = 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 historyTreatmentMods) RandomTempSitecondNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.TempSitecond = 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 historyTreatmentMods) Version(val int32) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Version = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) VersionFunc(f func() int32) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Version = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetVersion() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomVersion(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Version = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m historyTreatmentMods) Created(val null.Val[time.Time]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Created = func() null.Val[time.Time] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m historyTreatmentMods) CreatedFunc(f func() null.Val[time.Time]) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Created = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m historyTreatmentMods) UnsetCreated() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomCreated(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
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 historyTreatmentMods) RandomCreatedNotNull(f *faker.Faker) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(_ context.Context, o *HistoryTreatmentTemplate) {
|
|
o.Created = func() null.Val[time.Time] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_time_Time(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m historyTreatmentMods) WithParentsCascading() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(ctx context.Context, o *HistoryTreatmentTemplate) {
|
|
if isDone, _ := historyTreatmentWithParentsCascadingCtx.Value(ctx); isDone {
|
|
return
|
|
}
|
|
ctx = historyTreatmentWithParentsCascadingCtx.WithValue(ctx, true)
|
|
{
|
|
|
|
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m historyTreatmentMods) WithOrganization(rel *OrganizationTemplate) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(ctx context.Context, o *HistoryTreatmentTemplate) {
|
|
o.r.Organization = &historyTreatmentROrganizationR{
|
|
o: rel,
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m historyTreatmentMods) WithNewOrganization(mods ...OrganizationMod) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(ctx context.Context, o *HistoryTreatmentTemplate) {
|
|
related := o.f.NewOrganizationWithContext(ctx, mods...)
|
|
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
})
|
|
}
|
|
|
|
func (m historyTreatmentMods) WithExistingOrganization(em *models.Organization) HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(ctx context.Context, o *HistoryTreatmentTemplate) {
|
|
o.r.Organization = &historyTreatmentROrganizationR{
|
|
o: o.f.FromExistingOrganization(em),
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m historyTreatmentMods) WithoutOrganization() HistoryTreatmentMod {
|
|
return HistoryTreatmentModFunc(func(ctx context.Context, o *HistoryTreatmentTemplate) {
|
|
o.r.Organization = nil
|
|
})
|
|
}
|