<?php

namespace App\DBTestSupport;

use Illuminate\Support\Facades\DB;

class PackageTourMother {
    
    public static function build1($id = 1, $idPackage = 1, $idTour = 1) {
        return [
            'Id_PackageTour' => $id,
            'PackageTour_Order' => 1,
            'Id_Package' => $idPackage,
            'Id_Tour' => $idTour
        ];
    }

    public static function push1($id = 1, $idPackage = 1, $idTour = 1) {
        return self::push(self::build1($id, $idPackage, $idTour));
    }

    private static function push($object) {
        DB::select("CALL `sp_package_tour_insert` (?,?)", [
            $object['Id_Package'],
            $object['Id_Tour']
        ]);
        return $object;
    }

}