{
  "$defs": {
    "DeliveryMode": {
      "description": "Delivery mode.",
      "oneOf": [
        {
          "enum": [
            "hybrid"
          ],
          "type": "string"
        },
        {
          "const": "elearning",
          "description": "Self-paced e-learning.",
          "type": "string"
        },
        {
          "const": "live_remote",
          "description": "Instructor-led, remote.",
          "type": "string"
        },
        {
          "const": "live_onsite",
          "description": "Instructor-led, in person.",
          "type": "string"
        },
        {
          "const": "reading",
          "description": "Reading-based, async.",
          "type": "string"
        }
      ]
    },
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    },
    "PathRef": {
      "description": "Path-based cross-reference relative to .corpospec/ root.\nPattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$`",
      "pattern": "^[a-z0-9_-]+(/[a-z0-9_.-]+)+$",
      "type": "string"
    },
    "TrainingCategory": {
      "description": "Training category.",
      "oneOf": [
        {
          "enum": [
            "safety_and_health",
            "skill_development",
            "onboarding",
            "leadership",
            "other"
          ],
          "type": "string"
        },
        {
          "const": "data_protection",
          "description": "GDPR / data-protection awareness.",
          "type": "string"
        },
        {
          "const": "information_security",
          "description": "ISO 27001 / PCI DSS / SOC 2 awareness.",
          "type": "string"
        },
        {
          "const": "anti_discrimination",
          "description": "AGG / Title VII / Equality Act 2010.",
          "type": "string"
        },
        {
          "const": "supply_chain_due_diligence",
          "description": "LkSG / CSDDD supply-chain awareness.",
          "type": "string"
        },
        {
          "const": "anti_money_laundering",
          "description": "AML / GwG / FATF.",
          "type": "string"
        },
        {
          "const": "anti_bribery",
          "description": "Anti-bribery / OECD Anti-Bribery Convention.",
          "type": "string"
        }
      ]
    }
  },
  "$id": "https://corpospec.com/schemas/v0.16.0/training-module.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Training-module record.",
  "properties": {
    "builds_skills": {
      "description": "PathRefs to skills this module builds (skill_framework.rs).",
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "category": {
      "$ref": "#/$defs/TrainingCategory"
    },
    "delivery_mode": {
      "$ref": "#/$defs/DeliveryMode"
    },
    "description": {
      "type": "string"
    },
    "duration_minutes": {
      "description": "Estimated duration in minutes.",
      "format": "int32",
      "type": "integer"
    },
    "effective_from": {
      "$ref": "#/$defs/IsoDate"
    },
    "effective_to": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoDate"
        },
        {
          "type": "null"
        }
      ]
    },
    "entity": {
      "$ref": "#/$defs/PathRef"
    },
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "mandatory": {
      "description": "Whether this training is mandatory for some role / all.",
      "type": "boolean"
    },
    "mandatory_for_roles": {
      "description": "PathRefs to roles this module is mandatory for (empty ⇒ all).",
      "items": {
        "$ref": "#/$defs/PathRef"
      },
      "type": "array"
    },
    "name": {
      "type": "string"
    },
    "recertification_months": {
      "description": "Re-certification cadence (months); None ⇒ one-time.",
      "format": "int32",
      "type": [
        "integer",
        "null"
      ]
    },
    "statutory_basis": {
      "description": "Statutory basis (e.g. \"AGG § 12 Abs. 2\", \"ISO 27001:2022 A.6.3\").",
      "type": "string"
    }
  },
  "required": [
    "id",
    "entity",
    "category",
    "name",
    "description",
    "delivery_mode",
    "duration_minutes",
    "mandatory",
    "statutory_basis",
    "effective_from"
  ],
  "title": "TrainingModule",
  "type": "object",
  "x-corpospec-pillar": "people"
}