{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rotageek/json-schema/rotageek-rotageek-asp-net-core-public-api-models-time-sheet-response-model-schema.json",
  "title": "Rotageek.AspNetCore.PublicApi.Models.TimeSheetResponseModel",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rotageek-timesheets-api-openapi.yml#/components/schemas/Rotageek.AspNetCore.PublicApi.Models.TimeSheetResponseModel",
  "type": "object",
  "properties": {
    "status": {
      "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.TimeSheetStatus"
    },
    "startDate": {
      "type": "string",
      "description": "Time sheet start date",
      "format": "date-time"
    },
    "endDate": {
      "type": "string",
      "description": "Time sheet end date",
      "format": "date-time"
    },
    "updatedOn": {
      "type": [
        "string",
        "null"
      ],
      "description": "Date and time this time sheet",
      "format": "date-time"
    },
    "entries": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.TimeSheetEntryResponseModel"
      },
      "description": "List of entries in this time sheet"
    },
    "amendments": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.TimeSheetEntryAmendmentModel"
      },
      "description": "List of amendments of entries from previous weeks in this time sheet"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_Comment": {
      "type": "object",
      "properties": {
        "userId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Unique if of user who left this comment"
        },
        "text": {
          "type": [
            "string",
            "null"
          ],
          "description": "Comment content"
        },
        "date": {
          "type": "string",
          "description": "Date when comment was made",
          "format": "date-time"
        }
      },
      "additionalProperties": false,
      "description": "Container for comment information of time sheet record object"
    },
    "Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_GeoCoordinatesModel": {
      "type": "object",
      "properties": {
        "longitude": {
          "type": "number",
          "description": "Longitude component of position",
          "format": "float"
        },
        "latitude": {
          "type": "number",
          "description": "Latitude component of position",
          "format": "float"
        }
      },
      "additionalProperties": false,
      "description": "Container for geo coordinates positional information"
    },
    "Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_TimeAndAttendanceExceptionModel": {
      "type": "object",
      "properties": {
        "type": {
          "type": [
            "string",
            "null"
          ],
          "description": "Exception type - This can be Early / Late Clock In / Out."
        },
        "reason": {
          "type": [
            "string",
            "null"
          ],
          "description": "Exception reason"
        }
      },
      "additionalProperties": false,
      "description": "Container for time and attendance exception information"
    },
    "Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_TimeSheetAdjustmentReasonsModel": {
      "type": "object",
      "properties": {
        "startAdjustmentReason": {
          "type": [
            "string",
            "null"
          ],
          "description": "The reason selected for adjusting the start time"
        },
        "startAdjustedByUserId": {
          "type": [
            "string",
            "null"
          ],
          "description": "User identifier of the person who made the start time adjustment"
        },
        "endAdjustmentReason": {
          "type": [
            "string",
            "null"
          ],
          "description": "The reason selected for adjusting the end time"
        },
        "endAdjustedByUserId": {
          "type": [
            "string",
            "null"
          ],
          "description": "User identifier of the person who made the end time adjustment"
        },
        "breakAdjustmentReason": {
          "type": [
            "string",
            "null"
          ],
          "description": "The reason selected for adjusting the unpaid break duration"
        },
        "breakAdjustedByUserId": {
          "type": [
            "string",
            "null"
          ],
          "description": "User identifier of the person who made the unpaid break duration adjustment"
        },
        "deleteAdjustmentReason": {
          "type": [
            "string",
            "null"
          ],
          "description": "The reason selected for deleting a time sheet entry"
        },
        "deleteAdjustedByUserId": {
          "type": [
            "string",
            "null"
          ],
          "description": "User identifier of the person who deleted the time sheet entry"
        }
      },
      "additionalProperties": false,
      "description": "Container for reasons for manager adjustments to a time sheet entry"
    },
    "Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_TimeSheetLeaveDataResponseModel": {
      "type": "object",
      "properties": {
        "leaveRequestId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Leave request unique id"
        },
        "leaveRequestDuration": {
          "type": [
            "number",
            "null"
          ],
          "description": "Total leave request duration",
          "format": "double"
        },
        "leaveTypeId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Leave type id"
        }
      },
      "additionalProperties": false,
      "description": "Container for leave information of time sheet record object"
    },
    "Rotageek.AspNetCore.PublicApi.Models.PayrollData": {
      "type": "object",
      "properties": {
        "payrollCodeId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Associated payroll code"
        },
        "duration": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Duration of this payroll",
          "format": "int32"
        }
      },
      "additionalProperties": false,
      "description": "Container for payroll data of time sheet record object"
    },
    "Rotageek.AspNetCore.PublicApi.Models.TimeSheetEntryAmendmentModel": {
      "type": "object",
      "properties": {
        "userId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Target user id"
        },
        "locationId": {
          "type": [
            "string",
            "null"
          ],
          "description": "ID of worked location"
        },
        "startTime": {
          "type": "string",
          "description": "Actual shift start time",
          "format": "date-time"
        },
        "endTime": {
          "type": "string",
          "description": "Actual shift end time",
          "format": "date-time"
        },
        "breakDuration": {
          "type": "integer",
          "description": "Actual break duration",
          "format": "int32"
        },
        "employeeMissing": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Flag which indicates whether the user clocked into the shift associated with this time sheet entry"
        },
        "payrollCodes": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.PayrollData"
          },
          "description": "List of associated payroll codes"
        },
        "inactive": {
          "type": "boolean",
          "description": "If set to true, this amendment removes / deletes the original time sheet entry"
        },
        "standalone": {
          "type": "boolean",
          "description": "Flags whether this amendment is standalone i.e. a new, backdated time sheet entry"
        },
        "approved": {
          "type": "boolean",
          "description": "Flag whether this amendment record was approved by a supervisor"
        },
        "isLeave": {
          "type": "boolean",
          "description": "Flag which indicates whether this amendment record is associated with a shift or leave"
        },
        "timeSheetEntry": {
          "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.TimeSheetEntryResponseModel"
        }
      },
      "additionalProperties": false,
      "description": "Container for time sheet entry amendment record object"
    },
    "Rotageek.AspNetCore.PublicApi.Models.TimeSheetEntryResponseModel": {
      "type": "object",
      "properties": {
        "clockInException": {
          "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_TimeAndAttendanceExceptionModel"
        },
        "clockOutException": {
          "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_TimeAndAttendanceExceptionModel"
        },
        "comments": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_Comment"
          },
          "description": "List of comments for this time sheet entry"
        },
        "leaveData": {
          "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_TimeSheetLeaveDataResponseModel"
        },
        "approved": {
          "type": "boolean",
          "description": "Flag whether this time sheet record was approved by a supervisor"
        },
        "clockInTime": {
          "type": [
            "string",
            "null"
          ],
          "description": "Shift clock-in time",
          "format": "date-time"
        },
        "clockOutTime": {
          "type": [
            "string",
            "null"
          ],
          "description": "Shift clock-out time",
          "format": "date-time"
        },
        "adjustmentReasons": {
          "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_TimeSheetAdjustmentReasonsModel"
        },
        "scheduleRecordId": {
          "type": [
            "string",
            "null"
          ],
          "description": "ID of the associated schedule record (if any)"
        },
        "userId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Target user id"
        },
        "startTime": {
          "type": "string",
          "description": "Actual shift start time",
          "format": "date-time"
        },
        "clockInCoordinates": {
          "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_GeoCoordinatesModel"
        },
        "endTime": {
          "type": "string",
          "description": "Actual shift end time",
          "format": "date-time"
        },
        "clockOutCoordinates": {
          "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.BaseTimeSheetEntryModel_GeoCoordinatesModel"
        },
        "breakDuration": {
          "type": "integer",
          "description": "Actual break duration",
          "format": "int32"
        },
        "isLeave": {
          "type": "boolean",
          "description": "Flag which indicates whether this time sheet entry is associated with a shift or leave"
        },
        "employeeMissing": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Flag which indicates whether the user clocked into the shift associated with this time sheet entry"
        },
        "payrollCodes": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.PayrollData"
          },
          "description": "List of associated payroll codes"
        },
        "locationId": {
          "type": [
            "string",
            "null"
          ],
          "description": "ID of worked location"
        }
      },
      "additionalProperties": false
    },
    "Rotageek.AspNetCore.PublicApi.Models.TimeSheetStatus": {
      "enum": [
        "Created",
        "Submitted",
        "SignedOff"
      ],
      "type": "string",
      "description": "Describes the time sheet status"
    }
  }
}