go-gorm-model
Go GORM Model
Generate GORM persistence models in internal/modules/<module>/model/.
When to Use
- Create persistence models mapping database tables
- Add structs with nullable pointer types, indexes, JSONB, defaults
- Map SQL migrations to Go structs
Pattern
Model files must follow this location and naming:
- Path:
internal/modules/<module>/model/<entity>_model.go - Package:
model - Struct name:
<Entity>Model - TableName method:
func (*<Entity>Model) TableName() string { return "<table_name>" }
More from cristiano-pacheco/ai-tools
go-chi-handler
Generate Chi HTTP handlers, use case orchestration, Use for REST endpoint handlers or web http handlers.
26go-usecase
Generate use cases. Use when creating business operations, CRUD use cases, or any Execute-based module operation.
22go-enum
Generate type-safe enums with validation. Use when creating enums, defining constants, or adding enum types.
20go-cache
Generate Redis-backed Go cache. Invoke whenever user mentions cache or Redis.
20go-integration-tests
Generate Go integration tests with real database/infrastructure via itestkit containers. Use when testing use cases against real databases, verifying end-to-end flows, or adding integration test coverage.
20go-service
Generate services. Use for reusable single-responsibility business services or domain services.
18