<?php

namespace App\Appointment\Availability\ValueObject;

final readonly class AvailableSlot
{
    public function __construct(
        public int $start,
        public int $end,
        public SlotAssignment $assignment,
    ) {}

    public function toArray(): array
    {
        return [
            'start'      => $this->start,
            'end'        => $this->end,
            'assignment' => $this->assignment->toArray(),
        ];
    }
}
