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