Use Go pointer types for nullable columns. Never use database/sql types (sql.NullString, sql.NullInt32, etc.) — those are not used in this codebase.
| TEXT / VARCHAR nullable | string | | BIGINT nullable (value) | int64 | | BIGINT nullable (FK) | uint64 | | BOOLEAN nullable | bool | | TIMESTAMPTZ nullable | time.Time |
Do NOT add gorm:"column:..." tags. GORM automatically maps Go field names to snakecase column names (ProductID → productid, CreatedAt → createdat, etc.). Only add tags when there is a specific GORM feature to declare.
Generate Go GORM models following Go modular architecture conventions. Use when creating or updating persistence models in internal/modules/<module>/model/, including table mapping, nullable pointer types, index tags, PostgreSQL-specific types, and timestamps. Always use this skill when asked to create a model, add a GORM struct, map a database table, or generate model files. Source: cristiano-pacheco/ai-tools.