<?php

declare(strict_types=1);

namespace App\DataTransferObjects;

use Carbon\Carbon;

final readonly class BlockedDateData
{
    public function __construct(
        public int $propertyId,
        public Carbon $startDate,
        public Carbon $endDate,
        public string $reason,
        public ?string $notes = null,
    ) {}

    public function toArray(): array
    {
        return [
            'property_id' => $this->propertyId,
            'start_date' => $this->startDate->toDateString(),
            'end_date' => $this->endDate->toDateString(),
            'reason' => $this->reason,
            'notes' => $this->notes,
        ];
    }
}
