Move notification event type onto events
This commit is contained in:
@@ -7,8 +7,6 @@ use Carbon\CarbonImmutable;
|
||||
|
||||
final readonly class TicketStatusChangedPayload implements NotificationEventPayload
|
||||
{
|
||||
public NotificationEventType $eventType;
|
||||
|
||||
public function __construct(
|
||||
public int $projectId,
|
||||
public string $projectKey,
|
||||
@@ -24,14 +22,7 @@ final readonly class TicketStatusChangedPayload implements NotificationEventPayl
|
||||
public int $toStatusId,
|
||||
public string $toStatusLabel,
|
||||
public CarbonImmutable $occurredAt,
|
||||
) {
|
||||
$this->eventType = NotificationEventType::TicketStatusChanged;
|
||||
}
|
||||
|
||||
public function eventType(): NotificationEventType
|
||||
{
|
||||
return $this->eventType;
|
||||
}
|
||||
) {}
|
||||
|
||||
public function projectId(): int
|
||||
{
|
||||
@@ -80,7 +71,7 @@ final readonly class TicketStatusChangedPayload implements NotificationEventPayl
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'event_type' => $this->eventType->value,
|
||||
'event_type' => NotificationEventType::TicketStatusChanged->value,
|
||||
'project' => [
|
||||
'id' => $this->projectId,
|
||||
'key' => $this->projectKey,
|
||||
|
||||
Reference in New Issue
Block a user