feat: rework automatic job profile assignment

This commit is contained in:
Björn Fromme
2024-11-26 16:46:29 +01:00
parent d52cdfca85
commit 97d658e71a
11 changed files with 220 additions and 68 deletions
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace App\Event;
use App\Entity\License;
use Symfony\Contracts\EventDispatcher\Event;
class LicenseAddedEvent extends Event
{
public const NAME = 'license.added';
public function __construct(private readonly License $license)
{
}
public function getLicense(): License
{
return $this->license;
}
}
+20
View File
@@ -0,0 +1,20 @@
<?php
namespace App\Event;
use App\Entity\License;
use Symfony\Contracts\EventDispatcher\Event;
class LicenseDeletedEvent extends Event
{
public const NAME = 'license.deleted';
public function __construct(private readonly License $license)
{
}
public function getLicense(): License
{
return $this->license;
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Event;
use App\Entity\TrainingAttendance;
use Symfony\Contracts\EventDispatcher\Event;
class TrainingAttendanceCreatedEvent extends Event
{
public const NAME = 'training_attendance.created';
public function __construct(private readonly TrainingAttendance $trainingAttendance)
{
}
public function getTrainingAttendance(): TrainingAttendance
{
return $this->trainingAttendance;
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Event;
use App\Entity\TrainingAttendance;
use Symfony\Contracts\EventDispatcher\Event;
class TrainingAttendanceDeletedEvent extends Event
{
public const NAME = 'training_attendance.deleted';
public function __construct(private readonly TrainingAttendance $trainingAttendance)
{
}
public function getTrainingAttendance(): TrainingAttendance
{
return $this->trainingAttendance;
}
}