Add support for file attachments in equipment status changes

- Introduced functionality for uploading and managing attachments in the ChangeEquipmentStatus module.
- Added new endpoints for uploading and deleting attachments, as well as for downloading them.
- Updated the ChangeEquipmentStatusService to handle attachment storage and retrieval using the new storage service methods.
- Enhanced the ChangeEquipmentStatusEdit and ChangeEquipmentStatusShow components to support attachment input and display.
- Removed deprecated attachment handling from Equipment module to streamline functionality.
- Updated Prisma schema to reflect changes in attachment management.
This commit is contained in:
Первов Артем
2026-04-21 12:19:49 +03:00
parent d572647772
commit b1aefae2fa
25 changed files with 669 additions and 430 deletions

View File

@@ -20,8 +20,6 @@ model Equipment {
dateOfInspection DateTime?
commissionedAt DateTime?
status EquipmentStatus @default(Active)
/// JSON: { objectKey, originalFileName, contentType, sizeBytes } — файл в MinIO/S3
attachment Json?
changeEquipmentStatuses ChangeEquipmentStatus[]
}
@@ -33,4 +31,6 @@ model ChangeEquipmentStatus {
number String?
date DateTime
responsible String?
/// JSON: [{ id, objectKey, originalFileName, contentType, sizeBytes }] — файлы в MinIO/S3
attachments Json?
}