<?php<liu21st@gmail.com>declare (strict_types = 1);
namespace think\contract;
use Closure;
use think\Collection;
use think\db\Query;
use think\Model;
interface ModelRelationInterface
{
public function getRelation(array $subRelation = [], Closure $closure = null): Collection;
public function eagerlyResultSet(array &$resultSet, string $relation, array $subRelation, Closure $closure = null): void;
public function eagerlyResult(Model $result, string $relation, array $subRelation = [], Closure $closure = null): void;
public function relationCount(Model $result, Closure $closure, string $aggregate = 'count', string $field = '*', string &$name = null);
public function getRelationCountQuery(Closure $closure = null, string $aggregate = 'count', string $field = '*', string &$name = null): string;
public function has(string $operator = '>=', int $count = 1, string $id = '*', string $joinType = 'INNER'): Query;
public function hasWhere($where = [], $fields = null, string $joinType = ''): Query;
}