94 lines
4.6 KiB
Go
Executable File
94 lines
4.6 KiB
Go
Executable File
package models
|
|
|
|
import "fmt"
|
|
import db "github.com/bitechdev/GoCore/pkg/models"
|
|
import "github.com/bitechdev/GoCore/pkg/types"
|
|
|
|
//ModelCoreMastertask - Generated Table for Schema core
|
|
type ModelCoreMastertask struct {
|
|
Allactionsmustcomplete types.SInt16 `json:"allactionsmustcomplete" gorm:"Column:allactionsmustcomplete;type:smallint;"`
|
|
Condition string `json:"condition" gorm:"Column:condition;type:citext;"`
|
|
Description string `json:"description" gorm:"Column:description;type:citext;"`
|
|
Dueday types.SInt16 `json:"dueday" gorm:"Column:dueday;type:smallint;"`
|
|
Dueoption string `json:"dueoption" gorm:"Column:dueoption;type:citext;"`
|
|
Escalation types.ZNullInt32 `json:"escalation" gorm:"Column:escalation;type:integer;"`
|
|
Escalationoption string `json:"escalationoption" gorm:"Column:escalationoption;type:citext;"`
|
|
GUID types.NullableUUID `json:"guid" gorm:"Column:guid;type:uuid;default:newid();"`
|
|
Inactive types.SInt16 `json:"inactive" gorm:"Column:inactive;type:smallint;"`
|
|
Jsonvalue types.NullableJSONB `json:"jsonvalue" gorm:"Column:jsonvalue;type:jsonb;"`
|
|
Mastertasknote string `json:"mastertasknote" gorm:"Column:mastertasknote;type:citext;"`
|
|
Repeatinterval types.SInt16 `json:"repeatinterval" gorm:"Column:repeatinterval;type:smallint;"`
|
|
Repeattype string `json:"repeattype" gorm:"Column:repeattype;type:citext;"`
|
|
Ridjsonschema types.ZNullInt32 `json:"rid_jsonschema" gorm:"Column:rid_jsonschema;type:integer;"`
|
|
Ridmasterprocess types.ZNullInt32 `json:"rid_masterprocess" gorm:"Column:rid_masterprocess;type:integer;"`
|
|
Ridmastertask int32 `json:"rid_mastertask" gorm:"Column:rid_mastertask;type:integer;primaryKey;default:nextval('core.identity_mastertask_rid_mastertask'::regclass);"`
|
|
Ridmastertypetasktype types.ZNullInt32 `json:"rid_mastertype_tasktype" gorm:"Column:rid_mastertype_tasktype;type:integer;"`
|
|
Sequenceno types.ZNullInt32 `json:"sequenceno" gorm:"Column:sequenceno;type:integer;"`
|
|
Singletask types.SInt16 `json:"singletask" gorm:"Column:singletask;type:smallint;"`
|
|
Startday types.SInt16 `json:"startday" gorm:"Column:startday;type:smallint;"`
|
|
Updatecnt int64 `json:"updatecnt" gorm:"Column:updatecnt;type:integer;default:0;"`
|
|
JSON *ModelCoreJsonschema `json:"JSON,omitempty" gorm:"references:rid_jsonschema;foreignKey:rid_jsonschema;"`
|
|
MPR *ModelCoreMasterprocess `json:"MPR,omitempty" gorm:"references:rid_masterprocess;foreignKey:rid_masterprocess;"`
|
|
MTT *ModelCoreMastertype `json:"MTT,omitempty" gorm:"references:rid_mastertype_tasktype;foreignKey:rid_mastertype;"`
|
|
|
|
MAL []*ModelCoreMastertaskitem `json:"MAL,omitempty" gorm:"references:rid_mastertask;foreignKey:rid_mastertask;opt_c"`
|
|
TAS []*ModelCoreTasklist `json:"TAS,omitempty" gorm:"references:rid_mastertask;foreignKey:rid_mastertask;opt_c"`
|
|
db.DBAdhocBuffer `json:",omitempty"`
|
|
db.DBGetIDInterface `json:",omitempty" gorm:"-"`
|
|
types.SQLTypable `json:",omitempty" gorm:"-"`
|
|
}
|
|
|
|
// 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 int64(m.Ridmastertask)
|
|
}
|
|
|
|
// 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 = int32(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
|
|
}
|