feat: update gen model

This commit is contained in:
Rogee
2025-02-13 18:45:03 +08:00
parent e2b09420a0
commit e4ad0152d3
2 changed files with 11 additions and 10 deletions

View File

@@ -8,10 +8,10 @@ import (
"path/filepath" "path/filepath"
"strings" "strings"
"go.ipao.vip/atomctl/pkg/utils"
"go.ipao.vip/atomctl/pkg/utils/generator"
_ "github.com/lib/pq" _ "github.com/lib/pq"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"go.ipao.vip/atomctl/pkg/utils"
"go.ipao.vip/atomctl/pkg/utils/generator"
) )
func CommandGenEnum(root *cobra.Command) { func CommandGenEnum(root *cobra.Command) {
@@ -20,6 +20,7 @@ func CommandGenEnum(root *cobra.Command) {
Aliases: []string{"e"}, Aliases: []string{"e"},
Short: "Generate enums", Short: "Generate enums",
RunE: commandGenEnumE, RunE: commandGenEnumE,
PostRunE: commandGenProviderE,
} }
cmd.Flags().BoolP("flag", "f", true, "Flag enum values") cmd.Flags().BoolP("flag", "f", true, "Flag enum values")

View File

@@ -18,7 +18,7 @@ func CommandGenRoute(root *cobra.Command) {
Use: "route", Use: "route",
Short: "generate routes", Short: "generate routes",
RunE: commandGenRouteE, RunE: commandGenRouteE,
// PostRunE: commandGenProviderE, PostRunE: commandGenProviderE,
} }
root.AddCommand(cmd) root.AddCommand(cmd)