ormtool

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 3 Imported by: 2

README

数据库表转换为golang 结构体

1. 获取方式

go get github.com/enjoy322/ormtool@v0.0.9

2. 配置说明

# 保存路径
SavePath:       "./models/model.go",
# 是否生成web json tag
IsGenJsonTag:   true,
# 是否生成在同一文件
IsGenInOneFile: true,
# 1:不生成数据库基本信息 2:生成简单的数据库字段信息
GenDBInfoType: 2,
# json tag类型,前提:IsGenJsonTag:true. 1.UserName 2.userName 3.user_name 4.user-name
JsonTagType:    1,
# 是否生成建表语句
IsGenCreateSQL: true

欢迎提交pr和issue

参考

https://github.com/gohouse/converter

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMySQL

func GenerateMySQL(dbConf base.MysqlConfig, c base.Config)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL