// Package model define model struct of model runtime service package model import ( "modelRT/constants" "modelRT/orm" ) // SelectModelByType define select the data structure for parsing based on the input model type func SelectModelByType(modelType int) BasicModelInterface { switch modelType { case constants.BusbarType: return &orm.BusbarSection{} case constants.AsyncMotorType: return &orm.AsyncMotor{} case constants.DemoType: return &orm.Demo{} } return nil } // SelectModelNameByType define select the data structure name for parsing based on the input model type func SelectModelNameByType(modelType int) string { return SelectModelByType(modelType).ReturnTableName() }