Skip to content

Commit

Permalink
feat: gen
Browse files Browse the repository at this point in the history
  • Loading branch information
zhixunjie committed May 1, 2024
1 parent 50b78f6 commit 31a32bb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs
Submodule docs updated from 9e4a40 to e9362f
2 changes: 1 addition & 1 deletion internal/logic/data/ent/generate/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func applyTableNames(g *gen.Generator) {
}

// 封装函数使用:生成query文件和model文件
func genCode2() {
func genCode() {
// gen.Config: https://gorm.io/zh_CN/gen/dao.html#gen-Config
g := gen.NewGenerator(gen.Config{
Mode: gen.WithoutContext | gen.WithDefaultQuery | gen.WithQueryInterface, // generate mode
Expand Down
4 changes: 2 additions & 2 deletions internal/logic/data/ent/generate/gen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package generate

import "testing"

func TestGenCode2(t *testing.T) {
genCode2()
func TestGenCode(t *testing.T) {
genCode()
}

func TestGenCreateTable(t *testing.T) {
Expand Down

0 comments on commit 31a32bb

Please sign in to comment.