<?php

declare(strict_types=1);

namespace App\DataTransferObjects;

final readonly class OwnerStatsData
{
    public function __construct(
        public float $totalEarnings,
        public int $activeBookings,
        public float $occupancyRate,
        public float $averageRating,
        public float $thisMonthEarnings,
        public float $lastMonthEarnings,
    ) {}

    public function toArray(): array
    {
        return [
            'totalEarnings' => $this->totalEarnings,
            'activeBookings' => $this->activeBookings,
            'occupancyRate' => $this->occupancyRate,
            'averageRating' => $this->averageRating,
            'thisMonthEarnings' => $this->thisMonthEarnings,
            'lastMonthEarnings' => $this->lastMonthEarnings,
        ];
    }
}
