fix: update associations

This commit is contained in:
2025-03-09 20:10:33 +07:00
parent d149aebf12
commit 7c7c8e6cc5
6 changed files with 124 additions and 19 deletions

View File

@@ -1,17 +1,18 @@
package main
import (
"gorm.io/gen"
"app/internal/models"
"app/internal/models"
"gorm.io/gen"
)
func main() {
g := gen.NewGenerator(gen.Config{
OutPath: "../dal", // output directory, default value is ./query
Mode: gen.WithDefaultQuery | gen.WithQueryInterface | gen.WithoutContext,
FieldNullable: true,
WithUnitTest: true,
})
g.ApplyBasic(models.Entities...)
g.Execute()
g := gen.NewGenerator(gen.Config{
OutPath: "../dal", // output directory, default value is ./query
Mode: gen.WithDefaultQuery | gen.WithQueryInterface | gen.WithoutContext,
FieldNullable: true,
WithUnitTest: true,
})
g.ApplyBasic(models.Entities...)
g.Execute()
}