KwestKarz Task & Helper Data Model Specification - wwestlake/KwestKarz GitHub Wiki
KwestKarz Task & Helper Data Model Specification
This document defines the backend and frontend data structures used to support helper-based vehicle task workflows, including task assignment, completion reporting, user management, and vehicle metadata.
🔐 UserAccount
{
"id": "guid",
"email": "string",
"username": "string",
"passwordHash": "string",
"roles": ["Admin", "FleetManager", "Helper"],
"isActive": true,
"requiresPasswordReset": true,
"lastLoginAt": "datetime",
"displayName": "string",
"phoneNumber": "optional"
}
🚘 Vehicle
{
"id": "guid",
"make": "string",
"model": "string",
"year": "number",
"plateNumber": "string",
"color": "string",
"status": "NotListed | Listed | Reserved | OnTrip | InMaintenance | Sold | Booked",
"requiresMaintenance": false,
"locationNote": "string",
"currentMileage": "number",
"photoUrl": "optional"
}
📋 Task
{
"id": "guid",
"title": "string",
"description": "string",
"vehicleId": "guid",
"assignedToUserId": "guid",
"status": "Draft | Assigned | InProgress | Completed | Incomplete | Verified | Rejected",
"priority": "Low | Normal | Urgent",
"startWindowAt": "datetime",
"endWindowAt": "datetime",
"dueAt": "datetime",
"photosRequired": true,
"checklist": ["Vacuum", "Take odometer photo"],
"requiresCertification": true,
"managerNotes": "optional string",
"helperInstructions": "optional string",
"taskTemplateId": "guid (optional)",
"createdAt": "datetime",
"completedAt": "datetime",
"verifiedByUserId": "guid (optional)",
"verificationNotes": "optional"
}
📦 TaskSubmission
{
"id": "guid",
"taskId": "guid",
"submittedByUserId": "guid",
"status": "Completed | Incomplete",
"certified": true,
"notes": "Helper's description",
"incompleteReason": "Blocked | Keys Missing | No Access | Other",
"photos": [
{ "url": "string", "label": "before" },
{ "url": "string", "label": "after" }
],
"submittedAt": "datetime",
"wasAutoMarkedComplete": false
}
✉️ EmailInvite
{
"id": "guid",
"email": "string",
"token": "secure string",
"expiresAt": "datetime",
"claimedAt": "datetime (nullable)",
"used": false,
"wasExpired": false,
"role": "Helper",
"invitedByUserId": "guid",
"invitedAt": "datetime"
}
♻️ (Optional) TaskTemplate
{
"id": "guid",
"name": "Photo Inspection",
"defaultChecklist": ["Walkaround Photos", "Tire Condition"],
"defaultPhotosRequired": true,
"defaultInstructions": "Take clean outdoor photos.",
"createdByUserId": "guid"
}