src/Leevel/Database/Ddd/Relation/HasMany.php
protected function getRelationValue(array $maps, string $key, string $type)
    {
        $value = $maps[$key];

        return 'one' === $type ? reset($value) : $this->targetEntity->collection($value);
    }
protected function getRelationValue(array $maps, string $key, string $type)
    {
        $value = $maps[$key];

        return 'one' === $type ? reset($value) : $this->targetEntity->collection($value);
    }
取得关联模型实体数据.

@param array  $maps
@param string $key
@param string $type

@return mixed