Domain Model
Maintenance Plan
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string.uuid | Yes | — | Id |
| createdAt | string.date-time | Yes | — | Created at |
| updatedAt | string.date-time | Yes | — | Updated at |
| customerId | string | Yes | — | ID of the associated customer |
| siteId | string | Yes | — | ID of the associated site |
| name | string | Yes | — | Name |
| description | string | No | — | Description |
| status | enum(draft, active, suspended, expired, canceled) | Yes | — | Status |
| frequencyMonths | integer | Yes | — | Frequency months |
| startDate | string.date-time | No | — | Start date |
| endDate | string.date-time | No | — | End date |
| coveredSystemIds | string[] | No | — | Covered system ids |
| contractValue | unknown | No | — | Contract value |
| ownerUserId | string | No | — | ID of the associated owner user |
| workspaceId | string | Yes | — | ID of the associated workspace |
| visibilityMode | enum(global, workspace_local, shared) | Yes | — | Visibility mode |
| lastCompletedDate | unknown | No | — | Last completed date |
| nextScheduledDate | unknown | No | — | Next scheduled date |
| completionRate | unknown | No | — | Completion rate |
| missedCount | unknown | No | — | Missed count |
| totalScheduledCount | unknown | No | — | Total scheduled count |
| totalCompletedCount | unknown | No | — | Total completed count |
Create Schema
Fields accepted when creating a new record:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| customerId | string | Yes | — | ID of the associated customer |
| siteId | string | Yes | — | ID of the associated site |
| name | string | Yes | — | Name |
| description | string | No | — | Description |
| status | enum(draft, active, suspended, expired, canceled) | Yes | "draft" | Status |
| frequencyMonths | integer | Yes | — | Frequency months |
| startDate | string.date-time | No | — | Start date |
| endDate | string.date-time | No | — | End date |
| coveredSystemIds | string[] | No | — | Covered system ids |
| contractValue | unknown | No | — | Contract value |
| ownerUserId | string | No | — | ID of the associated owner user |
| workspaceId | string | No | — | ID of the associated workspace |
| visibilityMode | enum(global, workspace_local, shared) | Yes | "workspace_local" | Visibility mode |
Update Schema
All fields are optional when updating:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| customerId | string | No | — | ID of the associated customer |
| siteId | string | No | — | ID of the associated site |
| name | string | No | — | Name |
| description | string | No | — | Description |
| status | enum(draft, active, suspended, expired, canceled) | No | "draft" | Status |
| frequencyMonths | integer | No | — | Frequency months |
| startDate | string.date-time | No | — | Start date |
| endDate | string.date-time | No | — | End date |
| coveredSystemIds | string[] | No | — | Covered system ids |
| contractValue | unknown | No | — | Contract value |
| ownerUserId | string | No | — | ID of the associated owner user |