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.
24 lines
482 B
PHP
24 lines
482 B
PHP
<?php
|
|
|
|
namespace App\Services\Ticket;
|
|
|
|
final readonly class TicketViewer
|
|
{
|
|
private function __construct(
|
|
public int $actorId,
|
|
public bool $isAdmin,
|
|
public bool $isSuperAdmin
|
|
) {
|
|
}
|
|
|
|
public static function user(int $actorId): self
|
|
{
|
|
return new self($actorId, false, false);
|
|
}
|
|
|
|
public static function administrator(int $actorId, bool $isSuperAdmin): self
|
|
{
|
|
return new self($actorId, true, $isSuperAdmin);
|
|
}
|
|
}
|