<?php
defined('_JEXEC') or die('Restricted access');

/**
* @package OS CCK
* @copyright 2019 OrdaSoft.
* @author Andrey Kvasnevskiy(akbet@mail.ru),Vladislav Prikhodko (vlados.vp1@gmail.com)
* @link http://ordasoft.com/cck-content-construction-kit-for-joomla.html
* @description OrdaSoft Content Construction Kit
*/

class os_cckCoupons extends JTable
{
    var $coup_id = null;
    var $name = null;
    var $type = null;
    var $creation_date = null;
    var $date_start = null;
    var $date_finish = null;
    var $value = null;
    var $used_number = null;
    var $max_uses = null;
    var $entities = null;
    var $user_group_ids = null;
    var $category_ids = null;
    var $publish = null;
    
    /**
     * @param database - A database connector object
     */
    function __construct(&$db){
      parent::__construct('#__os_cck_coupons', 'coup_id', $db);
    }
    
    function store($updateNulls = false){
        if(!parent::store()){
            //echo $this->getError(); exit;
            return false;
        }else{
            return true;
        }
    }
    
    
}