{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "Absence", "type": "object", "required": [ "_id", "createdAt", "updatedAt", "userId", "start", "end", "absenceType", "activityType", "status", "timeUnit" ], "properties": { "_id": { "type": "string", "pattern": "^[0-9a-f]{24}$", "example": "66a1b2c3d4e5f6789012345a", "description": "Unique identifier for the absence" }, "createdAt": { "type": "string", "format": "date-time", "example": "2024-01-15T08:30:00.000Z", "description": "When the absence was created" }, "updatedAt": { "type": "string", "format": "date-time", "example": "2024-01-15T08:30:00.000Z", "description": "When the absence was last modified" }, "userId": { "type": "string", "pattern": "^[0-9a-f]{24}$", "example": "58d55e3ffdc2eb20547edd0a", "description": "ID of the user taking the absence" }, "start": { "type": "string", "format": "date-time", "example": "2024-02-01T00:00:00.000Z", "description": "Start date and time of the absence" }, "startDayTime": { "type": "string", "example": "09:00", "description": "Start time of the absence (HH:mm format)" }, "startDayDuration": { "type": "string", "enum": [ "fullDay", "halfDayMorning", "halfDayAfternoon" ], "example": "fullDay", "description": "Duration type for the start day of the absence" }, "end": { "type": "string", "format": "date-time", "example": "2024-02-05T23:59:59.999Z", "description": "End date and time of the absence" }, "endDayTime": { "type": "string", "example": "17:00", "description": "End time of the absence (HH:mm format)" }, "endDayDuration": { "type": "string", "enum": [ "fullDay", "halfDayMorning", "halfDayAfternoon" ], "example": "fullDay", "description": "Duration type for the end day of the absence" }, "absenceType": { "type": "string", "enum": [ "paidVacation", "sickLeave", "parentalLeave", "unpaidVacation", "familyCare", "childCare", "shortTermAllowance", "quarantine", "lockout", "irrevocableExemption", "voluntaryMilitaryService", "unlawfulStrike", "lawfulStrike", "unexcusedAbsence", "remoteWork", "otherPaidLeave", "educationalLeave", "gardenLeave", "longtermSickLeave" ], "example": "paidVacation", "description": "Type of absence being taken" }, "activityType": { "type": "string", "enum": [ "nonWorkingPaid", "nonWorkingUnpaid", "working", "nonWorkingPartiallyPaid" ], "example": "nonWorkingPaid", "description": "Activity type classification of the absence" }, "status": { "type": "string", "enum": [ "active", "removed", "pendingRemoval" ], "example": "active", "description": "Current status of the absence" }, "timeUnit": { "type": "string", "enum": [ "days", "hours" ], "example": "days", "description": "Unit of time used for measuring the absence duration" }, "comment": { "type": "string", "example": "Medical appointment", "description": "Optional comment or note about the absence" }, "actualAbsenceDuration": { "type": "number", "nullable": true, "example": 5, "description": "Actual duration of the absence in the specified time unit" } } }