Data Definition Document: Operations Maintenance
Domain: Operations (maintenance, security, personnel, services)
Logical Sub-Domain: Maintenance (Asset Care)
Physical Packages: @sd/mod-operations/maintenance
Related Documents: Process Blueprint
Context: This document defines the Data Structures for Tickets, PMP Schedules, and Housekeeping.
Source: packages/modules/operations/src/maintenance/schema.ts
0. Entity Relationship Diagram (ERD)
erDiagram
ASSET_HEARTBEAT ||--o{ SERVICE_REQUEST : "generates"
SERVICE_REQUEST }o--|| USER : "requested_by"
SERVICE_REQUEST }o--|| VENDOR_PROFILE : "assigned_to"
CLEANING_TASK }o--|| ASSET : "targets"
SERVICE_REQUEST {
string id PK
enum type "maintenance, housekeeping"
enum priority "normal, urgent"
string locationAssetId FK
}
ASSET_HEARTBEAT {
string id PK
string assetId FK
enum frequency "weekly, monthly"
date nextInspectionDueAt
}
CLEANING_TASK {
string id PK
date scheduledDate
json checklist
}
1. Primary Entities
Entity: ServiceRequest
A reactive ticket for work required.
| Field | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | Unique ID. |
type |
string |
Yes | maintenance, housekeeping. |
title |
string |
Yes | Short Summary. |
priority |
string |
Yes | low to emergency. |
requesterId |
string |
Yes | User who filed report. |
assigneeId |
string |
No | Staff or Vendor ID. |
status |
string |
Yes | triage, assigned, completed. |
auditLog |
json[] |
Yes | History of changes. |
Entity: AssetHeartbeat
A scheduled definition for preventive maintenance.
| Field | Type | Required | Description |
|---|---|---|---|
assetId |
string |
Yes | Target Asset. |
frequency |
string |
Yes | daily, weekly, monthly, annually. |
nextInspectionDueAt |
Timestamp |
Yes | Next trigger date. |
Entity: CleaningTask
A housekeeping job.
| Field | Type | Required | Description |
|---|---|---|---|
checklist |
object[] |
Yes | Items to verify (e.g. "Replenish Soap"). |
scheduledDate |
Timestamp |
Yes | Target Date. |
4. Changelog
| Date | Author | Description | Reference |
|---|---|---|---|
| 2026-01-24 | Antigravity | Initial creation | Implementation Plan |