<?php

namespace Lc\SovBundle\Repository\User;

use Lc\SovBundle\Repository\AbstractStore;
use Lc\SovBundle\Repository\RepositoryQueryInterface;

class GroupUserStore extends AbstractStore implements GroupUserStoreInterface
{
    protected GroupUserRepositoryQueryInterface $query;

    public function __construct(GroupUserRepositoryQueryInterface $query)
    {
        $this->query = $query;
    }

    public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
    {
        $query->orderBy('id');
        return $query;
    }

    public function filtersDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
    {
        return $query;
    }

    public function relationsDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
    {
        $query->joinUsers();
        return $query;
    }
}
