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

        /**
         * @param $name
         * @return array
         * @throws Exception
         */
        public function getOrderStatusByName($name)
        {
            $table = $this->getTable("");
            $table->load(array(
                'name' => $name
            ));
            return $table->getProperties();
        }
    }
}
