public static function initialize(Config $config)
    {
        $class = $config->getModelClass();

        return $config
            ->addRel(new BelongsTo('parent', $config, $class::getRepo()))
            ->addRel(new HasMany('children', $config, $class::getRepo(), ['foreignKey' => 'parentId']));
    }