<?php

namespace domain\Ticket\Ticket;

use domain\_\AbstractRepositoryQuery;

class TicketRepositoryQuery extends AbstractRepositoryQuery
{
    protected TicketDefinition $definition;

    public function loadDependencies(): void
    {
        $this->loadDefinition(TicketDefinition::class);
    }

    public function filterByStatusOpen(): self
    {
        $this->andWhere(['ticket.status' => Ticket::STATUS_OPEN]);
        return $this;
    }
}