go-gorm-model
Installation
SKILL.md
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>" }