Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Field ¶
type Field struct { DatabaseName string SQLType string IsPrimaryKey bool GoType reflect.Type GoName string DALfmt string DTOfmt string }
Field collection of var about one column.
type ModelInfo ¶
type ModelInfo struct { Module string StructName string ShortStructName string IsTable bool TableName string IsView bool ViewName string Fields []Field Import map[string]bool IDName string IDType string DBImport string JSONobj string }
ModelInfo Object pass to Generator, to Generate DTO,DAL.
func GenerateStruct ¶
func GenerateStruct(module, tableName string, viewName string, cols []*sql.ColumnType, primarykeys []string, dbImport string) *ModelInfo
GenerateStruct generates a struct for the given table.
Click to show internal directories.
Click to hide internal directories.