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" //ModelCoreMasterprocess - Generated Table for Schema core type ModelCoreMasterprocess struct { bun.BaseModel `bun:"table:core.masterprocess,alias:masterprocess"` Description resolvespec_common.SqlString `json:"description" bun:"description,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,"` Ridjsonschema resolvespec_common.SqlInt32 `json:"rid_jsonschema" bun:"rid_jsonschema,type:integer,"` Ridmasterprocess resolvespec_common.SqlInt32 `json:"rid_masterprocess" bun:"rid_masterprocess,type:integer,pk,default:nextval('core.identity_masterprocess_rid_masterprocess'::regclass),"` Ridmastertypehubtype resolvespec_common.SqlInt32 `json:"rid_mastertype_hubtype" bun:"rid_mastertype_hubtype,type:integer,"` Ridmastertypeprocesstype resolvespec_common.SqlInt32 `json:"rid_mastertype_processtype" bun:"rid_mastertype_processtype,type:integer,"` Ridprogrammodule resolvespec_common.SqlInt32 `json:"rid_programmodule" bun:"rid_programmodule,type:integer,"` Sequenceno resolvespec_common.SqlInt32 `json:"sequenceno" bun:"sequenceno,type:integer,"` Singleprocess resolvespec_common.SqlInt16 `json:"singleprocess" bun:"singleprocess,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"` MTT_RID_MASTERTYPE_HUBTYPE *ModelCoreMastertype `json:"MTT_RID_MASTERTYPE_HUBTYPE,omitempty" bun:"rel:has-one,join:rid_mastertype_hubtype=rid_mastertype"` MTT_RID_MASTERTYPE_PROCESSTYPE *ModelCoreMastertype `json:"MTT_RID_MASTERTYPE_PROCESSTYPE,omitempty" bun:"rel:has-one,join:rid_mastertype_processtype=rid_mastertype"` PMO *ModelPublicProgrammodule `json:"PMO,omitempty" bun:"rel:has-one,join:rid_programmodule=rid_programmodule"` MTL []*ModelCoreMastertask `json:"MTL,omitempty" bun:"rel:has-many,join:rid_masterprocess=rid_masterprocess"` PRO []*ModelCoreProcess `json:"PRO,omitempty" bun:"rel:has-many,join:rid_masterprocess=rid_masterprocess"` 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 ModelCoreMasterprocess) TableName() string { return "core.masterprocess" } // TableName - Returns the table name for the object. func (m ModelCoreMasterprocess) TableNameOnly() string { return "masterprocess" } // SchemaName - Returns the schema name for the object. func (m ModelCoreMasterprocess) SchemaName() string { return "core" } // GetID - ID interface func (m ModelCoreMasterprocess) GetID() int64 { return m.Ridmasterprocess.Int64() } // GetIDStr - ID interface func (m ModelCoreMasterprocess) GetIDStr() string { return fmt.Sprintf("%d", m.Ridmasterprocess) } // SetID - ID interface func (m ModelCoreMasterprocess) SetID(newid int64) { m.UpdateID(newid) } func (m *ModelCoreMasterprocess) UpdateID(newid int64) { m.Ridmasterprocess.FromString(fmt.Sprintf("%d", newid)) } // GetIDName - ID interface func (m ModelCoreMasterprocess) GetIDName() string { return "rid_masterprocess" } // GetPrefix - Returns a table prefix func (m ModelCoreMasterprocess) GetPrefix() string { return "MPR" } // GetRowNumber - Returns the row number of the record func (m ModelCoreMasterprocess) GetRowNumber() int64 { return m.RowNumber } // SetRowNumber - Set the row number of a record func (m *ModelCoreMasterprocess) SetRowNumber(num int64) { m.RowNumber = num }