// 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:
@@ -74,8 +74,10 @@ class StockAvailableCore extends ObjectModel
|
||||
'out_of_stock' => 'isInt'
|
||||
);
|
||||
|
||||
protected $table = 'stock_available';
|
||||
protected $identifier = 'id_stock_available';
|
||||
public static $definition = array(
|
||||
'table' => 'stock_available',
|
||||
'primary' => 'id_stock_available',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -122,8 +122,10 @@ class StockMvtCore extends ObjectModel
|
||||
*/
|
||||
public $quantity;
|
||||
|
||||
protected $table = 'stock_mvt';
|
||||
protected $identifier = 'id_stock_mvt';
|
||||
public static $definition = array(
|
||||
'table' => 'stock_mvt',
|
||||
'primary' => 'id_stock_mvt',
|
||||
);
|
||||
|
||||
protected $fieldsRequired = array(
|
||||
'date_add',
|
||||
|
||||
@@ -45,8 +45,12 @@ class StockMvtReasonCore extends ObjectModel
|
||||
/** @var boolean True if the movement reason has been deleted (staying in database as deleted) */
|
||||
public $deleted = 0;
|
||||
|
||||
protected $table = 'stock_mvt_reason';
|
||||
protected $identifier = 'id_stock_mvt_reason';
|
||||
public static $definition = array(
|
||||
'table' => 'stock_mvt_reason',
|
||||
'primary' => 'id_stock_mvt_reason',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
protected $fieldsRequiredLang = array('name');
|
||||
protected $fieldsSizeLang = array('name' => 255);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
@@ -154,15 +154,10 @@ class SupplyOrderCore extends ObjectModel
|
||||
'is_template' => 'isBool',
|
||||
);
|
||||
|
||||
/**
|
||||
* @var string Database table name
|
||||
*/
|
||||
protected $table = 'supply_order';
|
||||
|
||||
/**
|
||||
* @var string Database ID name
|
||||
*/
|
||||
protected $identifier = 'id_supply_order';
|
||||
public static $definition = array(
|
||||
'table' => 'supply_order',
|
||||
'primary' => 'id_supply_order',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -76,15 +76,10 @@ class SupplyOrderHistoryCore extends ObjectModel
|
||||
'date_add' => 'isDate'
|
||||
);
|
||||
|
||||
/**
|
||||
* @var string Database table name
|
||||
*/
|
||||
protected $table = 'supply_order_history';
|
||||
|
||||
/**
|
||||
* @var string Database ID name
|
||||
*/
|
||||
protected $identifier = 'id_supply_order_history';
|
||||
public static $definition = array(
|
||||
'table' => 'supply_order_history',
|
||||
'primary' => 'id_supply_order_history',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -82,15 +82,10 @@ class SupplyOrderReceiptHistoryCore extends ObjectModel
|
||||
'date_add' => 'isDate'
|
||||
);
|
||||
|
||||
/**
|
||||
* @var string Database table name
|
||||
*/
|
||||
protected $table = 'supply_order_receipt_history';
|
||||
|
||||
/**
|
||||
* @var string Database ID name
|
||||
*/
|
||||
protected $identifier = 'id_supply_order_receipt_history';
|
||||
public static $definition = array(
|
||||
'table' => 'supply_order_receipt_history',
|
||||
'primary' => 'id_supply_order_receipt_history',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
@@ -78,15 +78,11 @@ class SupplyOrderStateCore extends ObjectModel
|
||||
protected $fieldsSizeLang = array('name' => 128);
|
||||
protected $fieldsValidateLang = array('name' => 'isGenericName');
|
||||
|
||||
/**
|
||||
* @var string Database table name
|
||||
*/
|
||||
protected $table = 'supply_order_state';
|
||||
|
||||
/**
|
||||
* @var string Database ID name
|
||||
*/
|
||||
protected $identifier = 'id_supply_order_state';
|
||||
public static $definition = array(
|
||||
'table' => 'supply_order_state',
|
||||
'primary' => 'id_supply_order_state',
|
||||
'multilang' => true,
|
||||
);
|
||||
|
||||
/**
|
||||
* @see ObjectModel::getFields()
|
||||
|
||||
@@ -83,8 +83,10 @@ class WarehouseCore extends ObjectModel
|
||||
'id_currency' => 'isUnsignedId'
|
||||
);
|
||||
|
||||
protected $table = 'warehouse';
|
||||
protected $identifier = 'id_warehouse';
|
||||
public static $definition = array(
|
||||
'table' => 'warehouse',
|
||||
'primary' => 'id_warehouse',
|
||||
);
|
||||
|
||||
public function getFields()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user