Files
myep-team/src/Enum/StatisticsEventName.php
T

34 lines
1.2 KiB
PHP

<?php
namespace App\Enum;
/**
* The metrics collected into the statistics_event table.
*
* Adding a metric means adding a case here plus one StatisticsCollectorInterface that
* records it. The table itself does not change, and neither does
* StatisticsChangeSetListener.
*
* A case's value is what ends up in statistics_event.name, so renaming one orphans every
* row already recorded under the old value.
*/
enum StatisticsEventName: string
{
case ASSIGNMENT_JOB_PROFILE_CHANGED = 'assignment.job_profile_changed';
case ASSIGNMENT_CALLED_OFF = 'assignment.called_off';
case DISPOSITION_CALLED_OFF = 'disposition.called_off';
case DISPOSITION_DELETED = 'disposition.deleted';
case APPLICATION_CREATED = 'application.created';
public function label(): string
{
return match ($this) {
self::ASSIGNMENT_JOB_PROFILE_CHANGED => 'Tätigkeitsprofil geändert',
self::ASSIGNMENT_CALLED_OFF => 'Reise abgesagt',
self::DISPOSITION_CALLED_OFF => 'Einsatz abgesagt',
self::DISPOSITION_DELETED => 'Einteilung gelöscht',
self::APPLICATION_CREATED => 'Bewerbung eingegangen',
};
}
}