x default position value
This commit is contained in:
@@ -109,6 +109,7 @@ abstract class Product implements ActiveRecordInterface
|
||||
|
||||
/**
|
||||
* The value for the position field.
|
||||
* Note: this column has a database default value of: 0
|
||||
* @var int
|
||||
*/
|
||||
protected $position;
|
||||
@@ -364,6 +365,7 @@ abstract class Product implements ActiveRecordInterface
|
||||
public function applyDefaultValues()
|
||||
{
|
||||
$this->visible = 0;
|
||||
$this->position = 0;
|
||||
$this->version = 0;
|
||||
}
|
||||
|
||||
@@ -1028,6 +1030,10 @@ abstract class Product implements ActiveRecordInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->position !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->version !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ abstract class ProductVersion implements ActiveRecordInterface
|
||||
|
||||
/**
|
||||
* The value for the position field.
|
||||
* Note: this column has a database default value of: 0
|
||||
* @var int
|
||||
*/
|
||||
protected $position;
|
||||
@@ -145,6 +146,7 @@ abstract class ProductVersion implements ActiveRecordInterface
|
||||
public function applyDefaultValues()
|
||||
{
|
||||
$this->visible = 0;
|
||||
$this->position = 0;
|
||||
$this->version = 0;
|
||||
}
|
||||
|
||||
@@ -805,6 +807,10 @@ abstract class ProductVersion implements ActiveRecordInterface
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->position !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->version !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ class ProductTableMap extends TableMap
|
||||
$this->addForeignKey('TAX_RULE_ID', 'TaxRuleId', 'INTEGER', 'tax_rule', 'ID', false, null, null);
|
||||
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', true, null, 0);
|
||||
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
|
||||
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, 0);
|
||||
$this->addForeignKey('TEMPLATE_ID', 'TemplateId', 'INTEGER', 'template', 'ID', false, null, null);
|
||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||
|
||||
@@ -180,7 +180,7 @@ class ProductVersionTableMap extends TableMap
|
||||
$this->addColumn('TAX_RULE_ID', 'TaxRuleId', 'INTEGER', false, null, null);
|
||||
$this->addColumn('REF', 'Ref', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('VISIBLE', 'Visible', 'TINYINT', true, null, 0);
|
||||
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, null);
|
||||
$this->addColumn('POSITION', 'Position', 'INTEGER', true, null, 0);
|
||||
$this->addColumn('TEMPLATE_ID', 'TemplateId', 'INTEGER', false, null, null);
|
||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||
|
||||
@@ -37,7 +37,7 @@ CREATE TABLE `product`
|
||||
`tax_rule_id` INTEGER,
|
||||
`ref` VARCHAR(255) NOT NULL,
|
||||
`visible` TINYINT DEFAULT 0 NOT NULL,
|
||||
`position` INTEGER NOT NULL,
|
||||
`position` INTEGER DEFAULT 0 NOT NULL,
|
||||
`template_id` INTEGER,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
@@ -2298,7 +2298,7 @@ CREATE TABLE `product_version`
|
||||
`tax_rule_id` INTEGER,
|
||||
`ref` VARCHAR(255) NOT NULL,
|
||||
`visible` TINYINT DEFAULT 0 NOT NULL,
|
||||
`position` INTEGER NOT NULL,
|
||||
`position` INTEGER DEFAULT 0 NOT NULL,
|
||||
`template_id` INTEGER,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<column name="tax_rule_id" type="INTEGER" />
|
||||
<column name="ref" required="true" size="255" type="VARCHAR" />
|
||||
<column defaultValue="0" name="visible" required="true" type="TINYINT" />
|
||||
<column name="position" required="true" type="INTEGER" />
|
||||
<column name="position" required="true" defaultValue="0" type="INTEGER" />
|
||||
<column name="title" size="255" type="VARCHAR" />
|
||||
<column name="description" type="CLOB" />
|
||||
<column name="chapo" type="LONGVARCHAR" />
|
||||
|
||||
Reference in New Issue
Block a user