mirror of
https://github.com/go-home-admin/toolset.git
synced 2025-12-24 13:37:52 +08:00
add: 允许锁住_gen文件不再生成
This commit is contained in:
@@ -61,6 +61,10 @@ func GenMysql(name string, conf Conf, out string) {
|
||||
mysqlTableName := parser.StringToSnake(table)
|
||||
file := out + "/" + mysqlTableName
|
||||
|
||||
if _, err := os.Stat(file + "_lock.go"); !os.IsNotExist(err) {
|
||||
continue
|
||||
}
|
||||
|
||||
str := "package " + name
|
||||
str += "\nimport (" + imports[table] + "\n)"
|
||||
str += "\n" + genOrmStruct(table, columns, conf, relationship[table])
|
||||
|
||||
Reference in New Issue
Block a user