Maintenance Logs
Track scheduled and completed maintenance activities on facility resources.
Use Cases
- Scheduled Maintenance: Greens aeration, cart service, simulator calibration
- Unscheduled Repairs: Equipment breakdowns, weather damage
- Audit Trail: Who logged what maintenance and when
Log Properties
| Field | Type | Description |
|---|---|---|
id | number | Unique identifier |
resourceId | number? | Linked facility resource |
courseId | number? | Optional course reference |
maintenanceType | string? | Type (e.g., GREENS, BUNKERS, IRRIGATION) |
description | string? | Detailed description |
startTime | DateTime | Maintenance start |
endTime | DateTime? | Maintenance end |
recordedBy | string? | Staff member who logged it |
recordedAt | DateTime | When the log was created |
REST API
List Maintenance Logs
GET /maintenance-logs?tenantId=1&clubId=10&resourceId=42
Query Parameters:
tenantId(required) - Tenant scopeclubId(optional) - Club scoperesourceId(optional) - Filter by resourcecourseId(optional) - Filter by course
Get Single Log
GET /maintenance-logs/123?tenantId=1
Create Maintenance Log
POST /maintenance-logs?tenantId=1&clubId=10
Content-Type: application/json
{
"resourceId": 42,
"maintenanceType": "GREENS",
"description": "Core aeration and top dressing on holes 1-9",
"startTime": "2025-01-15T06:00:00Z",
"endTime": "2025-01-15T14:00:00Z",
"recordedBy": "superintendent@club.example"
}
Update Log
PUT /maintenance-logs/123?tenantId=1
Content-Type: application/json
{
"endTime": "2025-01-15T16:00:00Z",
"description": "Extended due to weather delay"
}
Delete Log
DELETE /maintenance-logs/123?tenantId=1
GraphQL API
Query Logs
query MaintenanceLogs {
maintenanceLogs(tenantId: 1, clubId: 10, resourceId: 42) {
id
maintenanceType
description
startTime
endTime
recordedBy
}
}
Create Log
mutation CreateMaintenanceLog {
createMaintenanceLog(
tenantId: 1
clubId: 10
data: {
resourceId: 42
maintenanceType: "GREENS"
description: "Core aeration"
startTime: "2025-01-15T06:00:00Z"
}
) {
id
maintenanceType
startTime
}
}
Scoping
Maintenance logs are scoped through their linked resource:
MaintenanceLog → FacilityResource → tenantId/clubId
When creating a log, the service validates that the resourceId belongs to the specified tenant/club scope.
Common Maintenance Types
| Type | Description |
|---|---|
GREENS | Greens maintenance (mowing, aeration, top dressing) |
BUNKERS | Bunker maintenance (raking, sand replenishment) |
IRRIGATION | Irrigation system maintenance |
CART_SERVICE | Golf cart service and maintenance |
SIMULATOR_CALIBRATION | Simulator calibration and updates |
GENERAL | General facility maintenance |