git init
This commit is contained in:
367
domain/toir.api.dsl
Normal file
367
domain/toir.api.dsl
Normal file
@@ -0,0 +1,367 @@
|
||||
dto DTO.Equipment {
|
||||
description "Полный response-объект для единицы оборудования";
|
||||
attribute id {
|
||||
type uuid;
|
||||
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 "Текущий статус";
|
||||
map Equipment.status;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentCreate {
|
||||
description "Тело запроса на создание единицы оборудования";
|
||||
attribute name {
|
||||
type string;
|
||||
description "Название оборудования";
|
||||
is required;
|
||||
map Equipment.name;
|
||||
}
|
||||
attribute serialNumber {
|
||||
type string;
|
||||
description "Заводской (серийный) номер";
|
||||
is required;
|
||||
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 required;
|
||||
map Equipment.status;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentUpdate {
|
||||
description "Тело запроса на обновление единицы оборудования";
|
||||
attribute name {
|
||||
type string;
|
||||
description "Название оборудования";
|
||||
is nullable;
|
||||
map Equipment.name;
|
||||
}
|
||||
attribute serialNumber {
|
||||
type string;
|
||||
description "Заводской (серийный) номер";
|
||||
is nullable;
|
||||
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;
|
||||
map Equipment.status;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentListRequest {
|
||||
description "Запрос для постраничного получения списка оборудования с фильтрацией";
|
||||
attribute page {
|
||||
type DTO.PageRequest;
|
||||
}
|
||||
attribute filterName {
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
attribute filterSerialNumber {
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
attribute filterStatus {
|
||||
type EquipmentStatus;
|
||||
is nullable;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentListResponse {
|
||||
description "Ответ с постраничным списком оборудования и метаданными";
|
||||
attribute content {
|
||||
type DTO.Equipment[];
|
||||
}
|
||||
attribute pageInfo {
|
||||
type DTO.PageInfo;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.ChangeEquipmentStatus {
|
||||
description "Полный response-объект для документа изменения статуса";
|
||||
attribute equipmentId {
|
||||
type Equipment;
|
||||
is nullable;
|
||||
map ChangeEquipmentStatus.equipmentId;
|
||||
}
|
||||
attribute newStatus {
|
||||
type EquipmentStatus;
|
||||
description "Новый статус";
|
||||
map ChangeEquipmentStatus.newStatus;
|
||||
}
|
||||
attribute number {
|
||||
type string;
|
||||
description "Номер";
|
||||
is nullable;
|
||||
map ChangeEquipmentStatus.number;
|
||||
}
|
||||
attribute date {
|
||||
type date;
|
||||
description "Дата изменения статуса";
|
||||
map ChangeEquipmentStatus.date;
|
||||
}
|
||||
attribute responsible {
|
||||
type string;
|
||||
description "Ответственный";
|
||||
is nullable;
|
||||
map ChangeEquipmentStatus.responsible;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.ChangeEquipmentStatusCreate {
|
||||
description "Тело запроса на создание документа изменения статуса";
|
||||
attribute equipmentId {
|
||||
type Equipment;
|
||||
is nullable;
|
||||
map ChangeEquipmentStatus.equipmentId;
|
||||
}
|
||||
attribute newStatus {
|
||||
type EquipmentStatus;
|
||||
description "Новый статус";
|
||||
is required;
|
||||
map ChangeEquipmentStatus.newStatus;
|
||||
}
|
||||
attribute number {
|
||||
type string;
|
||||
description "Номер";
|
||||
is nullable;
|
||||
map ChangeEquipmentStatus.number;
|
||||
}
|
||||
attribute date {
|
||||
type date;
|
||||
description "Дата изменения статуса";
|
||||
is required;
|
||||
map ChangeEquipmentStatus.date;
|
||||
}
|
||||
attribute responsible {
|
||||
type string;
|
||||
description "Ответственный";
|
||||
is nullable;
|
||||
map ChangeEquipmentStatus.responsible;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.ChangeEquipmentStatusUpdate {
|
||||
description "Тело запроса на обновление документа изменения статуса";
|
||||
attribute equipmentId {
|
||||
type Equipment;
|
||||
is nullable;
|
||||
map ChangeEquipmentStatus.equipmentId;
|
||||
}
|
||||
attribute newStatus {
|
||||
type EquipmentStatus;
|
||||
description "Новый статус";
|
||||
is nullable;
|
||||
map ChangeEquipmentStatus.newStatus;
|
||||
}
|
||||
attribute number {
|
||||
type string;
|
||||
description "Номер";
|
||||
is nullable;
|
||||
map ChangeEquipmentStatus.number;
|
||||
}
|
||||
attribute date {
|
||||
type date;
|
||||
description "Дата изменения статуса";
|
||||
is nullable;
|
||||
map ChangeEquipmentStatus.date;
|
||||
}
|
||||
attribute responsible {
|
||||
type string;
|
||||
description "Ответственный";
|
||||
is nullable;
|
||||
map ChangeEquipmentStatus.responsible;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.ChangeEquipmentStatusListRequest {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.ChangeEquipmentStatusListResponse {
|
||||
description "Ответ с постраничным списком документов изменения статуса и метаданными";
|
||||
attribute content {
|
||||
type DTO.ChangeEquipmentStatus[];
|
||||
}
|
||||
attribute pageInfo {
|
||||
type DTO.PageInfo;
|
||||
}
|
||||
}
|
||||
|
||||
api API.Equipment {
|
||||
description "API управления справочником оборудования";
|
||||
|
||||
endpoint listEquipment {
|
||||
label "POST /equipment/page";
|
||||
description "Постраничный список оборудования с фильтрацией";
|
||||
attribute request {
|
||||
type DTO.EquipmentListRequest;
|
||||
}
|
||||
attribute response {
|
||||
type DTO.EquipmentListResponse;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint getEquipment {
|
||||
label "GET /equipment/{id}";
|
||||
description "Получить единицу оборудования по идентификатору";
|
||||
attribute id {
|
||||
type uuid;
|
||||
}
|
||||
attribute response {
|
||||
type DTO.Equipment;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint createEquipment {
|
||||
label "POST /equipment";
|
||||
description "Создать новую единицу оборудования";
|
||||
attribute request {
|
||||
type DTO.EquipmentCreate;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint updateEquipment {
|
||||
label "PUT /equipment/{id}";
|
||||
description "Обновить данные единицы оборудования";
|
||||
attribute id {
|
||||
type uuid;
|
||||
}
|
||||
attribute request {
|
||||
type DTO.EquipmentUpdate;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint deleteEquipment {
|
||||
label "DELETE /equipment/{id}";
|
||||
description "Удалить единицу оборудования";
|
||||
attribute id {
|
||||
type uuid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
api API.EquipmentStatusChange {
|
||||
description "API управления документами изменения статуса оборудования";
|
||||
|
||||
endpoint listStatusChanges {
|
||||
label "POST /status-changes/page";
|
||||
description "Постраничный список документов изменения статуса с фильтрацией";
|
||||
attribute request {
|
||||
type DTO.ChangeEquipmentStatusListRequest;
|
||||
}
|
||||
attribute response {
|
||||
type DTO.ChangeEquipmentStatusListResponse;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint getStatusChange {
|
||||
label "GET /status-changes/{id}";
|
||||
description "Получить документ изменения статуса по идентификатору";
|
||||
attribute id {
|
||||
type uuid;
|
||||
}
|
||||
attribute response {
|
||||
type DTO.ChangeEquipmentStatus;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint createStatusChange {
|
||||
label "POST /status-changes";
|
||||
description "Создать документ изменения статуса оборудования";
|
||||
attribute request {
|
||||
type DTO.ChangeEquipmentStatusCreate;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint updateStatusChange {
|
||||
labelо "PUT /status-changes/{id}";
|
||||
description "Обновить документ изменения статуса";
|
||||
attribute id {
|
||||
type uuid;
|
||||
}
|
||||
attribute request {
|
||||
type DTO.ChangeEquipmentStatusUpdate;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint deleteStatusChange {
|
||||
label "DELETE /status-changes/{id}";
|
||||
description "Удалить документ изменения статуса";
|
||||
attribute id {
|
||||
type uuid;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user