feat: 自动化代码可自行配置mod
This commit is contained in:
@@ -2,17 +2,17 @@ package {{.Package}}
|
||||
|
||||
import (
|
||||
{{if not .OnlyTemplate}}
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/{{.Package}}"
|
||||
{{.Package}}Req "github.com/flipped-aurora/gin-vue-admin/server/model/{{.Package}}/request"
|
||||
"{{.Module}}/global"
|
||||
"{{.Module}}/model/common/response"
|
||||
"{{.Module}}/model/{{.Package}}"
|
||||
{{.Package}}Req "{{.Module}}/model/{{.Package}}/request"
|
||||
"github.com/gin-gonic/gin"
|
||||
"go.uber.org/zap"
|
||||
{{- if .AutoCreateResource}}
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/utils"
|
||||
"{{.Module}}/utils"
|
||||
{{- end }}
|
||||
{{- else}}
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
|
||||
"{{.Module}}/model/common/response"
|
||||
"github.com/gin-gonic/gin"
|
||||
{{- end}}
|
||||
)
|
||||
|
||||
@@ -31,7 +31,7 @@ package {{.Package}}
|
||||
{{- if not .OnlyTemplate}}
|
||||
import (
|
||||
{{- if .GvaModel }}
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"{{.Module}}/global"
|
||||
{{- end }}
|
||||
{{- if or .HasTimer }}
|
||||
"time"
|
||||
|
||||
@@ -25,7 +25,7 @@ package request
|
||||
|
||||
import (
|
||||
{{- if not .OnlyTemplate }}
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"{{.Module}}/model/common/request"
|
||||
{{ if or .HasSearchTimer .GvaModel}}"time"{{ end }}
|
||||
{{- end }}
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package {{.Package}}
|
||||
|
||||
import (
|
||||
{{if .OnlyTemplate}}// {{ end}}"github.com/flipped-aurora/gin-vue-admin/server/middleware"
|
||||
{{if .OnlyTemplate}}// {{ end}}"{{.Module}}/middleware"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@ package {{.Package}}
|
||||
|
||||
import (
|
||||
{{- if not .OnlyTemplate }}
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/{{.Package}}"
|
||||
{{.Package}}Req "github.com/flipped-aurora/gin-vue-admin/server/model/{{.Package}}/request"
|
||||
"{{.Module}}/global"
|
||||
"{{.Module}}/model/{{.Package}}"
|
||||
{{.Package}}Req "{{.Module}}/model/{{.Package}}/request"
|
||||
{{- if .AutoCreateResource }}
|
||||
"gorm.io/gorm"
|
||||
{{- end}}
|
||||
|
||||
Reference in New Issue
Block a user