2022-07-15 11:49:53 +00:00
|
|
|
/*
|
2022-07-16 15:46:09 +00:00
|
|
|
Copyright © 2022 Matthieu Derasse <git@derasse.fr>
|
2022-07-15 11:49:53 +00:00
|
|
|
|
|
|
|
*/
|
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
2022-08-03 11:17:15 +00:00
|
|
|
// dbCmd represents the db command.
|
2022-07-15 11:49:53 +00:00
|
|
|
var dbCmd = &cobra.Command{
|
|
|
|
Use: "db",
|
|
|
|
Short: "Generate Database Struct from pkg/dbmodels/schema.yaml",
|
2022-11-11 17:52:44 +00:00
|
|
|
Run: runGenerateDB,
|
2022-07-15 11:49:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
generateCmd.AddCommand(dbCmd)
|
|
|
|
}
|
2022-11-11 17:52:44 +00:00
|
|
|
|
|
|
|
// runGenerateDB will generate database models, db connector, ... for the current project.
|
|
|
|
func runGenerateDB(cmd *cobra.Command, args []string) {
|
|
|
|
}
|