// Format definitions

This commit is contained in:
rMalie
2011-12-13 13:41:54 +00:00
parent a40f3c304c
commit c022f4e0e5
71 changed files with 710 additions and 1791 deletions
+3 -16
View File
@@ -31,9 +31,6 @@ class GroupReductionCore extends ObjectModel
public $id_category;
public $reduction;
/**
* @see ObjectModel::$definition
*/
@@ -41,24 +38,14 @@ class GroupReductionCore extends ObjectModel
'table' => 'group_reduction',
'primary' => 'id_group_reduction',
'fields' => array(
'id_group' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'id_category' => array('type' => 'FILL_ME', 'validate' => 'isUnsignedId', 'required' => true),
'reduction' => array('type' => 'FILL_ME', 'validate' => 'isPrice', 'required' => true),
'id_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
'id_category' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true),
'reduction' => array('type' => self::TYPE_FLOAT, 'validate' => 'isPrice', 'required' => true),
),
);
protected static $reduction_cache = array();
public function getFields()
{
$this->validateFields();
$fields['id_group'] = (int)$this->id_group;
$fields['id_category'] = (int)$this->id_category;
$fields['reduction'] = (float)$this->reduction;
return $fields;
}
public function add($autodate = true, $null_values = false)
{
return (parent::add($autodate, $null_values) && $this->_setCache());