<?php

namespace Velis\Model\DataObject;

use ReflectionException;
use Velis\Db\EntityRepository;

trait RepositoryTrait
{
    /**
     * @return EntityRepository<static>
     * @throws ReflectionException
     */
    public static function repository(): EntityRepository
    {
        return self::$_db->getRepository(static::class);
    }
}
