This commit is contained in:
eson
2023-06-19 10:12:58 +08:00
parent c5ecca3da2
commit 038d2d36a4
225 changed files with 419 additions and 314 deletions

View File

@@ -115,7 +115,7 @@ func GenFromPath(mdir string, cols []Column, tableName string, tableComment stri
// 匹配到主键定义
fcontent := "package model\n"
fcontent := "package gmodel\n"
structstr := "// %s %s\ntype %s struct {%s\n}\n"
@@ -210,7 +210,7 @@ func GenFromPath(mdir string, cols []Column, tableName string, tableComment stri
panic(err)
}
fcontent = "package model\n// TODO: 使用model的属性做你想做的"
fcontent = "package gmodel\n// TODO: 使用model的属性做你想做的"
genGoLogicFileName := fmt.Sprintf("%s/%s_logic.go", mdir, tableName)
// 使用 os.Stat 函数获取文件信息