feat: base

This commit is contained in:
GogaCoder
2025-01-03 00:05:10 +07:00
commit 493ebacfcb
1224 changed files with 1648045 additions and 0 deletions

21
internal/gen/gen.go Normal file
View File

@@ -0,0 +1,21 @@
package main
import (
"gorm.io/gen"
"app/internal/models"
)
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,
})
// Generate default DAO interface for those specified structs
g.ApplyBasic(models.Entities...)
// Execute the generator
g.Execute()
}