<?php

namespace App\Http\Resources\Files;

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;

class FileMetaResource extends JsonResource
{
    public function toArray(Request $request): array
    {
        return [
            'name' => $this->resource['name'] ?? null,
            'mime' => $this->resource['mime'] ?? null,
            'size' => $this->resource['size'] ?? null,
            'etag' => $this->resource['etag'] ?? null,
            'last_modified' => $this->resource['last_modified'] ?? null,
            'download_name' => $this->resource['download_name'] ?? null,
        ];
    }
}
