<?php

namespace Lc\SovBundle\Repository\Ticket;

use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\ORM\QueryBuilder;
use Lc\SovBundle\Doctrine\EntityInterface;
use Lc\SovBundle\Model\Ticket\TicketInterface;
use Lc\SovBundle\Repository\AbstractRepositoryQuery;

interface TicketMessageRepositoryQueryInterface
{
    public function create();

    public function call(callable $fn);

    public function count();

    public function findOne();

    public function find(): array;

    public function limit(int $maxResults);

    public function paginate(int $page = 1, int $limit = 20);

    public function getRepository(): ServiceEntityRepository;

    public function getQueryBuilder(): QueryBuilder;

    public function groupBy(string $field);

    public function orderBy(string $field, string $sort = 'ASC');

    public function filterById(int $id);

    public function andWhereEqual($field, $value);

    public function filterByOldUrl(string $oldUrl);

    public function resetRelationsJoin(): void;

    public function filterByDevAlias(string $devAlias);

    public function filterBySlug(string $slug);

    public function filterIsParent();

    public function filterIsChildren();

    public function filterByParent(EntityInterface $parent = null);

    public function filterIsOffline();

    public function filterIsOnline();

    public function filterIsDeleted();

    public function filterIsOnlineAndOffline();

    public function filterByTicket(TicketInterface $ticket);
}