<?php

namespace App\DBTestSupport;

use Illuminate\Support\Facades\DB;

class TypeRateMother {
    
    public static function build1($id = 1) {
        return [
            'Id_TypeRate' => $id,
            'TypeRate_Name' => 'Adult',
            'TypeRate_Abrv' => 'ADLT',
            'TypeRate_Status' => 2
        ];
    }

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

    private static function push($object) {
        DB::select("CALL `sp_type_rate_insert` (?,?,?)", [
            $object['TypeRate_Name'],
            $object['TypeRate_Abrv'],
            $object['TypeRate_Status']
        ]);
        return $object;
    }

}