kind:reverse name:mydb source: database:mysql conn_str:"user:password@tcp(MysqlIP:MysqlPort)/dbname?charset=utf8" 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 packagemodels
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