public function belongsToMany($model, $table, $foreignKey, $localKey, $alias)
{
// 记录当前关联信息
$this->type = self::BELONGS_TO_MANY;
$this->model = $model;
$this->foreignKey = $foreignKey;
$this->localKey = $localKey;
$this->middle = $table;
$this->alias = $alias;
$this->query = (new $model())->db();
// 返回关联的模型对象
return $this;
}