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

View File

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