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
82 lines
4.0 KiB
Go
Executable File
82 lines
4.0 KiB
Go
Executable File
package models
|
|
|
|
// // ModelCoreMasterprocess - Generated Table for Schema core
|
|
// type ModelCoreMasterprocess struct {
|
|
// Description string `json:"description" gorm:"Column:description;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;"`
|
|
// Ridjsonschema types.ZNullInt32 `json:"rid_jsonschema" gorm:"Column:rid_jsonschema;type:integer;"`
|
|
// Ridmasterprocess int32 `json:"rid_masterprocess" gorm:"Column:rid_masterprocess;type:integer;primaryKey;default:nextval('core.identity_masterprocess_rid_masterprocess'::regclass);"`
|
|
// Ridmastertypehubtype types.ZNullInt32 `json:"rid_mastertype_hubtype" gorm:"Column:rid_mastertype_hubtype;type:integer;"`
|
|
// Ridmastertypeprocesstype types.ZNullInt32 `json:"rid_mastertype_processtype" gorm:"Column:rid_mastertype_processtype;type:integer;"`
|
|
// Ridprogrammodule types.ZNullInt32 `json:"rid_programmodule" gorm:"Column:rid_programmodule;type:integer;"`
|
|
// Sequenceno types.ZNullInt32 `json:"sequenceno" gorm:"Column:sequenceno;type:integer;"`
|
|
// Singleprocess types.SInt16 `json:"singleprocess" gorm:"Column:singleprocess;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;"`
|
|
// MTT_RID_MASTERTYPE_HUBTYPE *ModelCoreMastertype `json:"MTT_RID_MASTERTYPE_HUBTYPE,omitempty" gorm:"references:rid_mastertype_hubtype;foreignKey:rid_mastertype;"`
|
|
// MTT_RID_MASTERTYPE_PROCESSTYPE *ModelCoreMastertype `json:"MTT_RID_MASTERTYPE_PROCESSTYPE,omitempty" gorm:"references:rid_mastertype_processtype;foreignKey:rid_mastertype;"`
|
|
// //PMO *ModelPublicProgrammodule `json:"PMO,omitempty" gorm:"references:rid_programmodule;foreignKey:rid_programmodule;"`
|
|
|
|
// MTL []*ModelCoreMastertask `json:"MTL,omitempty" gorm:"references:rid_masterprocess;foreignKey:rid_masterprocess;opt_c"`
|
|
// PRO []*ModelCoreProcess `json:"PRO,omitempty" gorm:"references:rid_masterprocess;foreignKey:rid_masterprocess;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 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 int64(m.Ridmasterprocess)
|
|
// }
|
|
|
|
// // 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 = int32(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
|
|
// }
|