<?php

namespace App\Repositories\Eloquent;

use App\Models\Profession;
use App\Repositories\Interfaces\ProfessionRepositoryInterface;
use Illuminate\Support\Collection;

class ProfessionRepository extends BaseRepository implements ProfessionRepositoryInterface
{
    /**
    * ProfessionRepository constructor.
    *
    * @param Profession $model
    */
    public function __construct(Profession $model)
    {
       parent::__construct($model);
    }

    /**
     * @return Collection
     */
    public function getParentOnly(): Collection
    {
        return $this->model->where('parent_id', 0)->get();
    }
}
