diff --git a/sqltool/custom.yml b/sqltool/custom.yml deleted file mode 100644 index 58c52ce..0000000 --- a/sqltool/custom.yml +++ /dev/null @@ -1,39 +0,0 @@ -kind: reverse -name: mydb -source: - database: sqlite3 - conn_str: "../wol.db" -targets: -- type: codes - include_tables: # tables included, you can use ** - - "*" - exclude_tables: # tables excluded, you can use ** - - c - table_mapper: snake # how table name map to class or struct name - column_mapper: snake # how column name map to class or struct field name - table_prefix: "" # table prefix - multiple_files: true # generate multiple files or one - language: golang - template: | # template for code file, it has higher perior than template_path - package models - - {{$ilen := len .Imports}} - {{if gt $ilen 0}} - import ( - {{range .Imports}}"{{.}}"{{end}} - ) - {{end}} - - {{range .Tables}} - type {{TableMapper .Name}} struct { - {{$table := .}} - {{range .ColumnsSeq}}{{$col := $table.GetColumn .}} {{ColumnMapper $col.Name}} {{Type $col}} `{{Tag $table $col}}` - {{end}} - } - - func (m *{{TableMapper .Name}}) TableName() string { - return "{{$table.Name}}" - } - {{end}} - template_path: ./template/goxorm.tmpl # template path for code file, it has higher perior than template field on language - output_dir: ../models # code output directory \ No newline at end of file diff --git a/sqltool/reverse--windows-amd64.exe b/sqltool/reverse--windows-amd64.exe deleted file mode 100644 index f551a00..0000000 Binary files a/sqltool/reverse--windows-amd64.exe and /dev/null differ