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

        /**
         * @param $name
         * @return mixed
         */
        public function getTagByName($name)
        {
            $db = Factory::getDBO();
            $query = $db->getQuery(true);
            $query->select('*')
                ->from($this->getTableName())
                ->where('name=' . $query->quote($name));
            $tag = $db->setQuery($query)->loadObject();
            return $tag;
        }
    }
}