<?php
defined('_WPBOOKINGPRO_EXEC') or die;
if(!class_exists("WpBookingPro_OrderModel")) {
    /**
     * Class WpBookingPro_OrderModel
     */
    class WpBookingPro_OrderModel extends WoobookingModelForm
    {
        /**
         * @var string
         */
        public $table_name = "order";
        /**
         * @var string
         */
        public $context = "order";

        /**
         * @param $order_id
         * @param $order_status_id
         * @return array|bool|object
         */
        public function change_order_status($order_id, $order_status_id)
        {
            $data = array(
                "id" => $order_id,
                "order_status_id" => $order_status_id
            );
            $order = parent::save($data);
            return $order;
        }
    }
}