# DeleteCompanyHoliday

## Permission Scope

`holidayCalendar`

## Overview

Removes a holiday fact that was entered in error. Since `CompanyHoliday` is a plain dated fact, deletion is a direct removal of the record rather than closing an effective-dated generation.

## Business Rules

- Only a holiday entered in error is removed this way; a wrong `holidayKind` or `name` should normally be corrected via update rather than delete-and-recreate
- Deletion removes the dated fact outright; there is no generation history to preserve for `CompanyHoliday`
- After deletion, the date is no longer resolvable by `getCompanyHolidayByDate` for scheduling or calculation purposes

## Process Flow

```mermaid
flowchart TD
    A[Receive holiday id] --> B{Holiday exists?}
    B -- No --> C[Reject: HOLIDAY_NOT_FOUND]
    B -- Yes --> D[Delete CompanyHoliday fact]
    D --> E[Date no longer resolvable by scheduling/calculation as a holiday]
```

## External Dependencies

- [time-tracking::CompanyHoliday](../model/CompanyHoliday.md) model — the entity this command deletes

## Error Scenarios

- **HOLIDAY_NOT_FOUND**: no `CompanyHoliday` exists for the given id

## Test Cases

- deleting an existing holiday removes it so it is no longer returned by `getCompanyHolidayByDate`
- deleting a non-existent holiday id is rejected
- deletion does not create or affect any other holiday fact

