feat(collections): add admin CRUD for items with dynamic field form
Fourth admin increment: items with custom EAV values.
- Nested routes /admin/collections/{collection_id}/items[...].
- CollectionItemsAdminController: paginated list (admin sees inactive too,
optional ?section= filter); create/edit form with base fields plus dynamic
widgets per FieldType (textarea for text/html, number for integer/double,
checkbox for boolean, per-line textarea for multiple, text otherwise);
section picker when has_sections; store with CSRF, validation and code
uniqueness per (collection_id, section_id).
- EAV read/write: form values read via getValuesMap (findWithValues), and
SaveCollectionItemUseCase fully rebuilds values (delete + insert) into the
typed columns, casting per FieldType (boolean always 0/1, empty singles
skipped, dates normalized).
- New ContentCollectionItemValueRepository (deleteByItem/insertMany); item
repository gains findWithValues/create/update/delete; section repository gains
getAllByCollection. Items link added per collection.
- DB test for the EAV write path (typed columns, full replace, duplicates) plus
list/delete use case tests.
- Nested routes /admin/collections/{collection_id}/items[...].
- CollectionItemsAdminController: paginated list (admin sees inactive too,
optional ?section= filter); create/edit form with base fields plus dynamic
widgets per FieldType (textarea for text/html, number for integer/double,
checkbox for boolean, per-line textarea for multiple, text otherwise);
section picker when has_sections; store with CSRF, validation and code
uniqueness per (collection_id, section_id).
- EAV read/write: form values read via getValuesMap (findWithValues), and
SaveCollectionItemUseCase fully rebuilds values (delete + insert) into the
typed columns, casting per FieldType (boolean always 0/1, empty singles
skipped, dates normalized).
- New ContentCollectionItemValueRepository (deleteByItem/insertMany); item
repository gains findWithValues/create/update/delete; section repository gains
getAllByCollection. Items link added per collection.
- DB test for the EAV write path (typed columns, full replace, duplicates) plus
list/delete use case tests.