{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","title":"Internal training record (well-being at work)","description":"Record of an internal training given by the employer (art. I.2-21 of the Code on well-being at work): the session sheet with its participants, or the individual attestation of one worker. Nothing is computed or defaulted.","additionalProperties":false,"required":["profile","document","employer","training","trainer","signatory"],"properties":{"profile":{"type":"string","enum":["session_sheet","individual_certificate"],"description":"Layout: the session sheet (participants) or the individual attestation (one worker)."},"document":{"type":"object","additionalProperties":false,"required":["place","date"],"properties":{"place":{"type":"string","minLength":1,"description":"Place where the document is drawn up."},"date":{"type":"string","format":"date","description":"Date of the document."},"reference":{"type":"string","description":"Internal reference of the document (optional)."}}},"employer":{"type":"object","additionalProperties":false,"required":["name","address"],"properties":{"name":{"type":"string","minLength":1,"description":"Name of the employer."},"address":{"type":"string","minLength":1,"description":"Address of the employer."},"enterprise_number":{"type":"string","description":"Belgian enterprise number (BCE / KBO) of the employer (optional)."},"seat_region":{"type":"string","enum":["nl_region","fr_region","brussels","de_region"],"description":"Linguistic region of the employer's operating seat (optional): Dutch-language region, French-language region, Brussels-Capital or German-language region. Nothing is compared with it."}}},"training":{"type":"object","additionalProperties":false,"required":["title","occasion","date","content"],"properties":{"title":{"type":"string","minLength":1,"description":"Subject of the training."},"occasion":{"type":"string","enum":["engagement","transfer_or_function_change","new_equipment","new_technology","periodic_refresher","fire_evacuation_drill","ppe","other"],"description":"Occasion of the training (art. I.2-21 al. 2, or a periodic refresher, a fire-evacuation drill, PPE, other)."},"date":{"type":"string","format":"date","description":"Date of the training."},"start_time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","description":"Start time, HH:MM (optional)."},"end_time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","description":"End time, HH:MM (optional)."},"duration_stated":{"type":"string","description":"Duration as the employer states it (optional)."},"location":{"type":"string","description":"Place of the training (optional)."},"content":{"type":"array","minItems":1,"description":"Topics covered by the training.","items":{"type":"string","minLength":1,"description":"A topic covered."}},"during_working_time":{"type":"boolean","description":"Whether the training was given during working time (optional)."}}},"trainer":{"type":"object","additionalProperties":false,"required":["name","kind"],"properties":{"name":{"type":"string","minLength":1,"description":"Name of the trainer."},"kind":{"type":"string","enum":["internal","external"],"description":"Whether the trainer belongs to the undertaking or not."},"organisation":{"type":"string","description":"Organisation of the trainer (optional)."}}},"participants":{"type":"array","minItems":1,"description":"Persons invited, with their attendance (session sheet).","items":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"description":"Name of the person invited."},"function":{"type":"string","description":"Function of the person (optional)."},"attended":{"type":"boolean","description":"Whether the person attended (optional)."},"assessment":{"type":"string","description":"Assessment of the person, only if given (optional)."}}}},"worker":{"type":"object","additionalProperties":false,"required":["name"],"description":"The worker concerned (individual attestation).","properties":{"name":{"type":"string","minLength":1,"description":"Name of the worker."},"function":{"type":"string","description":"Function of the worker (optional)."},"assessment":{"type":"string","description":"Assessment of the worker, only if given (optional)."}}},"materials":{"type":"array","description":"Documents handed over (optional); may reference the workstation instructions.","items":{"type":"string","minLength":1,"description":"A document handed over."}},"signatory":{"type":"object","additionalProperties":false,"required":["name","title"],"properties":{"name":{"type":"string","minLength":1,"description":"Name of the signatory."},"title":{"type":"string","minLength":1,"description":"Function of the signatory."}}},"notes":{"type":"string","description":"Free remarks (optional)."}},"allOf":[{"if":{"properties":{"profile":{"const":"session_sheet"}},"required":["profile"]},"then":{"required":["participants"]}},{"if":{"properties":{"profile":{"const":"individual_certificate"}},"required":["profile"]},"then":{"required":["worker"]}}]}