代码生成器最后一步(仅剩传给前端下载)

This commit is contained in:
QM303176530
2020-03-30 00:06:48 +08:00
parent e36dcecd0b
commit cc6e5a5a60
17 changed files with 231 additions and 812 deletions
+9
View File
@@ -0,0 +1,9 @@
代码解压后把fe的api文件内容粘贴进前端api文件夹下并修改为自己想要的名字即可
后端代码解压后同理,放到自己想要的 mvc对应路径 并且到 initRouter中注册自动生成的路由 到registTable中注册自动生成的model
项目github:"https://github.com/piexlmax/gin-vue-admin"
希望大家给个star多多鼓励
暂时不保存大家生成的结构体 只为方便一次性使用
+2 -2
View File
@@ -9,8 +9,8 @@ import (
)
type {{.StructName}} struct {
gorm.Model {{range .Components}}
{{.ComponentName}} {{.ComponentType}} `json:"{{.ComponentJson}}"` {{ end }}
gorm.Model {{range .Fields}}
{{.FieldName}} {{.FieldType}} `json:"{{.FieldJson}}"{{if .ColumnName}} gorm:"column:{{.ColumnName}}"{{end}}`{{ end }}
}
// 创建{{.StructName}}