<?php

namespace Lc\SovBundle\Repository\Ticket;

use Knp\Component\Pager\PaginatorInterface;
use Lc\SovBundle\Model\Ticket\TicketInterface;
use Lc\SovBundle\Repository\AbstractRepositoryQuery;

class TicketMessageRepositoryQuery extends AbstractRepositoryQuery implements TicketMessageRepositoryQueryInterface
{
    public function __construct(TicketMessageRepository $repository, PaginatorInterface $paginator)
    {
        parent::__construct($repository, 'ticketMessage', $paginator);
    }

    public function filterByTicket(TicketInterface $ticket)
    {
        return $this->andWhereEqual('ticket', $ticket);
    }
}
