Skip to content

Commit

Permalink
add: 允许锁住_gen文件不再生成
Browse files Browse the repository at this point in the history
  • Loading branch information
cyz-home committed Dec 7, 2023
1 parent 497b1b5 commit 42bf01c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions console/commands/orm/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 42bf01c

Please sign in to comment.