Update model.go

This commit is contained in:
谢小军
2019-12-13 20:09:22 +08:00
parent e770a9834e
commit d0a57e4c0a

View File

@@ -12,11 +12,21 @@ type _Model struct {
}
// Generate build code string.生成代码
func Generate(info DBInfo) string {
func Generate(info DBInfo) (out []GenOutInfo) {
m := _Model{
info: info,
}
return m.generate()
// struct
var stt GenOutInfo
stt.FileCtx = m.generate()
stt.FileName = info.DbName + ".go"
out = append(out, stt)
// ------end
// gen function
// -------------- end
return
}
func (m *_Model) generate() string {