Split archive journal to 2 sub-modules by status. Add possibility to upload file for equipment. Change date fields for equipment.
This commit is contained in:
@@ -59,11 +59,11 @@ dto DTO.Equipment {
|
||||
description "Текущий статус";
|
||||
map Equipment.status;
|
||||
}
|
||||
attribute attachment {
|
||||
type DTO.FileAttachment;
|
||||
attribute attachments {
|
||||
type DTO.FileAttachment[];
|
||||
is nullable;
|
||||
description "Вложение (файл в MinIO/S3)";
|
||||
map Equipment.attachment;
|
||||
map Equipment.attachments;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@ api API.Equipment {
|
||||
}
|
||||
|
||||
endpoint uploadEquipmentAttachment {
|
||||
label "POST /equipment/{id}/attachment";
|
||||
label "POST /equipment/{id}/attachments";
|
||||
description "Загрузить файл-вложение (multipart/form-data, поле file)";
|
||||
attribute id {
|
||||
type uuid;
|
||||
@@ -355,19 +355,25 @@ api API.Equipment {
|
||||
}
|
||||
|
||||
endpoint deleteEquipmentAttachment {
|
||||
label "DELETE /equipment/{id}/attachment";
|
||||
label "DELETE /equipment/{id}/attachments/{attachmentId}";
|
||||
description "Удалить файл-вложение из хранилища и из записи";
|
||||
attribute id {
|
||||
type uuid;
|
||||
}
|
||||
attribute attachmentId {
|
||||
type uuid;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint downloadEquipmentAttachment {
|
||||
label "GET /equipment/{id}/attachment/download";
|
||||
label "GET /equipment/{id}/attachments/{attachmentId}/download";
|
||||
description "Скачать файл-вложение (Content-Disposition: attachment, поток из MinIO)";
|
||||
attribute id {
|
||||
type uuid;
|
||||
}
|
||||
attribute attachmentId {
|
||||
type uuid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -422,4 +428,4 @@ api API.EquipmentStatusChange {
|
||||
type uuid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user