{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","title":"Internal leave request","description":"A worker's internal leave request and the employer's first answer. The kind of leave is a label only (no legal effect); the number of days is typed and never computed; the balances are typed by the employer; the decision status has no default.","additionalProperties":false,"required":["employer","employee","request"],"properties":{"employer":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"description":"Name of the employer."},"address":{"type":"string","description":"Address of the employer (optional)."},"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."}}},"employee":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"description":"Name of the worker who asks for the leave."},"department":{"type":"string","description":"Department or site (optional)."},"employee_id":{"type":"string","description":"Employee number or other internal identifier (optional)."},"manager":{"type":"string","description":"Name of the manager who answers (optional)."}}},"request":{"type":"object","additionalProperties":false,"required":["date","type","start_date","end_date","total_days"],"properties":{"date":{"type":"string","format":"date","description":"Date of the request."},"type":{"type":"string","enum":["legal_holiday","extra_legal_holiday","small_leave_circumstances","unpaid_leave","recovery_rest","time_credit_or_thematic_leave_see_form","other"],"description":"Kind of leave, as a label only; it has no legal effect in this document."},"type_other_label":{"type":"string","minLength":1,"description":"Label of the kind of leave when the kind is 'other'."},"start_date":{"type":"string","format":"date","description":"First day of the leave."},"end_date":{"type":"string","format":"date","description":"Last day of the leave."},"half_days":{"type":"boolean","description":"Whether the request includes half days (optional)."},"total_days":{"type":"number","minimum":0,"description":"Number of days asked, typed by the worker; it is never computed from the dates."},"reason":{"type":"string","description":"Reason of the request (optional)."}},"allOf":[{"if":{"properties":{"type":{"const":"other"}},"required":["type"]},"then":{"required":["type_other_label"]}}]},"balance":{"type":"object","additionalProperties":false,"properties":{"before":{"type":"number","description":"Leave balance before this request, typed by the employer (optional)."},"after":{"type":"number","description":"Leave balance after this request, typed by the employer (optional)."}}},"decision":{"type":"object","additionalProperties":false,"properties":{"status":{"type":"string","enum":["pending","approved","rejected"],"description":"Status of the request as the employer states it (optional, no default)."},"by":{"type":"string","description":"Name of the person who decides (optional)."},"date":{"type":"string","format":"date","description":"Date of the decision (optional)."},"reason":{"type":"string","description":"Reason of the decision (optional)."}}}}}