30 lines
740 B
PHP
30 lines
740 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Domain\Models\Entities;
|
|
|
|
use Carbon\CarbonInterface;
|
|
use Domain\Enums\RepeatFrequency;
|
|
use Domain\Models\ValueObjects\Entities\PickupExceptionId;
|
|
use Shared\DDD\Entity;
|
|
|
|
/** @implements \Shared\DDD\Entity<\Domain\Models\ValueObjects\Entities\PickupExceptionId> */
|
|
final readonly class PickupExceptionOnDate implements Entity
|
|
{
|
|
public function __construct(
|
|
public PickupExceptionId $id,
|
|
public CarbonInterface $date,
|
|
public string $label,
|
|
public bool $repeatable,
|
|
public RepeatFrequency $repeatFrequency,
|
|
public bool $autoUpdated
|
|
) {
|
|
}
|
|
|
|
#[\Override]
|
|
public function id(): PickupExceptionId
|
|
{
|
|
return $this->id;
|
|
}
|
|
}
|