Move notification event type onto events
This commit is contained in:
@@ -7,8 +7,6 @@ use Carbon\CarbonImmutable;
|
||||
|
||||
final readonly class TicketCreatedPayload implements NotificationEventPayload
|
||||
{
|
||||
public NotificationEventType $eventType;
|
||||
|
||||
public ?int $fromStatusId;
|
||||
|
||||
public ?string $fromStatusLabel;
|
||||
@@ -27,16 +25,10 @@ final readonly class TicketCreatedPayload implements NotificationEventPayload
|
||||
public string $toStatusLabel,
|
||||
public CarbonImmutable $occurredAt,
|
||||
) {
|
||||
$this->eventType = NotificationEventType::TicketCreate;
|
||||
$this->fromStatusId = null;
|
||||
$this->fromStatusLabel = null;
|
||||
}
|
||||
|
||||
public function eventType(): NotificationEventType
|
||||
{
|
||||
return $this->eventType;
|
||||
}
|
||||
|
||||
public function projectId(): int
|
||||
{
|
||||
return $this->projectId;
|
||||
@@ -84,7 +76,7 @@ final readonly class TicketCreatedPayload implements NotificationEventPayload
|
||||
public function toArray(): array
|
||||
{
|
||||
return [
|
||||
'event_type' => $this->eventType->value,
|
||||
'event_type' => NotificationEventType::TicketCreate->value,
|
||||
'project' => [
|
||||
'id' => $this->projectId,
|
||||
'key' => $this->projectKey,
|
||||
|
||||
Reference in New Issue
Block a user