Audit object model

From PrestaShop/PrestaShop · View interactive version

Audit object model is an AI agent skill from the GitHub repository PrestaShop/PrestaShop. Read the legacy ObjectModel class for the domain and extract its database schema, field definitions, multilingual fields, and validation rules. This is the authoritative source for what columns the Doctrine repository must handle.

How to use this skill

Skill file

audit-object-model

Instructions

  1. Open classes/{Domain}.php — read the $definition array fully.
  2. Extract the table name — this is the primary DB table.
  3. List every field in $definition['fields']: field name, type, validate rule, required flag, lang flag, shop flag.
  4. Identify multilingual fields ('lang' => true) — these need TranslatableType in the form and multilingual handling in handlers.
  5. Identify shop-scoped fields ('shop' => true) — these require multistore-aware repository methods.
  6. If classes/lang/{Domain}Lang.php exists, read it and confirm the lang table structure.
  7. Note any hasMany or hasManyToMany relations defined — these become sub-resources (handled by dedicated commands and repositories when the domain is non-trivial).
  8. Record every $validateFields() rule — these inform ValueObject validation.
  9. Output: structured schema map (table, columns, lang columns, shop columns, relations, validation rules).

Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.