- 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.
37 lines
909 B
Plaintext
37 lines
909 B
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
}
|
|
|
|
enum EquipmentStatus {
|
|
Active
|
|
Repair
|
|
Reserve
|
|
WriteOff
|
|
}
|
|
|
|
model Equipment {
|
|
id String @id @default(uuid())
|
|
name String
|
|
serialNumber String
|
|
dateOfInspection DateTime?
|
|
commissionedAt DateTime?
|
|
status EquipmentStatus @default(Active)
|
|
changeEquipmentStatuses ChangeEquipmentStatus[]
|
|
}
|
|
|
|
model ChangeEquipmentStatus {
|
|
id String @id @default(uuid())
|
|
equipmentId String?
|
|
equipment Equipment? @relation(fields: [equipmentId], references: [id])
|
|
newStatus EquipmentStatus
|
|
number String?
|
|
date DateTime
|
|
responsible String?
|
|
/// JSON: [{ id, objectKey, originalFileName, contentType, sizeBytes }] — файлы в MinIO/S3
|
|
attachments Json?
|
|
}
|