feat:回滚自动化生产代码

This commit is contained in:
songzhibin97
2021-07-10 17:39:24 +08:00
parent 44e7b643f9
commit 76d38c1108
9 changed files with 177 additions and 7 deletions
+5 -1
View File
@@ -2,12 +2,16 @@ package model
import "errors"
type AutoHistoryByID struct {
ID uint `json:"id"`
}
// 初始版本自动化代码工具
type AutoCodeStruct struct {
StructName string `json:"structName"` // Struct名称
TableName string `json:"tableName"` // 表名
PackageName string `json:"packageName"` // 文件名称
HumpPackageName string `json:"humpPackageName"` // go文件名称
HumpPackageName string `json:"humpPackageName"` // go文件名称
Abbreviation string `json:"abbreviation"` // Struct简称
Description string `json:"description"` // Struct中文名称
AutoCreateApiToSql bool `json:"autoCreateApiToSql"` // 是否自动创建api
+13
View File
@@ -0,0 +1,13 @@
package model
import "gin-vue-admin/global"
// 自动迁移代码记录,用于回滚,重放使用
type SysAutoCodeHistory struct {
global.GVA_MODEL
TableName string
AutoCodeMeta string `gorm:"type:text"` // 其他meta信息 path;path
InjectionMeta string `gorm:"type:text"` // 注入的内容 RouterPath@functionName@RouterString;
Flag int // 表示对应状态 0 代表创建, 1 代表回滚 ...
}