<?php

namespace Daylight\Core\Modules\MediaLibrary\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class Media extends JsonResource
{
    public function toArray($request): array
    {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'size' => $this->size,
            'url' => $this->getUrl(),
            'thumbnail_url' => $this->getThumbnailUrl(),
        ];
    }
}
