// Remove $table and $identifier property from all classes, and add static $definition instead
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10912 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -223,8 +223,11 @@ class OrderCore extends ObjectModel
|
||||
);
|
||||
|
||||
/* MySQL does not allow 'order' for a table name */
|
||||
protected $table = 'orders';
|
||||
protected $identifier = 'id_order';
|
||||
public static $definition = array(
|
||||
'table' => 'orders',
|
||||
'primary' => 'id_order',
|
||||
);
|
||||
|
||||
protected $_taxCalculationMethod = PS_TAX_EXC;
|
||||
|
||||
protected static $_historyCache = array();
|
||||
|
||||
@@ -48,8 +48,10 @@ class OrderCartRuleCore extends ObjectModel
|
||||
protected $fieldsValidate = array ('id_order' => 'isUnsignedId', 'name' => 'isGenericName', 'value' => 'isInt');
|
||||
|
||||
/* MySQL does not allow 'order detail' for a table name */
|
||||
protected $table = 'order_cart_rule';
|
||||
protected $identifier = 'id_order_cart_rule';
|
||||
public static $definition = array(
|
||||
'table' => 'order_cart_rule',
|
||||
'primary' => 'id_order_cart_rule',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
@@ -174,8 +174,10 @@ class OrderDetailCore extends ObjectModel
|
||||
'total_price_tax_excl' => 'isPrice'
|
||||
);
|
||||
|
||||
protected $table = 'order_detail';
|
||||
protected $identifier = 'id_order_detail';
|
||||
public static $definition = array(
|
||||
'table' => 'order_detail',
|
||||
'primary' => 'id_order_detail',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array (
|
||||
|
||||
@@ -47,8 +47,10 @@ class OrderHistoryCore extends ObjectModel
|
||||
protected $fieldsRequired = array('id_order', 'id_order_state');
|
||||
protected $fieldsValidate = array('id_order' => 'isUnsignedId', 'id_order_state' => 'isUnsignedId', 'id_employee' => 'isUnsignedId');
|
||||
|
||||
protected $table = 'order_history';
|
||||
protected $identifier = 'id_order_history';
|
||||
public static $definition = array(
|
||||
'table' => 'order_history',
|
||||
'primary' => 'id_order_history',
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'objectsNodeName' => 'order_histories',
|
||||
|
||||
@@ -44,8 +44,11 @@ class OrderMessageCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 128, 'message' => 1200);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName', 'message' => 'isMessage');
|
||||
|
||||
protected $table = 'order_message';
|
||||
protected $identifier = 'id_order_message';
|
||||
public static $definition = array(
|
||||
'table' => 'order_message',
|
||||
'primary' => 'id_order_message',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
@@ -53,8 +53,10 @@ class OrderReturnCore extends ObjectModel
|
||||
protected $fieldsRequired = array ('id_customer', 'id_order');
|
||||
protected $fieldsValidate = array('id_customer' => 'isUnsignedId', 'id_order' => 'isUnsignedId', 'question' => 'isMessage');
|
||||
|
||||
protected $table = 'order_return';
|
||||
protected $identifier = 'id_order_return';
|
||||
public static $definition = array(
|
||||
'table' => 'order_return',
|
||||
'primary' => 'id_order_return',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -38,8 +38,11 @@ class OrderReturnStateCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 64);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
protected $table = 'order_return_state';
|
||||
protected $identifier = 'id_order_return_state';
|
||||
public static $definition = array(
|
||||
'table' => 'order_return_state',
|
||||
'primary' => 'id_order_return_state',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -62,8 +62,10 @@ class OrderSlipCore extends ObjectModel
|
||||
protected $fieldsRequired = array ('id_customer', 'id_order', 'conversion_rate');
|
||||
protected $fieldsValidate = array('id_customer' => 'isUnsignedId', 'id_order' => 'isUnsignedId', 'conversion_rate' => 'isFloat');
|
||||
|
||||
protected $table = 'order_slip';
|
||||
protected $identifier = 'id_order_slip';
|
||||
public static $definition = array(
|
||||
'table' => 'order_slip',
|
||||
'primary' => 'id_order_slip',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -68,8 +68,11 @@ class OrderStateCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 64, 'template' => 64);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName', 'template' => 'isTplName');
|
||||
|
||||
protected $table = 'order_state';
|
||||
protected $identifier = 'id_order_state';
|
||||
public static $definition = array(
|
||||
'table' => 'order_state',
|
||||
'primary' => 'id_order_state',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $webserviceParameters = array(
|
||||
'fields' => array(
|
||||
|
||||
Reference in New Issue
Block a user