1. pkg/models/models.go:184 - Fixed typo in ForeignKeyConstraint constant from "foreign_Key" to "foreign_key" 2. pkg/readers/drawdb/reader.go:62-68 - Fixed ReadSchema() to properly detect schema name from tables instead of hardcoding "default" 3. pkg/writers/dbml/writer.go:128 - Changed primary key attribute from "primary key" to DBML standard "pk" 4. pkg/writers/dbml/writer.go:208-221 - Fixed foreign key reference format to use "table.column" syntax for single columns instead of "table.(column)" Test Results All reader and writer tests are now passing: Readers: - DBML: 74.4% coverage (2 tests skipped due to missing parser features for Ref statements) - DCTX: 77.6% coverage - DrawDB: 83.6% coverage - JSON: 82.1% coverage - YAML: 82.1% coverage Writers: - Bun: 68.5% coverage - DBML: 91.5% coverage - DCTX: 100.0% coverage - DrawDB: 83.8% coverage - GORM: 69.2% coverage - JSON: 82.4% coverage - YAML: 82.4% coverage
90 lines
4.7 KiB
Go
Executable File
90 lines
4.7 KiB
Go
Executable File
package models
|
|
|
|
// //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
|
|
// }
|