Vacation
This model represents vacation.
| Property | Type | Description | Information |
|---|---|---|---|
id | int | Identifier | Unique for single vacation. |
vacation_from | Date | Start date of a vacation | Must be prior to vacation_to. |
vacation_to | Date | End date of a vacation | Must be greater than vacation_from. User must have right amount of available vacation days. |
days | int | Total amount of vacation days | Gets counted automatically from given dates. |
work_days | int | Total amount of work days | Gets counted automatically from given dates. |
is_approved | bool | Approval state | true for approved vacation, false for unapproved or undecided vacation. |
note | string | Vacation note | Optional information about vacation. |
applicant_id | int | Identifier of applicant | Gets id from request by default, but could be set by Admin or Manager. |
responder_id | int | Identifier of respondent | Gets id from request by default, but could be set by Admin or Manager. |
approval_date | Date | Approval date | Gets current day's date by default, but could be set by Admin or Manager. |
Example:
{
"id": 1,
"vacation_from": "2022-11-14",
"vacation_to": "2022-11-24",
"days": 11,
"work_days": 9,
"is_approved": true,
"note": "Listopadová chalupa",
"applicant_id": 14,
"responder_id": 1,
"approval_date": "2022-10-05"
}