{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:folio:1:plans",
  "title": "plans.json",
  "description": "The week plan. Only in full exports.",
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "id",
      "date",
      "slotId",
      "recipeId",
      "portion",
      "updatedAt"
    ],
    "properties": {
      "id": {
        "type": "string",
        "minLength": 1
      },
      "date": {
        "type": "string",
        "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
        "description": "A calendar day, yyyy-MM-dd, in the cook's own time zone."
      },
      "slotId": {
        "type": "string",
        "minLength": 1
      },
      "recipeId": {
        "type": "string",
        "minLength": 1
      },
      "portion": {
        "type": "number",
        "exclusiveMinimum": 0,
        "description": "Servings, 1.25 for one and a quarter."
      },
      "locked": {
        "type": "boolean"
      },
      "leftoverOf": {
        "type": [
          "string",
          "null"
        ],
        "description": "The id of the entry that cooked this meal."
      },
      "skipped": {
        "type": "boolean"
      },
      "updatedAt": {
        "type": "string",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,9})?Z$",
        "description": "ISO 8601 in UTC with a Z, seconds required, fractions of a second optional (up to 9 digits): 2026-11-08T12:00:00Z."
      }
    },
    "description": "One meal: one per date and slot."
  }
}
