API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · training_reports

Training Report (Ausbildungsnachweis) Schema

ID del esquema
training_report
Colección
training_reports
Permisos
  • Leertraining_report_view
  • Creartraining_report_create
  • Modificartraining_report_edit
  • Eliminartraining_report_delete

Campos

Training Report (Ausbildungsnachweis) Schema

training_reports4 permisos

Monthly apprentice training report after the IHK Trier form. Filled by the apprentice, reviewed and approved by the team lead (Ausbilder). Status machine: draft → submitted → in_review → needs_revision → approved.

sequenceNumberintegeropcional

IHK "Ausbildungsnachweis Nr." — per-apprentice running number (1, 2, 3 …). Set at creation = count of the apprentice's existing reports + 1.

≥ 1solo lecturaadmite null
apprenticeUserIduuidobligatorio

User UUID of the apprentice (Azubi) this report belongs to.

solo lectura
apprenticeProfileIduuidopcional

employee_profile UUID of the apprentice (denormalized for lookup).

solo lecturaadmite null
apprenticeNamestringopcional

Vor- und Zuname — snapshot of the apprentice name at creation (auto-filled).

máx. 300 caracteressolo lecturaadmite null
ausbildungsberufstringopcional

Ausbildungsberuf, Fachrichtung (e.g. "Fachinformatiker für Anwendungsentwicklung"). Auto-filled from the profile qualification, apprentice-editable.

máx. 300 caracteresadmite null
ausbildungsjahrstringopcional

Ausbildungsjahr as printed on the IHK form (e.g. "2025" — the year the training started). Free string, auto-filled from the hire year.

máx. 20 caracteresadmite null
departmentstringopcional

Ausbildungsabteilung/-bereich during the reporting period (e.g. "Entwicklung").

máx. 300 caracteresadmite null
locationstringopcional

Ausbildungs-Standort/Arbeitsort as a denormalized snapshot label (e.g. "Trier · 54290 Trier"), resolved from the apprentice profile workLocationId → legal-entity address at creation. Powers the reviewer "Standort" filter. Optional → null on reports created before this field existed (no backfill; the filter simply does not match those old drafts).

máx. 300 caracteressolo lecturaadmite null
periodobjectobligatorio

Reporting period — monthly. Drives the unique-per-month constraint.

solo lectura
yearintegerobligatorio
2000 – 2100
monthintegerobligatorio
1 – 12
periodLabelstringopcional

Human-readable period label (e.g. "Mai 2026"). Auto-filled.

máx. 50 caracteressolo lecturaadmite null
periodStartdateopcional

First day of the reporting period (ISO date). Auto-filled.

solo lecturaadmite null
periodEnddateopcional

Last day of the reporting period (ISO date). Auto-filled.

solo lecturaadmite null
reviewerIduuidopcional

User UUID of the reviewing team lead / Ausbilder. Resolved from the apprentice profile (ausbilderEmployeeId → userId, managerId fallback) at creation.

solo lecturaadmite null
reviewerNamestringopcional

Snapshot of the assigned Ausbilder name (shown to the apprentice in their list). Auto-filled at creation.

máx. 300 caracteressolo lecturaadmite null
statusstringobligatorio

Workflow status. Transitions enforced by training-report.service.

draftsubmittedin_reviewneeds_revisionapproved
Valor por defecto: "draft"solo lectura
activitiesstring[]opcional

"Tätigkeiten diesen Monat" — one entry per bullet point (PLAIN; derived from activitiesHtml when the rich editor is used; authoritative for PDF/AI/reviewer offset-annotations).

Valor por defecto: []admite null
activitiesHtmlstringopcional

Rich-text HTML body for the monthly activities list (sanitised).

máx. 80000 caracteresadmite null
vocationalSchoolSubjectsHtmlstringopcional

Rich-text HTML for the vocational-school subjects list (sanitised).

máx. 40000 caracteresadmite null
vocationalSchoolTopicsHtmlstringopcional

Rich-text HTML for the vocational-school topics list (sanitised).

máx. 60000 caracteresadmite null
vocationalSchoolSubjectsstring[]opcional

Berufsschule → Unterrichtsfächer (e.g. "FAE_L01", "Sport").

Valor por defecto: []admite null
vocationalSchoolTopicsstring[]opcional

Berufsschule → Unterrichtsthemen (one entry per topic line).

Valor por defecto: []admite null
detailedTaskobjectopcional

Ausführliche Beschreibung einer Arbeitsaufgabe für diesen Monat.

admite null
topicstringopcional

Thema.

máx. 500 caracteresadmite null
descriptionstringopcional

Long-form description of one work task (PLAIN text — derived from descriptionHtml when the rich editor is used; stays authoritative for PDF/AI/reviewer offset-annotations).

máx. 20000 caracteresadmite null
descriptionHtmlstringopcional

Rich-text HTML body for the work-task description (sanitised).

máx. 80000 caracteresadmite null
externalFileIdsstring[]opcional

Externally uploaded report files (e.g. signed PDF, scanned sheet) via the file/DMS service.

Valor por defecto: []admite null
sourcestringopcional

How the report is authored: "form" (default) = the structured IHK form, the SSoT for inline annotations / AI pre-check / search; "upload" = the apprentice uploaded a finished document (uploadedPdfFileId — PDF or Word) which IS the report document instead of the rendered form.

formupload
Valor por defecto: "form"solo lecturaadmite null
uploadedPdfFileIdstringopcional

When source="upload": file id (collection `files`, entityType `training_reports`) of the apprentice-uploaded source document served as the report document (download/preview) in place of the form render. Legacy name — the file may be a PDF or a Word document (see uploadedDocumentVersions[].mimeType). Kept as the downloadable original after a PDF→form extraction.

solo lecturaadmite null
uploadedDocumentVersionsobject[]opcional

Chronological stack of every uploaded report document (source="upload"). Each successful set-pdf upload appends an entry; the last entry is the active document (uploadedPdfFileId). Lets the apprentice and reviewer see and download previous versions after a re-upload. Optional → absent/empty on reports whose single upload predates this field (fall back to uploadedPdfFileId, assumed PDF).

Valor por defecto: []solo lecturaadmite null
idstringopcional

Stable version entry id (UUID).

fileIdstringobligatorio

files-collection id of this uploaded document version.

fileNamestringopcional
máx. 500 caracteresadmite null
mimeTypestringopcional

MIME type of the uploaded file (e.g. "application/pdf" or a Word type). Drives inline-preview vs. download-only in the UI.

máx. 200 caracteresadmite null
fileSizeintegeropcional
≥ 0admite null
uploadedAtdatetimeopcional
admite null
uploadedByuuidopcional
admite null
uploadedByNamestringopcional
máx. 300 caracteresadmite null
pdfExtractionStatusstringopcional

State of the manual "Felder aus PDF erkennen" job (OCR + LLM that parses the uploaded PDF into the form fields, then flips source=upload → form). Null = never run.

pendingcompletedfailed
solo lecturaadmite null
pdfExtractionFeedbackstringopcional

Error / completion message from the PDF field-extraction job.

máx. 5000 caracteressolo lecturaadmite null
submittedAtdatetimeopcional

When the apprentice submitted the report.

solo lecturaadmite null
reviewedAtdatetimeopcional

When the team lead approved or sent back the report.

solo lecturaadmite null
reviewedByuuidopcional

User UUID of the reviewer who took the last review action.

solo lecturaadmite null
revisionCountintegeropcional

How often the report has been sent back for revision.

≥ 0Valor por defecto: 0solo lectura
reviewFeedbackstringopcional

Overall feedback text from the team lead (shown to the apprentice).

máx. 10000 caracteressolo lecturaadmite null
reviewAnnotationsobject[]opcional

Inline text-passage markups by the reviewer: the apprentice sees these anchored comments on return.

Valor por defecto: []solo lecturaadmite null
idstringopcional

Stable annotation id (UUID).

fieldPathstringopcional

Path of the annotated text field (e.g. "detailedTask.description", "activities.0").

máx. 200 caracteresadmite null
quotestringopcional

Snapshot of the marked text — render fallback if offsets drift.

máx. 10000 caracteresadmite null
startOffsetintegeropcional

Character start offset of the marked range within the field text.

≥ 0admite null
endOffsetintegeropcional

Character end offset (exclusive) of the marked range.

≥ 0admite null
commentstringobligatorio

What is wrong / how to fix.

máx. 5000 caracteres
resolvedbooleanopcional

Whether the apprentice has addressed this annotation.

Valor por defecto: falseadmite null
createdAtdatetimeopcional
solo lecturaadmite null
createdByuuidopcional
solo lecturaadmite null
apprenticeSignatureobjectopcional

Digital signature captured when the apprentice submits ("für die Richtigkeit" — IHK "Unterschrift des Auszubildenden"). Drawn online, uploaded as an image, or typed.

solo lecturaadmite null
signedByuuidopcional
admite null
signedByNamestringopcional
máx. 300 caracteresadmite null
signedAtdatetimeopcional
admite null
methodstringopcional
drawntypeduploaded
admite null
imagestringopcional
máx. 1500000 caracteresadmite null
typedNamestringopcional
máx. 300 caracteresadmite null
approvalSignatureobjectopcional

Digital signature captured when the reviewer approves the report (IHK "Unterschrift des Ausbildenden").

solo lecturaadmite null
signedByuuidopcional
admite null
signedByNamestringopcional
máx. 300 caracteresadmite null
signedAtdatetimeopcional
admite null
methodstringopcional
drawntypeduploaded
admite null
imagestringopcional
máx. 1500000 caracteresadmite null
typedNamestringopcional
máx. 300 caracteresadmite null
lastReminderAtdatetimeopcional

When the reviewer last sent the apprentice a reminder for this report.

solo lecturaadmite null
reminderCountintegeropcional

How many reminders the reviewer has sent for this report.

≥ 0Valor por defecto: 0solo lectura
aiReviewStatusstringopcional

State of the manual AI pre-check. Null = never run.

pendingcompletedfailed
solo lecturaadmite null
aiReviewFeedbackstringopcional

AI summary of the report quality.

máx. 20000 caracteressolo lecturaadmite null
aiReviewStrengthsstring[]opcional

What the apprentice did well (AI).

Valor por defecto: []solo lecturaadmite null
aiReviewIssuesobject[]opcional

Problems / gaps the AI found.

Valor por defecto: []solo lecturaadmite null
textstringobligatorio
máx. 5000 caracteres
sectionRefstringopcional
máx. 200 caracteresadmite null
aiReviewSuggestionsstring[]opcional

Actionable improvement suggestions (AI).

Valor por defecto: []solo lecturaadmite null
aiReviewCriteriaobject[]opcional

Per-criterion verdict of the AI pre-check (spelling, accuracy, completeness, clarity) — drives the "Geprüft wird" result list in the reviewer UI.

Valor por defecto: []solo lecturaadmite null
keystringobligatorio
spellingaccuracycompletenessclarity
ratingstringobligatorio
goodwarningcritical
summarystringopcional
máx. 2000 caracteresadmite null
aiReviewScorenumberopcional

Suggested quality score 0–100 (AI). Advisory only — no grading.

0 – 100solo lecturaadmite null
aiReviewConfidencenumberopcional

AI confidence 0.0–1.0.

0 – 1solo lecturaadmite null
aiReviewedAtdatetimeopcional

When the AI pre-check completed.

solo lecturaadmite null
pdfFileIdstringopcional

File id of the generated, signed IHK PDF (collection `files`, entityType `training_report`). Created on approval; the apprentice can download it afterwards via GET /training-reports/:id/download.

solo lecturaadmite null

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/training_reports — Lista, paginada y filtrable
  • GET /api/v1/training_reports/<id> — Una entidad
  • POST /api/v1/training_reports — Crear
  • PATCH /api/v1/training_reports/<id> — Actualización parcial
  • DELETE /api/v1/training_reports/<id> — Eliminación lógica
  • GET /api/v1/training_reports/<id>/timeline — Auditoría y actividades

Búsqueda