rebase generation
This commit is contained in:
@@ -1,31 +1,57 @@
|
||||
enum EquipmentStatus {
|
||||
value Active {
|
||||
label "В эксплуатации";
|
||||
}
|
||||
value Repair {
|
||||
label "В ремонте";
|
||||
}
|
||||
value Reserve {
|
||||
label "В резерве";
|
||||
}
|
||||
value WriteOff {
|
||||
label "Списано";
|
||||
}
|
||||
}
|
||||
|
||||
// =====================
|
||||
// DTO
|
||||
// =====================
|
||||
|
||||
dto DTO.Equipment {
|
||||
description "Полный response-объект для единицы оборудования";
|
||||
description "Полный объект оборудования";
|
||||
|
||||
attribute id {
|
||||
type uuid;
|
||||
description "Идентификатор оборудования";
|
||||
map Equipment.id;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
description "Название оборудования";
|
||||
map Equipment.name;
|
||||
}
|
||||
|
||||
attribute serialNumber {
|
||||
type string;
|
||||
description "Заводской (серийный) номер";
|
||||
map Equipment.serialNumber;
|
||||
}
|
||||
|
||||
attribute dateOfInspection {
|
||||
type date;
|
||||
is nullable;
|
||||
description "Дата поверки";
|
||||
map Equipment.dateOfInspection;
|
||||
}
|
||||
|
||||
attribute commissionedAt {
|
||||
type date;
|
||||
is nullable;
|
||||
description "Дата изготовления";
|
||||
map Equipment.commissionedAt;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type EquipmentStatus;
|
||||
description "Текущий статус";
|
||||
@@ -34,234 +60,261 @@ dto DTO.Equipment {
|
||||
}
|
||||
|
||||
dto DTO.EquipmentCreate {
|
||||
description "Тело запроса на создание единицы оборудования";
|
||||
description "Тело запроса на создание оборудования";
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
description "Название оборудования";
|
||||
is required;
|
||||
description "Название оборудования";
|
||||
map Equipment.name;
|
||||
}
|
||||
|
||||
attribute serialNumber {
|
||||
type string;
|
||||
description "Заводской (серийный) номер";
|
||||
is required;
|
||||
description "Заводской (серийный) номер";
|
||||
map Equipment.serialNumber;
|
||||
}
|
||||
|
||||
attribute dateOfInspection {
|
||||
type date;
|
||||
is nullable;
|
||||
description "Дата поверки";
|
||||
map Equipment.dateOfInspection;
|
||||
}
|
||||
|
||||
attribute commissionedAt {
|
||||
type date;
|
||||
is nullable;
|
||||
description "Дата изготовления";
|
||||
map Equipment.commissionedAt;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type EquipmentStatus;
|
||||
is nullable;
|
||||
description "Текущий статус";
|
||||
is required;
|
||||
map Equipment.status;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentUpdate {
|
||||
description "Тело запроса на обновление единицы оборудования";
|
||||
description "Тело запроса на обновление оборудования (частичное)";
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
description "Название оборудования";
|
||||
is nullable;
|
||||
description "Название оборудования";
|
||||
map Equipment.name;
|
||||
}
|
||||
|
||||
attribute serialNumber {
|
||||
type string;
|
||||
description "Заводской (серийный) номер";
|
||||
is nullable;
|
||||
description "Заводской (серийный) номер";
|
||||
map Equipment.serialNumber;
|
||||
}
|
||||
|
||||
attribute dateOfInspection {
|
||||
type date;
|
||||
is nullable;
|
||||
description "Дата поверки";
|
||||
map Equipment.dateOfInspection;
|
||||
}
|
||||
|
||||
attribute commissionedAt {
|
||||
type date;
|
||||
is nullable;
|
||||
description "Дата изготовления";
|
||||
map Equipment.commissionedAt;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type EquipmentStatus;
|
||||
description "Текущий статус";
|
||||
is nullable;
|
||||
description "Текущий статус";
|
||||
map Equipment.status;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentListRequest {
|
||||
description "Запрос для постраничного получения списка оборудования с фильтрацией";
|
||||
description "Запрос постраничного списка оборудования с фильтрацией";
|
||||
|
||||
attribute filter {
|
||||
type DTO.Filter;
|
||||
is nullable;
|
||||
description "Фильтр";
|
||||
}
|
||||
|
||||
attribute page {
|
||||
type DTO.PageRequest;
|
||||
}
|
||||
attribute filterName {
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
attribute filterSerialNumber {
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
attribute filterStatus {
|
||||
type EquipmentStatus;
|
||||
is nullable;
|
||||
description "Параметры пагинации";
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentListResponse {
|
||||
description "Ответ с постраничным списком оборудования и метаданными";
|
||||
description "Ответ со списком оборудования";
|
||||
|
||||
attribute content {
|
||||
type DTO.Equipment[];
|
||||
description "Список оборудования";
|
||||
}
|
||||
|
||||
attribute pageInfo {
|
||||
type DTO.PageInfo;
|
||||
description "Метаданные пагинации";
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.ChangeEquipmentStatus {
|
||||
description "Полный response-объект для документа изменения статуса";
|
||||
description "Полный объект документа изменения статуса оборудования";
|
||||
|
||||
attribute equipmentId {
|
||||
type Equipment;
|
||||
is nullable;
|
||||
type uuid;
|
||||
description "Оборудование";
|
||||
map ChangeEquipmentStatus.equipmentId;
|
||||
}
|
||||
|
||||
attribute newStatus {
|
||||
type EquipmentStatus;
|
||||
description "Новый статус";
|
||||
map ChangeEquipmentStatus.newStatus;
|
||||
}
|
||||
|
||||
attribute number {
|
||||
type string;
|
||||
description "Номер";
|
||||
is nullable;
|
||||
description "Номер";
|
||||
map ChangeEquipmentStatus.number;
|
||||
}
|
||||
|
||||
attribute date {
|
||||
type date;
|
||||
description "Дата изменения статуса";
|
||||
map ChangeEquipmentStatus.date;
|
||||
}
|
||||
|
||||
attribute responsible {
|
||||
type string;
|
||||
description "Ответственный";
|
||||
is nullable;
|
||||
description "Ответственный";
|
||||
map ChangeEquipmentStatus.responsible;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.ChangeEquipmentStatusCreate {
|
||||
description "Тело запроса на создание документа изменения статуса";
|
||||
|
||||
attribute equipmentId {
|
||||
type Equipment;
|
||||
is nullable;
|
||||
type uuid;
|
||||
is required;
|
||||
description "Оборудование";
|
||||
map ChangeEquipmentStatus.equipmentId;
|
||||
}
|
||||
|
||||
attribute newStatus {
|
||||
type EquipmentStatus;
|
||||
description "Новый статус";
|
||||
is required;
|
||||
description "Новый статус";
|
||||
map ChangeEquipmentStatus.newStatus;
|
||||
}
|
||||
|
||||
attribute number {
|
||||
type string;
|
||||
description "Номер";
|
||||
is nullable;
|
||||
description "Номер";
|
||||
map ChangeEquipmentStatus.number;
|
||||
}
|
||||
|
||||
attribute date {
|
||||
type date;
|
||||
description "Дата изменения статуса";
|
||||
is required;
|
||||
description "Дата изменения статуса";
|
||||
map ChangeEquipmentStatus.date;
|
||||
}
|
||||
|
||||
attribute responsible {
|
||||
type string;
|
||||
description "Ответственный";
|
||||
is nullable;
|
||||
description "Ответственный";
|
||||
map ChangeEquipmentStatus.responsible;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.ChangeEquipmentStatusUpdate {
|
||||
description "Тело запроса на обновление документа изменения статуса";
|
||||
description "Тело запроса на обновление документа изменения статуса (частичное)";
|
||||
|
||||
attribute equipmentId {
|
||||
type Equipment;
|
||||
type uuid;
|
||||
is nullable;
|
||||
description "Оборудование";
|
||||
map ChangeEquipmentStatus.equipmentId;
|
||||
}
|
||||
|
||||
attribute newStatus {
|
||||
type EquipmentStatus;
|
||||
description "Новый статус";
|
||||
is nullable;
|
||||
description "Новый статус";
|
||||
map ChangeEquipmentStatus.newStatus;
|
||||
}
|
||||
|
||||
attribute number {
|
||||
type string;
|
||||
description "Номер";
|
||||
is nullable;
|
||||
description "Номер";
|
||||
map ChangeEquipmentStatus.number;
|
||||
}
|
||||
|
||||
attribute date {
|
||||
type date;
|
||||
description "Дата изменения статуса";
|
||||
is nullable;
|
||||
description "Дата изменения статуса";
|
||||
map ChangeEquipmentStatus.date;
|
||||
}
|
||||
|
||||
attribute responsible {
|
||||
type string;
|
||||
description "Ответственный";
|
||||
is nullable;
|
||||
description "Ответственный";
|
||||
map ChangeEquipmentStatus.responsible;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.ChangeEquipmentStatusListRequest {
|
||||
description "Запрос для постраничного получения списка документов изменения статуса с фильтрацией";
|
||||
description "Запрос постраничного списка документов изменения статуса с фильтрацией";
|
||||
|
||||
attribute filter {
|
||||
type DTO.Filter;
|
||||
is nullable;
|
||||
description "Фильтр";
|
||||
}
|
||||
|
||||
attribute page {
|
||||
type DTO.PageRequest;
|
||||
}
|
||||
attribute filterEquipmentId {
|
||||
type uuid;
|
||||
is nullable;
|
||||
}
|
||||
attribute filterNumber {
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
attribute filterDate {
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
attribute filterResponsible {
|
||||
type string;
|
||||
is nullable;
|
||||
description "Параметры пагинации";
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.ChangeEquipmentStatusListResponse {
|
||||
description "Ответ с постраничным списком документов изменения статуса и метаданными";
|
||||
description "Ответ со списком документов изменения статуса";
|
||||
|
||||
attribute content {
|
||||
type DTO.ChangeEquipmentStatus[];
|
||||
description "Список документов изменения статуса";
|
||||
}
|
||||
|
||||
attribute pageInfo {
|
||||
type DTO.PageInfo;
|
||||
description "Метаданные пагинации";
|
||||
}
|
||||
}
|
||||
|
||||
// =====================
|
||||
// API
|
||||
// =====================
|
||||
|
||||
api API.Equipment {
|
||||
description "API управления справочником оборудования";
|
||||
description "API управления оборудованием";
|
||||
|
||||
endpoint listEquipment {
|
||||
label "POST /equipment/page";
|
||||
@@ -276,9 +329,10 @@ api API.Equipment {
|
||||
|
||||
endpoint getEquipment {
|
||||
label "GET /equipment/{id}";
|
||||
description "Получить единицу оборудования по идентификатору";
|
||||
description "Получить оборудование по идентификатору";
|
||||
attribute id {
|
||||
type uuid;
|
||||
description "Идентификатор оборудования";
|
||||
}
|
||||
attribute response {
|
||||
type DTO.Equipment;
|
||||
@@ -287,7 +341,7 @@ api API.Equipment {
|
||||
|
||||
endpoint createEquipment {
|
||||
label "POST /equipment";
|
||||
description "Создать новую единицу оборудования";
|
||||
description "Создать оборудование";
|
||||
attribute request {
|
||||
type DTO.EquipmentCreate;
|
||||
}
|
||||
@@ -295,9 +349,10 @@ api API.Equipment {
|
||||
|
||||
endpoint updateEquipment {
|
||||
label "PUT /equipment/{id}";
|
||||
description "Обновить данные единицы оборудования";
|
||||
description "Обновить оборудование";
|
||||
attribute id {
|
||||
type uuid;
|
||||
description "Идентификатор оборудования";
|
||||
}
|
||||
attribute request {
|
||||
type DTO.EquipmentUpdate;
|
||||
@@ -306,18 +361,19 @@ api API.Equipment {
|
||||
|
||||
endpoint deleteEquipment {
|
||||
label "DELETE /equipment/{id}";
|
||||
description "Удалить единицу оборудования";
|
||||
description "Удалить оборудование";
|
||||
attribute id {
|
||||
type uuid;
|
||||
description "Идентификатор оборудования";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
api API.EquipmentStatusChange {
|
||||
api API.ChangeEquipmentStatus {
|
||||
description "API управления документами изменения статуса оборудования";
|
||||
|
||||
endpoint listStatusChanges {
|
||||
label "POST /status-changes/page";
|
||||
endpoint listChangeEquipmentStatus {
|
||||
label "POST /change-equipment-status/page";
|
||||
description "Постраничный список документов изменения статуса с фильтрацией";
|
||||
attribute request {
|
||||
type DTO.ChangeEquipmentStatusListRequest;
|
||||
@@ -327,41 +383,56 @@ api API.EquipmentStatusChange {
|
||||
}
|
||||
}
|
||||
|
||||
endpoint getStatusChange {
|
||||
label "GET /status-changes/{id}";
|
||||
description "Получить документ изменения статуса по идентификатору";
|
||||
attribute id {
|
||||
endpoint getChangeEquipmentStatus {
|
||||
label "GET /change-equipment-status/{equipmentId}/{newStatus}";
|
||||
description "Получить документ изменения статуса по ключу";
|
||||
attribute equipmentId {
|
||||
type uuid;
|
||||
description "Оборудование";
|
||||
}
|
||||
attribute newStatus {
|
||||
type EquipmentStatus;
|
||||
description "Новый статус";
|
||||
}
|
||||
attribute response {
|
||||
type DTO.ChangeEquipmentStatus;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint createStatusChange {
|
||||
label "POST /status-changes";
|
||||
description "Создать документ изменения статуса оборудования";
|
||||
endpoint createChangeEquipmentStatus {
|
||||
label "POST /change-equipment-status";
|
||||
description "Создать документ изменения статуса";
|
||||
attribute request {
|
||||
type DTO.ChangeEquipmentStatusCreate;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint updateStatusChange {
|
||||
labelо "PUT /status-changes/{id}";
|
||||
endpoint updateChangeEquipmentStatus {
|
||||
label "PUT /change-equipment-status/{equipmentId}/{newStatus}";
|
||||
description "Обновить документ изменения статуса";
|
||||
attribute id {
|
||||
attribute equipmentId {
|
||||
type uuid;
|
||||
description "Оборудование";
|
||||
}
|
||||
attribute newStatus {
|
||||
type EquipmentStatus;
|
||||
description "Новый статус";
|
||||
}
|
||||
attribute request {
|
||||
type DTO.ChangeEquipmentStatusUpdate;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint deleteStatusChange {
|
||||
label "DELETE /status-changes/{id}";
|
||||
endpoint deleteChangeEquipmentStatus {
|
||||
label "DELETE /change-equipment-status/{equipmentId}/{newStatus}";
|
||||
description "Удалить документ изменения статуса";
|
||||
attribute id {
|
||||
attribute equipmentId {
|
||||
type uuid;
|
||||
description "Оборудование";
|
||||
}
|
||||
attribute newStatus {
|
||||
type EquipmentStatus;
|
||||
description "Новый статус";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user