feat: add CategoryImportController for bulk JSON import and export of categories

- Implemented export functionality to retrieve all rows from specified category tables.
- Developed import functionality with strict validation and referential integrity checks.
- Added error handling for various import scenarios including invalid formats and duplicate entries.
- Introduced tests for import functionality to ensure correct behavior and validation.
This commit is contained in:
hamed
2026-06-30 21:51:06 +03:30
parent 803196108c
commit 22937dfa56
22 changed files with 2473 additions and 835 deletions
+7
View File
@@ -247,3 +247,10 @@ Legacy endpoint that proxies to the new endpoints.
> ⚠️ Response is **triple-nested**: `data?.data?.data ?? []`
> Note: `categorys` (not `categories`) is intentional — legacy route name.
---
## Bulk import / export
Full-table JSON export and strict wipe+replace import for this category live under
`/api/v1/admin/categories/{bundle}/{export|import}` — see [category-import.md](category-import.md).