This commit is contained in:
MaKarin
2026-04-03 20:54:37 +03:00
commit c89c23fd1d
50 changed files with 6716 additions and 0 deletions

90
domain/toir.api.dsl Normal file
View File

@@ -0,0 +1,90 @@
enum EquipmentStatus {
value Active {
label "В эксплуатации";
}
value Repair {
label "В ремонте";
}
value Reserve {
label "В резерве";
}
value WriteOff {
label "Списано";
}
}
// Оборудование
entity Equipment {
description "Единица оборудования — объект ремонта и технического обслуживания";
attribute id {
type uuid;
key primary;
}
attribute name {
description "Название оборудования";
is required;
type string;
}
attribute serialNumber {
description "Заводской (серийный) номер";
type string;
is required;
}
attribute dateOfInspection {
description "Дата поверки";
type date;
}
attribute commissionedAt {
description "Дата изготовления";
type date;
}
attribute status {
description "Текущий статус";
type EquipmentStatus;
default Active;
is required;
}
}
// Документ изменения статуса оборудования — с характеристиками: дата события, ссылка на оборудование, новый статус, возможно ответственный
entity ChangeEquipmentStatus {
description "Документ изменения статуса оборудования";
attribute equipmentId {
description "Оборудование";
type Equipment;
}
attribute newStatus {
description "Новый статус";
type EquipmentStatus;
is required;
//sync Equipment.status;
}
attribute number {
description "Номер";
type string;
}
attribute date {
description "Дата изменения статуса";
is required;
type date;
}
attribute responsible {
description "Ответственный";
type string;
}
}