代码清理

This commit is contained in:
2025-02-25 15:56:33 +08:00
parent 9a8680a221
commit 884faae5ba
9 changed files with 32 additions and 59 deletions

25
cmd/gen/gen.go Normal file
View File

@@ -0,0 +1,25 @@
package main
import (
"proxy-server/server/pkg/env"
"proxy-server/server/pkg/orm"
"gorm.io/gen"
)
func main() {
env.Init()
orm.Init()
g := gen.NewGenerator(gen.Config{
OutPath: "../../temp-out",
Mode: gen.WithoutContext | gen.WithDefaultQuery | gen.WithQueryInterface,
})
g.UseDB(orm.DB)
g.ApplyBasic(
g.GenerateAllTable()...,
)
g.Execute()
}