Files
toir-light/domain/toir.api.dsl
2026-04-03 20:54:37 +03:00

91 lines
1.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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;
}
}