<?php

namespace KupShop\ReclamationsElninoBundle\Query;

use Query\QueryBuilder;

class Reclamations
{
    public static function joinOrders()
    {
        return function (QueryBuilder $qb) {
            $qb->leftJoin('r', 'reclamation_items_elnino', 'ri', 'ri.id_reclamation = r.id')
                ->leftJoin('ri', 'order_items', 'oi', 'oi.id = ri.id_item')
                ->leftJoin('oi', 'orders', 'o', 'o.id = oi.id_order');
        };
    }
}
