update model removing increase property
This commit is contained in:
@@ -75,12 +75,6 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
*/
|
||||
protected $product_id;
|
||||
|
||||
/**
|
||||
* The value for the increase field.
|
||||
* @var double
|
||||
*/
|
||||
protected $increase;
|
||||
|
||||
/**
|
||||
* The value for the quantity field.
|
||||
* @var double
|
||||
@@ -458,17 +452,6 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
return $this->product_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [increase] column value.
|
||||
*
|
||||
* @return double
|
||||
*/
|
||||
public function getIncrease()
|
||||
{
|
||||
|
||||
return $this->increase;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [quantity] column value.
|
||||
*
|
||||
@@ -599,27 +582,6 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setProductId()
|
||||
|
||||
/**
|
||||
* Set the value of [increase] column.
|
||||
*
|
||||
* @param double $v new value
|
||||
* @return \Thelia\Model\ProductSaleElements The current object (for fluent API support)
|
||||
*/
|
||||
public function setIncrease($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (double) $v;
|
||||
}
|
||||
|
||||
if ($this->increase !== $v) {
|
||||
$this->increase = $v;
|
||||
$this->modifiedColumns[] = ProductSaleElementsTableMap::INCREASE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setIncrease()
|
||||
|
||||
/**
|
||||
* Set the value of [quantity] column.
|
||||
*
|
||||
@@ -797,28 +759,25 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : ProductSaleElementsTableMap::translateFieldName('ProductId', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->product_id = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ProductSaleElementsTableMap::translateFieldName('Increase', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->increase = (null !== $col) ? (double) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ProductSaleElementsTableMap::translateFieldName('Quantity', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : ProductSaleElementsTableMap::translateFieldName('Quantity', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->quantity = (null !== $col) ? (double) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ProductSaleElementsTableMap::translateFieldName('Promo', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : ProductSaleElementsTableMap::translateFieldName('Promo', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->promo = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ProductSaleElementsTableMap::translateFieldName('Newness', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : ProductSaleElementsTableMap::translateFieldName('Newness', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->newness = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : ProductSaleElementsTableMap::translateFieldName('Weight', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : ProductSaleElementsTableMap::translateFieldName('Weight', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->weight = (null !== $col) ? (double) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : ProductSaleElementsTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : ProductSaleElementsTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->created_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : ProductSaleElementsTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : ProductSaleElementsTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -831,7 +790,7 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 9; // 9 = ProductSaleElementsTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 8; // 8 = ProductSaleElementsTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\ProductSaleElements object", 0, $e);
|
||||
@@ -1130,9 +1089,6 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(ProductSaleElementsTableMap::PRODUCT_ID)) {
|
||||
$modifiedColumns[':p' . $index++] = 'PRODUCT_ID';
|
||||
}
|
||||
if ($this->isColumnModified(ProductSaleElementsTableMap::INCREASE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'INCREASE';
|
||||
}
|
||||
if ($this->isColumnModified(ProductSaleElementsTableMap::QUANTITY)) {
|
||||
$modifiedColumns[':p' . $index++] = 'QUANTITY';
|
||||
}
|
||||
@@ -1168,9 +1124,6 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
case 'PRODUCT_ID':
|
||||
$stmt->bindValue($identifier, $this->product_id, PDO::PARAM_INT);
|
||||
break;
|
||||
case 'INCREASE':
|
||||
$stmt->bindValue($identifier, $this->increase, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'QUANTITY':
|
||||
$stmt->bindValue($identifier, $this->quantity, PDO::PARAM_STR);
|
||||
break;
|
||||
@@ -1258,24 +1211,21 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
return $this->getProductId();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getIncrease();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getQuantity();
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
return $this->getPromo();
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
return $this->getNewness();
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
return $this->getWeight();
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -1309,13 +1259,12 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getProductId(),
|
||||
$keys[2] => $this->getIncrease(),
|
||||
$keys[3] => $this->getQuantity(),
|
||||
$keys[4] => $this->getPromo(),
|
||||
$keys[5] => $this->getNewness(),
|
||||
$keys[6] => $this->getWeight(),
|
||||
$keys[7] => $this->getCreatedAt(),
|
||||
$keys[8] => $this->getUpdatedAt(),
|
||||
$keys[2] => $this->getQuantity(),
|
||||
$keys[3] => $this->getPromo(),
|
||||
$keys[4] => $this->getNewness(),
|
||||
$keys[5] => $this->getWeight(),
|
||||
$keys[6] => $this->getCreatedAt(),
|
||||
$keys[7] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1377,24 +1326,21 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
$this->setProductId($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setIncrease($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setQuantity($value);
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
$this->setPromo($value);
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
$this->setNewness($value);
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
$this->setWeight($value);
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1423,13 +1369,12 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setProductId($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setIncrease($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setQuantity($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setPromo($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setNewness($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setWeight($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setCreatedAt($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setUpdatedAt($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setQuantity($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setPromo($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setNewness($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setWeight($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setCreatedAt($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setUpdatedAt($arr[$keys[7]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1443,7 +1388,6 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
|
||||
if ($this->isColumnModified(ProductSaleElementsTableMap::ID)) $criteria->add(ProductSaleElementsTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(ProductSaleElementsTableMap::PRODUCT_ID)) $criteria->add(ProductSaleElementsTableMap::PRODUCT_ID, $this->product_id);
|
||||
if ($this->isColumnModified(ProductSaleElementsTableMap::INCREASE)) $criteria->add(ProductSaleElementsTableMap::INCREASE, $this->increase);
|
||||
if ($this->isColumnModified(ProductSaleElementsTableMap::QUANTITY)) $criteria->add(ProductSaleElementsTableMap::QUANTITY, $this->quantity);
|
||||
if ($this->isColumnModified(ProductSaleElementsTableMap::PROMO)) $criteria->add(ProductSaleElementsTableMap::PROMO, $this->promo);
|
||||
if ($this->isColumnModified(ProductSaleElementsTableMap::NEWNESS)) $criteria->add(ProductSaleElementsTableMap::NEWNESS, $this->newness);
|
||||
@@ -1514,7 +1458,6 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
|
||||
{
|
||||
$copyObj->setProductId($this->getProductId());
|
||||
$copyObj->setIncrease($this->getIncrease());
|
||||
$copyObj->setQuantity($this->getQuantity());
|
||||
$copyObj->setPromo($this->getPromo());
|
||||
$copyObj->setNewness($this->getNewness());
|
||||
@@ -2437,7 +2380,6 @@ abstract class ProductSaleElements implements ActiveRecordInterface
|
||||
{
|
||||
$this->id = null;
|
||||
$this->product_id = null;
|
||||
$this->increase = null;
|
||||
$this->quantity = null;
|
||||
$this->promo = null;
|
||||
$this->newness = null;
|
||||
|
||||
@@ -23,7 +23,6 @@ use Thelia\Model\Map\ProductSaleElementsTableMap;
|
||||
*
|
||||
* @method ChildProductSaleElementsQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildProductSaleElementsQuery orderByProductId($order = Criteria::ASC) Order by the product_id column
|
||||
* @method ChildProductSaleElementsQuery orderByIncrease($order = Criteria::ASC) Order by the increase column
|
||||
* @method ChildProductSaleElementsQuery orderByQuantity($order = Criteria::ASC) Order by the quantity column
|
||||
* @method ChildProductSaleElementsQuery orderByPromo($order = Criteria::ASC) Order by the promo column
|
||||
* @method ChildProductSaleElementsQuery orderByNewness($order = Criteria::ASC) Order by the newness column
|
||||
@@ -33,7 +32,6 @@ use Thelia\Model\Map\ProductSaleElementsTableMap;
|
||||
*
|
||||
* @method ChildProductSaleElementsQuery groupById() Group by the id column
|
||||
* @method ChildProductSaleElementsQuery groupByProductId() Group by the product_id column
|
||||
* @method ChildProductSaleElementsQuery groupByIncrease() Group by the increase column
|
||||
* @method ChildProductSaleElementsQuery groupByQuantity() Group by the quantity column
|
||||
* @method ChildProductSaleElementsQuery groupByPromo() Group by the promo column
|
||||
* @method ChildProductSaleElementsQuery groupByNewness() Group by the newness column
|
||||
@@ -66,7 +64,6 @@ use Thelia\Model\Map\ProductSaleElementsTableMap;
|
||||
*
|
||||
* @method ChildProductSaleElements findOneById(int $id) Return the first ChildProductSaleElements filtered by the id column
|
||||
* @method ChildProductSaleElements findOneByProductId(int $product_id) Return the first ChildProductSaleElements filtered by the product_id column
|
||||
* @method ChildProductSaleElements findOneByIncrease(double $increase) Return the first ChildProductSaleElements filtered by the increase column
|
||||
* @method ChildProductSaleElements findOneByQuantity(double $quantity) Return the first ChildProductSaleElements filtered by the quantity column
|
||||
* @method ChildProductSaleElements findOneByPromo(int $promo) Return the first ChildProductSaleElements filtered by the promo column
|
||||
* @method ChildProductSaleElements findOneByNewness(int $newness) Return the first ChildProductSaleElements filtered by the newness column
|
||||
@@ -76,7 +73,6 @@ use Thelia\Model\Map\ProductSaleElementsTableMap;
|
||||
*
|
||||
* @method array findById(int $id) Return ChildProductSaleElements objects filtered by the id column
|
||||
* @method array findByProductId(int $product_id) Return ChildProductSaleElements objects filtered by the product_id column
|
||||
* @method array findByIncrease(double $increase) Return ChildProductSaleElements objects filtered by the increase column
|
||||
* @method array findByQuantity(double $quantity) Return ChildProductSaleElements objects filtered by the quantity column
|
||||
* @method array findByPromo(int $promo) Return ChildProductSaleElements objects filtered by the promo column
|
||||
* @method array findByNewness(int $newness) Return ChildProductSaleElements objects filtered by the newness column
|
||||
@@ -171,7 +167,7 @@ abstract class ProductSaleElementsQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, PRODUCT_ID, INCREASE, QUANTITY, PROMO, NEWNESS, WEIGHT, CREATED_AT, UPDATED_AT FROM product_sale_elements WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, PRODUCT_ID, QUANTITY, PROMO, NEWNESS, WEIGHT, CREATED_AT, UPDATED_AT FROM product_sale_elements WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -344,47 +340,6 @@ abstract class ProductSaleElementsQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(ProductSaleElementsTableMap::PRODUCT_ID, $productId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the increase column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByIncrease(1234); // WHERE increase = 1234
|
||||
* $query->filterByIncrease(array(12, 34)); // WHERE increase IN (12, 34)
|
||||
* $query->filterByIncrease(array('min' => 12)); // WHERE increase > 12
|
||||
* </code>
|
||||
*
|
||||
* @param mixed $increase The value to use as filter.
|
||||
* Use scalar values for equality.
|
||||
* Use array values for in_array() equivalent.
|
||||
* Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildProductSaleElementsQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByIncrease($increase = null, $comparison = null)
|
||||
{
|
||||
if (is_array($increase)) {
|
||||
$useMinMax = false;
|
||||
if (isset($increase['min'])) {
|
||||
$this->addUsingAlias(ProductSaleElementsTableMap::INCREASE, $increase['min'], Criteria::GREATER_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if (isset($increase['max'])) {
|
||||
$this->addUsingAlias(ProductSaleElementsTableMap::INCREASE, $increase['max'], Criteria::LESS_EQUAL);
|
||||
$useMinMax = true;
|
||||
}
|
||||
if ($useMinMax) {
|
||||
return $this;
|
||||
}
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(ProductSaleElementsTableMap::INCREASE, $increase, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the quantity column
|
||||
*
|
||||
|
||||
@@ -57,7 +57,7 @@ class ProductSaleElementsTableMap extends TableMap
|
||||
/**
|
||||
* The total number of columns
|
||||
*/
|
||||
const NUM_COLUMNS = 9;
|
||||
const NUM_COLUMNS = 8;
|
||||
|
||||
/**
|
||||
* The number of lazy-loaded columns
|
||||
@@ -67,7 +67,7 @@ class ProductSaleElementsTableMap extends TableMap
|
||||
/**
|
||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||
*/
|
||||
const NUM_HYDRATE_COLUMNS = 9;
|
||||
const NUM_HYDRATE_COLUMNS = 8;
|
||||
|
||||
/**
|
||||
* the column name for the ID field
|
||||
@@ -79,11 +79,6 @@ class ProductSaleElementsTableMap extends TableMap
|
||||
*/
|
||||
const PRODUCT_ID = 'product_sale_elements.PRODUCT_ID';
|
||||
|
||||
/**
|
||||
* the column name for the INCREASE field
|
||||
*/
|
||||
const INCREASE = 'product_sale_elements.INCREASE';
|
||||
|
||||
/**
|
||||
* the column name for the QUANTITY field
|
||||
*/
|
||||
@@ -126,12 +121,12 @@ class ProductSaleElementsTableMap extends TableMap
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'ProductId', 'Increase', 'Quantity', 'Promo', 'Newness', 'Weight', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'productId', 'increase', 'quantity', 'promo', 'newness', 'weight', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(ProductSaleElementsTableMap::ID, ProductSaleElementsTableMap::PRODUCT_ID, ProductSaleElementsTableMap::INCREASE, ProductSaleElementsTableMap::QUANTITY, ProductSaleElementsTableMap::PROMO, ProductSaleElementsTableMap::NEWNESS, ProductSaleElementsTableMap::WEIGHT, ProductSaleElementsTableMap::CREATED_AT, ProductSaleElementsTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'PRODUCT_ID', 'INCREASE', 'QUANTITY', 'PROMO', 'NEWNESS', 'WEIGHT', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'product_id', 'increase', 'quantity', 'promo', 'newness', 'weight', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
self::TYPE_PHPNAME => array('Id', 'ProductId', 'Quantity', 'Promo', 'Newness', 'Weight', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'productId', 'quantity', 'promo', 'newness', 'weight', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(ProductSaleElementsTableMap::ID, ProductSaleElementsTableMap::PRODUCT_ID, ProductSaleElementsTableMap::QUANTITY, ProductSaleElementsTableMap::PROMO, ProductSaleElementsTableMap::NEWNESS, ProductSaleElementsTableMap::WEIGHT, ProductSaleElementsTableMap::CREATED_AT, ProductSaleElementsTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'PRODUCT_ID', 'QUANTITY', 'PROMO', 'NEWNESS', 'WEIGHT', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'product_id', 'quantity', 'promo', 'newness', 'weight', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -141,12 +136,12 @@ class ProductSaleElementsTableMap extends TableMap
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'ProductId' => 1, 'Increase' => 2, 'Quantity' => 3, 'Promo' => 4, 'Newness' => 5, 'Weight' => 6, 'CreatedAt' => 7, 'UpdatedAt' => 8, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'productId' => 1, 'increase' => 2, 'quantity' => 3, 'promo' => 4, 'newness' => 5, 'weight' => 6, 'createdAt' => 7, 'updatedAt' => 8, ),
|
||||
self::TYPE_COLNAME => array(ProductSaleElementsTableMap::ID => 0, ProductSaleElementsTableMap::PRODUCT_ID => 1, ProductSaleElementsTableMap::INCREASE => 2, ProductSaleElementsTableMap::QUANTITY => 3, ProductSaleElementsTableMap::PROMO => 4, ProductSaleElementsTableMap::NEWNESS => 5, ProductSaleElementsTableMap::WEIGHT => 6, ProductSaleElementsTableMap::CREATED_AT => 7, ProductSaleElementsTableMap::UPDATED_AT => 8, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'PRODUCT_ID' => 1, 'INCREASE' => 2, 'QUANTITY' => 3, 'PROMO' => 4, 'NEWNESS' => 5, 'WEIGHT' => 6, 'CREATED_AT' => 7, 'UPDATED_AT' => 8, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'product_id' => 1, 'increase' => 2, 'quantity' => 3, 'promo' => 4, 'newness' => 5, 'weight' => 6, 'created_at' => 7, 'updated_at' => 8, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, )
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'ProductId' => 1, 'Quantity' => 2, 'Promo' => 3, 'Newness' => 4, 'Weight' => 5, 'CreatedAt' => 6, 'UpdatedAt' => 7, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'productId' => 1, 'quantity' => 2, 'promo' => 3, 'newness' => 4, 'weight' => 5, 'createdAt' => 6, 'updatedAt' => 7, ),
|
||||
self::TYPE_COLNAME => array(ProductSaleElementsTableMap::ID => 0, ProductSaleElementsTableMap::PRODUCT_ID => 1, ProductSaleElementsTableMap::QUANTITY => 2, ProductSaleElementsTableMap::PROMO => 3, ProductSaleElementsTableMap::NEWNESS => 4, ProductSaleElementsTableMap::WEIGHT => 5, ProductSaleElementsTableMap::CREATED_AT => 6, ProductSaleElementsTableMap::UPDATED_AT => 7, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'PRODUCT_ID' => 1, 'QUANTITY' => 2, 'PROMO' => 3, 'NEWNESS' => 4, 'WEIGHT' => 5, 'CREATED_AT' => 6, 'UPDATED_AT' => 7, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'product_id' => 1, 'quantity' => 2, 'promo' => 3, 'newness' => 4, 'weight' => 5, 'created_at' => 6, 'updated_at' => 7, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -167,7 +162,6 @@ class ProductSaleElementsTableMap extends TableMap
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('PRODUCT_ID', 'ProductId', 'INTEGER', 'product', 'ID', true, null, null);
|
||||
$this->addColumn('INCREASE', 'Increase', 'FLOAT', false, null, null);
|
||||
$this->addColumn('QUANTITY', 'Quantity', 'FLOAT', true, null, null);
|
||||
$this->addColumn('PROMO', 'Promo', 'TINYINT', false, null, 0);
|
||||
$this->addColumn('NEWNESS', 'Newness', 'TINYINT', false, null, 0);
|
||||
@@ -340,7 +334,6 @@ class ProductSaleElementsTableMap extends TableMap
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(ProductSaleElementsTableMap::ID);
|
||||
$criteria->addSelectColumn(ProductSaleElementsTableMap::PRODUCT_ID);
|
||||
$criteria->addSelectColumn(ProductSaleElementsTableMap::INCREASE);
|
||||
$criteria->addSelectColumn(ProductSaleElementsTableMap::QUANTITY);
|
||||
$criteria->addSelectColumn(ProductSaleElementsTableMap::PROMO);
|
||||
$criteria->addSelectColumn(ProductSaleElementsTableMap::NEWNESS);
|
||||
@@ -350,7 +343,6 @@ class ProductSaleElementsTableMap extends TableMap
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.PRODUCT_ID');
|
||||
$criteria->addSelectColumn($alias . '.INCREASE');
|
||||
$criteria->addSelectColumn($alias . '.QUANTITY');
|
||||
$criteria->addSelectColumn($alias . '.PROMO');
|
||||
$criteria->addSelectColumn($alias . '.NEWNESS');
|
||||
|
||||
@@ -352,7 +352,6 @@ CREATE TABLE `product_sale_elements`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`product_id` INTEGER NOT NULL,
|
||||
`increase` FLOAT,
|
||||
`quantity` FLOAT NOT NULL,
|
||||
`promo` TINYINT DEFAULT 0,
|
||||
`newness` TINYINT DEFAULT 0,
|
||||
|
||||
Reference in New Issue
Block a user