<?php

namespace App\Classes\Modules\Announcements\Services;


use App\Classes\General\Eloquent\AbstractFetchRecord;
use Illuminate\Database\Eloquent\Builder;
use App\Models\Announcement;

class FetchesAnnouncement extends AbstractFetchRecord
{

    /** @var Announcement */
    private $repository;


    /**
     * FetchesAnnouncement constructor.
     * @param Announcement $repository
     */
    public function __construct(Announcement $repository)
    {
        $this->repository = $repository;
    }


    /**
     * @return Builder
     */
    public function getRepository(): Builder
    {
        return $this->repository->newQuery();
    }
}