<?php

namespace apexl\Io\modules\file\entities\operators;

use apexl\Io\exceptions\RecordNotFoundException;
use apexl\Io\operators\entityDatabaseOperator;

class fileOperator extends entityDatabaseOperator
{
    public function __construct($table, $primaryKey = 'id')
    {
        parent::__construct($table, $primaryKey);
    }

    /**
     * @throws RecordNotFoundException
     */
    public function loadByFileName($fileName): array
    {
        return $this->loadBy('name', $fileName);
    }
}
