package models_bun import "fmt" import db "github.com/bitechdev/GoCore/pkg/models" import "github.com/bitechdev/GoCore/pkg/types" import "github.com/uptrace/bun" import resolvespec_common "github.com/bitechdev/ResolveSpec/pkg/common" //ModelCoreMastertask - Generated Table for Schema core type ModelCoreMastertask struct { bun.BaseModel `bun:"table:core.mastertask,alias:mastertask"` Allactionsmustcomplete resolvespec_common.SqlInt16 `json:"allactionsmustcomplete" bun:"allactionsmustcomplete,type:smallint,"` Condition resolvespec_common.SqlString `json:"condition" bun:"condition,type:citext,"` Description resolvespec_common.SqlString `json:"description" bun:"description,type:citext,"` Dueday resolvespec_common.SqlInt16 `json:"dueday" bun:"dueday,type:smallint,"` Dueoption resolvespec_common.SqlString `json:"dueoption" bun:"dueoption,type:citext,"` Escalation resolvespec_common.SqlInt32 `json:"escalation" bun:"escalation,type:integer,"` Escalationoption resolvespec_common.SqlString `json:"escalationoption" bun:"escalationoption,type:citext,"` GUID resolvespec_common.SqlUUID `json:"guid" bun:"guid,type:uuid,default:newid(),"` Inactive resolvespec_common.SqlInt16 `json:"inactive" bun:"inactive,type:smallint,"` Jsonvalue resolvespec_common.SqlJSONB `json:"jsonvalue" bun:"jsonvalue,type:jsonb,"` Mastertasknote resolvespec_common.SqlString `json:"mastertasknote" bun:"mastertasknote,type:citext,"` Repeatinterval resolvespec_common.SqlInt16 `json:"repeatinterval" bun:"repeatinterval,type:smallint,"` Repeattype resolvespec_common.SqlString `json:"repeattype" bun:"repeattype,type:citext,"` Ridjsonschema resolvespec_common.SqlInt32 `json:"rid_jsonschema" bun:"rid_jsonschema,type:integer,"` Ridmasterprocess resolvespec_common.SqlInt32 `json:"rid_masterprocess" bun:"rid_masterprocess,type:integer,"` Ridmastertask resolvespec_common.SqlInt32 `json:"rid_mastertask" bun:"rid_mastertask,type:integer,pk,default:nextval('core.identity_mastertask_rid_mastertask'::regclass),"` Ridmastertypetasktype resolvespec_common.SqlInt32 `json:"rid_mastertype_tasktype" bun:"rid_mastertype_tasktype,type:integer,"` Sequenceno resolvespec_common.SqlInt32 `json:"sequenceno" bun:"sequenceno,type:integer,"` Singletask resolvespec_common.SqlInt16 `json:"singletask" bun:"singletask,type:smallint,"` Startday resolvespec_common.SqlInt16 `json:"startday" bun:"startday,type:smallint,"` Updatecnt int64 `json:"updatecnt" bun:"updatecnt,type:integer,default:0,"` JSON *ModelCoreJsonschema `json:"JSON,omitempty" bun:"rel:has-one,join:rid_jsonschema=rid_jsonschema"` MPR *ModelCoreMasterprocess `json:"MPR,omitempty" bun:"rel:has-one,join:rid_masterprocess=rid_masterprocess"` MTT *ModelCoreMastertype `json:"MTT,omitempty" bun:"rel:has-one,join:rid_mastertype_tasktype=rid_mastertype"` MAL []*ModelCoreMastertaskitem `json:"MAL,omitempty" bun:"rel:has-many,join:rid_mastertask=rid_mastertask"` TAS []*ModelCoreTasklist `json:"TAS,omitempty" bun:"rel:has-many,join:rid_mastertask=rid_mastertask"` db.DBAdhocBuffer `json:",omitempty" bun:",scanonly"` db.DBGetIDInterface `json:",omitempty" bun:"-"` types.SQLTypable `json:",omitempty" bun:"-"` } // TableName - Returns the table name for the object. func (m ModelCoreMastertask) TableName() string { return "core.mastertask" } // TableName - Returns the table name for the object. func (m ModelCoreMastertask) TableNameOnly() string { return "mastertask" } // SchemaName - Returns the schema name for the object. func (m ModelCoreMastertask) SchemaName() string { return "core" } // GetID - ID interface func (m ModelCoreMastertask) GetID() int64 { return m.Ridmastertask.Int64() } // GetIDStr - ID interface func (m ModelCoreMastertask) GetIDStr() string { return fmt.Sprintf("%d", m.Ridmastertask) } // SetID - ID interface func (m ModelCoreMastertask) SetID(newid int64) { m.UpdateID(newid) } func (m *ModelCoreMastertask) UpdateID(newid int64) { m.Ridmastertask.FromString(fmt.Sprintf("%d", newid)) } // GetIDName - ID interface func (m ModelCoreMastertask) GetIDName() string { return "rid_mastertask" } // GetPrefix - Returns a table prefix func (m ModelCoreMastertask) GetPrefix() string { return "MTL" } // GetRowNumber - Returns the row number of the record func (m ModelCoreMastertask) GetRowNumber() int64 { return m.RowNumber } // SetRowNumber - Set the row number of a record func (m *ModelCoreMastertask) SetRowNumber(num int64) { m.RowNumber = num }