nidus-sync/factory/fs_proposedtreatmentarea.bob.go

2503 lines
81 KiB
Go
Raw Normal View History

// 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 FSProposedtreatmentareaMod interface {
Apply(context.Context, *FSProposedtreatmentareaTemplate)
}
type FSProposedtreatmentareaModFunc func(context.Context, *FSProposedtreatmentareaTemplate)
func (f FSProposedtreatmentareaModFunc) Apply(ctx context.Context, n *FSProposedtreatmentareaTemplate) {
f(ctx, n)
}
type FSProposedtreatmentareaModSlice []FSProposedtreatmentareaMod
func (mods FSProposedtreatmentareaModSlice) Apply(ctx context.Context, n *FSProposedtreatmentareaTemplate) {
for _, f := range mods {
f.Apply(ctx, n)
}
}
// FSProposedtreatmentareaTemplate is an object representing the database table.
// all columns are optional and should be set by mods
type FSProposedtreatmentareaTemplate struct {
OrganizationID func() int32
Acres func() null.Val[float64]
Comments func() null.Val[string]
Completed func() null.Val[int16]
Completedby func() null.Val[string]
Completeddate func() null.Val[int64]
Creationdate func() null.Val[int64]
Creator func() null.Val[string]
Duedate func() null.Val[int64]
Exported func() null.Val[int16]
Editdate func() null.Val[int64]
Editor func() null.Val[string]
Globalid func() string
Hectares func() null.Val[float64]
Issprayroute func() null.Val[int16]
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]
Method func() null.Val[string]
Name func() null.Val[string]
Objectid func() int32
Priority func() null.Val[string]
Reviewed func() null.Val[int16]
Reviewedby func() null.Val[string]
Revieweddate func() null.Val[int64]
ShapeArea func() null.Val[float64]
ShapeLength func() null.Val[float64]
Targetapprate func() null.Val[float64]
Targetproduct func() null.Val[string]
Targetspecies func() null.Val[string]
Zone func() null.Val[string]
Zone2 func() null.Val[string]
GeometryX func() null.Val[float64]
GeometryY func() null.Val[float64]
Updated func() time.Time
r fsProposedtreatmentareaR
f *Factory
alreadyPersisted bool
}
type fsProposedtreatmentareaR struct {
Organization *fsProposedtreatmentareaROrganizationR
}
type fsProposedtreatmentareaROrganizationR struct {
o *OrganizationTemplate
}
// Apply mods to the FSProposedtreatmentareaTemplate
func (o *FSProposedtreatmentareaTemplate) Apply(ctx context.Context, mods ...FSProposedtreatmentareaMod) {
for _, mod := range mods {
mod.Apply(ctx, o)
}
}
// setModelRels creates and sets the relationships on *models.FSProposedtreatmentarea
// according to the relationships in the template. Nothing is inserted into the db
func (t FSProposedtreatmentareaTemplate) setModelRels(o *models.FSProposedtreatmentarea) {
if t.r.Organization != nil {
rel := t.r.Organization.o.Build()
rel.R.FSProposedtreatmentareas = append(rel.R.FSProposedtreatmentareas, o)
o.OrganizationID = rel.ID // h2
o.R.Organization = rel
}
}
// BuildSetter returns an *models.FSProposedtreatmentareaSetter
// this does nothing with the relationship templates
func (o FSProposedtreatmentareaTemplate) BuildSetter() *models.FSProposedtreatmentareaSetter {
m := &models.FSProposedtreatmentareaSetter{}
if o.OrganizationID != nil {
val := o.OrganizationID()
m.OrganizationID = omit.From(val)
}
if o.Acres != nil {
val := o.Acres()
m.Acres = omitnull.FromNull(val)
}
if o.Comments != nil {
val := o.Comments()
m.Comments = omitnull.FromNull(val)
}
if o.Completed != nil {
val := o.Completed()
m.Completed = omitnull.FromNull(val)
}
if o.Completedby != nil {
val := o.Completedby()
m.Completedby = omitnull.FromNull(val)
}
if o.Completeddate != nil {
val := o.Completeddate()
m.Completeddate = 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.Duedate != nil {
val := o.Duedate()
m.Duedate = omitnull.FromNull(val)
}
if o.Exported != nil {
val := o.Exported()
m.Exported = 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.Hectares != nil {
val := o.Hectares()
m.Hectares = omitnull.FromNull(val)
}
if o.Issprayroute != nil {
val := o.Issprayroute()
m.Issprayroute = 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.Method != nil {
val := o.Method()
m.Method = omitnull.FromNull(val)
}
if o.Name != nil {
val := o.Name()
m.Name = 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.Reviewed != nil {
val := o.Reviewed()
m.Reviewed = omitnull.FromNull(val)
}
if o.Reviewedby != nil {
val := o.Reviewedby()
m.Reviewedby = omitnull.FromNull(val)
}
if o.Revieweddate != nil {
val := o.Revieweddate()
m.Revieweddate = omitnull.FromNull(val)
}
if o.ShapeArea != nil {
val := o.ShapeArea()
m.ShapeArea = omitnull.FromNull(val)
}
if o.ShapeLength != nil {
val := o.ShapeLength()
m.ShapeLength = omitnull.FromNull(val)
}
if o.Targetapprate != nil {
val := o.Targetapprate()
m.Targetapprate = omitnull.FromNull(val)
}
if o.Targetproduct != nil {
val := o.Targetproduct()
m.Targetproduct = omitnull.FromNull(val)
}
if o.Targetspecies != nil {
val := o.Targetspecies()
m.Targetspecies = omitnull.FromNull(val)
}
if o.Zone != nil {
val := o.Zone()
m.Zone = omitnull.FromNull(val)
}
if o.Zone2 != nil {
val := o.Zone2()
m.Zone2 = omitnull.FromNull(val)
}
if o.GeometryX != nil {
val := o.GeometryX()
m.GeometryX = omitnull.FromNull(val)
}
if o.GeometryY != nil {
val := o.GeometryY()
m.GeometryY = omitnull.FromNull(val)
}
if o.Updated != nil {
val := o.Updated()
m.Updated = omit.From(val)
}
return m
}
// BuildManySetter returns an []*models.FSProposedtreatmentareaSetter
// this does nothing with the relationship templates
func (o FSProposedtreatmentareaTemplate) BuildManySetter(number int) []*models.FSProposedtreatmentareaSetter {
m := make([]*models.FSProposedtreatmentareaSetter, number)
for i := range m {
m[i] = o.BuildSetter()
}
return m
}
// Build returns an *models.FSProposedtreatmentarea
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FSProposedtreatmentareaTemplate.Create
func (o FSProposedtreatmentareaTemplate) Build() *models.FSProposedtreatmentarea {
m := &models.FSProposedtreatmentarea{}
if o.OrganizationID != nil {
m.OrganizationID = o.OrganizationID()
}
if o.Acres != nil {
m.Acres = o.Acres()
}
if o.Comments != nil {
m.Comments = o.Comments()
}
if o.Completed != nil {
m.Completed = o.Completed()
}
if o.Completedby != nil {
m.Completedby = o.Completedby()
}
if o.Completeddate != nil {
m.Completeddate = o.Completeddate()
}
if o.Creationdate != nil {
m.Creationdate = o.Creationdate()
}
if o.Creator != nil {
m.Creator = o.Creator()
}
if o.Duedate != nil {
m.Duedate = o.Duedate()
}
if o.Exported != nil {
m.Exported = o.Exported()
}
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.Hectares != nil {
m.Hectares = o.Hectares()
}
if o.Issprayroute != nil {
m.Issprayroute = o.Issprayroute()
}
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.Method != nil {
m.Method = o.Method()
}
if o.Name != nil {
m.Name = o.Name()
}
if o.Objectid != nil {
m.Objectid = o.Objectid()
}
if o.Priority != nil {
m.Priority = o.Priority()
}
if o.Reviewed != nil {
m.Reviewed = o.Reviewed()
}
if o.Reviewedby != nil {
m.Reviewedby = o.Reviewedby()
}
if o.Revieweddate != nil {
m.Revieweddate = o.Revieweddate()
}
if o.ShapeArea != nil {
m.ShapeArea = o.ShapeArea()
}
if o.ShapeLength != nil {
m.ShapeLength = o.ShapeLength()
}
if o.Targetapprate != nil {
m.Targetapprate = o.Targetapprate()
}
if o.Targetproduct != nil {
m.Targetproduct = o.Targetproduct()
}
if o.Targetspecies != nil {
m.Targetspecies = o.Targetspecies()
}
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.Updated != nil {
m.Updated = o.Updated()
}
o.setModelRels(m)
return m
}
// BuildMany returns an models.FSProposedtreatmentareaSlice
// Related objects are also created and placed in the .R field
// NOTE: Objects are not inserted into the database. Use FSProposedtreatmentareaTemplate.CreateMany
func (o FSProposedtreatmentareaTemplate) BuildMany(number int) models.FSProposedtreatmentareaSlice {
m := make(models.FSProposedtreatmentareaSlice, number)
for i := range m {
m[i] = o.Build()
}
return m
}
func ensureCreatableFSProposedtreatmentarea(m *models.FSProposedtreatmentareaSetter) {
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)
}
}
// insertOptRels creates and inserts any optional the relationships on *models.FSProposedtreatmentarea
// according to the relationships in the template.
// any required relationship should have already exist on the model
func (o *FSProposedtreatmentareaTemplate) insertOptRels(ctx context.Context, exec bob.Executor, m *models.FSProposedtreatmentarea) error {
var err error
return err
}
// Create builds a fsProposedtreatmentarea and inserts it into the database
// Relations objects are also inserted and placed in the .R field
func (o *FSProposedtreatmentareaTemplate) Create(ctx context.Context, exec bob.Executor) (*models.FSProposedtreatmentarea, error) {
var err error
opt := o.BuildSetter()
ensureCreatableFSProposedtreatmentarea(opt)
if o.r.Organization == nil {
FSProposedtreatmentareaMods.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.FSProposedtreatmentareas.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 fsProposedtreatmentarea and inserts it into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o *FSProposedtreatmentareaTemplate) MustCreate(ctx context.Context, exec bob.Executor) *models.FSProposedtreatmentarea {
m, err := o.Create(ctx, exec)
if err != nil {
panic(err)
}
return m
}
// CreateOrFail builds a fsProposedtreatmentarea 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 *FSProposedtreatmentareaTemplate) CreateOrFail(ctx context.Context, tb testing.TB, exec bob.Executor) *models.FSProposedtreatmentarea {
tb.Helper()
m, err := o.Create(ctx, exec)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// CreateMany builds multiple fsProposedtreatmentareas and inserts them into the database
// Relations objects are also inserted and placed in the .R field
func (o FSProposedtreatmentareaTemplate) CreateMany(ctx context.Context, exec bob.Executor, number int) (models.FSProposedtreatmentareaSlice, error) {
var err error
m := make(models.FSProposedtreatmentareaSlice, number)
for i := range m {
m[i], err = o.Create(ctx, exec)
if err != nil {
return nil, err
}
}
return m, nil
}
// MustCreateMany builds multiple fsProposedtreatmentareas and inserts them into the database
// Relations objects are also inserted and placed in the .R field
// panics if an error occurs
func (o FSProposedtreatmentareaTemplate) MustCreateMany(ctx context.Context, exec bob.Executor, number int) models.FSProposedtreatmentareaSlice {
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
panic(err)
}
return m
}
// CreateManyOrFail builds multiple fsProposedtreatmentareas 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 FSProposedtreatmentareaTemplate) CreateManyOrFail(ctx context.Context, tb testing.TB, exec bob.Executor, number int) models.FSProposedtreatmentareaSlice {
tb.Helper()
m, err := o.CreateMany(ctx, exec, number)
if err != nil {
tb.Fatal(err)
return nil
}
return m
}
// FSProposedtreatmentarea has methods that act as mods for the FSProposedtreatmentareaTemplate
var FSProposedtreatmentareaMods fsProposedtreatmentareaMods
type fsProposedtreatmentareaMods struct{}
func (m fsProposedtreatmentareaMods) RandomizeAllColumns(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModSlice{
FSProposedtreatmentareaMods.RandomOrganizationID(f),
FSProposedtreatmentareaMods.RandomAcres(f),
FSProposedtreatmentareaMods.RandomComments(f),
FSProposedtreatmentareaMods.RandomCompleted(f),
FSProposedtreatmentareaMods.RandomCompletedby(f),
FSProposedtreatmentareaMods.RandomCompleteddate(f),
FSProposedtreatmentareaMods.RandomCreationdate(f),
FSProposedtreatmentareaMods.RandomCreator(f),
FSProposedtreatmentareaMods.RandomDuedate(f),
FSProposedtreatmentareaMods.RandomExported(f),
FSProposedtreatmentareaMods.RandomEditdate(f),
FSProposedtreatmentareaMods.RandomEditor(f),
FSProposedtreatmentareaMods.RandomGlobalid(f),
FSProposedtreatmentareaMods.RandomHectares(f),
FSProposedtreatmentareaMods.RandomIssprayroute(f),
FSProposedtreatmentareaMods.RandomLasttreatactivity(f),
FSProposedtreatmentareaMods.RandomLasttreatdate(f),
FSProposedtreatmentareaMods.RandomLasttreatproduct(f),
FSProposedtreatmentareaMods.RandomLasttreatqty(f),
FSProposedtreatmentareaMods.RandomLasttreatqtyunit(f),
FSProposedtreatmentareaMods.RandomMethod(f),
FSProposedtreatmentareaMods.RandomName(f),
FSProposedtreatmentareaMods.RandomObjectid(f),
FSProposedtreatmentareaMods.RandomPriority(f),
FSProposedtreatmentareaMods.RandomReviewed(f),
FSProposedtreatmentareaMods.RandomReviewedby(f),
FSProposedtreatmentareaMods.RandomRevieweddate(f),
FSProposedtreatmentareaMods.RandomShapeArea(f),
FSProposedtreatmentareaMods.RandomShapeLength(f),
FSProposedtreatmentareaMods.RandomTargetapprate(f),
FSProposedtreatmentareaMods.RandomTargetproduct(f),
FSProposedtreatmentareaMods.RandomTargetspecies(f),
FSProposedtreatmentareaMods.RandomZone(f),
FSProposedtreatmentareaMods.RandomZone2(f),
FSProposedtreatmentareaMods.RandomGeometryX(f),
FSProposedtreatmentareaMods.RandomGeometryY(f),
FSProposedtreatmentareaMods.RandomUpdated(f),
}
}
// Set the model columns to this value
func (m fsProposedtreatmentareaMods) OrganizationID(val int32) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.OrganizationID = func() int32 { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) OrganizationIDFunc(f func() int32) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.OrganizationID = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetOrganizationID() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomOrganizationID(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.OrganizationID = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m fsProposedtreatmentareaMods) Acres(val null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Acres = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) AcresFunc(f func() null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Acres = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetAcres() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Acres = 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 fsProposedtreatmentareaMods) RandomAcres(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Acres = 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 fsProposedtreatmentareaMods) RandomAcresNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Acres = 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 fsProposedtreatmentareaMods) Comments(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Comments = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) CommentsFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Comments = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetComments() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomComments(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomCommentsNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Completed(val null.Val[int16]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completed = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) CompletedFunc(f func() null.Val[int16]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completed = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetCompleted() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completed = 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 fsProposedtreatmentareaMods) RandomCompleted(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completed = 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 fsProposedtreatmentareaMods) RandomCompletedNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completed = 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 fsProposedtreatmentareaMods) Completedby(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completedby = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) CompletedbyFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completedby = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetCompletedby() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completedby = 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 fsProposedtreatmentareaMods) RandomCompletedby(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completedby = 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 fsProposedtreatmentareaMods) RandomCompletedbyNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completedby = 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 fsProposedtreatmentareaMods) Completeddate(val null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completeddate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) CompleteddateFunc(f func() null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completeddate = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetCompleteddate() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completeddate = 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 fsProposedtreatmentareaMods) RandomCompleteddate(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completeddate = 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 fsProposedtreatmentareaMods) RandomCompleteddateNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Completeddate = 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 fsProposedtreatmentareaMods) Creationdate(val null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Creationdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) CreationdateFunc(f func() null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Creationdate = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetCreationdate() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomCreationdate(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomCreationdateNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Creator(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Creator = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) CreatorFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Creator = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetCreator() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomCreator(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomCreatorNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Duedate(val null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Duedate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) DuedateFunc(f func() null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Duedate = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetDuedate() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Duedate = 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 fsProposedtreatmentareaMods) RandomDuedate(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Duedate = 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 fsProposedtreatmentareaMods) RandomDuedateNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Duedate = 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 fsProposedtreatmentareaMods) Exported(val null.Val[int16]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Exported = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) ExportedFunc(f func() null.Val[int16]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Exported = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetExported() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Exported = 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 fsProposedtreatmentareaMods) RandomExported(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Exported = 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 fsProposedtreatmentareaMods) RandomExportedNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Exported = 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 fsProposedtreatmentareaMods) Editdate(val null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Editdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) EditdateFunc(f func() null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Editdate = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetEditdate() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomEditdate(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomEditdateNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Editor(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Editor = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) EditorFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Editor = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetEditor() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomEditor(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomEditorNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Globalid(val string) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Globalid = func() string { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) GlobalidFunc(f func() string) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Globalid = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetGlobalid() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomGlobalid(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Globalid = func() string {
return random_string(f)
}
})
}
// Set the model columns to this value
func (m fsProposedtreatmentareaMods) Hectares(val null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Hectares = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) HectaresFunc(f func() null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Hectares = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetHectares() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Hectares = 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 fsProposedtreatmentareaMods) RandomHectares(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Hectares = 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 fsProposedtreatmentareaMods) RandomHectaresNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Hectares = 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 fsProposedtreatmentareaMods) Issprayroute(val null.Val[int16]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Issprayroute = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) IssprayrouteFunc(f func() null.Val[int16]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Issprayroute = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetIssprayroute() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Issprayroute = 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 fsProposedtreatmentareaMods) RandomIssprayroute(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Issprayroute = 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 fsProposedtreatmentareaMods) RandomIssprayrouteNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Issprayroute = 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 fsProposedtreatmentareaMods) Lasttreatactivity(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Lasttreatactivity = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) LasttreatactivityFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Lasttreatactivity = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetLasttreatactivity() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomLasttreatactivity(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomLasttreatactivityNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Lasttreatdate(val null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Lasttreatdate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) LasttreatdateFunc(f func() null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Lasttreatdate = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetLasttreatdate() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomLasttreatdate(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomLasttreatdateNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Lasttreatproduct(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Lasttreatproduct = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) LasttreatproductFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Lasttreatproduct = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetLasttreatproduct() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomLasttreatproduct(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomLasttreatproductNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Lasttreatqty(val null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Lasttreatqty = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) LasttreatqtyFunc(f func() null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Lasttreatqty = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetLasttreatqty() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomLasttreatqty(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomLasttreatqtyNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Lasttreatqtyunit(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Lasttreatqtyunit = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) LasttreatqtyunitFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Lasttreatqtyunit = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetLasttreatqtyunit() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomLasttreatqtyunit(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomLasttreatqtyunitNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Method(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Method = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) MethodFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Method = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetMethod() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Method = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsProposedtreatmentareaMods) RandomMethod(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Method = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsProposedtreatmentareaMods) RandomMethodNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Method = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsProposedtreatmentareaMods) Name(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Name = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) NameFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Name = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetName() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomName(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomNameNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Objectid(val int32) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Objectid = func() int32 { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) ObjectidFunc(f func() int32) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Objectid = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetObjectid() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomObjectid(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Objectid = func() int32 {
return random_int32(f)
}
})
}
// Set the model columns to this value
func (m fsProposedtreatmentareaMods) Priority(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Priority = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) PriorityFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Priority = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetPriority() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomPriority(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomPriorityNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Reviewed(val null.Val[int16]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Reviewed = func() null.Val[int16] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) ReviewedFunc(f func() null.Val[int16]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Reviewed = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetReviewed() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Reviewed = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsProposedtreatmentareaMods) RandomReviewed(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Reviewed = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsProposedtreatmentareaMods) RandomReviewedNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Reviewed = func() null.Val[int16] {
if f == nil {
f = &defaultFaker
}
val := random_int16(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsProposedtreatmentareaMods) Reviewedby(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Reviewedby = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) ReviewedbyFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Reviewedby = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetReviewedby() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Reviewedby = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsProposedtreatmentareaMods) RandomReviewedby(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Reviewedby = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsProposedtreatmentareaMods) RandomReviewedbyNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Reviewedby = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsProposedtreatmentareaMods) Revieweddate(val null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Revieweddate = func() null.Val[int64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) RevieweddateFunc(f func() null.Val[int64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Revieweddate = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetRevieweddate() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Revieweddate = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsProposedtreatmentareaMods) RandomRevieweddate(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Revieweddate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsProposedtreatmentareaMods) RandomRevieweddateNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Revieweddate = func() null.Val[int64] {
if f == nil {
f = &defaultFaker
}
val := random_int64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsProposedtreatmentareaMods) ShapeArea(val null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.ShapeArea = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) ShapeAreaFunc(f func() null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.ShapeArea = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetShapeArea() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.ShapeArea = 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 fsProposedtreatmentareaMods) RandomShapeArea(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.ShapeArea = 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 fsProposedtreatmentareaMods) RandomShapeAreaNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.ShapeArea = 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 fsProposedtreatmentareaMods) ShapeLength(val null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.ShapeLength = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) ShapeLengthFunc(f func() null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.ShapeLength = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetShapeLength() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.ShapeLength = 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 fsProposedtreatmentareaMods) RandomShapeLength(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.ShapeLength = 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 fsProposedtreatmentareaMods) RandomShapeLengthNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.ShapeLength = 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 fsProposedtreatmentareaMods) Targetapprate(val null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetapprate = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) TargetapprateFunc(f func() null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetapprate = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetTargetapprate() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetapprate = 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 fsProposedtreatmentareaMods) RandomTargetapprate(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetapprate = 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 fsProposedtreatmentareaMods) RandomTargetapprateNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetapprate = 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 fsProposedtreatmentareaMods) Targetproduct(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetproduct = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) TargetproductFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetproduct = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetTargetproduct() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetproduct = 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 fsProposedtreatmentareaMods) RandomTargetproduct(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetproduct = 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 fsProposedtreatmentareaMods) RandomTargetproductNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetproduct = 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 fsProposedtreatmentareaMods) Targetspecies(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetspecies = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) TargetspeciesFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetspecies = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetTargetspecies() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetspecies = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsProposedtreatmentareaMods) RandomTargetspecies(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetspecies = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsProposedtreatmentareaMods) RandomTargetspeciesNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Targetspecies = func() null.Val[string] {
if f == nil {
f = &defaultFaker
}
val := random_string(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsProposedtreatmentareaMods) Zone(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Zone = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) ZoneFunc(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Zone = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetZone() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomZone(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomZoneNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) Zone2(val null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Zone2 = func() null.Val[string] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) Zone2Func(f func() null.Val[string]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Zone2 = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetZone2() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomZone2(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomZone2NotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) GeometryX(val null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.GeometryX = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) GeometryXFunc(f func() null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.GeometryX = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetGeometryX() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.GeometryX = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsProposedtreatmentareaMods) RandomGeometryX(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.GeometryX = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsProposedtreatmentareaMods) RandomGeometryXNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.GeometryX = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsProposedtreatmentareaMods) GeometryY(val null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.GeometryY = func() null.Val[float64] { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) GeometryYFunc(f func() null.Val[float64]) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.GeometryY = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetGeometryY() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.GeometryY = nil
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is sometimes null
func (m fsProposedtreatmentareaMods) RandomGeometryY(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.GeometryY = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Generates a random value for the column using the given faker
// if faker is nil, a default faker is used
// The generated value is never null
func (m fsProposedtreatmentareaMods) RandomGeometryYNotNull(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.GeometryY = func() null.Val[float64] {
if f == nil {
f = &defaultFaker
}
val := random_float64(f)
return null.From(val)
}
})
}
// Set the model columns to this value
func (m fsProposedtreatmentareaMods) Updated(val time.Time) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Updated = func() time.Time { return val }
})
}
// Set the Column from the function
func (m fsProposedtreatmentareaMods) UpdatedFunc(f func() time.Time) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Updated = f
})
}
// Clear any values for the column
func (m fsProposedtreatmentareaMods) UnsetUpdated() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
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 fsProposedtreatmentareaMods) RandomUpdated(f *faker.Faker) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(_ context.Context, o *FSProposedtreatmentareaTemplate) {
o.Updated = func() time.Time {
return random_time_Time(f)
}
})
}
func (m fsProposedtreatmentareaMods) WithParentsCascading() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(ctx context.Context, o *FSProposedtreatmentareaTemplate) {
if isDone, _ := fsProposedtreatmentareaWithParentsCascadingCtx.Value(ctx); isDone {
return
}
ctx = fsProposedtreatmentareaWithParentsCascadingCtx.WithValue(ctx, true)
{
related := o.f.NewOrganizationWithContext(ctx, OrganizationMods.WithParentsCascading())
m.WithOrganization(related).Apply(ctx, o)
}
})
}
func (m fsProposedtreatmentareaMods) WithOrganization(rel *OrganizationTemplate) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(ctx context.Context, o *FSProposedtreatmentareaTemplate) {
o.r.Organization = &fsProposedtreatmentareaROrganizationR{
o: rel,
}
})
}
func (m fsProposedtreatmentareaMods) WithNewOrganization(mods ...OrganizationMod) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(ctx context.Context, o *FSProposedtreatmentareaTemplate) {
related := o.f.NewOrganizationWithContext(ctx, mods...)
m.WithOrganization(related).Apply(ctx, o)
})
}
func (m fsProposedtreatmentareaMods) WithExistingOrganization(em *models.Organization) FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(ctx context.Context, o *FSProposedtreatmentareaTemplate) {
o.r.Organization = &fsProposedtreatmentareaROrganizationR{
o: o.f.FromExistingOrganization(em),
}
})
}
func (m fsProposedtreatmentareaMods) WithoutOrganization() FSProposedtreatmentareaMod {
return FSProposedtreatmentareaModFunc(func(ctx context.Context, o *FSProposedtreatmentareaTemplate) {
o.r.Organization = nil
})
}