It's...way too many rows, now that I have the actual data. It needs to be reworked.
3210 lines
98 KiB
Go
3210 lines
98 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 FSPointlocationMod interface {
|
|
Apply(context.Context, *FSPointlocationTemplate)
|
|
}
|
|
|
|
type FSPointlocationModFunc func(context.Context, *FSPointlocationTemplate)
|
|
|
|
func (f FSPointlocationModFunc) Apply(ctx context.Context, n *FSPointlocationTemplate) {
|
|
f(ctx, n)
|
|
}
|
|
|
|
type FSPointlocationModSlice []FSPointlocationMod
|
|
|
|
func (mods FSPointlocationModSlice) Apply(ctx context.Context, n *FSPointlocationTemplate) {
|
|
for _, f := range mods {
|
|
f.Apply(ctx, n)
|
|
}
|
|
}
|
|
|
|
// FSPointlocationTemplate is an object representing the database table.
|
|
// all columns are optional and should be set by mods
|
|
type FSPointlocationTemplate struct {
|
|
OrganizationID func() int32
|
|
Accessdesc func() null.Val[string]
|
|
Active func() null.Val[int16]
|
|
Comments func() null.Val[string]
|
|
Creationdate func() null.Val[int64]
|
|
Creator func() null.Val[string]
|
|
Description func() null.Val[string]
|
|
Externalid func() null.Val[string]
|
|
Editdate func() null.Val[int64]
|
|
Editor func() null.Val[string]
|
|
Globalid func() string
|
|
Habitat func() null.Val[string]
|
|
Jurisdiction func() null.Val[string]
|
|
Larvinspectinterval func() null.Val[int16]
|
|
Lastinspectactiontaken func() null.Val[string]
|
|
Lastinspectactivity func() null.Val[string]
|
|
Lastinspectavglarvae func() null.Val[float64]
|
|
Lastinspectavgpupae func() null.Val[float64]
|
|
Lastinspectbreeding func() null.Val[string]
|
|
Lastinspectconditions func() null.Val[string]
|
|
Lastinspectdate func() null.Val[int64]
|
|
Lastinspectfieldspecies func() null.Val[string]
|
|
Lastinspectlstages func() null.Val[string]
|
|
Lasttreatactivity func() null.Val[string]
|
|
Lasttreatdate func() null.Val[int64]
|
|
Lasttreatproduct func() null.Val[string]
|
|
Lasttreatqty func() null.Val[float64]
|
|
Lasttreatqtyunit func() null.Val[string]
|
|
Locationnumber func() null.Val[int64]
|
|
Name func() null.Val[string]
|
|
Nextactiondatescheduled func() null.Val[int64]
|
|
Objectid func() int32
|
|
Priority func() null.Val[string]
|
|
Stype func() null.Val[string]
|
|
Symbology func() null.Val[string]
|
|
Usetype func() null.Val[string]
|
|
Waterorigin func() null.Val[string]
|
|
X func() null.Val[float64]
|
|
Y func() null.Val[float64]
|
|
Zone func() null.Val[string]
|
|
Zone2 func() null.Val[string]
|
|
GeometryX func() float64
|
|
GeometryY func() float64
|
|
Assignedtech func() null.Val[string]
|
|
DeactivateReason func() null.Val[string]
|
|
Scalarpriority func() null.Val[int64]
|
|
Sourcestatus func() null.Val[string]
|
|
Updated func() time.Time
|
|
Geom func() null.Val[string]
|
|
|
|
r fsPointlocationR
|
|
f *Factory
|
|
|
|
alreadyPersisted bool
|
|
}
|
|
|
|
type fsPointlocationR struct {
|
|
Organization *fsPointlocationROrganizationR
|
|
}
|
|
|
|
type fsPointlocationROrganizationR struct {
|
|
o *OrganizationTemplate
|
|
}
|
|
|
|
// Apply mods to the FSPointlocationTemplate
|
|
func (o *FSPointlocationTemplate) Apply(ctx context.Context, mods ...FSPointlocationMod) {
|
|
for _, mod := range mods {
|
|
mod.Apply(ctx, o)
|
|
}
|
|
}
|
|
|
|
// setModelRels creates and sets the relationships on *models.FSPointlocation
|
|
// according to the relationships in the template. Nothing is inserted into the db
|
|
func (t FSPointlocationTemplate) setModelRels(o *models.FSPointlocation) {
|
|
if t.r.Organization != nil {
|
|
rel := t.r.Organization.o.Build()
|
|
rel.R.FSPointlocations = append(rel.R.FSPointlocations, o)
|
|
o.OrganizationID = rel.ID // h2
|
|
o.R.Organization = rel
|
|
}
|
|
}
|
|
|
|
// BuildSetter returns an *models.FSPointlocationSetter
|
|
// this does nothing with the relationship templates
|
|
func (o FSPointlocationTemplate) BuildSetter() *models.FSPointlocationSetter {
|
|
m := &models.FSPointlocationSetter{}
|
|
|
|
if o.OrganizationID != nil {
|
|
val := o.OrganizationID()
|
|
m.OrganizationID = omit.From(val)
|
|
}
|
|
if o.Accessdesc != nil {
|
|
val := o.Accessdesc()
|
|
m.Accessdesc = omitnull.FromNull(val)
|
|
}
|
|
if o.Active != nil {
|
|
val := o.Active()
|
|
m.Active = omitnull.FromNull(val)
|
|
}
|
|
if o.Comments != nil {
|
|
val := o.Comments()
|
|
m.Comments = omitnull.FromNull(val)
|
|
}
|
|
if o.Creationdate != nil {
|
|
val := o.Creationdate()
|
|
m.Creationdate = omitnull.FromNull(val)
|
|
}
|
|
if o.Creator != nil {
|
|
val := o.Creator()
|
|
m.Creator = omitnull.FromNull(val)
|
|
}
|
|
if o.Description != nil {
|
|
val := o.Description()
|
|
m.Description = omitnull.FromNull(val)
|
|
}
|
|
if o.Externalid != nil {
|
|
val := o.Externalid()
|
|
m.Externalid = 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.Globalid != nil {
|
|
val := o.Globalid()
|
|
m.Globalid = omit.From(val)
|
|
}
|
|
if o.Habitat != nil {
|
|
val := o.Habitat()
|
|
m.Habitat = omitnull.FromNull(val)
|
|
}
|
|
if o.Jurisdiction != nil {
|
|
val := o.Jurisdiction()
|
|
m.Jurisdiction = omitnull.FromNull(val)
|
|
}
|
|
if o.Larvinspectinterval != nil {
|
|
val := o.Larvinspectinterval()
|
|
m.Larvinspectinterval = omitnull.FromNull(val)
|
|
}
|
|
if o.Lastinspectactiontaken != nil {
|
|
val := o.Lastinspectactiontaken()
|
|
m.Lastinspectactiontaken = omitnull.FromNull(val)
|
|
}
|
|
if o.Lastinspectactivity != nil {
|
|
val := o.Lastinspectactivity()
|
|
m.Lastinspectactivity = omitnull.FromNull(val)
|
|
}
|
|
if o.Lastinspectavglarvae != nil {
|
|
val := o.Lastinspectavglarvae()
|
|
m.Lastinspectavglarvae = omitnull.FromNull(val)
|
|
}
|
|
if o.Lastinspectavgpupae != nil {
|
|
val := o.Lastinspectavgpupae()
|
|
m.Lastinspectavgpupae = omitnull.FromNull(val)
|
|
}
|
|
if o.Lastinspectbreeding != nil {
|
|
val := o.Lastinspectbreeding()
|
|
m.Lastinspectbreeding = omitnull.FromNull(val)
|
|
}
|
|
if o.Lastinspectconditions != nil {
|
|
val := o.Lastinspectconditions()
|
|
m.Lastinspectconditions = omitnull.FromNull(val)
|
|
}
|
|
if o.Lastinspectdate != nil {
|
|
val := o.Lastinspectdate()
|
|
m.Lastinspectdate = omitnull.FromNull(val)
|
|
}
|
|
if o.Lastinspectfieldspecies != nil {
|
|
val := o.Lastinspectfieldspecies()
|
|
m.Lastinspectfieldspecies = omitnull.FromNull(val)
|
|
}
|
|
if o.Lastinspectlstages != nil {
|
|
val := o.Lastinspectlstages()
|
|
m.Lastinspectlstages = omitnull.FromNull(val)
|
|
}
|
|
if o.Lasttreatactivity != nil {
|
|
val := o.Lasttreatactivity()
|
|
m.Lasttreatactivity = omitnull.FromNull(val)
|
|
}
|
|
if o.Lasttreatdate != nil {
|
|
val := o.Lasttreatdate()
|
|
m.Lasttreatdate = omitnull.FromNull(val)
|
|
}
|
|
if o.Lasttreatproduct != nil {
|
|
val := o.Lasttreatproduct()
|
|
m.Lasttreatproduct = omitnull.FromNull(val)
|
|
}
|
|
if o.Lasttreatqty != nil {
|
|
val := o.Lasttreatqty()
|
|
m.Lasttreatqty = omitnull.FromNull(val)
|
|
}
|
|
if o.Lasttreatqtyunit != nil {
|
|
val := o.Lasttreatqtyunit()
|
|
m.Lasttreatqtyunit = omitnull.FromNull(val)
|
|
}
|
|
if o.Locationnumber != nil {
|
|
val := o.Locationnumber()
|
|
m.Locationnumber = omitnull.FromNull(val)
|
|
}
|
|
if o.Name != nil {
|
|
val := o.Name()
|
|
m.Name = omitnull.FromNull(val)
|
|
}
|
|
if o.Nextactiondatescheduled != nil {
|
|
val := o.Nextactiondatescheduled()
|
|
m.Nextactiondatescheduled = omitnull.FromNull(val)
|
|
}
|
|
if o.Objectid != nil {
|
|
val := o.Objectid()
|
|
m.Objectid = omit.From(val)
|
|
}
|
|
if o.Priority != nil {
|
|
val := o.Priority()
|
|
m.Priority = omitnull.FromNull(val)
|
|
}
|
|
if o.Stype != nil {
|
|
val := o.Stype()
|
|
m.Stype = omitnull.FromNull(val)
|
|
}
|
|
if o.Symbology != nil {
|
|
val := o.Symbology()
|
|
m.Symbology = omitnull.FromNull(val)
|
|
}
|
|
if o.Usetype != nil {
|
|
val := o.Usetype()
|
|
m.Usetype = omitnull.FromNull(val)
|
|
}
|
|
if o.Waterorigin != nil {
|
|
val := o.Waterorigin()
|
|
m.Waterorigin = omitnull.FromNull(val)
|
|
}
|
|
if o.X != nil {
|
|
val := o.X()
|
|
m.X = omitnull.FromNull(val)
|
|
}
|
|
if o.Y != nil {
|
|
val := o.Y()
|
|
m.Y = 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 = omit.From(val)
|
|
}
|
|
if o.GeometryY != nil {
|
|
val := o.GeometryY()
|
|
m.GeometryY = omit.From(val)
|
|
}
|
|
if o.Assignedtech != nil {
|
|
val := o.Assignedtech()
|
|
m.Assignedtech = omitnull.FromNull(val)
|
|
}
|
|
if o.DeactivateReason != nil {
|
|
val := o.DeactivateReason()
|
|
m.DeactivateReason = omitnull.FromNull(val)
|
|
}
|
|
if o.Scalarpriority != nil {
|
|
val := o.Scalarpriority()
|
|
m.Scalarpriority = omitnull.FromNull(val)
|
|
}
|
|
if o.Sourcestatus != nil {
|
|
val := o.Sourcestatus()
|
|
m.Sourcestatus = omitnull.FromNull(val)
|
|
}
|
|
if o.Updated != nil {
|
|
val := o.Updated()
|
|
m.Updated = omit.From(val)
|
|
}
|
|
if o.Geom != nil {
|
|
val := o.Geom()
|
|
m.Geom = omitnull.FromNull(val)
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildManySetter returns an []*models.FSPointlocationSetter
|
|
// this does nothing with the relationship templates
|
|
func (o FSPointlocationTemplate) BuildManySetter(number int) []*models.FSPointlocationSetter {
|
|
m := make([]*models.FSPointlocationSetter, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.BuildSetter()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
// Build returns an *models.FSPointlocation
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use FSPointlocationTemplate.Create
|
|
func (o FSPointlocationTemplate) Build() *models.FSPointlocation {
|
|
m := &models.FSPointlocation{}
|
|
|
|
if o.OrganizationID != nil {
|
|
m.OrganizationID = o.OrganizationID()
|
|
}
|
|
if o.Accessdesc != nil {
|
|
m.Accessdesc = o.Accessdesc()
|
|
}
|
|
if o.Active != nil {
|
|
m.Active = o.Active()
|
|
}
|
|
if o.Comments != nil {
|
|
m.Comments = o.Comments()
|
|
}
|
|
if o.Creationdate != nil {
|
|
m.Creationdate = o.Creationdate()
|
|
}
|
|
if o.Creator != nil {
|
|
m.Creator = o.Creator()
|
|
}
|
|
if o.Description != nil {
|
|
m.Description = o.Description()
|
|
}
|
|
if o.Externalid != nil {
|
|
m.Externalid = o.Externalid()
|
|
}
|
|
if o.Editdate != nil {
|
|
m.Editdate = o.Editdate()
|
|
}
|
|
if o.Editor != nil {
|
|
m.Editor = o.Editor()
|
|
}
|
|
if o.Globalid != nil {
|
|
m.Globalid = o.Globalid()
|
|
}
|
|
if o.Habitat != nil {
|
|
m.Habitat = o.Habitat()
|
|
}
|
|
if o.Jurisdiction != nil {
|
|
m.Jurisdiction = o.Jurisdiction()
|
|
}
|
|
if o.Larvinspectinterval != nil {
|
|
m.Larvinspectinterval = o.Larvinspectinterval()
|
|
}
|
|
if o.Lastinspectactiontaken != nil {
|
|
m.Lastinspectactiontaken = o.Lastinspectactiontaken()
|
|
}
|
|
if o.Lastinspectactivity != nil {
|
|
m.Lastinspectactivity = o.Lastinspectactivity()
|
|
}
|
|
if o.Lastinspectavglarvae != nil {
|
|
m.Lastinspectavglarvae = o.Lastinspectavglarvae()
|
|
}
|
|
if o.Lastinspectavgpupae != nil {
|
|
m.Lastinspectavgpupae = o.Lastinspectavgpupae()
|
|
}
|
|
if o.Lastinspectbreeding != nil {
|
|
m.Lastinspectbreeding = o.Lastinspectbreeding()
|
|
}
|
|
if o.Lastinspectconditions != nil {
|
|
m.Lastinspectconditions = o.Lastinspectconditions()
|
|
}
|
|
if o.Lastinspectdate != nil {
|
|
m.Lastinspectdate = o.Lastinspectdate()
|
|
}
|
|
if o.Lastinspectfieldspecies != nil {
|
|
m.Lastinspectfieldspecies = o.Lastinspectfieldspecies()
|
|
}
|
|
if o.Lastinspectlstages != nil {
|
|
m.Lastinspectlstages = o.Lastinspectlstages()
|
|
}
|
|
if o.Lasttreatactivity != nil {
|
|
m.Lasttreatactivity = o.Lasttreatactivity()
|
|
}
|
|
if o.Lasttreatdate != nil {
|
|
m.Lasttreatdate = o.Lasttreatdate()
|
|
}
|
|
if o.Lasttreatproduct != nil {
|
|
m.Lasttreatproduct = o.Lasttreatproduct()
|
|
}
|
|
if o.Lasttreatqty != nil {
|
|
m.Lasttreatqty = o.Lasttreatqty()
|
|
}
|
|
if o.Lasttreatqtyunit != nil {
|
|
m.Lasttreatqtyunit = o.Lasttreatqtyunit()
|
|
}
|
|
if o.Locationnumber != nil {
|
|
m.Locationnumber = o.Locationnumber()
|
|
}
|
|
if o.Name != nil {
|
|
m.Name = o.Name()
|
|
}
|
|
if o.Nextactiondatescheduled != nil {
|
|
m.Nextactiondatescheduled = o.Nextactiondatescheduled()
|
|
}
|
|
if o.Objectid != nil {
|
|
m.Objectid = o.Objectid()
|
|
}
|
|
if o.Priority != nil {
|
|
m.Priority = o.Priority()
|
|
}
|
|
if o.Stype != nil {
|
|
m.Stype = o.Stype()
|
|
}
|
|
if o.Symbology != nil {
|
|
m.Symbology = o.Symbology()
|
|
}
|
|
if o.Usetype != nil {
|
|
m.Usetype = o.Usetype()
|
|
}
|
|
if o.Waterorigin != nil {
|
|
m.Waterorigin = o.Waterorigin()
|
|
}
|
|
if o.X != nil {
|
|
m.X = o.X()
|
|
}
|
|
if o.Y != nil {
|
|
m.Y = o.Y()
|
|
}
|
|
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.Assignedtech != nil {
|
|
m.Assignedtech = o.Assignedtech()
|
|
}
|
|
if o.DeactivateReason != nil {
|
|
m.DeactivateReason = o.DeactivateReason()
|
|
}
|
|
if o.Scalarpriority != nil {
|
|
m.Scalarpriority = o.Scalarpriority()
|
|
}
|
|
if o.Sourcestatus != nil {
|
|
m.Sourcestatus = o.Sourcestatus()
|
|
}
|
|
if o.Updated != nil {
|
|
m.Updated = o.Updated()
|
|
}
|
|
if o.Geom != nil {
|
|
m.Geom = o.Geom()
|
|
}
|
|
|
|
o.setModelRels(m)
|
|
|
|
return m
|
|
}
|
|
|
|
// BuildMany returns an models.FSPointlocationSlice
|
|
// Related objects are also created and placed in the .R field
|
|
// NOTE: Objects are not inserted into the database. Use FSPointlocationTemplate.CreateMany
|
|
func (o FSPointlocationTemplate) BuildMany(number int) models.FSPointlocationSlice {
|
|
m := make(models.FSPointlocationSlice, number)
|
|
|
|
for i := range m {
|
|
m[i] = o.Build()
|
|
}
|
|
|
|
return m
|
|
}
|
|
|
|
func ensureCreatableFSPointlocation(m *models.FSPointlocationSetter) {
|
|
if !(m.OrganizationID.IsValue()) {
|
|
val := random_int32(nil)
|
|
m.OrganizationID = omit.From(val)
|
|
}
|
|
if !(m.Globalid.IsValue()) {
|
|
val := random_string(nil)
|
|
m.Globalid = omit.From(val)
|
|
}
|
|
if !(m.Objectid.IsValue()) {
|
|
val := random_int32(nil)
|
|
m.Objectid = omit.From(val)
|
|
}
|
|
if !(m.GeometryX.IsValue()) {
|
|
val := random_float64(nil)
|
|
m.GeometryX = omit.From(val)
|
|
}
|
|
if !(m.GeometryY.IsValue()) {
|
|
val := random_float64(nil)
|
|
m.GeometryY = omit.From(val)
|
|
}
|
|
}
|
|
|
|
// insertOptRels creates and inserts any optional the relationships on *models.FSPointlocation
|
|
// according to the relationships in the template.
|
|
// any required relationship should have already exist on the model
|
|
func (o *FSPointlocationTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FSPointlocation) error {
|
|
var err error
|
|
|
|
return err
|
|
}
|
|
|
|
// Create builds a fsPointlocation and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o *FSPointlocationTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FSPointlocation, error) {
|
|
var err error
|
|
opt := o.BuildSetter()
|
|
ensureCreatableFSPointlocation(opt)
|
|
|
|
if o.r.Organization == nil {
|
|
FSPointlocationMods.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.FSPointlocations.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 fsPointlocation and inserts it into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o *FSPointlocationTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FSPointlocation {
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateOrFail builds a fsPointlocation 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 *FSPointlocationTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FSPointlocation {
|
|
tb.Helper()
|
|
m, err := o.Create(ctx, exec)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateMany builds multiple fsPointlocations and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
func (o FSPointlocationTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FSPointlocationSlice, error) {
|
|
var err error
|
|
m := make(models.FSPointlocationSlice, number)
|
|
|
|
for i := range m {
|
|
m[i], err = o.Create(ctx, exec)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
}
|
|
|
|
return m, nil
|
|
}
|
|
|
|
// MustCreateMany builds multiple fsPointlocations and inserts them into the database
|
|
// Relations objects are also inserted and placed in the .R field
|
|
// panics if an error occurs
|
|
func (o FSPointlocationTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FSPointlocationSlice {
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return m
|
|
}
|
|
|
|
// CreateManyOrFail builds multiple fsPointlocations 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 FSPointlocationTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FSPointlocationSlice {
|
|
tb.Helper()
|
|
m, err := o.CreateMany(ctx, exec, number)
|
|
if err != nil {
|
|
tb.Fatal(err)
|
|
return nil
|
|
}
|
|
return m
|
|
}
|
|
|
|
// FSPointlocation has methods that act as mods for the FSPointlocationTemplate
|
|
var FSPointlocationMods fsPointlocationMods
|
|
|
|
type fsPointlocationMods struct{}
|
|
|
|
func (m fsPointlocationMods) RandomizeAllColumns(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModSlice{
|
|
FSPointlocationMods.RandomOrganizationID(f),
|
|
FSPointlocationMods.RandomAccessdesc(f),
|
|
FSPointlocationMods.RandomActive(f),
|
|
FSPointlocationMods.RandomComments(f),
|
|
FSPointlocationMods.RandomCreationdate(f),
|
|
FSPointlocationMods.RandomCreator(f),
|
|
FSPointlocationMods.RandomDescription(f),
|
|
FSPointlocationMods.RandomExternalid(f),
|
|
FSPointlocationMods.RandomEditdate(f),
|
|
FSPointlocationMods.RandomEditor(f),
|
|
FSPointlocationMods.RandomGlobalid(f),
|
|
FSPointlocationMods.RandomHabitat(f),
|
|
FSPointlocationMods.RandomJurisdiction(f),
|
|
FSPointlocationMods.RandomLarvinspectinterval(f),
|
|
FSPointlocationMods.RandomLastinspectactiontaken(f),
|
|
FSPointlocationMods.RandomLastinspectactivity(f),
|
|
FSPointlocationMods.RandomLastinspectavglarvae(f),
|
|
FSPointlocationMods.RandomLastinspectavgpupae(f),
|
|
FSPointlocationMods.RandomLastinspectbreeding(f),
|
|
FSPointlocationMods.RandomLastinspectconditions(f),
|
|
FSPointlocationMods.RandomLastinspectdate(f),
|
|
FSPointlocationMods.RandomLastinspectfieldspecies(f),
|
|
FSPointlocationMods.RandomLastinspectlstages(f),
|
|
FSPointlocationMods.RandomLasttreatactivity(f),
|
|
FSPointlocationMods.RandomLasttreatdate(f),
|
|
FSPointlocationMods.RandomLasttreatproduct(f),
|
|
FSPointlocationMods.RandomLasttreatqty(f),
|
|
FSPointlocationMods.RandomLasttreatqtyunit(f),
|
|
FSPointlocationMods.RandomLocationnumber(f),
|
|
FSPointlocationMods.RandomName(f),
|
|
FSPointlocationMods.RandomNextactiondatescheduled(f),
|
|
FSPointlocationMods.RandomObjectid(f),
|
|
FSPointlocationMods.RandomPriority(f),
|
|
FSPointlocationMods.RandomStype(f),
|
|
FSPointlocationMods.RandomSymbology(f),
|
|
FSPointlocationMods.RandomUsetype(f),
|
|
FSPointlocationMods.RandomWaterorigin(f),
|
|
FSPointlocationMods.RandomX(f),
|
|
FSPointlocationMods.RandomY(f),
|
|
FSPointlocationMods.RandomZone(f),
|
|
FSPointlocationMods.RandomZone2(f),
|
|
FSPointlocationMods.RandomGeometryX(f),
|
|
FSPointlocationMods.RandomGeometryY(f),
|
|
FSPointlocationMods.RandomAssignedtech(f),
|
|
FSPointlocationMods.RandomDeactivateReason(f),
|
|
FSPointlocationMods.RandomScalarpriority(f),
|
|
FSPointlocationMods.RandomSourcestatus(f),
|
|
FSPointlocationMods.RandomUpdated(f),
|
|
FSPointlocationMods.RandomGeom(f),
|
|
}
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fsPointlocationMods) OrganizationID(val int32) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.OrganizationID = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) OrganizationIDFunc(f func() int32) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.OrganizationID = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetOrganizationID() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomOrganizationID(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.OrganizationID = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fsPointlocationMods) Accessdesc(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Accessdesc = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) AccessdescFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Accessdesc = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetAccessdesc() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Accessdesc = 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 fsPointlocationMods) RandomAccessdesc(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Accessdesc = 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 fsPointlocationMods) RandomAccessdescNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Accessdesc = 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 fsPointlocationMods) Active(val null.Val[int16]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Active = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) ActiveFunc(f func() null.Val[int16]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Active = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetActive() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Active = 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 fsPointlocationMods) RandomActive(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Active = 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 fsPointlocationMods) RandomActiveNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Active = 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 fsPointlocationMods) Comments(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Comments = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) CommentsFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Comments = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetComments() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomComments(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomCommentsNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) Creationdate(val null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Creationdate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) CreationdateFunc(f func() null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Creationdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetCreationdate() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomCreationdate(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomCreationdateNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) Creator(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Creator = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) CreatorFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Creator = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetCreator() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomCreator(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomCreatorNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) Description(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Description = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) DescriptionFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Description = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetDescription() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Description = 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 fsPointlocationMods) RandomDescription(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Description = 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 fsPointlocationMods) RandomDescriptionNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Description = 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 fsPointlocationMods) Externalid(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Externalid = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) ExternalidFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Externalid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetExternalid() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Externalid = 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 fsPointlocationMods) RandomExternalid(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Externalid = 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 fsPointlocationMods) RandomExternalidNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Externalid = 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 fsPointlocationMods) Editdate(val null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Editdate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) EditdateFunc(f func() null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Editdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetEditdate() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomEditdate(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomEditdateNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) Editor(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Editor = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) EditorFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Editor = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetEditor() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomEditor(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomEditorNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) Globalid(val string) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Globalid = func() string { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) GlobalidFunc(f func() string) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Globalid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetGlobalid() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Globalid = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
func (m fsPointlocationMods) RandomGlobalid(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Globalid = func() string {
|
|
return random_string(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fsPointlocationMods) Habitat(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Habitat = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) HabitatFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Habitat = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetHabitat() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomHabitat(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomHabitatNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) Jurisdiction(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Jurisdiction = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) JurisdictionFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Jurisdiction = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetJurisdiction() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Jurisdiction = 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 fsPointlocationMods) RandomJurisdiction(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Jurisdiction = 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 fsPointlocationMods) RandomJurisdictionNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Jurisdiction = 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 fsPointlocationMods) Larvinspectinterval(val null.Val[int16]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Larvinspectinterval = func() null.Val[int16] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LarvinspectintervalFunc(f func() null.Val[int16]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Larvinspectinterval = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLarvinspectinterval() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Larvinspectinterval = 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 fsPointlocationMods) RandomLarvinspectinterval(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Larvinspectinterval = 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 fsPointlocationMods) RandomLarvinspectintervalNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Larvinspectinterval = 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 fsPointlocationMods) Lastinspectactiontaken(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectactiontaken = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LastinspectactiontakenFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectactiontaken = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLastinspectactiontaken() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectactiontaken = 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 fsPointlocationMods) RandomLastinspectactiontaken(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectactiontaken = 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 fsPointlocationMods) RandomLastinspectactiontakenNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectactiontaken = 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 fsPointlocationMods) Lastinspectactivity(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectactivity = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LastinspectactivityFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectactivity = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLastinspectactivity() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectactivity = 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 fsPointlocationMods) RandomLastinspectactivity(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectactivity = 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 fsPointlocationMods) RandomLastinspectactivityNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectactivity = 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 fsPointlocationMods) Lastinspectavglarvae(val null.Val[float64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectavglarvae = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LastinspectavglarvaeFunc(f func() null.Val[float64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectavglarvae = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLastinspectavglarvae() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectavglarvae = 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 fsPointlocationMods) RandomLastinspectavglarvae(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectavglarvae = 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 fsPointlocationMods) RandomLastinspectavglarvaeNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectavglarvae = 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 fsPointlocationMods) Lastinspectavgpupae(val null.Val[float64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectavgpupae = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LastinspectavgpupaeFunc(f func() null.Val[float64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectavgpupae = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLastinspectavgpupae() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectavgpupae = 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 fsPointlocationMods) RandomLastinspectavgpupae(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectavgpupae = 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 fsPointlocationMods) RandomLastinspectavgpupaeNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectavgpupae = 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 fsPointlocationMods) Lastinspectbreeding(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectbreeding = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LastinspectbreedingFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectbreeding = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLastinspectbreeding() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectbreeding = 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 fsPointlocationMods) RandomLastinspectbreeding(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectbreeding = 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 fsPointlocationMods) RandomLastinspectbreedingNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectbreeding = 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 fsPointlocationMods) Lastinspectconditions(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectconditions = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LastinspectconditionsFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectconditions = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLastinspectconditions() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectconditions = 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 fsPointlocationMods) RandomLastinspectconditions(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectconditions = 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 fsPointlocationMods) RandomLastinspectconditionsNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectconditions = 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 fsPointlocationMods) Lastinspectdate(val null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectdate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LastinspectdateFunc(f func() null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLastinspectdate() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectdate = 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 fsPointlocationMods) RandomLastinspectdate(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectdate = 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 fsPointlocationMods) RandomLastinspectdateNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectdate = 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 fsPointlocationMods) Lastinspectfieldspecies(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectfieldspecies = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LastinspectfieldspeciesFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectfieldspecies = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLastinspectfieldspecies() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectfieldspecies = 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 fsPointlocationMods) RandomLastinspectfieldspecies(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectfieldspecies = 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 fsPointlocationMods) RandomLastinspectfieldspeciesNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectfieldspecies = 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 fsPointlocationMods) Lastinspectlstages(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectlstages = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LastinspectlstagesFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectlstages = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLastinspectlstages() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectlstages = 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 fsPointlocationMods) RandomLastinspectlstages(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectlstages = 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 fsPointlocationMods) RandomLastinspectlstagesNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lastinspectlstages = 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 fsPointlocationMods) Lasttreatactivity(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatactivity = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LasttreatactivityFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatactivity = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLasttreatactivity() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatactivity = 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 fsPointlocationMods) RandomLasttreatactivity(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatactivity = 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 fsPointlocationMods) RandomLasttreatactivityNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatactivity = 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 fsPointlocationMods) Lasttreatdate(val null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatdate = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LasttreatdateFunc(f func() null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatdate = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLasttreatdate() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatdate = 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 fsPointlocationMods) RandomLasttreatdate(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatdate = 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 fsPointlocationMods) RandomLasttreatdateNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatdate = 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 fsPointlocationMods) Lasttreatproduct(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatproduct = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LasttreatproductFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatproduct = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLasttreatproduct() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatproduct = 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 fsPointlocationMods) RandomLasttreatproduct(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatproduct = 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 fsPointlocationMods) RandomLasttreatproductNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatproduct = 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 fsPointlocationMods) Lasttreatqty(val null.Val[float64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatqty = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LasttreatqtyFunc(f func() null.Val[float64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatqty = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLasttreatqty() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatqty = 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 fsPointlocationMods) RandomLasttreatqty(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatqty = 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 fsPointlocationMods) RandomLasttreatqtyNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatqty = 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 fsPointlocationMods) Lasttreatqtyunit(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatqtyunit = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LasttreatqtyunitFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatqtyunit = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLasttreatqtyunit() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatqtyunit = 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 fsPointlocationMods) RandomLasttreatqtyunit(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatqtyunit = 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 fsPointlocationMods) RandomLasttreatqtyunitNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Lasttreatqtyunit = 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 fsPointlocationMods) Locationnumber(val null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Locationnumber = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) LocationnumberFunc(f func() null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Locationnumber = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetLocationnumber() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Locationnumber = 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 fsPointlocationMods) RandomLocationnumber(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Locationnumber = 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 fsPointlocationMods) RandomLocationnumberNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Locationnumber = 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 fsPointlocationMods) Name(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Name = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) NameFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Name = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetName() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Name = 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 fsPointlocationMods) RandomName(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Name = 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 fsPointlocationMods) RandomNameNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Name = 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 fsPointlocationMods) Nextactiondatescheduled(val null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Nextactiondatescheduled = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) NextactiondatescheduledFunc(f func() null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Nextactiondatescheduled = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetNextactiondatescheduled() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Nextactiondatescheduled = 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 fsPointlocationMods) RandomNextactiondatescheduled(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Nextactiondatescheduled = 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 fsPointlocationMods) RandomNextactiondatescheduledNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Nextactiondatescheduled = 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 fsPointlocationMods) Objectid(val int32) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Objectid = func() int32 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) ObjectidFunc(f func() int32) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Objectid = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetObjectid() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomObjectid(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Objectid = func() int32 {
|
|
return random_int32(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fsPointlocationMods) Priority(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Priority = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) PriorityFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Priority = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetPriority() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Priority = 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 fsPointlocationMods) RandomPriority(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Priority = 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 fsPointlocationMods) RandomPriorityNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Priority = 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 fsPointlocationMods) Stype(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Stype = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) StypeFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Stype = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetStype() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Stype = 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 fsPointlocationMods) RandomStype(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Stype = 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 fsPointlocationMods) RandomStypeNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Stype = 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 fsPointlocationMods) Symbology(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Symbology = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) SymbologyFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Symbology = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetSymbology() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Symbology = 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 fsPointlocationMods) RandomSymbology(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Symbology = 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 fsPointlocationMods) RandomSymbologyNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Symbology = 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 fsPointlocationMods) Usetype(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Usetype = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) UsetypeFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Usetype = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetUsetype() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Usetype = 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 fsPointlocationMods) RandomUsetype(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Usetype = 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 fsPointlocationMods) RandomUsetypeNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Usetype = 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 fsPointlocationMods) Waterorigin(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Waterorigin = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) WateroriginFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Waterorigin = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetWaterorigin() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Waterorigin = 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 fsPointlocationMods) RandomWaterorigin(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Waterorigin = 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 fsPointlocationMods) RandomWateroriginNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Waterorigin = 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 fsPointlocationMods) X(val null.Val[float64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.X = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) XFunc(f func() null.Val[float64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.X = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetX() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.X = 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 fsPointlocationMods) RandomX(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.X = 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 fsPointlocationMods) RandomXNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.X = 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 fsPointlocationMods) Y(val null.Val[float64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Y = func() null.Val[float64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) YFunc(f func() null.Val[float64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Y = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetY() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Y = 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 fsPointlocationMods) RandomY(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Y = 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 fsPointlocationMods) RandomYNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Y = 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 fsPointlocationMods) Zone(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Zone = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) ZoneFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Zone = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetZone() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomZone(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomZoneNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) Zone2(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Zone2 = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) Zone2Func(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Zone2 = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetZone2() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomZone2(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) RandomZone2NotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
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 fsPointlocationMods) GeometryX(val float64) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.GeometryX = func() float64 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) GeometryXFunc(f func() float64) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.GeometryX = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetGeometryX() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.GeometryX = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
func (m fsPointlocationMods) RandomGeometryX(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.GeometryX = func() float64 {
|
|
return random_float64(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fsPointlocationMods) GeometryY(val float64) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.GeometryY = func() float64 { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) GeometryYFunc(f func() float64) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.GeometryY = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetGeometryY() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.GeometryY = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
func (m fsPointlocationMods) RandomGeometryY(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.GeometryY = func() float64 {
|
|
return random_float64(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fsPointlocationMods) Assignedtech(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Assignedtech = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) AssignedtechFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Assignedtech = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetAssignedtech() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Assignedtech = 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 fsPointlocationMods) RandomAssignedtech(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Assignedtech = 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 fsPointlocationMods) RandomAssignedtechNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Assignedtech = 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 fsPointlocationMods) DeactivateReason(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.DeactivateReason = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) DeactivateReasonFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.DeactivateReason = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetDeactivateReason() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.DeactivateReason = 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 fsPointlocationMods) RandomDeactivateReason(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.DeactivateReason = 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 fsPointlocationMods) RandomDeactivateReasonNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.DeactivateReason = 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 fsPointlocationMods) Scalarpriority(val null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Scalarpriority = func() null.Val[int64] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) ScalarpriorityFunc(f func() null.Val[int64]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Scalarpriority = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetScalarpriority() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Scalarpriority = 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 fsPointlocationMods) RandomScalarpriority(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Scalarpriority = 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 fsPointlocationMods) RandomScalarpriorityNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Scalarpriority = 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 fsPointlocationMods) Sourcestatus(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Sourcestatus = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) SourcestatusFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Sourcestatus = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetSourcestatus() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Sourcestatus = 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 fsPointlocationMods) RandomSourcestatus(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Sourcestatus = 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 fsPointlocationMods) RandomSourcestatusNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Sourcestatus = 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 fsPointlocationMods) Updated(val time.Time) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Updated = func() time.Time { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) UpdatedFunc(f func() time.Time) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Updated = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetUpdated() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Updated = nil
|
|
})
|
|
}
|
|
|
|
// Generates a random value for the column using the given faker
|
|
// if faker is nil, a default faker is used
|
|
func (m fsPointlocationMods) RandomUpdated(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Updated = func() time.Time {
|
|
return random_time_Time(f)
|
|
}
|
|
})
|
|
}
|
|
|
|
// Set the model columns to this value
|
|
func (m fsPointlocationMods) Geom(val null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Geom = func() null.Val[string] { return val }
|
|
})
|
|
}
|
|
|
|
// Set the Column from the function
|
|
func (m fsPointlocationMods) GeomFunc(f func() null.Val[string]) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Geom = f
|
|
})
|
|
}
|
|
|
|
// Clear any values for the column
|
|
func (m fsPointlocationMods) UnsetGeom() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Geom = 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 fsPointlocationMods) RandomGeom(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Geom = 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 fsPointlocationMods) RandomGeomNotNull(f *faker.Faker) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(_ context.Context, o *FSPointlocationTemplate) {
|
|
o.Geom = func() null.Val[string] {
|
|
if f == nil {
|
|
f = &defaultFaker
|
|
}
|
|
|
|
val := random_string(f)
|
|
return null.From(val)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fsPointlocationMods) WithParentsCascading() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(ctx context.Context, o *FSPointlocationTemplate) {
|
|
if isDone, _ := fsPointlocationWithParentsCascadingCtx.Value(ctx); isDone {
|
|
return
|
|
}
|
|
ctx = fsPointlocationWithParentsCascadingCtx.WithValue(ctx, true)
|
|
{
|
|
|
|
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fsPointlocationMods) WithOrganization(rel *OrganizationTemplate) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(ctx context.Context, o *FSPointlocationTemplate) {
|
|
o.r.Organization = &fsPointlocationROrganizationR{
|
|
o: rel,
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fsPointlocationMods) WithNewOrganization(mods ...OrganizationMod) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(ctx context.Context, o *FSPointlocationTemplate) {
|
|
related := o.f.NewOrganizationWithContext(ctx, mods...)
|
|
|
|
m.WithOrganization(related).Apply(ctx, o)
|
|
})
|
|
}
|
|
|
|
func (m fsPointlocationMods) WithExistingOrganization(em *models.Organization) FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(ctx context.Context, o *FSPointlocationTemplate) {
|
|
o.r.Organization = &fsPointlocationROrganizationR{
|
|
o: o.f.FromExistingOrganization(em),
|
|
}
|
|
})
|
|
}
|
|
|
|
func (m fsPointlocationMods) WithoutOrganization() FSPointlocationMod {
|
|
return FSPointlocationModFunc(func(ctx context.Context, o *FSPointlocationTemplate) {
|
|
o.r.Organization = nil
|
|
})
|
|
}
|