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-rules
go-unit-tests
Generate Go unit tests using testify suite/assert patterns. Use when writing test suites with mocks, testing standalone functions, or adding unit test coverage.
25go-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.
15go-create-usecase
Generate Go use cases for modular architecture using ports-based dependencies and decorator-based observability. Use when implementing business actions in internal/modules/<module>/usecase/ such as create, update, list, delete, status transitions, uploads, notifications, or any domain operation that orchestrates repositories/services.
11go-cache
Generate Redis-backed Go cache. Invoke whenever user mentions cache or Redis.
11go-chi-handler
Generate Chi HTTP handlers, use case orchestration, Use for REST endpoint handlers or web http handlers.
10creating-cursor-rules-skill
Expert guidance for creating effective Cursor IDE rules with best practices, patterns, and examples
9