<?php

namespace App\Repositories;

use App\Models\File;
use Illuminate\Database\Eloquent\Collection;

class ContainerFileRepository
{
    public static function getSourceFileFiles(File $file): Collection|array
    {
        return File::query()
            ->where('object_type', $file->object_type)
            ->where('object_id', $file->object_id)
            ->where("source_file_id", $file->source_file_id)
            ->where("folder_id", $file->folder_id)
            ->get();
    }
}