{
  "$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-new-time-sheet-model-schema.json",
  "title": "Rotageek.AspNetCore.PublicApi.Models.NewTimeSheetModel",
  "description": "Container for new time sheet object",
  "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.NewTimeSheetModel",
  "type": "object",
  "properties": {
    "entries": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Rotageek.AspNetCore.PublicApi.Models.NewTimeSheetEntryModel"
      },
      "description": "List of entries 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.NewTimeSheetEntryModel": {
      "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.NewTimeSheetEntryModel_TimeSheetLeaveDataRequestModel"
        },
        "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,
      "description": "Container for time sheet entry record object"
    },
    "Rotageek.AspNetCore.PublicApi.Models.NewTimeSheetEntryModel_TimeSheetLeaveDataRequestModel": {
      "required": [
        "leaveRequestDuration",
        "leaveRequestId"
      ],
      "type": "object",
      "properties": {
        "leaveRequestId": {
          "minLength": 1,
          "type": "string",
          "description": "Leave request unique id"
        },
        "leaveRequestDuration": {
          "maximum": 24,
          "minimum": 0,
          "type": "number",
          "description": "Total leave request duration",
          "format": "double"
        }
      },
      "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"
    }
  }
}