feat: collect assignment and disposition events for statistics
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
<?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 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::APPLICATION_CREATED => 'Bewerbung eingegangen',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user