optimize
This commit is contained in:
@@ -4,7 +4,6 @@ Copyright © 2023 NAME HERE <EMAIL ADDRESS>
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"atom/cmd/model"
|
|
||||||
"atom/container"
|
"atom/container"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
@@ -41,7 +40,7 @@ var genCmd = &cobra.Command{
|
|||||||
g.UseDB(gq.DB) // reuse your gorm db
|
g.UseDB(gq.DB) // reuse your gorm db
|
||||||
|
|
||||||
// Generate basic type-safe DAO API for struct `model.User` following conventions
|
// Generate basic type-safe DAO API for struct `model.User` following conventions
|
||||||
g.ApplyBasic(model.User{})
|
g.ApplyBasic()
|
||||||
|
|
||||||
// Generate Type Safe API with Dynamic SQL defined on Querier interface for `model.User` and `model.Company`
|
// Generate Type Safe API with Dynamic SQL defined on Querier interface for `model.User` and `model.Company`
|
||||||
// g.ApplyInterface(func(Querier) {}, model.User{}, model.Company{})
|
// g.ApplyInterface(func(Querier) {}, model.User{}, model.Company{})
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
package model
|
|
||||||
|
|
||||||
type Company struct {
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
package model
|
|
||||||
|
|
||||||
type User struct {
|
|
||||||
}
|
|
||||||
0
database/models/.gitkeep
Normal file
0
database/models/.gitkeep
Normal file
Reference in New Issue
Block a user