You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
584 B
PHP
28 lines
584 B
PHP
<?php
|
|
|
|
namespace App\Services\Ticket;
|
|
|
|
final readonly class TicketEvent
|
|
{
|
|
private function __construct(
|
|
public string $kind,
|
|
public TicketWriteResult $result
|
|
) {
|
|
}
|
|
|
|
public static function created(TicketWriteResult $result): self
|
|
{
|
|
return new self('created', $result);
|
|
}
|
|
|
|
public static function userReply(TicketWriteResult $result): self
|
|
{
|
|
return new self('user_reply', $result);
|
|
}
|
|
|
|
public static function adminReply(TicketWriteResult $result): self
|
|
{
|
|
return new self('admin_reply', $result);
|
|
}
|
|
}
|