fix: update associations
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user