Coflyr · Shared planning · Database pending
Common maintenance planning framework
Backend classes and shared operations updated on 8 October 2026. Database migration, legacy component-table retirement and frontend routing remain pending the project review. No browser reopening.
Common maintenance planning framework (9 shared classes)
Aircraft and component planning use these common models. Existing classes are expanded or reused; this section does not indicate that new physical tables were created. Database migration and legacy component-table removal remain pending the complete project review. Framework details and class fields.
| Model class | Table | Shared purpose | Component replacement / coverage | Implementation |
|---|---|---|---|---|
| MaintenanceEventMaster | MaintenanceEventMasters | Shared demand, due limits and scheduling for aircraft or component assets. | ComponentPlanningRecords; planning context of ComponentWorkpackageEvents | BE updated · DB pending |
| MaintenanceEventDueLimit | MaintenanceEventDueLimits | Structured counter/calendar limits and baselines. | ComponentPlanningRecord counter dimension, DueAt, ToGo and Interval | Existing shared support |
| MaintenanceForecastRecord | MaintenanceForecastRecords | Calculated forecast with aircraft/rotable/part context; future availability results. | ComponentPlanningRecords forecast results | BE updated · DB pending |
| ProductionPlan | ProductionPlans | Package-owned aircraft/component schedule, optionally scoped to one order; planning, production and snapshot versions are rows in this table. | ComponentShopProductionPlans + ComponentShopProductionPlanVersions | BE updated · DB pending |
| ProductionPlanTemplate | ProductionPlanTemplates | Common scheduling templates with asset-type applicability and part/facility scope metadata. | ComponentShopProductionPlanTemplates | BE updated · DB pending |
| ProductionPlanElement | ProductionPlanElements | Schedule/template items, groups and milestones; direct order/WorkStep references. | ComponentShopProductionPlanItems + ComponentShopProductionPlanTemplateItems | BE updated · DB pending |
| ProductionPlanLink | ProductionPlanLinks | Finish/start dependencies with lag; graph validation and scheduling. | ComponentShopProductionPlanLinks | BE updated · DB pending |
| ProductionPlanCapacity | ProductionPlanCapacities | Common supply capacity by facility, qualification, shift, skill and recurrence; effective staffing may be fractional. | ComponentShopProductionCapacities | BE updated · DB pending |
| ProductionPlanAssignment | ProductionPlanAssignments | Shared order assignment and production lifecycle. | Component order allocation uses the same assignment class | Existing shared support |
Shared behavior
- Component events can exist without an aircraft, using a selected rotable/part or unknown part reference. Aircraft events retain their required aircraft context. Event/package asset types are validated.
- Forecast calculation accepts optional aircraft/component and rotable filters. Scheduling placeholders are not marked as calculated maintenance deadlines.
- Templates retain hierarchy and dependency edges when copied to plans; live order/step references are stripped when saved as reusable templates.
- Common schedule dependencies support FinishToStart, StartToStart, FinishToFinish and StartToFinish with lag; cyclic, duplicate or cross-graph links are rejected.
- Planning copies and snapshots preserve component scope, schedule graph and capacity. Production release archives the previous production baseline in the same plan family.
- Production-control replan and booking-refresh APIs use the same shared services as planning operations. Execution progress is read from common orders/steps.
API entry points
| Operation | Route / notes |
|---|---|
| Create aircraft/component package | POST /api/work-planning-operations/workpackages with AssetType and component PartId/RotableId as applicable |
| Plan aircraft/component event | POST /api/work-planning-operations/events; common MaintenanceEventMaster CRUD also supports the new fields |
| Forecast | POST /api/work-planning-operations/forecast/calculate; optional assetType and rotableIds query filters; existing aircraft ID body retained |
| Generate/release/stagger | /api/production-planning-operations/plans/{id}/auto-generate, release, stagger |
| Replan/snapshot | /api/production-planning-operations/plans/{id}/replan and snapshot; shared replan also used by production-control API |
| Refresh execution | /api/production-planning-operations/plans/{id}/refresh-execution; production-control refresh-bookings delegates to the same service |
Migration boundaries
Existing component endpoints and tables remain available until schema/data migration and frontend adoption are completed. Capability/MOCL, assembly-tree booking, engineering compliance, formulas and print jobs remain specialized support. Nullable capability/warranty/stock/yield fields are storage hooks; automatic capability, warranty and inventory calculation is not implemented by this change. Recurrence is represented in common capacity; a full recurrence-expansion engine and full resource optimization are not claimed.
MaintenanceForecastRecord — 32 mapped fields in current backend
Database pending. Types below come from the current runtime EF model, not the unchanged migration snapshot.
| Field | EF CLR type | Nullability |
|---|---|---|
Id | Guid | Required |
AircraftTailId | Guid? | Nullable |
AssetType | WorkpackageAssetType | Required |
CalculatedDate | DateTime | Required |
CalculationInfo | String | Nullable |
CalculationStatus | String | Required |
DueDimension | String | Nullable |
ForecastDueDate | DateTime | Required |
ForecastRunKey | String | Nullable |
HasCalculatedDeadline | Boolean | Required |
HasInternalCapability | Boolean? | Nullable |
HasValidWarranty | Boolean? | Nullable |
IntervalValue | Decimal? | Nullable |
IsOverdue | Boolean | Required |
MaintenanceEventId | Guid? | Nullable |
MaintenanceTaskId | Guid? | Nullable |
PartId | Guid? | Nullable |
ProjectedFlightCyclesAtDue | Int64 | Required |
ProjectedFlightHoursAtDue | Decimal | Required |
RemainingDaysToDue | Int32 | Required |
RotableId | Guid? | Nullable |
SinceRequirementValue | Decimal? | Nullable |
StockQuantity | Decimal? | Nullable |
SystemAuditId | Guid? | Nullable |
TaskCardId | Guid? | Nullable |
ToGoValue | Decimal? | Nullable |
UnknownPartNumber | String | Nullable |
UpdateId | Guid? | Nullable |
UtilisationPerDay | Decimal? | Nullable |
WorkorderId | Guid? | Nullable |
WorkpackageId | Guid? | Nullable |
YieldPercentage | Decimal? | Nullable |
MaintenanceEventMaster — 76 mapped fields in current backend
Database pending. Types below come from the current runtime EF model, not the unchanged migration snapshot.
| Field | EF CLR type | Nullability |
|---|---|---|
Id | Guid | Required |
ActualEndDate | DateTime? | Nullable |
ActualStartDate | DateTime? | Nullable |
AircraftGroup | String | Nullable |
AircraftTailId | Guid? | Nullable |
ApprovedExtensionCycles | Int64 | Required |
ApprovedExtensionDays | Int32 | Required |
ApprovedExtensionHours | Decimal | Required |
AssetType | WorkpackageAssetType | Required |
AssignedLeadStaffId | Guid? | Nullable |
AtaId | Guid? | Nullable |
CalculationInfo | String | Nullable |
DueAt | DateTime? | Nullable |
DueDimension | String | Nullable |
DueGroupLogic | CalculationLogic? | Nullable |
DueValue | Decimal? | Nullable |
Effectivity | String | Nullable |
EstimatedManHours | Decimal | Required |
EventNumber | String | Required |
EventRevision | String | Nullable |
EventStatus | MaintenanceEventStatus | Required |
EventTitle | String | Required |
EventType | MaintenanceEventType | Required |
ExpectedAt | DateTime? | Nullable |
ExtendedBy | String | Nullable |
ExtensionApprovalStatus | String | Nullable |
ExtensionDate | DateTime? | Nullable |
ExtensionReason | String | Nullable |
ExtensionReasonCode | String | Nullable |
ExtensionUtilized | Boolean | Required |
FacilityId | Guid? | Nullable |
FifoDate | DateTime? | Nullable |
IncludeUnlimitedEvents | Boolean | Required |
InitializationKey | String | Nullable |
IntervalValue | Decimal? | Nullable |
IsExtensionRequested | Boolean | Required |
IsMandatory | Boolean | Required |
IsTool | Boolean | Required |
IsTurnaround | Boolean | Required |
Limitation | String | Nullable |
MaintenanceTaskId | Guid? | Nullable |
MaterialClassCode | String | Nullable |
OccurrenceId | Guid? | Nullable |
OrderReference | String | Nullable |
OrderTargetDate | DateTime? | Nullable |
OriginalDueAt | DateTime? | Nullable |
OwnerBusinessPartnerId | Guid? | Nullable |
PartId | Guid? | Nullable |
Performed | Boolean | Required |
PerformedAt | DateTime? | Nullable |
Plannable | Boolean | Required |
PlannedGroundTimeHours | Decimal | Required |
PlanningRemarks | String | Nullable |
PriorityCode | String | Nullable |
QualificationCodes | String | Nullable |
Quantity | Decimal | Required |
RemovalReason | String | Nullable |
RemovalWorkorderId | Guid? | Nullable |
RequiredConditionId | Guid? | Nullable |
ReturnType | ComponentReturnType? | Nullable |
RotableId | Guid? | Nullable |
ScheduledEndDate | DateTime | Required |
ScheduledStartDate | DateTime | Required |
SerialNumber | String | Nullable |
ShowUntil | DateTime? | Nullable |
SpecialCodes | String | Nullable |
StationCode | String | Nullable |
StationId | Guid? | Nullable |
SystemAuditId | Guid? | Nullable |
TaskCardId | Guid? | Nullable |
ToGoValue | Decimal? | Nullable |
TurnaroundHours | Decimal? | Nullable |
UnknownPartNumber | String | Nullable |
UpdateId | Guid? | Nullable |
WorkorderId | Guid? | Nullable |
WorkpackageId | Guid? | Nullable |
ProductionPlanCapacity — 28 mapped fields in current backend
Database pending. Types below come from the current runtime EF model, not the unchanged migration snapshot.
| Field | EF CLR type | Nullability |
|---|---|---|
Id | Guid | Required |
Active | Boolean | Required |
AircraftModelCode | String | Nullable |
AircraftSubTypeCode | String | Nullable |
AircraftTypeCode | String | Nullable |
CapacityDescription | String | Required |
CapacityType | ProductionCapacityType | Required |
ClassificationCode | String | Nullable |
Employees | Decimal | Required |
EndDateTime | DateTime | Required |
FacilityCode | String | Nullable |
FacilityId | Guid? | Nullable |
ManHours | Decimal | Required |
ProductionPlanId | Guid | Required |
QualificationCode | String | Nullable |
Recurrence | ProductionCapacityRecurrence | Required |
Recurring | Boolean | Required |
RecurringData | String | Nullable |
RecurringMode | String | Nullable |
ResourceType | String | Nullable |
ScopeCode | String | Nullable |
ShiftCode | String | Nullable |
ShiftGroupCode | String | Nullable |
SkillCode | String | Nullable |
StartDateTime | DateTime | Required |
StationCode | String | Nullable |
SystemAuditId | Guid? | Nullable |
UpdateId | Guid? | Nullable |
ProductionPlanElement — 42 mapped fields in current backend
Database pending. Types below come from the current runtime EF model, not the unchanged migration snapshot.
| Field | EF CLR type | Nullability |
|---|---|---|
Id | Guid | Required |
Accomplished | Boolean | Required |
AchievedPercent | Decimal | Required |
ActualEnd | DateTime? | Nullable |
ActualStart | DateTime? | Nullable |
AreaCode | String | Nullable |
AtaId | Guid? | Nullable |
BookedManHours | Decimal | Required |
Closed | Boolean | Required |
Color | String | Nullable |
Criteria | String | Nullable |
Critical | Boolean | Required |
DefaultFindingGroup | Boolean | Required |
DurationMinutes | Int32 | Required |
ElementName | String | Required |
ElementType | ProductionPlanElementType | Required |
EstimatedManHours | Decimal | Required |
InternalMilestone | Boolean | Required |
MilestoneAccomplishedAt | DateTime? | Nullable |
OriginalEnd | DateTime? | Nullable |
OriginalStart | DateTime? | Nullable |
PanelCode | String | Nullable |
ParentElementId | Guid? | Nullable |
PhaseCode | String | Nullable |
ProductionPlanId | Guid? | Nullable |
ProductionPlanTemplateId | Guid? | Nullable |
QualificationCode | String | Nullable |
RowNumber | Int32 | Required |
ScheduledEnd | DateTime? | Nullable |
ScheduledStart | DateTime? | Nullable |
SequenceNumber | Int32 | Required |
ShopRequestCode | String | Nullable |
SpecialCode | String | Nullable |
StartOffsetMinutes | Int32 | Required |
Suspended | Boolean | Required |
SuspendedAt | DateTime? | Nullable |
SuspensionReason | String | Nullable |
SystemAuditId | Guid? | Nullable |
TaskCardId | Guid? | Nullable |
UpdateId | Guid? | Nullable |
WorkStepId | Guid? | Nullable |
WorkorderId | Guid? | Nullable |
ProductionPlanLink — 7 mapped fields in current backend
Database pending. Types below come from the current runtime EF model, not the unchanged migration snapshot.
| Field | EF CLR type | Nullability |
|---|---|---|
Id | Guid | Required |
DependencyType | ProductionPlanDependencyType | Required |
FromElementId | Guid | Required |
LagMinutes | Int32 | Required |
SystemAuditId | Guid? | Nullable |
ToElementId | Guid | Required |
UpdateId | Guid? | Nullable |
ProductionPlan — 41 mapped fields in current backend
Database pending. Types below come from the current runtime EF model, not the unchanged migration snapshot.
| Field | EF CLR type | Nullability |
|---|---|---|
Id | Guid | Required |
ActiveForWorkpackage | Boolean | Required |
AircraftRegistration | String | Nullable |
AircraftType | String | Nullable |
AssetType | WorkpackageAssetType | Required |
CompressLines | Boolean | Required |
ConflictCount | Int32 | Required |
ConflictsComputedAt | DateTime? | Nullable |
EmptyRowsBetweenTasks | Int32 | Required |
FacilityId | Guid? | Nullable |
GroupByCriteria | String | Nullable |
GroupMode | Boolean | Required |
HideEvents | Boolean | Required |
InitialPlanId | Guid? | Nullable |
LastAutoGeneratedAt | DateTime? | Nullable |
LastStaggeredAt | DateTime? | Nullable |
NestedGroups | Boolean | Required |
OffsetFromWorkpackageStartHours | Decimal | Required |
OnlyWorkSteps | Boolean | Required |
PlanName | String | Required |
PlanNumber | String | Required |
PlanStatus | ProductionPlanStatus | Required |
PlannedEnd | DateTime | Required |
PlannedStart | DateTime | Required |
ReleasedAt | DateTime? | Nullable |
ReleasedBy | String | Nullable |
ShowAllConnections | Boolean | Required |
ShowCriticalPath | Boolean | Required |
ShowInternalMilestones | Boolean | Required |
ShowTechnicalQueries | Boolean | Required |
SnapTo | ProductionPlanSnapUnit | Required |
SourceTemplateId | Guid? | Nullable |
SourceVersionId | Guid? | Nullable |
SystemAuditId | Guid? | Nullable |
UpdateId | Guid? | Nullable |
VersionDescription | String | Nullable |
VersionNumber | Int32 | Required |
VersionRole | ProductionPlanVersionRole | Required |
WorkorderId | Guid? | Nullable |
WorkpackageId | Guid | Required |
WorkpackageNumber | String | Nullable |
ProductionPlanTemplate — 28 mapped fields in current backend
Database pending. Types below come from the current runtime EF model, not the unchanged migration snapshot.
| Field | EF CLR type | Nullability |
|---|---|---|
Id | Guid | Required |
ActivatedAt | DateTime? | Nullable |
ActivatedBy | String | Nullable |
AircraftType | String | Nullable |
ArchivedAt | DateTime? | Nullable |
AssetType | WorkpackageAssetType? | Nullable |
CompressLines | Boolean | Required |
DurationHours | Decimal | Required |
EmptyRowsBetweenTasks | Int32 | Required |
FacilityId | Guid? | Nullable |
GroupByCriteria | String | Nullable |
LastAutoGeneratedAt | DateTime? | Nullable |
LastRecollectedAt | DateTime? | Nullable |
MaintenanceProgramNumber | String | Nullable |
MaintenanceProgramRevision | String | Nullable |
NestedGroups | Boolean | Required |
OffsetOfFirstGroupHours | Decimal | Required |
OnlyWorkSteps | Boolean | Required |
PartId | Guid? | Nullable |
RequiredConditionCode | String | Nullable |
ShowCriticalPath | Boolean | Required |
ShowInternalMilestones | Boolean | Required |
SnapTo | ProductionPlanSnapUnit | Required |
SystemAuditId | Guid? | Nullable |
TemplateCode | String | Required |
TemplateName | String | Required |
TemplateStatus | ProductionPlanTemplateStatus | Required |
UpdateId | Guid? | Nullable |