mirror of
https://github.com/go-home-admin/toolset.git
synced 2026-04-22 16:17:04 +08:00
add: 支持直接根据 sqlite 注释生成 orm
This commit is contained in:
@@ -57,7 +57,7 @@ func GenSqlite(table string, goType parser.GoType, out string) {
|
||||
var baseFunStr string
|
||||
baseFunStr = strings.ReplaceAll(baseMysqlFuncStr,
|
||||
"tx = providers.GetBean(\"mysql, {db}\").(*gorm.DB).Model(&MysqlTableName{})",
|
||||
"tx = DB()")
|
||||
"tx = DB().Model(&MysqlTableName{})")
|
||||
for old, newStr := range map[string]string{
|
||||
"MysqlTableName": parser.StringToHump(table),
|
||||
"{table_name}": table,
|
||||
|
||||
Reference in New Issue
Block a user