use only TOiR.domain.dsl like single source of truth for generation, update context for pinned .gitignore
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
import ./TOiR;
|
||||
|
||||
ui UI.Equipment {
|
||||
offset 600;
|
||||
|
||||
description "Единица оборудования — объект ремонта и технического обслуживания";
|
||||
|
||||
attribute Код {
|
||||
map Equipment.id;
|
||||
}
|
||||
|
||||
attribute ИнвентарныйНомер {
|
||||
map Equipment.inventoryNumber;
|
||||
}
|
||||
|
||||
attribute СерийныйНомер {
|
||||
map Equipment.serialNumber;
|
||||
}
|
||||
|
||||
attribute Наименование {
|
||||
map Equipment.name;
|
||||
}
|
||||
|
||||
// Связь с видом оборудования (справочник НСИ)
|
||||
attribute Тип {
|
||||
map Equipment.equipmentTypeCode;
|
||||
}
|
||||
|
||||
attribute Статус {
|
||||
map Equipment.status;
|
||||
description "Текущий статус";
|
||||
}
|
||||
|
||||
attribute МестоТекущее {
|
||||
map Equipment.location;
|
||||
}
|
||||
|
||||
attribute ДатаВвода {
|
||||
map Equipment.commissionedAt;
|
||||
}
|
||||
|
||||
attribute НаработкаВсего {
|
||||
map Equipment.totalEngineHours;
|
||||
}
|
||||
|
||||
attribute НаработкаТекущая {
|
||||
map Equipment.engineHoursSinceLastRepair;
|
||||
}
|
||||
|
||||
attribute Ремонт {
|
||||
map Equipment.lastRepairAt;
|
||||
}
|
||||
|
||||
attribute Примечания {
|
||||
map Equipment.notes;
|
||||
}
|
||||
}
|
||||
@@ -1,811 +0,0 @@
|
||||
// ─────────────────────────────────────────────
|
||||
// DTO: Вид оборудования (EquipmentType)
|
||||
// ─────────────────────────────────────────────
|
||||
|
||||
dto DTO.EquipmentType {
|
||||
description "Вид оборудования — полный объект ответа";
|
||||
|
||||
attribute code {
|
||||
type string;
|
||||
description "Код вида оборудования";
|
||||
map EquipmentType.code;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
description "Наименование вида";
|
||||
map EquipmentType.name;
|
||||
}
|
||||
|
||||
attribute manufacturer {
|
||||
type string;
|
||||
description "Производитель";
|
||||
is nullable;
|
||||
map EquipmentType.manufacturer;
|
||||
}
|
||||
|
||||
attribute maintenanceIntervalHours {
|
||||
type integer;
|
||||
description "Периодичность ТО, моточасов";
|
||||
is nullable;
|
||||
map EquipmentType.maintenanceIntervalHours;
|
||||
}
|
||||
|
||||
attribute overhaulIntervalHours {
|
||||
type integer;
|
||||
description "Периодичность КР, моточасов";
|
||||
is nullable;
|
||||
map EquipmentType.overhaulIntervalHours;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentTypeCreate {
|
||||
description "Вид оборудования — тело запроса на создание";
|
||||
|
||||
attribute code {
|
||||
type string;
|
||||
description "Код вида оборудования";
|
||||
is required;
|
||||
map EquipmentType.code;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
description "Наименование вида";
|
||||
is required;
|
||||
map EquipmentType.name;
|
||||
}
|
||||
|
||||
attribute manufacturer {
|
||||
type string;
|
||||
description "Производитель";
|
||||
is nullable;
|
||||
map EquipmentType.manufacturer;
|
||||
}
|
||||
|
||||
attribute maintenanceIntervalHours {
|
||||
type integer;
|
||||
description "Периодичность ТО, моточасов";
|
||||
is nullable;
|
||||
map EquipmentType.maintenanceIntervalHours;
|
||||
}
|
||||
|
||||
attribute overhaulIntervalHours {
|
||||
type integer;
|
||||
description "Периодичность КР, моточасов";
|
||||
is nullable;
|
||||
map EquipmentType.overhaulIntervalHours;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentTypeUpdate {
|
||||
description "Вид оборудования — тело запроса на обновление (частичное)";
|
||||
|
||||
attribute code {
|
||||
type string;
|
||||
description "Код вида оборудования";
|
||||
is nullable;
|
||||
map EquipmentType.code;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
description "Наименование вида";
|
||||
is nullable;
|
||||
map EquipmentType.name;
|
||||
}
|
||||
|
||||
attribute manufacturer {
|
||||
type string;
|
||||
description "Производитель";
|
||||
is nullable;
|
||||
map EquipmentType.manufacturer;
|
||||
}
|
||||
|
||||
attribute maintenanceIntervalHours {
|
||||
type integer;
|
||||
description "Периодичность ТО, моточасов";
|
||||
is nullable;
|
||||
map EquipmentType.maintenanceIntervalHours;
|
||||
}
|
||||
|
||||
attribute overhaulIntervalHours {
|
||||
type integer;
|
||||
description "Периодичность КР, моточасов";
|
||||
is nullable;
|
||||
map EquipmentType.overhaulIntervalHours;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentTypeListResponse {
|
||||
description "Список видов оборудования (формат React Admin)";
|
||||
|
||||
attribute data {
|
||||
type DTO.EquipmentType[];
|
||||
}
|
||||
|
||||
attribute total {
|
||||
type integer;
|
||||
}
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// DTO: Оборудование (Equipment)
|
||||
// ─────────────────────────────────────────────
|
||||
|
||||
dto DTO.Equipment {
|
||||
description "Единица оборудования — полный объект ответа";
|
||||
|
||||
attribute id {
|
||||
type uuid;
|
||||
map Equipment.id;
|
||||
}
|
||||
|
||||
attribute inventoryNumber {
|
||||
type string;
|
||||
description "Инвентарный номер";
|
||||
map Equipment.inventoryNumber;
|
||||
}
|
||||
|
||||
attribute serialNumber {
|
||||
type string;
|
||||
description "Заводской (серийный) номер";
|
||||
is nullable;
|
||||
map Equipment.serialNumber;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
description "Наименование единицы оборудования";
|
||||
map Equipment.name;
|
||||
}
|
||||
|
||||
attribute equipmentTypeCode {
|
||||
type string;
|
||||
description "Код вида оборудования";
|
||||
map Equipment.equipmentTypeCode;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type EquipmentStatus;
|
||||
description "Текущий статус";
|
||||
map Equipment.status;
|
||||
}
|
||||
|
||||
attribute location {
|
||||
type string;
|
||||
description "Место эксплуатации / скважина / куст";
|
||||
is nullable;
|
||||
map Equipment.location;
|
||||
}
|
||||
|
||||
attribute commissionedAt {
|
||||
type date;
|
||||
description "Дата ввода в эксплуатацию";
|
||||
is nullable;
|
||||
map Equipment.commissionedAt;
|
||||
}
|
||||
|
||||
attribute totalEngineHours {
|
||||
type decimal;
|
||||
description "Общая наработка, моточасов";
|
||||
is nullable;
|
||||
map Equipment.totalEngineHours;
|
||||
}
|
||||
|
||||
attribute engineHoursSinceLastRepair {
|
||||
type decimal;
|
||||
description "Наработка с последнего ремонта, моточасов";
|
||||
is nullable;
|
||||
map Equipment.engineHoursSinceLastRepair;
|
||||
}
|
||||
|
||||
attribute lastRepairAt {
|
||||
type date;
|
||||
description "Дата последнего ремонта";
|
||||
is nullable;
|
||||
map Equipment.lastRepairAt;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
type text;
|
||||
description "Примечания";
|
||||
is nullable;
|
||||
map Equipment.notes;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentCreate {
|
||||
description "Единица оборудования — тело запроса на создание";
|
||||
|
||||
attribute inventoryNumber {
|
||||
type string;
|
||||
description "Инвентарный номер";
|
||||
is required;
|
||||
map Equipment.inventoryNumber;
|
||||
}
|
||||
|
||||
attribute serialNumber {
|
||||
type string;
|
||||
description "Заводской (серийный) номер";
|
||||
is nullable;
|
||||
map Equipment.serialNumber;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
description "Наименование единицы оборудования";
|
||||
is required;
|
||||
map Equipment.name;
|
||||
}
|
||||
|
||||
attribute equipmentTypeCode {
|
||||
type string;
|
||||
description "Код вида оборудования";
|
||||
is required;
|
||||
map Equipment.equipmentTypeCode;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type EquipmentStatus;
|
||||
description "Текущий статус";
|
||||
is nullable;
|
||||
map Equipment.status;
|
||||
}
|
||||
|
||||
attribute location {
|
||||
type string;
|
||||
description "Место эксплуатации / скважина / куст";
|
||||
is nullable;
|
||||
map Equipment.location;
|
||||
}
|
||||
|
||||
attribute commissionedAt {
|
||||
type date;
|
||||
description "Дата ввода в эксплуатацию";
|
||||
is nullable;
|
||||
map Equipment.commissionedAt;
|
||||
}
|
||||
|
||||
attribute totalEngineHours {
|
||||
type decimal;
|
||||
description "Общая наработка, моточасов";
|
||||
is nullable;
|
||||
map Equipment.totalEngineHours;
|
||||
}
|
||||
|
||||
attribute engineHoursSinceLastRepair {
|
||||
type decimal;
|
||||
description "Наработка с последнего ремонта, моточасов";
|
||||
is nullable;
|
||||
map Equipment.engineHoursSinceLastRepair;
|
||||
}
|
||||
|
||||
attribute lastRepairAt {
|
||||
type date;
|
||||
description "Дата последнего ремонта";
|
||||
is nullable;
|
||||
map Equipment.lastRepairAt;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
type text;
|
||||
description "Примечания";
|
||||
is nullable;
|
||||
map Equipment.notes;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentUpdate {
|
||||
description "Единица оборудования — тело запроса на обновление (частичное)";
|
||||
|
||||
attribute inventoryNumber {
|
||||
type string;
|
||||
description "Инвентарный номер";
|
||||
is nullable;
|
||||
map Equipment.inventoryNumber;
|
||||
}
|
||||
|
||||
attribute serialNumber {
|
||||
type string;
|
||||
description "Заводской (серийный) номер";
|
||||
is nullable;
|
||||
map Equipment.serialNumber;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
description "Наименование единицы оборудования";
|
||||
is nullable;
|
||||
map Equipment.name;
|
||||
}
|
||||
|
||||
attribute equipmentTypeCode {
|
||||
type string;
|
||||
description "Код вида оборудования";
|
||||
is nullable;
|
||||
map Equipment.equipmentTypeCode;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type EquipmentStatus;
|
||||
description "Текущий статус";
|
||||
is nullable;
|
||||
map Equipment.status;
|
||||
}
|
||||
|
||||
attribute location {
|
||||
type string;
|
||||
description "Место эксплуатации / скважина / куст";
|
||||
is nullable;
|
||||
map Equipment.location;
|
||||
}
|
||||
|
||||
attribute commissionedAt {
|
||||
type date;
|
||||
description "Дата ввода в эксплуатацию";
|
||||
is nullable;
|
||||
map Equipment.commissionedAt;
|
||||
}
|
||||
|
||||
attribute totalEngineHours {
|
||||
type decimal;
|
||||
description "Общая наработка, моточасов";
|
||||
is nullable;
|
||||
map Equipment.totalEngineHours;
|
||||
}
|
||||
|
||||
attribute engineHoursSinceLastRepair {
|
||||
type decimal;
|
||||
description "Наработка с последнего ремонта, моточасов";
|
||||
is nullable;
|
||||
map Equipment.engineHoursSinceLastRepair;
|
||||
}
|
||||
|
||||
attribute lastRepairAt {
|
||||
type date;
|
||||
description "Дата последнего ремонта";
|
||||
is nullable;
|
||||
map Equipment.lastRepairAt;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
type text;
|
||||
description "Примечания";
|
||||
is nullable;
|
||||
map Equipment.notes;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentListResponse {
|
||||
description "Список оборудования (формат React Admin)";
|
||||
|
||||
attribute data {
|
||||
type DTO.Equipment[];
|
||||
}
|
||||
|
||||
attribute total {
|
||||
type integer;
|
||||
}
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// DTO: Заявка на ремонт (RepairOrder)
|
||||
// ─────────────────────────────────────────────
|
||||
|
||||
dto DTO.RepairOrder {
|
||||
description "Заявка на ремонт — полный объект ответа";
|
||||
|
||||
attribute id {
|
||||
type uuid;
|
||||
map RepairOrder.id;
|
||||
}
|
||||
|
||||
attribute number {
|
||||
type string;
|
||||
description "Номер заявки";
|
||||
map RepairOrder.number;
|
||||
}
|
||||
|
||||
attribute equipmentId {
|
||||
type uuid;
|
||||
description "Идентификатор единицы оборудования";
|
||||
map RepairOrder.equipmentId;
|
||||
}
|
||||
|
||||
attribute repairKind {
|
||||
type RepairKind;
|
||||
description "Вид ремонта";
|
||||
map RepairOrder.repairKind;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type RepairOrderStatus;
|
||||
description "Статус заявки";
|
||||
map RepairOrder.status;
|
||||
}
|
||||
|
||||
attribute plannedAt {
|
||||
type date;
|
||||
description "Плановая дата начала";
|
||||
map RepairOrder.plannedAt;
|
||||
}
|
||||
|
||||
attribute startedAt {
|
||||
type date;
|
||||
description "Фактическая дата начала";
|
||||
is nullable;
|
||||
map RepairOrder.startedAt;
|
||||
}
|
||||
|
||||
attribute completedAt {
|
||||
type date;
|
||||
description "Фактическая дата завершения";
|
||||
is nullable;
|
||||
map RepairOrder.completedAt;
|
||||
}
|
||||
|
||||
attribute contractor {
|
||||
type string;
|
||||
description "Подрядная организация (если внешний ремонт)";
|
||||
is nullable;
|
||||
map RepairOrder.contractor;
|
||||
}
|
||||
|
||||
attribute engineHoursAtRepair {
|
||||
type decimal;
|
||||
description "Наработка на момент ремонта, моточасов";
|
||||
is nullable;
|
||||
map RepairOrder.engineHoursAtRepair;
|
||||
}
|
||||
|
||||
attribute description {
|
||||
type text;
|
||||
description "Описание работ / дефекта";
|
||||
is nullable;
|
||||
map RepairOrder.description;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
type text;
|
||||
description "Примечания";
|
||||
is nullable;
|
||||
map RepairOrder.notes;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.RepairOrderCreate {
|
||||
description "Заявка на ремонт — тело запроса на создание";
|
||||
|
||||
attribute number {
|
||||
type string;
|
||||
description "Номер заявки";
|
||||
is required;
|
||||
map RepairOrder.number;
|
||||
}
|
||||
|
||||
attribute equipmentId {
|
||||
type uuid;
|
||||
description "Идентификатор единицы оборудования";
|
||||
is required;
|
||||
map RepairOrder.equipmentId;
|
||||
}
|
||||
|
||||
attribute repairKind {
|
||||
type RepairKind;
|
||||
description "Вид ремонта";
|
||||
is required;
|
||||
map RepairOrder.repairKind;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type RepairOrderStatus;
|
||||
description "Статус заявки";
|
||||
is nullable;
|
||||
map RepairOrder.status;
|
||||
}
|
||||
|
||||
attribute plannedAt {
|
||||
type date;
|
||||
description "Плановая дата начала";
|
||||
is required;
|
||||
map RepairOrder.plannedAt;
|
||||
}
|
||||
|
||||
attribute startedAt {
|
||||
type date;
|
||||
description "Фактическая дата начала";
|
||||
is nullable;
|
||||
map RepairOrder.startedAt;
|
||||
}
|
||||
|
||||
attribute completedAt {
|
||||
type date;
|
||||
description "Фактическая дата завершения";
|
||||
is nullable;
|
||||
map RepairOrder.completedAt;
|
||||
}
|
||||
|
||||
attribute contractor {
|
||||
type string;
|
||||
description "Подрядная организация (если внешний ремонт)";
|
||||
is nullable;
|
||||
map RepairOrder.contractor;
|
||||
}
|
||||
|
||||
attribute engineHoursAtRepair {
|
||||
type decimal;
|
||||
description "Наработка на момент ремонта, моточасов";
|
||||
is nullable;
|
||||
map RepairOrder.engineHoursAtRepair;
|
||||
}
|
||||
|
||||
attribute description {
|
||||
type text;
|
||||
description "Описание работ / дефекта";
|
||||
is nullable;
|
||||
map RepairOrder.description;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
type text;
|
||||
description "Примечания";
|
||||
is nullable;
|
||||
map RepairOrder.notes;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.RepairOrderUpdate {
|
||||
description "Заявка на ремонт — тело запроса на обновление (частичное)";
|
||||
|
||||
attribute number {
|
||||
type string;
|
||||
description "Номер заявки";
|
||||
is nullable;
|
||||
map RepairOrder.number;
|
||||
}
|
||||
|
||||
attribute equipmentId {
|
||||
type uuid;
|
||||
description "Идентификатор единицы оборудования";
|
||||
is nullable;
|
||||
map RepairOrder.equipmentId;
|
||||
}
|
||||
|
||||
attribute repairKind {
|
||||
type RepairKind;
|
||||
description "Вид ремонта";
|
||||
is nullable;
|
||||
map RepairOrder.repairKind;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type RepairOrderStatus;
|
||||
description "Статус заявки";
|
||||
is nullable;
|
||||
map RepairOrder.status;
|
||||
}
|
||||
|
||||
attribute plannedAt {
|
||||
type date;
|
||||
description "Плановая дата начала";
|
||||
is nullable;
|
||||
map RepairOrder.plannedAt;
|
||||
}
|
||||
|
||||
attribute startedAt {
|
||||
type date;
|
||||
description "Фактическая дата начала";
|
||||
is nullable;
|
||||
map RepairOrder.startedAt;
|
||||
}
|
||||
|
||||
attribute completedAt {
|
||||
type date;
|
||||
description "Фактическая дата завершения";
|
||||
is nullable;
|
||||
map RepairOrder.completedAt;
|
||||
}
|
||||
|
||||
attribute contractor {
|
||||
type string;
|
||||
description "Подрядная организация (если внешний ремонт)";
|
||||
is nullable;
|
||||
map RepairOrder.contractor;
|
||||
}
|
||||
|
||||
attribute engineHoursAtRepair {
|
||||
type decimal;
|
||||
description "Наработка на момент ремонта, моточасов";
|
||||
is nullable;
|
||||
map RepairOrder.engineHoursAtRepair;
|
||||
}
|
||||
|
||||
attribute description {
|
||||
type text;
|
||||
description "Описание работ / дефекта";
|
||||
is nullable;
|
||||
map RepairOrder.description;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
type text;
|
||||
description "Примечания";
|
||||
is nullable;
|
||||
map RepairOrder.notes;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.RepairOrderListResponse {
|
||||
description "Список заявок на ремонт (формат React Admin)";
|
||||
|
||||
attribute data {
|
||||
type DTO.RepairOrder[];
|
||||
}
|
||||
|
||||
attribute total {
|
||||
type integer;
|
||||
}
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// API: Виды оборудования
|
||||
// ─────────────────────────────────────────────
|
||||
|
||||
api API.EquipmentTypes {
|
||||
description "API управления справочником видов оборудования";
|
||||
|
||||
endpoint listEquipmentTypes {
|
||||
label "GET /equipment-types";
|
||||
description "Список видов оборудования (фильтры и пагинация — query-параметры)";
|
||||
attribute response {
|
||||
type DTO.EquipmentTypeListResponse;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint getEquipmentType {
|
||||
label "GET /equipment-types/{code}";
|
||||
description "Получить вид оборудования по коду";
|
||||
attribute code {
|
||||
type string;
|
||||
}
|
||||
attribute response {
|
||||
type DTO.EquipmentType;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint createEquipmentType {
|
||||
label "POST /equipment-types";
|
||||
description "Создать вид оборудования";
|
||||
attribute request {
|
||||
type DTO.EquipmentTypeCreate;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint updateEquipmentType {
|
||||
label "PATCH /equipment-types/{code}";
|
||||
description "Обновить вид оборудования";
|
||||
attribute code {
|
||||
type string;
|
||||
}
|
||||
attribute request {
|
||||
type DTO.EquipmentTypeUpdate;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint deleteEquipmentType {
|
||||
label "DELETE /equipment-types/{code}";
|
||||
description "Удалить вид оборудования";
|
||||
attribute code {
|
||||
type string;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// API: Оборудование
|
||||
// ─────────────────────────────────────────────
|
||||
|
||||
api API.Equipment {
|
||||
description "API управления оборудованием";
|
||||
|
||||
endpoint listEquipment {
|
||||
label "GET /equipment";
|
||||
description "Список оборудования (фильтры и пагинация — query-параметры)";
|
||||
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 "PATCH /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 API.RepairOrders {
|
||||
description "API управления заявками на ремонт";
|
||||
|
||||
endpoint listRepairOrders {
|
||||
label "GET /repair-orders";
|
||||
description "Список заявок на ремонт (фильтры и пагинация — query-параметры)";
|
||||
attribute response {
|
||||
type DTO.RepairOrderListResponse;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint getRepairOrder {
|
||||
label "GET /repair-orders/{id}";
|
||||
description "Получить заявку на ремонт по идентификатору";
|
||||
attribute id {
|
||||
type uuid;
|
||||
}
|
||||
attribute response {
|
||||
type DTO.RepairOrder;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint createRepairOrder {
|
||||
label "POST /repair-orders";
|
||||
description "Создать заявку на ремонт";
|
||||
attribute request {
|
||||
type DTO.RepairOrderCreate;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint updateRepairOrder {
|
||||
label "PATCH /repair-orders/{id}";
|
||||
description "Обновить заявку на ремонт";
|
||||
attribute id {
|
||||
type uuid;
|
||||
}
|
||||
attribute request {
|
||||
type DTO.RepairOrderUpdate;
|
||||
}
|
||||
}
|
||||
|
||||
endpoint deleteRepairOrder {
|
||||
label "DELETE /repair-orders/{id}";
|
||||
description "Удалить заявку на ремонт";
|
||||
attribute id {
|
||||
type uuid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,753 +0,0 @@
|
||||
/*
|
||||
КИС ТОиР — DTO
|
||||
Структуры данных для обмена через API
|
||||
*/
|
||||
|
||||
//import ./TOiR;
|
||||
//only external;
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// Общие
|
||||
// ─────────────────────────────────────────────
|
||||
|
||||
dto DTO.PageRequest {
|
||||
description "Параметры постраничной выдачи";
|
||||
|
||||
attribute page {
|
||||
description "Номер страницы (начиная с 0)";
|
||||
type integer;
|
||||
}
|
||||
|
||||
attribute size {
|
||||
description "Размер страницы";
|
||||
type integer;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.Filter {
|
||||
description "Элемент фильтра для запросов списка";
|
||||
attribute field { type string; }
|
||||
attribute operator { type string; }
|
||||
attribute value { type string; }
|
||||
}
|
||||
|
||||
dto DTO.PageInfo {
|
||||
description "Метаданные постраничной выдачи";
|
||||
attribute size { type integer; }
|
||||
attribute number { type integer; }
|
||||
attribute totalElements { type integer; }
|
||||
attribute totalPages { type integer; }
|
||||
}
|
||||
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// Вид оборудования (EquipmentType)
|
||||
// ─────────────────────────────────────────────
|
||||
|
||||
dto DTO.EquipmentType {
|
||||
description "Вид оборудования — response";
|
||||
|
||||
attribute code {
|
||||
type string;
|
||||
map EquipmentType.code;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
map EquipmentType.name;
|
||||
}
|
||||
|
||||
attribute manufacturer {
|
||||
type string;
|
||||
is nullable;
|
||||
map EquipmentType.manufacturer;
|
||||
}
|
||||
|
||||
attribute maintenanceIntervalHours {
|
||||
type integer;
|
||||
is nullable;
|
||||
map EquipmentType.maintenanceIntervalHours;
|
||||
}
|
||||
|
||||
attribute overhaulIntervalHours {
|
||||
type integer;
|
||||
is nullable;
|
||||
map EquipmentType.overhaulIntervalHours;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentTypeFilter {
|
||||
description "Фильтры для списка видов оборудования";
|
||||
|
||||
attribute code {
|
||||
description "Частичное совпадение по коду";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
description "Частичное совпадение по наименованию";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute manufacturer {
|
||||
description "Частичное совпадение по производителю";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentTypeCreate {
|
||||
description "Тело запроса на создание вида оборудования";
|
||||
|
||||
attribute code {
|
||||
description "Код вида оборудования";
|
||||
type string;
|
||||
is required;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
description "Наименование вида";
|
||||
type string;
|
||||
is required;
|
||||
}
|
||||
|
||||
attribute manufacturer {
|
||||
description "Производитель";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute maintenanceIntervalHours {
|
||||
description "Периодичность ТО, моточасов";
|
||||
type integer;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute overhaulIntervalHours {
|
||||
description "Периодичность КР, моточасов";
|
||||
type integer;
|
||||
is nullable;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentTypeUpdate {
|
||||
description "Тело запроса на обновление вида оборудования";
|
||||
|
||||
attribute name {
|
||||
description "Наименование вида";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute manufacturer {
|
||||
description "Производитель";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute maintenanceIntervalHours {
|
||||
description "Периодичность ТО, моточасов";
|
||||
type integer;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute overhaulIntervalHours {
|
||||
description "Периодичность КР, моточасов";
|
||||
type integer;
|
||||
is nullable;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// Оборудование (Equipment)
|
||||
// ─────────────────────────────────────────────
|
||||
|
||||
dto DTO.EquipmentListItem {
|
||||
description "Строка списка оборудования";
|
||||
|
||||
attribute id {
|
||||
type uuid;
|
||||
map Equipment.id;
|
||||
}
|
||||
|
||||
attribute inventoryNumber {
|
||||
type string;
|
||||
map Equipment.inventoryNumber;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
map Equipment.name;
|
||||
}
|
||||
|
||||
attribute equipmentTypeCode {
|
||||
type string;
|
||||
map Equipment.equipmentTypeCode;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type EquipmentStatus;
|
||||
map Equipment.status;
|
||||
}
|
||||
|
||||
attribute location {
|
||||
type string;
|
||||
is nullable;
|
||||
map Equipment.location;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentDetail {
|
||||
description "Полная информация об оборудовании";
|
||||
|
||||
attribute id {
|
||||
type uuid;
|
||||
map Equipment.id;
|
||||
}
|
||||
|
||||
attribute inventoryNumber {
|
||||
type string;
|
||||
map Equipment.inventoryNumber;
|
||||
}
|
||||
|
||||
attribute serialNumber {
|
||||
type string;
|
||||
is nullable;
|
||||
map Equipment.serialNumber;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
type string;
|
||||
map Equipment.name;
|
||||
}
|
||||
|
||||
attribute equipmentTypeCode {
|
||||
type string;
|
||||
map Equipment.equipmentTypeCode;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type EquipmentStatus;
|
||||
map Equipment.status;
|
||||
}
|
||||
|
||||
attribute location {
|
||||
type string;
|
||||
is nullable;
|
||||
map Equipment.location;
|
||||
}
|
||||
|
||||
attribute commissionedAt {
|
||||
type date;
|
||||
is nullable;
|
||||
map Equipment.commissionedAt;
|
||||
}
|
||||
|
||||
attribute totalEngineHours {
|
||||
type decimal;
|
||||
is nullable;
|
||||
map Equipment.totalEngineHours;
|
||||
}
|
||||
|
||||
attribute engineHoursSinceLastRepair {
|
||||
type decimal;
|
||||
is nullable;
|
||||
map Equipment.engineHoursSinceLastRepair;
|
||||
}
|
||||
|
||||
attribute lastRepairAt {
|
||||
type date;
|
||||
is nullable;
|
||||
map Equipment.lastRepairAt;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
type text;
|
||||
is nullable;
|
||||
map Equipment.notes;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentFilter {
|
||||
description "Фильтры для списка оборудования";
|
||||
|
||||
attribute inventoryNumber {
|
||||
description "Частичное совпадение по инвентарному номеру";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute serialNumber {
|
||||
description "Частичное совпадение по заводскому номеру";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
description "Частичное совпадение по наименованию";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute equipmentTypeCode {
|
||||
description "Точное совпадение по коду вида оборудования";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
description "Фильтр по статусу";
|
||||
type EquipmentStatus;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute location {
|
||||
description "Частичное совпадение по месту эксплуатации";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentCreate {
|
||||
description "Тело запроса на создание оборудования";
|
||||
|
||||
attribute inventoryNumber {
|
||||
description "Инвентарный номер";
|
||||
type string;
|
||||
is required;
|
||||
}
|
||||
|
||||
attribute serialNumber {
|
||||
description "Заводской (серийный) номер";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
description "Наименование единицы оборудования";
|
||||
type string;
|
||||
is required;
|
||||
}
|
||||
|
||||
attribute equipmentTypeCode {
|
||||
description "Код вида оборудования";
|
||||
type string;
|
||||
is required;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
description "Текущий статус";
|
||||
type EquipmentStatus;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute location {
|
||||
description "Место эксплуатации / скважина / куст";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute commissionedAt {
|
||||
description "Дата ввода в эксплуатацию";
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute totalEngineHours {
|
||||
description "Общая наработка, моточасов";
|
||||
type decimal;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute engineHoursSinceLastRepair {
|
||||
description "Наработка с последнего ремонта, моточасов";
|
||||
type decimal;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute lastRepairAt {
|
||||
description "Дата последнего ремонта";
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
description "Примечания";
|
||||
type text;
|
||||
is nullable;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.EquipmentUpdate {
|
||||
description "Тело запроса на обновление оборудования";
|
||||
|
||||
attribute inventoryNumber {
|
||||
description "Инвентарный номер";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute serialNumber {
|
||||
description "Заводской (серийный) номер";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute name {
|
||||
description "Наименование единицы оборудования";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute equipmentTypeCode {
|
||||
description "Код вида оборудования";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
description "Текущий статус";
|
||||
type EquipmentStatus;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute location {
|
||||
description "Место эксплуатации / скважина / куст";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute commissionedAt {
|
||||
description "Дата ввода в эксплуатацию";
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute totalEngineHours {
|
||||
description "Общая наработка, моточасов";
|
||||
type decimal;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute engineHoursSinceLastRepair {
|
||||
description "Наработка с последнего ремонта, моточасов";
|
||||
type decimal;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute lastRepairAt {
|
||||
description "Дата последнего ремонта";
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
description "Примечания";
|
||||
type text;
|
||||
is nullable;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ─────────────────────────────────────────────
|
||||
// Заявка на ремонт (RepairOrder)
|
||||
// ─────────────────────────────────────────────
|
||||
|
||||
dto DTO.RepairOrderListItem {
|
||||
description "Строка списка заявок на ремонт";
|
||||
|
||||
attribute id {
|
||||
type uuid;
|
||||
map RepairOrder.id;
|
||||
}
|
||||
|
||||
attribute number {
|
||||
type string;
|
||||
map RepairOrder.number;
|
||||
}
|
||||
|
||||
attribute equipmentId {
|
||||
type uuid;
|
||||
map RepairOrder.equipmentId;
|
||||
}
|
||||
|
||||
attribute repairKind {
|
||||
type RepairKind;
|
||||
map RepairOrder.repairKind;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type RepairOrderStatus;
|
||||
map RepairOrder.status;
|
||||
}
|
||||
|
||||
attribute plannedAt {
|
||||
type date;
|
||||
map RepairOrder.plannedAt;
|
||||
}
|
||||
|
||||
attribute contractor {
|
||||
type string;
|
||||
is nullable;
|
||||
map RepairOrder.contractor;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.RepairOrderDetail {
|
||||
description "Полная информация о заявке на ремонт";
|
||||
|
||||
attribute id {
|
||||
type uuid;
|
||||
map RepairOrder.id;
|
||||
}
|
||||
|
||||
attribute number {
|
||||
type string;
|
||||
map RepairOrder.number;
|
||||
}
|
||||
|
||||
attribute equipmentId {
|
||||
type uuid;
|
||||
map RepairOrder.equipmentId;
|
||||
}
|
||||
|
||||
attribute repairKind {
|
||||
type RepairKind;
|
||||
map RepairOrder.repairKind;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
type RepairOrderStatus;
|
||||
map RepairOrder.status;
|
||||
}
|
||||
|
||||
attribute plannedAt {
|
||||
type date;
|
||||
map RepairOrder.plannedAt;
|
||||
}
|
||||
|
||||
attribute startedAt {
|
||||
type date;
|
||||
is nullable;
|
||||
map RepairOrder.startedAt;
|
||||
}
|
||||
|
||||
attribute completedAt {
|
||||
type date;
|
||||
is nullable;
|
||||
map RepairOrder.completedAt;
|
||||
}
|
||||
|
||||
attribute contractor {
|
||||
type string;
|
||||
is nullable;
|
||||
map RepairOrder.contractor;
|
||||
}
|
||||
|
||||
attribute engineHoursAtRepair {
|
||||
type decimal;
|
||||
is nullable;
|
||||
map RepairOrder.engineHoursAtRepair;
|
||||
}
|
||||
|
||||
attribute description {
|
||||
type text;
|
||||
is nullable;
|
||||
map RepairOrder.description;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
type text;
|
||||
is nullable;
|
||||
map RepairOrder.notes;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.RepairOrderFilter {
|
||||
description "Фильтры для списка заявок на ремонт";
|
||||
|
||||
attribute number {
|
||||
description "Частичное совпадение по номеру заявки";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute equipmentId {
|
||||
description "Точное совпадение по идентификатору оборудования";
|
||||
type uuid;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute repairKind {
|
||||
description "Фильтр по виду ремонта";
|
||||
type RepairKind;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
description "Фильтр по статусу заявки";
|
||||
type RepairOrderStatus;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute plannedAtFrom {
|
||||
description "Плановая дата начала ОТ";
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute plannedAtTo {
|
||||
description "Плановая дата начала ДО";
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute contractor {
|
||||
description "Частичное совпадение по подрядчику";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.RepairOrderCreate {
|
||||
description "Тело запроса на создание заявки на ремонт";
|
||||
|
||||
attribute number {
|
||||
description "Номер заявки";
|
||||
type string;
|
||||
is required;
|
||||
}
|
||||
|
||||
attribute equipmentId {
|
||||
description "Идентификатор оборудования";
|
||||
type uuid;
|
||||
is required;
|
||||
}
|
||||
|
||||
attribute repairKind {
|
||||
description "Вид ремонта";
|
||||
type RepairKind;
|
||||
is required;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
description "Статус заявки";
|
||||
type RepairOrderStatus;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute plannedAt {
|
||||
description "Плановая дата начала";
|
||||
type date;
|
||||
is required;
|
||||
}
|
||||
|
||||
attribute startedAt {
|
||||
description "Фактическая дата начала";
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute completedAt {
|
||||
description "Фактическая дата завершения";
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute contractor {
|
||||
description "Подрядная организация";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute engineHoursAtRepair {
|
||||
description "Наработка на момент ремонта, моточасов";
|
||||
type decimal;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute description {
|
||||
description "Описание работ / дефекта";
|
||||
type text;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
description "Примечания";
|
||||
type text;
|
||||
is nullable;
|
||||
}
|
||||
}
|
||||
|
||||
dto DTO.RepairOrderUpdate {
|
||||
description "Тело запроса на обновление заявки на ремонт";
|
||||
|
||||
attribute number {
|
||||
description "Номер заявки";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute equipmentId {
|
||||
description "Идентификатор оборудования";
|
||||
type uuid;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute repairKind {
|
||||
description "Вид ремонта";
|
||||
type RepairKind;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute status {
|
||||
description "Статус заявки";
|
||||
type RepairOrderStatus;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute plannedAt {
|
||||
description "Плановая дата начала";
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute startedAt {
|
||||
description "Фактическая дата начала";
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute completedAt {
|
||||
description "Фактическая дата завершения";
|
||||
type date;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute contractor {
|
||||
description "Подрядная организация";
|
||||
type string;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute engineHoursAtRepair {
|
||||
description "Наработка на момент ремонта, моточасов";
|
||||
type decimal;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute description {
|
||||
description "Описание работ / дефекта";
|
||||
type text;
|
||||
is nullable;
|
||||
}
|
||||
|
||||
attribute notes {
|
||||
description "Примечания";
|
||||
type text;
|
||||
is nullable;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user