feat: services: crus, migrations

This commit is contained in:
2025-01-04 01:36:01 +07:00
parent 0c9f60bba5
commit 081ebf2b28
22 changed files with 533 additions and 63 deletions

View File

@@ -6,16 +6,12 @@ import (
)
func main() {
// Initialize the generator with configuration
g := gen.NewGenerator(gen.Config{
OutPath: "../dal", // output directory, default value is ./query
Mode: gen.WithDefaultQuery | gen.WithQueryInterface | gen.WithoutContext,
FieldNullable: true,
WithUnitTest: true,
})
// Generate default DAO interface for those specified structs
g.ApplyBasic(models.Entities...)
// Execute the generator
g.Execute()
}