init commit

This commit is contained in:
2025-02-19 14:23:58 +08:00
commit 10a4f010ce
34 changed files with 1340 additions and 0 deletions

31
gen.go Normal file
View File

@@ -0,0 +1,31 @@
package main
import (
"gorm.io/gen"
"proxy-server/server/orm"
)
const (
Host = "localhost"
Port = "5432"
Username = "gorm"
Password = "gorm"
Database = "gorm"
Timezone = "Asia/Shanghai"
)
func main() {
g := gen.NewGenerator(gen.Config{
OutPath: "../../temp-out",
Mode: gen.WithoutContext | gen.WithDefaultQuery | gen.WithQueryInterface,
})
orm.Init()
g.UseDB(orm.DB)
g.ApplyBasic(
g.GenerateAllTable()...,
)
g.Execute()
}