<?php
namespace WpBookingEventAdmin\app\controllers;
use WpBookingEvent\Factory;
use WpBookingEvent\Mvc\Controller\Controller;
use WpBookingEvent\Mvc\Controller\ControllerForm ;
use WpBookingEvent\Mvc\Model\Model;

defined('_WPBOOKINGEVENT_EXEC') or die;
class OrderDetailRateController extends ControllerForm
{
    public function delete($id = 0)
    {
        return parent::delete($id); // TODO: Change the autogenerated stub
    }
    public function save_change_time_order()
    {
        $input = Factory::getInput();
        $id = $input->getInt('id',0);
        $from = $input->getString('from',0);
        $to = $input->getString('to',0);
        $data = array(
            "id"=>$id,
            "start_date"=>$from,
            "end_date"=>$to
        );
        $modelOrderDetailRate = Model::getInstance('orderdetailrate');
        $new_order = $modelOrderDetailRate->saveChangeTimeOrder($data);
        return $new_order;

    }

}