<?php
/**
 * Created by PhpStorm.
 * User: Admin
 * Date: 26.08.2020
 * Time: 14:55
 */

namespace Diamond\Repositories\StatRule;


use Diamond\Domain\StatRule\StatRuleCollection;
use Diamond\Infrastructure\Models\Stat\Stat;
use Diamond\Infrastructure\Models\Stat\StatQuery;
use Diamond\Infrastructure\Models\StatRule\StatRule;
use Diamond\Infrastructure\Models\StatRule\StatRuleQuery;
use Diamond\Repositories\PropelAbstractRepository;
use Propel\Runtime\ActiveQuery\Criteria;
use Propel\Runtime\ActiveQuery\ModelCriteria;
use Repo\CollectionInterface;
use Repo\CrudRepositoryBuilderInterface;
use Repo\EntityInterface;
use Repo\PaginationInterface;

class StatRuleRepository extends PropelAbstractRepository implements CrudRepositoryBuilderInterface
{

    public static function createEntity(): EntityInterface
    {
        return new StatRule();
    }


    protected function createCollection(): CollectionInterface
    {
        return new StatRuleCollection();
    }

    /**
     * @param PaginationInterface|StatCriteriaInterface $criteria
     * @param ModelCriteria|StatQuery $dbCriteria
     */
    protected function modifyCriteria(PaginationInterface $criteria, ModelCriteria $dbCriteria): void
    {
        
    }

    /**
     * @return ModelCriteria
     */
    protected function createQuery(): ModelCriteria
    {
        return StatRuleQuery::create();
    }

}