53 lines
930 B
PHP
53 lines
930 B
PHP
<?php
|
|
|
|
namespace App\Schedule;
|
|
|
|
use DateTimeImmutable;
|
|
|
|
final readonly class ScheduleAssignment
|
|
{
|
|
/**
|
|
* @param list<string> $path
|
|
*/
|
|
public function __construct(
|
|
private int $id,
|
|
private string $name,
|
|
private string $kind,
|
|
private array $path,
|
|
private DateTimeImmutable $scheduledDate,
|
|
private int $position,
|
|
) {}
|
|
|
|
public function getId(): int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getName(): string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function getKind(): string
|
|
{
|
|
return $this->kind;
|
|
}
|
|
|
|
/**
|
|
* @return list<string>
|
|
*/
|
|
public function getPath(): array
|
|
{
|
|
return $this->path;
|
|
}
|
|
|
|
public function getScheduledDate(): DateTimeImmutable
|
|
{
|
|
return $this->scheduledDate;
|
|
}
|
|
|
|
public function getPosition(): int
|
|
{
|
|
return $this->position;
|
|
}
|
|
}
|