audit-object-model
Instructions
- Open
classes/{Domain}.php— read the$definitionarray fully. - Extract the
tablename — this is the primary DB table. - List every field in
$definition['fields']: field name, type, validate rule, required flag, lang flag, shop flag. - Identify multilingual fields (
'lang' => true) — these needTranslatableTypein the form and multilingual handling in handlers. - Identify shop-scoped fields (
'shop' => true) — these require multistore-aware repository methods. - If
classes/lang/{Domain}Lang.phpexists, read it and confirm the lang table structure. - Note any
hasManyorhasManyToManyrelations defined — these become sub-resources (handled by dedicated commands and repositories when the domain is non-trivial). - Record every
$validateFields()rule — these inform ValueObject validation. - Output: structured schema map (table, columns, lang columns, shop columns, relations, validation rules).
Rules
- Never modify ObjectModel files — read-only audit
- Flag any field with a custom validate method (
Validate::isXxx) — these need a custom ValueObject - Note
$identifierfield name — it becomes the{Domain}IdValueObject - Relations declared in ObjectModel that link to another entity's table are sub-resource candidates