*/ 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; } public function isPickupDay(WeekDay $pickupDay = WeekDay::Friday): bool { return $this->date->isDayOfWeek($pickupDay->value); } }