update address model
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
<default key="_view">index</default>
|
||||
</route>
|
||||
|
||||
<!-- Customer routes -->
|
||||
<route id="customer.create.process" path="/customer/create" methods="post">
|
||||
<default key="_controller">Thelia\Controller\Front\CustomerController::createAction</default>
|
||||
<default key="_view">connexion</default>
|
||||
@@ -25,7 +26,15 @@
|
||||
<route id="customer.logout.process" path="/customer/logout">
|
||||
<default key="_controller">Thelia\Controller\Front\CustomerController::logoutAction</default>
|
||||
</route>
|
||||
<!-- end customer routes -->
|
||||
|
||||
<!-- customer address routes -->
|
||||
<route id="customer.adress.create" path="/customer/address/create" method="post">
|
||||
<default key="_controller">Thelia\Controller\Front\CustomerAddressController::createAction</default>
|
||||
</route>
|
||||
<!-- end customer address routes -->
|
||||
|
||||
<!-- cart routes -->
|
||||
<route id="cart.add.process" path="/cart/add">
|
||||
<default key="_controller">Thelia\Controller\Front\CartController::addItem</default>
|
||||
<default key="_view">cart</default>
|
||||
@@ -40,4 +49,5 @@
|
||||
<default key="_controller">Thelia\Controller\Front\CartController::changeItem</default>
|
||||
<default key="_view">cart</default>
|
||||
</route>
|
||||
<!-- end cart routes -->
|
||||
</routes>
|
||||
|
||||
@@ -70,10 +70,10 @@ abstract class Address implements ActiveRecordInterface
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* The value for the name field.
|
||||
* The value for the label field.
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
protected $label;
|
||||
|
||||
/**
|
||||
* The value for the customer_id field.
|
||||
@@ -498,14 +498,14 @@ abstract class Address implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [name] column value.
|
||||
* Get the [label] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName()
|
||||
public function getLabel()
|
||||
{
|
||||
|
||||
return $this->name;
|
||||
return $this->label;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -724,25 +724,25 @@ abstract class Address implements ActiveRecordInterface
|
||||
} // setId()
|
||||
|
||||
/**
|
||||
* Set the value of [name] column.
|
||||
* Set the value of [label] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Address The current object (for fluent API support)
|
||||
*/
|
||||
public function setName($v)
|
||||
public function setLabel($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->name !== $v) {
|
||||
$this->name = $v;
|
||||
$this->modifiedColumns[] = AddressTableMap::NAME;
|
||||
if ($this->label !== $v) {
|
||||
$this->label = $v;
|
||||
$this->modifiedColumns[] = AddressTableMap::LABEL;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setName()
|
||||
} // setLabel()
|
||||
|
||||
/**
|
||||
* Set the value of [customer_id] column.
|
||||
@@ -1136,8 +1136,8 @@ abstract class Address implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 0 + $startcol : AddressTableMap::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->id = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : AddressTableMap::translateFieldName('Name', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->name = (null !== $col) ? (string) $col : null;
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : AddressTableMap::translateFieldName('Label', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->label = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : AddressTableMap::translateFieldName('CustomerId', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->customer_id = (null !== $col) ? (int) $col : null;
|
||||
@@ -1501,8 +1501,8 @@ abstract class Address implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(AddressTableMap::ID)) {
|
||||
$modifiedColumns[':p' . $index++] = 'ID';
|
||||
}
|
||||
if ($this->isColumnModified(AddressTableMap::NAME)) {
|
||||
$modifiedColumns[':p' . $index++] = 'NAME';
|
||||
if ($this->isColumnModified(AddressTableMap::LABEL)) {
|
||||
$modifiedColumns[':p' . $index++] = 'LABEL';
|
||||
}
|
||||
if ($this->isColumnModified(AddressTableMap::CUSTOMER_ID)) {
|
||||
$modifiedColumns[':p' . $index++] = 'CUSTOMER_ID';
|
||||
@@ -1566,8 +1566,8 @@ abstract class Address implements ActiveRecordInterface
|
||||
case 'ID':
|
||||
$stmt->bindValue($identifier, $this->id, PDO::PARAM_INT);
|
||||
break;
|
||||
case 'NAME':
|
||||
$stmt->bindValue($identifier, $this->name, PDO::PARAM_STR);
|
||||
case 'LABEL':
|
||||
$stmt->bindValue($identifier, $this->label, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'CUSTOMER_ID':
|
||||
$stmt->bindValue($identifier, $this->customer_id, PDO::PARAM_INT);
|
||||
@@ -1683,7 +1683,7 @@ abstract class Address implements ActiveRecordInterface
|
||||
return $this->getId();
|
||||
break;
|
||||
case 1:
|
||||
return $this->getName();
|
||||
return $this->getLabel();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getCustomerId();
|
||||
@@ -1763,7 +1763,7 @@ abstract class Address implements ActiveRecordInterface
|
||||
$keys = AddressTableMap::getFieldNames($keyType);
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getName(),
|
||||
$keys[1] => $this->getLabel(),
|
||||
$keys[2] => $this->getCustomerId(),
|
||||
$keys[3] => $this->getTitleId(),
|
||||
$keys[4] => $this->getCompany(),
|
||||
@@ -1841,7 +1841,7 @@ abstract class Address implements ActiveRecordInterface
|
||||
$this->setId($value);
|
||||
break;
|
||||
case 1:
|
||||
$this->setName($value);
|
||||
$this->setLabel($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setCustomerId($value);
|
||||
@@ -1916,7 +1916,7 @@ abstract class Address implements ActiveRecordInterface
|
||||
$keys = AddressTableMap::getFieldNames($keyType);
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setName($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setLabel($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setCustomerId($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setTitleId($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setCompany($arr[$keys[4]]);
|
||||
@@ -1945,7 +1945,7 @@ abstract class Address implements ActiveRecordInterface
|
||||
$criteria = new Criteria(AddressTableMap::DATABASE_NAME);
|
||||
|
||||
if ($this->isColumnModified(AddressTableMap::ID)) $criteria->add(AddressTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(AddressTableMap::NAME)) $criteria->add(AddressTableMap::NAME, $this->name);
|
||||
if ($this->isColumnModified(AddressTableMap::LABEL)) $criteria->add(AddressTableMap::LABEL, $this->label);
|
||||
if ($this->isColumnModified(AddressTableMap::CUSTOMER_ID)) $criteria->add(AddressTableMap::CUSTOMER_ID, $this->customer_id);
|
||||
if ($this->isColumnModified(AddressTableMap::TITLE_ID)) $criteria->add(AddressTableMap::TITLE_ID, $this->title_id);
|
||||
if ($this->isColumnModified(AddressTableMap::COMPANY)) $criteria->add(AddressTableMap::COMPANY, $this->company);
|
||||
@@ -2025,7 +2025,7 @@ abstract class Address implements ActiveRecordInterface
|
||||
*/
|
||||
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
|
||||
{
|
||||
$copyObj->setName($this->getName());
|
||||
$copyObj->setLabel($this->getLabel());
|
||||
$copyObj->setCustomerId($this->getCustomerId());
|
||||
$copyObj->setTitleId($this->getTitleId());
|
||||
$copyObj->setCompany($this->getCompany());
|
||||
@@ -2804,7 +2804,7 @@ abstract class Address implements ActiveRecordInterface
|
||||
public function clear()
|
||||
{
|
||||
$this->id = null;
|
||||
$this->name = null;
|
||||
$this->label = null;
|
||||
$this->customer_id = null;
|
||||
$this->title_id = null;
|
||||
$this->company = null;
|
||||
|
||||
@@ -22,7 +22,7 @@ use Thelia\Model\Map\AddressTableMap;
|
||||
*
|
||||
*
|
||||
* @method ChildAddressQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildAddressQuery orderByName($order = Criteria::ASC) Order by the name column
|
||||
* @method ChildAddressQuery orderByLabel($order = Criteria::ASC) Order by the label column
|
||||
* @method ChildAddressQuery orderByCustomerId($order = Criteria::ASC) Order by the customer_id column
|
||||
* @method ChildAddressQuery orderByTitleId($order = Criteria::ASC) Order by the title_id column
|
||||
* @method ChildAddressQuery orderByCompany($order = Criteria::ASC) Order by the company column
|
||||
@@ -41,7 +41,7 @@ use Thelia\Model\Map\AddressTableMap;
|
||||
* @method ChildAddressQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildAddressQuery groupById() Group by the id column
|
||||
* @method ChildAddressQuery groupByName() Group by the name column
|
||||
* @method ChildAddressQuery groupByLabel() Group by the label column
|
||||
* @method ChildAddressQuery groupByCustomerId() Group by the customer_id column
|
||||
* @method ChildAddressQuery groupByTitleId() Group by the title_id column
|
||||
* @method ChildAddressQuery groupByCompany() Group by the company column
|
||||
@@ -87,7 +87,7 @@ use Thelia\Model\Map\AddressTableMap;
|
||||
* @method ChildAddress findOneOrCreate(ConnectionInterface $con = null) Return the first ChildAddress matching the query, or a new ChildAddress object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildAddress findOneById(int $id) Return the first ChildAddress filtered by the id column
|
||||
* @method ChildAddress findOneByName(string $name) Return the first ChildAddress filtered by the name column
|
||||
* @method ChildAddress findOneByLabel(string $label) Return the first ChildAddress filtered by the label column
|
||||
* @method ChildAddress findOneByCustomerId(int $customer_id) Return the first ChildAddress filtered by the customer_id column
|
||||
* @method ChildAddress findOneByTitleId(int $title_id) Return the first ChildAddress filtered by the title_id column
|
||||
* @method ChildAddress findOneByCompany(string $company) Return the first ChildAddress filtered by the company column
|
||||
@@ -106,7 +106,7 @@ use Thelia\Model\Map\AddressTableMap;
|
||||
* @method ChildAddress findOneByUpdatedAt(string $updated_at) Return the first ChildAddress filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildAddress objects filtered by the id column
|
||||
* @method array findByName(string $name) Return ChildAddress objects filtered by the name column
|
||||
* @method array findByLabel(string $label) Return ChildAddress objects filtered by the label column
|
||||
* @method array findByCustomerId(int $customer_id) Return ChildAddress objects filtered by the customer_id column
|
||||
* @method array findByTitleId(int $title_id) Return ChildAddress objects filtered by the title_id column
|
||||
* @method array findByCompany(string $company) Return ChildAddress objects filtered by the company column
|
||||
@@ -211,7 +211,7 @@ abstract class AddressQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, NAME, CUSTOMER_ID, TITLE_ID, COMPANY, FIRSTNAME, LASTNAME, ADDRESS1, ADDRESS2, ADDRESS3, ZIPCODE, CITY, COUNTRY_ID, PHONE, CELLPHONE, IS_DEFAULT, CREATED_AT, UPDATED_AT FROM address WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, LABEL, CUSTOMER_ID, TITLE_ID, COMPANY, FIRSTNAME, LASTNAME, ADDRESS1, ADDRESS2, ADDRESS3, ZIPCODE, CITY, COUNTRY_ID, PHONE, CELLPHONE, IS_DEFAULT, CREATED_AT, UPDATED_AT FROM address WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -342,32 +342,32 @@ abstract class AddressQuery extends ModelCriteria
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the name column
|
||||
* Filter the query on the label column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByName('fooValue'); // WHERE name = 'fooValue'
|
||||
* $query->filterByName('%fooValue%'); // WHERE name LIKE '%fooValue%'
|
||||
* $query->filterByLabel('fooValue'); // WHERE label = 'fooValue'
|
||||
* $query->filterByLabel('%fooValue%'); // WHERE label LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $name The value to use as filter.
|
||||
* @param string $label The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildAddressQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByName($name = null, $comparison = null)
|
||||
public function filterByLabel($label = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($name)) {
|
||||
if (is_array($label)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $name)) {
|
||||
$name = str_replace('*', '%', $name);
|
||||
} elseif (preg_match('/[\%\*]/', $label)) {
|
||||
$label = str_replace('*', '%', $label);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(AddressTableMap::NAME, $name, $comparison);
|
||||
return $this->addUsingAlias(AddressTableMap::LABEL, $label, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,8 +20,6 @@ use Propel\Runtime\Util\PropelDateTime;
|
||||
use Thelia\Model\Coupon as ChildCoupon;
|
||||
use Thelia\Model\CouponI18n as ChildCouponI18n;
|
||||
use Thelia\Model\CouponI18nQuery as ChildCouponI18nQuery;
|
||||
use Thelia\Model\CouponOrder as ChildCouponOrder;
|
||||
use Thelia\Model\CouponOrderQuery as ChildCouponOrderQuery;
|
||||
use Thelia\Model\CouponQuery as ChildCouponQuery;
|
||||
use Thelia\Model\CouponVersion as ChildCouponVersion;
|
||||
use Thelia\Model\CouponVersionQuery as ChildCouponVersionQuery;
|
||||
@@ -80,24 +78,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
/**
|
||||
* The value for the title field.
|
||||
* @var string
|
||||
*/
|
||||
protected $title;
|
||||
|
||||
/**
|
||||
* The value for the short_description field.
|
||||
* @var string
|
||||
*/
|
||||
protected $short_description;
|
||||
|
||||
/**
|
||||
* The value for the description field.
|
||||
* @var string
|
||||
*/
|
||||
protected $description;
|
||||
|
||||
/**
|
||||
* The value for the amount field.
|
||||
* @var double
|
||||
@@ -171,12 +151,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
*/
|
||||
protected $version;
|
||||
|
||||
/**
|
||||
* @var ObjectCollection|ChildCouponOrder[] Collection to store aggregation of ChildCouponOrder objects.
|
||||
*/
|
||||
protected $collCouponOrders;
|
||||
protected $collCouponOrdersPartial;
|
||||
|
||||
/**
|
||||
* @var ObjectCollection|ChildCouponI18n[] Collection to store aggregation of ChildCouponI18n objects.
|
||||
*/
|
||||
@@ -219,12 +193,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
*/
|
||||
protected $enforceVersion = false;
|
||||
|
||||
/**
|
||||
* An array of objects scheduled for deletion.
|
||||
* @var ObjectCollection
|
||||
*/
|
||||
protected $couponOrdersScheduledForDeletion = null;
|
||||
|
||||
/**
|
||||
* An array of objects scheduled for deletion.
|
||||
* @var ObjectCollection
|
||||
@@ -537,39 +505,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [title] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [short_description] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getShortDescription()
|
||||
{
|
||||
|
||||
return $this->short_description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [description] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [amount] column value.
|
||||
*
|
||||
@@ -792,69 +727,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setType()
|
||||
|
||||
/**
|
||||
* Set the value of [title] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Coupon The current object (for fluent API support)
|
||||
*/
|
||||
public function setTitle($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->title !== $v) {
|
||||
$this->title = $v;
|
||||
$this->modifiedColumns[] = CouponTableMap::TITLE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setTitle()
|
||||
|
||||
/**
|
||||
* Set the value of [short_description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Coupon The current object (for fluent API support)
|
||||
*/
|
||||
public function setShortDescription($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->short_description !== $v) {
|
||||
$this->short_description = $v;
|
||||
$this->modifiedColumns[] = CouponTableMap::SHORT_DESCRIPTION;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setShortDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\Coupon The current object (for fluent API support)
|
||||
*/
|
||||
public function setDescription($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->description !== $v) {
|
||||
$this->description = $v;
|
||||
$this->modifiedColumns[] = CouponTableMap::DESCRIPTION;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [amount] column.
|
||||
*
|
||||
@@ -1165,58 +1037,49 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CouponTableMap::translateFieldName('Type', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->type = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->title = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponTableMap::translateFieldName('ShortDescription', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->short_description = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CouponTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->description = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CouponTableMap::translateFieldName('Amount', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponTableMap::translateFieldName('Amount', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->amount = (null !== $col) ? (double) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CouponTableMap::translateFieldName('IsUsed', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponTableMap::translateFieldName('IsUsed', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->is_used = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CouponTableMap::translateFieldName('IsEnabled', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CouponTableMap::translateFieldName('IsEnabled', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->is_enabled = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CouponTableMap::translateFieldName('ExpirationDate', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CouponTableMap::translateFieldName('ExpirationDate', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->expiration_date = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CouponTableMap::translateFieldName('SerializedRules', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CouponTableMap::translateFieldName('SerializedRules', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->serialized_rules = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CouponTableMap::translateFieldName('IsCumulative', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CouponTableMap::translateFieldName('IsCumulative', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->is_cumulative = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CouponTableMap::translateFieldName('IsRemovingPostage', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CouponTableMap::translateFieldName('IsRemovingPostage', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->is_removing_postage = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CouponTableMap::translateFieldName('MaxUsage', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CouponTableMap::translateFieldName('MaxUsage', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->max_usage = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CouponTableMap::translateFieldName('IsAvailableOnSpecialOffers', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CouponTableMap::translateFieldName('IsAvailableOnSpecialOffers', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->is_available_on_special_offers = (null !== $col) ? (boolean) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : CouponTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CouponTableMap::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 ? 16 + $startcol : CouponTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CouponTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : CouponTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CouponTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version = (null !== $col) ? (int) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
@@ -1226,7 +1089,7 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 18; // 18 = CouponTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 15; // 15 = CouponTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\Coupon object", 0, $e);
|
||||
@@ -1287,8 +1150,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
|
||||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->collCouponOrders = null;
|
||||
|
||||
$this->collCouponI18ns = null;
|
||||
|
||||
$this->collCouponVersions = null;
|
||||
@@ -1435,23 +1296,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
$this->resetModified();
|
||||
}
|
||||
|
||||
if ($this->couponOrdersScheduledForDeletion !== null) {
|
||||
if (!$this->couponOrdersScheduledForDeletion->isEmpty()) {
|
||||
\Thelia\Model\CouponOrderQuery::create()
|
||||
->filterByPrimaryKeys($this->couponOrdersScheduledForDeletion->getPrimaryKeys(false))
|
||||
->delete($con);
|
||||
$this->couponOrdersScheduledForDeletion = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->collCouponOrders !== null) {
|
||||
foreach ($this->collCouponOrders as $referrerFK) {
|
||||
if (!$referrerFK->isDeleted() && ($referrerFK->isNew() || $referrerFK->isModified())) {
|
||||
$affectedRows += $referrerFK->save($con);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->couponI18nsScheduledForDeletion !== null) {
|
||||
if (!$this->couponI18nsScheduledForDeletion->isEmpty()) {
|
||||
\Thelia\Model\CouponI18nQuery::create()
|
||||
@@ -1521,15 +1365,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CouponTableMap::TYPE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'TYPE';
|
||||
}
|
||||
if ($this->isColumnModified(CouponTableMap::TITLE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'TITLE';
|
||||
}
|
||||
if ($this->isColumnModified(CouponTableMap::SHORT_DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'SHORT_DESCRIPTION';
|
||||
}
|
||||
if ($this->isColumnModified(CouponTableMap::DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'DESCRIPTION';
|
||||
}
|
||||
if ($this->isColumnModified(CouponTableMap::AMOUNT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'AMOUNT';
|
||||
}
|
||||
@@ -1586,15 +1421,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
case 'TYPE':
|
||||
$stmt->bindValue($identifier, $this->type, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'TITLE':
|
||||
$stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'SHORT_DESCRIPTION':
|
||||
$stmt->bindValue($identifier, $this->short_description, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'DESCRIPTION':
|
||||
$stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'AMOUNT':
|
||||
$stmt->bindValue($identifier, $this->amount, PDO::PARAM_STR);
|
||||
break;
|
||||
@@ -1703,48 +1529,39 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
return $this->getType();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getTitle();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getShortDescription();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getDescription();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getAmount();
|
||||
break;
|
||||
case 7:
|
||||
case 4:
|
||||
return $this->getIsUsed();
|
||||
break;
|
||||
case 8:
|
||||
case 5:
|
||||
return $this->getIsEnabled();
|
||||
break;
|
||||
case 9:
|
||||
case 6:
|
||||
return $this->getExpirationDate();
|
||||
break;
|
||||
case 10:
|
||||
case 7:
|
||||
return $this->getSerializedRules();
|
||||
break;
|
||||
case 11:
|
||||
case 8:
|
||||
return $this->getIsCumulative();
|
||||
break;
|
||||
case 12:
|
||||
case 9:
|
||||
return $this->getIsRemovingPostage();
|
||||
break;
|
||||
case 13:
|
||||
case 10:
|
||||
return $this->getMaxUsage();
|
||||
break;
|
||||
case 14:
|
||||
case 11:
|
||||
return $this->getIsAvailableOnSpecialOffers();
|
||||
break;
|
||||
case 15:
|
||||
case 12:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 16:
|
||||
case 13:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
case 17:
|
||||
case 14:
|
||||
return $this->getVersion();
|
||||
break;
|
||||
default:
|
||||
@@ -1779,21 +1596,18 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getCode(),
|
||||
$keys[2] => $this->getType(),
|
||||
$keys[3] => $this->getTitle(),
|
||||
$keys[4] => $this->getShortDescription(),
|
||||
$keys[5] => $this->getDescription(),
|
||||
$keys[6] => $this->getAmount(),
|
||||
$keys[7] => $this->getIsUsed(),
|
||||
$keys[8] => $this->getIsEnabled(),
|
||||
$keys[9] => $this->getExpirationDate(),
|
||||
$keys[10] => $this->getSerializedRules(),
|
||||
$keys[11] => $this->getIsCumulative(),
|
||||
$keys[12] => $this->getIsRemovingPostage(),
|
||||
$keys[13] => $this->getMaxUsage(),
|
||||
$keys[14] => $this->getIsAvailableOnSpecialOffers(),
|
||||
$keys[15] => $this->getCreatedAt(),
|
||||
$keys[16] => $this->getUpdatedAt(),
|
||||
$keys[17] => $this->getVersion(),
|
||||
$keys[3] => $this->getAmount(),
|
||||
$keys[4] => $this->getIsUsed(),
|
||||
$keys[5] => $this->getIsEnabled(),
|
||||
$keys[6] => $this->getExpirationDate(),
|
||||
$keys[7] => $this->getSerializedRules(),
|
||||
$keys[8] => $this->getIsCumulative(),
|
||||
$keys[9] => $this->getIsRemovingPostage(),
|
||||
$keys[10] => $this->getMaxUsage(),
|
||||
$keys[11] => $this->getIsAvailableOnSpecialOffers(),
|
||||
$keys[12] => $this->getCreatedAt(),
|
||||
$keys[13] => $this->getUpdatedAt(),
|
||||
$keys[14] => $this->getVersion(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1802,9 +1616,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
}
|
||||
|
||||
if ($includeForeignObjects) {
|
||||
if (null !== $this->collCouponOrders) {
|
||||
$result['CouponOrders'] = $this->collCouponOrders->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
if (null !== $this->collCouponI18ns) {
|
||||
$result['CouponI18ns'] = $this->collCouponI18ns->toArray(null, true, $keyType, $includeLazyLoadColumns, $alreadyDumpedObjects);
|
||||
}
|
||||
@@ -1855,48 +1666,39 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
$this->setType($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setTitle($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setShortDescription($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setDescription($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setAmount($value);
|
||||
break;
|
||||
case 7:
|
||||
case 4:
|
||||
$this->setIsUsed($value);
|
||||
break;
|
||||
case 8:
|
||||
case 5:
|
||||
$this->setIsEnabled($value);
|
||||
break;
|
||||
case 9:
|
||||
case 6:
|
||||
$this->setExpirationDate($value);
|
||||
break;
|
||||
case 10:
|
||||
case 7:
|
||||
$this->setSerializedRules($value);
|
||||
break;
|
||||
case 11:
|
||||
case 8:
|
||||
$this->setIsCumulative($value);
|
||||
break;
|
||||
case 12:
|
||||
case 9:
|
||||
$this->setIsRemovingPostage($value);
|
||||
break;
|
||||
case 13:
|
||||
case 10:
|
||||
$this->setMaxUsage($value);
|
||||
break;
|
||||
case 14:
|
||||
case 11:
|
||||
$this->setIsAvailableOnSpecialOffers($value);
|
||||
break;
|
||||
case 15:
|
||||
case 12:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 16:
|
||||
case 13:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
case 17:
|
||||
case 14:
|
||||
$this->setVersion($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1926,21 +1728,18 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setCode($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setType($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setTitle($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setShortDescription($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setDescription($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setAmount($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setIsUsed($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setIsEnabled($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setExpirationDate($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setSerializedRules($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setIsCumulative($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setIsRemovingPostage($arr[$keys[12]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setMaxUsage($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setIsAvailableOnSpecialOffers($arr[$keys[14]]);
|
||||
if (array_key_exists($keys[15], $arr)) $this->setCreatedAt($arr[$keys[15]]);
|
||||
if (array_key_exists($keys[16], $arr)) $this->setUpdatedAt($arr[$keys[16]]);
|
||||
if (array_key_exists($keys[17], $arr)) $this->setVersion($arr[$keys[17]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setAmount($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setIsUsed($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setIsEnabled($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setExpirationDate($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setSerializedRules($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setIsCumulative($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setIsRemovingPostage($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setMaxUsage($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setIsAvailableOnSpecialOffers($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setCreatedAt($arr[$keys[12]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setUpdatedAt($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setVersion($arr[$keys[14]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1955,9 +1754,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CouponTableMap::ID)) $criteria->add(CouponTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(CouponTableMap::CODE)) $criteria->add(CouponTableMap::CODE, $this->code);
|
||||
if ($this->isColumnModified(CouponTableMap::TYPE)) $criteria->add(CouponTableMap::TYPE, $this->type);
|
||||
if ($this->isColumnModified(CouponTableMap::TITLE)) $criteria->add(CouponTableMap::TITLE, $this->title);
|
||||
if ($this->isColumnModified(CouponTableMap::SHORT_DESCRIPTION)) $criteria->add(CouponTableMap::SHORT_DESCRIPTION, $this->short_description);
|
||||
if ($this->isColumnModified(CouponTableMap::DESCRIPTION)) $criteria->add(CouponTableMap::DESCRIPTION, $this->description);
|
||||
if ($this->isColumnModified(CouponTableMap::AMOUNT)) $criteria->add(CouponTableMap::AMOUNT, $this->amount);
|
||||
if ($this->isColumnModified(CouponTableMap::IS_USED)) $criteria->add(CouponTableMap::IS_USED, $this->is_used);
|
||||
if ($this->isColumnModified(CouponTableMap::IS_ENABLED)) $criteria->add(CouponTableMap::IS_ENABLED, $this->is_enabled);
|
||||
@@ -2035,9 +1831,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
{
|
||||
$copyObj->setCode($this->getCode());
|
||||
$copyObj->setType($this->getType());
|
||||
$copyObj->setTitle($this->getTitle());
|
||||
$copyObj->setShortDescription($this->getShortDescription());
|
||||
$copyObj->setDescription($this->getDescription());
|
||||
$copyObj->setAmount($this->getAmount());
|
||||
$copyObj->setIsUsed($this->getIsUsed());
|
||||
$copyObj->setIsEnabled($this->getIsEnabled());
|
||||
@@ -2056,12 +1849,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
// the getter/setter methods for fkey referrer objects.
|
||||
$copyObj->setNew(false);
|
||||
|
||||
foreach ($this->getCouponOrders() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addCouponOrder($relObj->copy($deepCopy));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->getCouponI18ns() as $relObj) {
|
||||
if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves
|
||||
$copyObj->addCouponI18n($relObj->copy($deepCopy));
|
||||
@@ -2115,9 +1902,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
*/
|
||||
public function initRelation($relationName)
|
||||
{
|
||||
if ('CouponOrder' == $relationName) {
|
||||
return $this->initCouponOrders();
|
||||
}
|
||||
if ('CouponI18n' == $relationName) {
|
||||
return $this->initCouponI18ns();
|
||||
}
|
||||
@@ -2126,249 +1910,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collCouponOrders collection
|
||||
*
|
||||
* This does not modify the database; however, it will remove any associated objects, causing
|
||||
* them to be refetched by subsequent calls to accessor method.
|
||||
*
|
||||
* @return void
|
||||
* @see addCouponOrders()
|
||||
*/
|
||||
public function clearCouponOrders()
|
||||
{
|
||||
$this->collCouponOrders = null; // important to set this to NULL since that means it is uninitialized
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset is the collCouponOrders collection loaded partially.
|
||||
*/
|
||||
public function resetPartialCouponOrders($v = true)
|
||||
{
|
||||
$this->collCouponOrdersPartial = $v;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the collCouponOrders collection.
|
||||
*
|
||||
* By default this just sets the collCouponOrders collection to an empty array (like clearcollCouponOrders());
|
||||
* however, you may wish to override this method in your stub class to provide setting appropriate
|
||||
* to your application -- for example, setting the initial array to the values stored in database.
|
||||
*
|
||||
* @param boolean $overrideExisting If set to true, the method call initializes
|
||||
* the collection even if it is not empty
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initCouponOrders($overrideExisting = true)
|
||||
{
|
||||
if (null !== $this->collCouponOrders && !$overrideExisting) {
|
||||
return;
|
||||
}
|
||||
$this->collCouponOrders = new ObjectCollection();
|
||||
$this->collCouponOrders->setModel('\Thelia\Model\CouponOrder');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an array of ChildCouponOrder objects which contain a foreign key that references this object.
|
||||
*
|
||||
* If the $criteria is not null, it is used to always fetch the results from the database.
|
||||
* Otherwise the results are fetched from the database the first time, then cached.
|
||||
* Next time the same method is called without $criteria, the cached collection is returned.
|
||||
* If this ChildCoupon is new, it will return
|
||||
* an empty collection or the current collection; the criteria is ignored on a new object.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param ConnectionInterface $con optional connection object
|
||||
* @return Collection|ChildCouponOrder[] List of ChildCouponOrder objects
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCouponOrders($criteria = null, ConnectionInterface $con = null)
|
||||
{
|
||||
$partial = $this->collCouponOrdersPartial && !$this->isNew();
|
||||
if (null === $this->collCouponOrders || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collCouponOrders) {
|
||||
// return empty collection
|
||||
$this->initCouponOrders();
|
||||
} else {
|
||||
$collCouponOrders = ChildCouponOrderQuery::create(null, $criteria)
|
||||
->filterByCoupon($this)
|
||||
->find($con);
|
||||
|
||||
if (null !== $criteria) {
|
||||
if (false !== $this->collCouponOrdersPartial && count($collCouponOrders)) {
|
||||
$this->initCouponOrders(false);
|
||||
|
||||
foreach ($collCouponOrders as $obj) {
|
||||
if (false == $this->collCouponOrders->contains($obj)) {
|
||||
$this->collCouponOrders->append($obj);
|
||||
}
|
||||
}
|
||||
|
||||
$this->collCouponOrdersPartial = true;
|
||||
}
|
||||
|
||||
$collCouponOrders->getInternalIterator()->rewind();
|
||||
|
||||
return $collCouponOrders;
|
||||
}
|
||||
|
||||
if ($partial && $this->collCouponOrders) {
|
||||
foreach ($this->collCouponOrders as $obj) {
|
||||
if ($obj->isNew()) {
|
||||
$collCouponOrders[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->collCouponOrders = $collCouponOrders;
|
||||
$this->collCouponOrdersPartial = false;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->collCouponOrders;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a collection of CouponOrder objects related by a one-to-many relationship
|
||||
* to the current object.
|
||||
* It will also schedule objects for deletion based on a diff between old objects (aka persisted)
|
||||
* and new objects from the given Propel collection.
|
||||
*
|
||||
* @param Collection $couponOrders A Propel collection.
|
||||
* @param ConnectionInterface $con Optional connection object
|
||||
* @return ChildCoupon The current object (for fluent API support)
|
||||
*/
|
||||
public function setCouponOrders(Collection $couponOrders, ConnectionInterface $con = null)
|
||||
{
|
||||
$couponOrdersToDelete = $this->getCouponOrders(new Criteria(), $con)->diff($couponOrders);
|
||||
|
||||
|
||||
$this->couponOrdersScheduledForDeletion = $couponOrdersToDelete;
|
||||
|
||||
foreach ($couponOrdersToDelete as $couponOrderRemoved) {
|
||||
$couponOrderRemoved->setCoupon(null);
|
||||
}
|
||||
|
||||
$this->collCouponOrders = null;
|
||||
foreach ($couponOrders as $couponOrder) {
|
||||
$this->addCouponOrder($couponOrder);
|
||||
}
|
||||
|
||||
$this->collCouponOrders = $couponOrders;
|
||||
$this->collCouponOrdersPartial = false;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of related CouponOrder objects.
|
||||
*
|
||||
* @param Criteria $criteria
|
||||
* @param boolean $distinct
|
||||
* @param ConnectionInterface $con
|
||||
* @return int Count of related CouponOrder objects.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function countCouponOrders(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
|
||||
{
|
||||
$partial = $this->collCouponOrdersPartial && !$this->isNew();
|
||||
if (null === $this->collCouponOrders || null !== $criteria || $partial) {
|
||||
if ($this->isNew() && null === $this->collCouponOrders) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($partial && !$criteria) {
|
||||
return count($this->getCouponOrders());
|
||||
}
|
||||
|
||||
$query = ChildCouponOrderQuery::create(null, $criteria);
|
||||
if ($distinct) {
|
||||
$query->distinct();
|
||||
}
|
||||
|
||||
return $query
|
||||
->filterByCoupon($this)
|
||||
->count($con);
|
||||
}
|
||||
|
||||
return count($this->collCouponOrders);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method called to associate a ChildCouponOrder object to this object
|
||||
* through the ChildCouponOrder foreign key attribute.
|
||||
*
|
||||
* @param ChildCouponOrder $l ChildCouponOrder
|
||||
* @return \Thelia\Model\Coupon The current object (for fluent API support)
|
||||
*/
|
||||
public function addCouponOrder(ChildCouponOrder $l)
|
||||
{
|
||||
if ($this->collCouponOrders === null) {
|
||||
$this->initCouponOrders();
|
||||
$this->collCouponOrdersPartial = true;
|
||||
}
|
||||
|
||||
if (!in_array($l, $this->collCouponOrders->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
|
||||
$this->doAddCouponOrder($l);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CouponOrder $couponOrder The couponOrder object to add.
|
||||
*/
|
||||
protected function doAddCouponOrder($couponOrder)
|
||||
{
|
||||
$this->collCouponOrders[]= $couponOrder;
|
||||
$couponOrder->setCoupon($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CouponOrder $couponOrder The couponOrder object to remove.
|
||||
* @return ChildCoupon The current object (for fluent API support)
|
||||
*/
|
||||
public function removeCouponOrder($couponOrder)
|
||||
{
|
||||
if ($this->getCouponOrders()->contains($couponOrder)) {
|
||||
$this->collCouponOrders->remove($this->collCouponOrders->search($couponOrder));
|
||||
if (null === $this->couponOrdersScheduledForDeletion) {
|
||||
$this->couponOrdersScheduledForDeletion = clone $this->collCouponOrders;
|
||||
$this->couponOrdersScheduledForDeletion->clear();
|
||||
}
|
||||
$this->couponOrdersScheduledForDeletion[]= clone $couponOrder;
|
||||
$couponOrder->setCoupon(null);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If this collection has already been initialized with
|
||||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this Coupon is new, it will return
|
||||
* an empty collection; or if this Coupon has previously
|
||||
* been saved, it will retrieve related CouponOrders from storage.
|
||||
*
|
||||
* This method is protected by default in order to keep the public
|
||||
* api reasonable. You can provide public methods for those you
|
||||
* actually need in Coupon.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param ConnectionInterface $con optional connection object
|
||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||
* @return Collection|ChildCouponOrder[] List of ChildCouponOrder objects
|
||||
*/
|
||||
public function getCouponOrdersJoinOrder($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$query = ChildCouponOrderQuery::create(null, $criteria);
|
||||
$query->joinWith('Order', $joinBehavior);
|
||||
|
||||
return $this->getCouponOrders($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears out the collCouponI18ns collection
|
||||
*
|
||||
@@ -2823,9 +2364,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
$this->id = null;
|
||||
$this->code = null;
|
||||
$this->type = null;
|
||||
$this->title = null;
|
||||
$this->short_description = null;
|
||||
$this->description = null;
|
||||
$this->amount = null;
|
||||
$this->is_used = null;
|
||||
$this->is_enabled = null;
|
||||
@@ -2858,11 +2396,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
public function clearAllReferences($deep = false)
|
||||
{
|
||||
if ($deep) {
|
||||
if ($this->collCouponOrders) {
|
||||
foreach ($this->collCouponOrders as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
}
|
||||
}
|
||||
if ($this->collCouponI18ns) {
|
||||
foreach ($this->collCouponI18ns as $o) {
|
||||
$o->clearAllReferences($deep);
|
||||
@@ -2879,10 +2412,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
$this->currentLocale = 'en_US';
|
||||
$this->currentTranslations = null;
|
||||
|
||||
if ($this->collCouponOrders instanceof Collection) {
|
||||
$this->collCouponOrders->clearIterator();
|
||||
}
|
||||
$this->collCouponOrders = null;
|
||||
if ($this->collCouponI18ns instanceof Collection) {
|
||||
$this->collCouponI18ns->clearIterator();
|
||||
}
|
||||
@@ -3016,6 +2545,78 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
return $this->getTranslation($this->getLocale(), $con);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the [title] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->getCurrentTranslation()->getTitle();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the value of [title] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CouponI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setTitle($v)
|
||||
{ $this->getCurrentTranslation()->setTitle($v);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the [short_description] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getShortDescription()
|
||||
{
|
||||
return $this->getCurrentTranslation()->getShortDescription();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the value of [short_description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CouponI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setShortDescription($v)
|
||||
{ $this->getCurrentTranslation()->setShortDescription($v);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the [description] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->getCurrentTranslation()->getDescription();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the value of [description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CouponI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setDescription($v)
|
||||
{ $this->getCurrentTranslation()->setDescription($v);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
// versionable behavior
|
||||
|
||||
/**
|
||||
@@ -3067,9 +2668,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
$version->setId($this->getId());
|
||||
$version->setCode($this->getCode());
|
||||
$version->setType($this->getType());
|
||||
$version->setTitle($this->getTitle());
|
||||
$version->setShortDescription($this->getShortDescription());
|
||||
$version->setDescription($this->getDescription());
|
||||
$version->setAmount($this->getAmount());
|
||||
$version->setIsUsed($this->getIsUsed());
|
||||
$version->setIsEnabled($this->getIsEnabled());
|
||||
@@ -3122,9 +2720,6 @@ abstract class Coupon implements ActiveRecordInterface
|
||||
$this->setId($version->getId());
|
||||
$this->setCode($version->getCode());
|
||||
$this->setType($version->getType());
|
||||
$this->setTitle($version->getTitle());
|
||||
$this->setShortDescription($version->getShortDescription());
|
||||
$this->setDescription($version->getDescription());
|
||||
$this->setAmount($version->getAmount());
|
||||
$this->setIsUsed($version->getIsUsed());
|
||||
$this->setIsEnabled($version->getIsEnabled());
|
||||
|
||||
@@ -66,6 +66,24 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
*/
|
||||
protected $locale;
|
||||
|
||||
/**
|
||||
* The value for the title field.
|
||||
* @var string
|
||||
*/
|
||||
protected $title;
|
||||
|
||||
/**
|
||||
* The value for the short_description field.
|
||||
* @var string
|
||||
*/
|
||||
protected $short_description;
|
||||
|
||||
/**
|
||||
* The value for the description field.
|
||||
* @var string
|
||||
*/
|
||||
protected $description;
|
||||
|
||||
/**
|
||||
* @var Coupon
|
||||
*/
|
||||
@@ -368,6 +386,39 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
return $this->locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [title] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [short_description] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getShortDescription()
|
||||
{
|
||||
|
||||
return $this->short_description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [description] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of [id] column.
|
||||
*
|
||||
@@ -414,6 +465,69 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setLocale()
|
||||
|
||||
/**
|
||||
* Set the value of [title] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CouponI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setTitle($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->title !== $v) {
|
||||
$this->title = $v;
|
||||
$this->modifiedColumns[] = CouponI18nTableMap::TITLE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setTitle()
|
||||
|
||||
/**
|
||||
* Set the value of [short_description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CouponI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setShortDescription($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->short_description !== $v) {
|
||||
$this->short_description = $v;
|
||||
$this->modifiedColumns[] = CouponI18nTableMap::SHORT_DESCRIPTION;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setShortDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CouponI18n The current object (for fluent API support)
|
||||
*/
|
||||
public function setDescription($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->description !== $v) {
|
||||
$this->description = $v;
|
||||
$this->modifiedColumns[] = CouponI18nTableMap::DESCRIPTION;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setDescription()
|
||||
|
||||
/**
|
||||
* Indicates whether the columns in this object are only set to default values.
|
||||
*
|
||||
@@ -460,6 +574,15 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CouponI18nTableMap::translateFieldName('Locale', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->locale = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CouponI18nTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->title = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponI18nTableMap::translateFieldName('ShortDescription', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->short_description = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponI18nTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->description = (null !== $col) ? (string) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
$this->setNew(false);
|
||||
@@ -468,7 +591,7 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 2; // 2 = CouponI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 5; // 5 = CouponI18nTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\CouponI18n object", 0, $e);
|
||||
@@ -695,6 +818,15 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CouponI18nTableMap::LOCALE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'LOCALE';
|
||||
}
|
||||
if ($this->isColumnModified(CouponI18nTableMap::TITLE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'TITLE';
|
||||
}
|
||||
if ($this->isColumnModified(CouponI18nTableMap::SHORT_DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'SHORT_DESCRIPTION';
|
||||
}
|
||||
if ($this->isColumnModified(CouponI18nTableMap::DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'DESCRIPTION';
|
||||
}
|
||||
|
||||
$sql = sprintf(
|
||||
'INSERT INTO coupon_i18n (%s) VALUES (%s)',
|
||||
@@ -712,6 +844,15 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
case 'LOCALE':
|
||||
$stmt->bindValue($identifier, $this->locale, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'TITLE':
|
||||
$stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'SHORT_DESCRIPTION':
|
||||
$stmt->bindValue($identifier, $this->short_description, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'DESCRIPTION':
|
||||
$stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$stmt->execute();
|
||||
@@ -773,6 +914,15 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
case 1:
|
||||
return $this->getLocale();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getTitle();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getShortDescription();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getDescription();
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
break;
|
||||
@@ -804,6 +954,9 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getLocale(),
|
||||
$keys[2] => $this->getTitle(),
|
||||
$keys[3] => $this->getShortDescription(),
|
||||
$keys[4] => $this->getDescription(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -855,6 +1008,15 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
case 1:
|
||||
$this->setLocale($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setTitle($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setShortDescription($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setDescription($value);
|
||||
break;
|
||||
} // switch()
|
||||
}
|
||||
|
||||
@@ -881,6 +1043,9 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setLocale($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setTitle($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setShortDescription($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setDescription($arr[$keys[4]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -894,6 +1059,9 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
|
||||
if ($this->isColumnModified(CouponI18nTableMap::ID)) $criteria->add(CouponI18nTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(CouponI18nTableMap::LOCALE)) $criteria->add(CouponI18nTableMap::LOCALE, $this->locale);
|
||||
if ($this->isColumnModified(CouponI18nTableMap::TITLE)) $criteria->add(CouponI18nTableMap::TITLE, $this->title);
|
||||
if ($this->isColumnModified(CouponI18nTableMap::SHORT_DESCRIPTION)) $criteria->add(CouponI18nTableMap::SHORT_DESCRIPTION, $this->short_description);
|
||||
if ($this->isColumnModified(CouponI18nTableMap::DESCRIPTION)) $criteria->add(CouponI18nTableMap::DESCRIPTION, $this->description);
|
||||
|
||||
return $criteria;
|
||||
}
|
||||
@@ -966,6 +1134,9 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
{
|
||||
$copyObj->setId($this->getId());
|
||||
$copyObj->setLocale($this->getLocale());
|
||||
$copyObj->setTitle($this->getTitle());
|
||||
$copyObj->setShortDescription($this->getShortDescription());
|
||||
$copyObj->setDescription($this->getDescription());
|
||||
if ($makeNew) {
|
||||
$copyObj->setNew(true);
|
||||
}
|
||||
@@ -1051,6 +1222,9 @@ abstract class CouponI18n implements ActiveRecordInterface
|
||||
{
|
||||
$this->id = null;
|
||||
$this->locale = null;
|
||||
$this->title = null;
|
||||
$this->short_description = null;
|
||||
$this->description = null;
|
||||
$this->alreadyInSave = false;
|
||||
$this->clearAllReferences();
|
||||
$this->applyDefaultValues();
|
||||
|
||||
@@ -23,9 +23,15 @@ use Thelia\Model\Map\CouponI18nTableMap;
|
||||
*
|
||||
* @method ChildCouponI18nQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildCouponI18nQuery orderByLocale($order = Criteria::ASC) Order by the locale column
|
||||
* @method ChildCouponI18nQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||
* @method ChildCouponI18nQuery orderByShortDescription($order = Criteria::ASC) Order by the short_description column
|
||||
* @method ChildCouponI18nQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||
*
|
||||
* @method ChildCouponI18nQuery groupById() Group by the id column
|
||||
* @method ChildCouponI18nQuery groupByLocale() Group by the locale column
|
||||
* @method ChildCouponI18nQuery groupByTitle() Group by the title column
|
||||
* @method ChildCouponI18nQuery groupByShortDescription() Group by the short_description column
|
||||
* @method ChildCouponI18nQuery groupByDescription() Group by the description column
|
||||
*
|
||||
* @method ChildCouponI18nQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
|
||||
* @method ChildCouponI18nQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
@@ -40,9 +46,15 @@ use Thelia\Model\Map\CouponI18nTableMap;
|
||||
*
|
||||
* @method ChildCouponI18n findOneById(int $id) Return the first ChildCouponI18n filtered by the id column
|
||||
* @method ChildCouponI18n findOneByLocale(string $locale) Return the first ChildCouponI18n filtered by the locale column
|
||||
* @method ChildCouponI18n findOneByTitle(string $title) Return the first ChildCouponI18n filtered by the title column
|
||||
* @method ChildCouponI18n findOneByShortDescription(string $short_description) Return the first ChildCouponI18n filtered by the short_description column
|
||||
* @method ChildCouponI18n findOneByDescription(string $description) Return the first ChildCouponI18n filtered by the description column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildCouponI18n objects filtered by the id column
|
||||
* @method array findByLocale(string $locale) Return ChildCouponI18n objects filtered by the locale column
|
||||
* @method array findByTitle(string $title) Return ChildCouponI18n objects filtered by the title column
|
||||
* @method array findByShortDescription(string $short_description) Return ChildCouponI18n objects filtered by the short_description column
|
||||
* @method array findByDescription(string $description) Return ChildCouponI18n objects filtered by the description column
|
||||
*
|
||||
*/
|
||||
abstract class CouponI18nQuery extends ModelCriteria
|
||||
@@ -131,7 +143,7 @@ abstract class CouponI18nQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, LOCALE FROM coupon_i18n WHERE ID = :p0 AND LOCALE = :p1';
|
||||
$sql = 'SELECT ID, LOCALE, TITLE, SHORT_DESCRIPTION, DESCRIPTION FROM coupon_i18n WHERE ID = :p0 AND LOCALE = :p1';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||
@@ -304,6 +316,93 @@ abstract class CouponI18nQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CouponI18nTableMap::LOCALE, $locale, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the title column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
|
||||
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $title The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByTitle($title = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($title)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $title)) {
|
||||
$title = str_replace('*', '%', $title);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CouponI18nTableMap::TITLE, $title, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the short_description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByShortDescription('fooValue'); // WHERE short_description = 'fooValue'
|
||||
* $query->filterByShortDescription('%fooValue%'); // WHERE short_description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $shortDescription The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByShortDescription($shortDescription = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($shortDescription)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $shortDescription)) {
|
||||
$shortDescription = str_replace('*', '%', $shortDescription);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CouponI18nTableMap::SHORT_DESCRIPTION, $shortDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
|
||||
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $description The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponI18nQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDescription($description = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($description)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $description)) {
|
||||
$description = str_replace('*', '%', $description);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CouponI18nTableMap::DESCRIPTION, $description, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Coupon object
|
||||
*
|
||||
|
||||
@@ -16,10 +16,8 @@ use Propel\Runtime\Exception\PropelException;
|
||||
use Propel\Runtime\Map\TableMap;
|
||||
use Propel\Runtime\Parser\AbstractParser;
|
||||
use Propel\Runtime\Util\PropelDateTime;
|
||||
use Thelia\Model\Coupon as ChildCoupon;
|
||||
use Thelia\Model\CouponOrder as ChildCouponOrder;
|
||||
use Thelia\Model\CouponOrderQuery as ChildCouponOrderQuery;
|
||||
use Thelia\Model\CouponQuery as ChildCouponQuery;
|
||||
use Thelia\Model\Order as ChildOrder;
|
||||
use Thelia\Model\OrderQuery as ChildOrderQuery;
|
||||
use Thelia\Model\Map\CouponOrderTableMap;
|
||||
@@ -70,12 +68,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
*/
|
||||
protected $order_id;
|
||||
|
||||
/**
|
||||
* The value for the code field.
|
||||
* @var string
|
||||
*/
|
||||
protected $code;
|
||||
|
||||
/**
|
||||
* The value for the value field.
|
||||
* @var double
|
||||
@@ -99,11 +91,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
*/
|
||||
protected $aOrder;
|
||||
|
||||
/**
|
||||
* @var Coupon
|
||||
*/
|
||||
protected $aCoupon;
|
||||
|
||||
/**
|
||||
* Flag to prevent endless save loop, if this object is referenced
|
||||
* by another object which falls in this transaction.
|
||||
@@ -388,17 +375,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
return $this->order_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [code] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCode()
|
||||
{
|
||||
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [value] column value.
|
||||
*
|
||||
@@ -496,31 +472,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setOrderId()
|
||||
|
||||
/**
|
||||
* Set the value of [code] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CouponOrder The current object (for fluent API support)
|
||||
*/
|
||||
public function setCode($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->code !== $v) {
|
||||
$this->code = $v;
|
||||
$this->modifiedColumns[] = CouponOrderTableMap::CODE;
|
||||
}
|
||||
|
||||
if ($this->aCoupon !== null && $this->aCoupon->getCode() !== $v) {
|
||||
$this->aCoupon = null;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setCode()
|
||||
|
||||
/**
|
||||
* Set the value of [value] column.
|
||||
*
|
||||
@@ -627,19 +578,16 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 1 + $startcol : CouponOrderTableMap::translateFieldName('OrderId', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->order_id = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CouponOrderTableMap::translateFieldName('Code', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->code = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponOrderTableMap::translateFieldName('Value', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CouponOrderTableMap::translateFieldName('Value', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->value = (null !== $col) ? (double) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponOrderTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponOrderTableMap::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 ? 5 + $startcol : CouponOrderTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponOrderTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
@@ -652,7 +600,7 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 6; // 6 = CouponOrderTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 5; // 5 = CouponOrderTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\CouponOrder object", 0, $e);
|
||||
@@ -677,9 +625,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
if ($this->aOrder !== null && $this->order_id !== $this->aOrder->getId()) {
|
||||
$this->aOrder = null;
|
||||
}
|
||||
if ($this->aCoupon !== null && $this->code !== $this->aCoupon->getCode()) {
|
||||
$this->aCoupon = null;
|
||||
}
|
||||
} // ensureConsistency
|
||||
|
||||
/**
|
||||
@@ -720,7 +665,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
if ($deep) { // also de-associate any related objects?
|
||||
|
||||
$this->aOrder = null;
|
||||
$this->aCoupon = null;
|
||||
} // if (deep)
|
||||
}
|
||||
|
||||
@@ -855,13 +799,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
$this->setOrder($this->aOrder);
|
||||
}
|
||||
|
||||
if ($this->aCoupon !== null) {
|
||||
if ($this->aCoupon->isModified() || $this->aCoupon->isNew()) {
|
||||
$affectedRows += $this->aCoupon->save($con);
|
||||
}
|
||||
$this->setCoupon($this->aCoupon);
|
||||
}
|
||||
|
||||
if ($this->isNew() || $this->isModified()) {
|
||||
// persist changes
|
||||
if ($this->isNew()) {
|
||||
@@ -905,9 +842,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CouponOrderTableMap::ORDER_ID)) {
|
||||
$modifiedColumns[':p' . $index++] = 'ORDER_ID';
|
||||
}
|
||||
if ($this->isColumnModified(CouponOrderTableMap::CODE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'CODE';
|
||||
}
|
||||
if ($this->isColumnModified(CouponOrderTableMap::VALUE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'VALUE';
|
||||
}
|
||||
@@ -934,9 +868,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
case 'ORDER_ID':
|
||||
$stmt->bindValue($identifier, $this->order_id, PDO::PARAM_INT);
|
||||
break;
|
||||
case 'CODE':
|
||||
$stmt->bindValue($identifier, $this->code, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'VALUE':
|
||||
$stmt->bindValue($identifier, $this->value, PDO::PARAM_STR);
|
||||
break;
|
||||
@@ -1015,15 +946,12 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
return $this->getOrderId();
|
||||
break;
|
||||
case 2:
|
||||
return $this->getCode();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getValue();
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
default:
|
||||
@@ -1057,10 +985,9 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
$result = array(
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getOrderId(),
|
||||
$keys[2] => $this->getCode(),
|
||||
$keys[3] => $this->getValue(),
|
||||
$keys[4] => $this->getCreatedAt(),
|
||||
$keys[5] => $this->getUpdatedAt(),
|
||||
$keys[2] => $this->getValue(),
|
||||
$keys[3] => $this->getCreatedAt(),
|
||||
$keys[4] => $this->getUpdatedAt(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1072,9 +999,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
if (null !== $this->aOrder) {
|
||||
$result['Order'] = $this->aOrder->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
||||
}
|
||||
if (null !== $this->aCoupon) {
|
||||
$result['Coupon'] = $this->aCoupon->toArray($keyType, $includeLazyLoadColumns, $alreadyDumpedObjects, true);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
@@ -1116,15 +1040,12 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
$this->setOrderId($value);
|
||||
break;
|
||||
case 2:
|
||||
$this->setCode($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setValue($value);
|
||||
break;
|
||||
case 4:
|
||||
case 3:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 5:
|
||||
case 4:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1153,10 +1074,9 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setOrderId($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setCode($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setValue($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setCreatedAt($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setUpdatedAt($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setValue($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setCreatedAt($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setUpdatedAt($arr[$keys[4]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1170,7 +1090,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
|
||||
if ($this->isColumnModified(CouponOrderTableMap::ID)) $criteria->add(CouponOrderTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(CouponOrderTableMap::ORDER_ID)) $criteria->add(CouponOrderTableMap::ORDER_ID, $this->order_id);
|
||||
if ($this->isColumnModified(CouponOrderTableMap::CODE)) $criteria->add(CouponOrderTableMap::CODE, $this->code);
|
||||
if ($this->isColumnModified(CouponOrderTableMap::VALUE)) $criteria->add(CouponOrderTableMap::VALUE, $this->value);
|
||||
if ($this->isColumnModified(CouponOrderTableMap::CREATED_AT)) $criteria->add(CouponOrderTableMap::CREATED_AT, $this->created_at);
|
||||
if ($this->isColumnModified(CouponOrderTableMap::UPDATED_AT)) $criteria->add(CouponOrderTableMap::UPDATED_AT, $this->updated_at);
|
||||
@@ -1238,7 +1157,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
|
||||
{
|
||||
$copyObj->setOrderId($this->getOrderId());
|
||||
$copyObj->setCode($this->getCode());
|
||||
$copyObj->setValue($this->getValue());
|
||||
$copyObj->setCreatedAt($this->getCreatedAt());
|
||||
$copyObj->setUpdatedAt($this->getUpdatedAt());
|
||||
@@ -1321,59 +1239,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
return $this->aOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Declares an association between this object and a ChildCoupon object.
|
||||
*
|
||||
* @param ChildCoupon $v
|
||||
* @return \Thelia\Model\CouponOrder The current object (for fluent API support)
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function setCoupon(ChildCoupon $v = null)
|
||||
{
|
||||
if ($v === null) {
|
||||
$this->setCode(NULL);
|
||||
} else {
|
||||
$this->setCode($v->getCode());
|
||||
}
|
||||
|
||||
$this->aCoupon = $v;
|
||||
|
||||
// Add binding for other direction of this n:n relationship.
|
||||
// If this object has already been added to the ChildCoupon object, it will not be re-added.
|
||||
if ($v !== null) {
|
||||
$v->addCouponOrder($this);
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the associated ChildCoupon object
|
||||
*
|
||||
* @param ConnectionInterface $con Optional Connection object.
|
||||
* @return ChildCoupon The associated ChildCoupon object.
|
||||
* @throws PropelException
|
||||
*/
|
||||
public function getCoupon(ConnectionInterface $con = null)
|
||||
{
|
||||
if ($this->aCoupon === null && (($this->code !== "" && $this->code !== null))) {
|
||||
$this->aCoupon = ChildCouponQuery::create()
|
||||
->filterByCouponOrder($this) // here
|
||||
->findOne($con);
|
||||
/* The following can be used additionally to
|
||||
guarantee the related object contains a reference
|
||||
to this object. This level of coupling may, however, be
|
||||
undesirable since it could result in an only partially populated collection
|
||||
in the referenced object.
|
||||
$this->aCoupon->addCouponOrders($this);
|
||||
*/
|
||||
}
|
||||
|
||||
return $this->aCoupon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the current object and sets all attributes to their default values
|
||||
*/
|
||||
@@ -1381,7 +1246,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
{
|
||||
$this->id = null;
|
||||
$this->order_id = null;
|
||||
$this->code = null;
|
||||
$this->value = null;
|
||||
$this->created_at = null;
|
||||
$this->updated_at = null;
|
||||
@@ -1407,7 +1271,6 @@ abstract class CouponOrder implements ActiveRecordInterface
|
||||
} // if ($deep)
|
||||
|
||||
$this->aOrder = null;
|
||||
$this->aCoupon = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,14 +23,12 @@ use Thelia\Model\Map\CouponOrderTableMap;
|
||||
*
|
||||
* @method ChildCouponOrderQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildCouponOrderQuery orderByOrderId($order = Criteria::ASC) Order by the order_id column
|
||||
* @method ChildCouponOrderQuery orderByCode($order = Criteria::ASC) Order by the code column
|
||||
* @method ChildCouponOrderQuery orderByValue($order = Criteria::ASC) Order by the value column
|
||||
* @method ChildCouponOrderQuery orderByCreatedAt($order = Criteria::ASC) Order by the created_at column
|
||||
* @method ChildCouponOrderQuery orderByUpdatedAt($order = Criteria::ASC) Order by the updated_at column
|
||||
*
|
||||
* @method ChildCouponOrderQuery groupById() Group by the id column
|
||||
* @method ChildCouponOrderQuery groupByOrderId() Group by the order_id column
|
||||
* @method ChildCouponOrderQuery groupByCode() Group by the code column
|
||||
* @method ChildCouponOrderQuery groupByValue() Group by the value column
|
||||
* @method ChildCouponOrderQuery groupByCreatedAt() Group by the created_at column
|
||||
* @method ChildCouponOrderQuery groupByUpdatedAt() Group by the updated_at column
|
||||
@@ -43,23 +41,17 @@ use Thelia\Model\Map\CouponOrderTableMap;
|
||||
* @method ChildCouponOrderQuery rightJoinOrder($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Order relation
|
||||
* @method ChildCouponOrderQuery innerJoinOrder($relationAlias = null) Adds a INNER JOIN clause to the query using the Order relation
|
||||
*
|
||||
* @method ChildCouponOrderQuery leftJoinCoupon($relationAlias = null) Adds a LEFT JOIN clause to the query using the Coupon relation
|
||||
* @method ChildCouponOrderQuery rightJoinCoupon($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Coupon relation
|
||||
* @method ChildCouponOrderQuery innerJoinCoupon($relationAlias = null) Adds a INNER JOIN clause to the query using the Coupon relation
|
||||
*
|
||||
* @method ChildCouponOrder findOne(ConnectionInterface $con = null) Return the first ChildCouponOrder matching the query
|
||||
* @method ChildCouponOrder findOneOrCreate(ConnectionInterface $con = null) Return the first ChildCouponOrder matching the query, or a new ChildCouponOrder object populated from the query conditions when no match is found
|
||||
*
|
||||
* @method ChildCouponOrder findOneById(int $id) Return the first ChildCouponOrder filtered by the id column
|
||||
* @method ChildCouponOrder findOneByOrderId(int $order_id) Return the first ChildCouponOrder filtered by the order_id column
|
||||
* @method ChildCouponOrder findOneByCode(string $code) Return the first ChildCouponOrder filtered by the code column
|
||||
* @method ChildCouponOrder findOneByValue(double $value) Return the first ChildCouponOrder filtered by the value column
|
||||
* @method ChildCouponOrder findOneByCreatedAt(string $created_at) Return the first ChildCouponOrder filtered by the created_at column
|
||||
* @method ChildCouponOrder findOneByUpdatedAt(string $updated_at) Return the first ChildCouponOrder filtered by the updated_at column
|
||||
*
|
||||
* @method array findById(int $id) Return ChildCouponOrder objects filtered by the id column
|
||||
* @method array findByOrderId(int $order_id) Return ChildCouponOrder objects filtered by the order_id column
|
||||
* @method array findByCode(string $code) Return ChildCouponOrder objects filtered by the code column
|
||||
* @method array findByValue(double $value) Return ChildCouponOrder objects filtered by the value column
|
||||
* @method array findByCreatedAt(string $created_at) Return ChildCouponOrder objects filtered by the created_at column
|
||||
* @method array findByUpdatedAt(string $updated_at) Return ChildCouponOrder objects filtered by the updated_at column
|
||||
@@ -151,7 +143,7 @@ abstract class CouponOrderQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, ORDER_ID, CODE, VALUE, CREATED_AT, UPDATED_AT FROM coupon_order WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, ORDER_ID, VALUE, CREATED_AT, UPDATED_AT FROM coupon_order WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -324,35 +316,6 @@ abstract class CouponOrderQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CouponOrderTableMap::ORDER_ID, $orderId, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the code column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByCode('fooValue'); // WHERE code = 'fooValue'
|
||||
* $query->filterByCode('%fooValue%'); // WHERE code LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $code The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponOrderQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCode($code = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($code)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $code)) {
|
||||
$code = str_replace('*', '%', $code);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CouponOrderTableMap::CODE, $code, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the value column
|
||||
*
|
||||
@@ -555,81 +518,6 @@ abstract class CouponOrderQuery extends ModelCriteria
|
||||
->useQuery($relationAlias ? $relationAlias : 'Order', '\Thelia\Model\OrderQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\Coupon object
|
||||
*
|
||||
* @param \Thelia\Model\Coupon|ObjectCollection $coupon The related object(s) to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponOrderQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCoupon($coupon, $comparison = null)
|
||||
{
|
||||
if ($coupon instanceof \Thelia\Model\Coupon) {
|
||||
return $this
|
||||
->addUsingAlias(CouponOrderTableMap::CODE, $coupon->getCode(), $comparison);
|
||||
} elseif ($coupon instanceof ObjectCollection) {
|
||||
if (null === $comparison) {
|
||||
$comparison = Criteria::IN;
|
||||
}
|
||||
|
||||
return $this
|
||||
->addUsingAlias(CouponOrderTableMap::CODE, $coupon->toKeyValue('PrimaryKey', 'Code'), $comparison);
|
||||
} else {
|
||||
throw new PropelException('filterByCoupon() only accepts arguments of type \Thelia\Model\Coupon or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the Coupon relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildCouponOrderQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCoupon($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('Coupon');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'Coupon');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the Coupon relation Coupon object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return \Thelia\Model\CouponQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCouponQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCoupon($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'Coupon', '\Thelia\Model\CouponQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Exclude object from result
|
||||
*
|
||||
|
||||
@@ -25,9 +25,6 @@ use Thelia\Model\Map\CouponTableMap;
|
||||
* @method ChildCouponQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildCouponQuery orderByCode($order = Criteria::ASC) Order by the code column
|
||||
* @method ChildCouponQuery orderByType($order = Criteria::ASC) Order by the type column
|
||||
* @method ChildCouponQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||
* @method ChildCouponQuery orderByShortDescription($order = Criteria::ASC) Order by the short_description column
|
||||
* @method ChildCouponQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method ChildCouponQuery orderByAmount($order = Criteria::ASC) Order by the amount column
|
||||
* @method ChildCouponQuery orderByIsUsed($order = Criteria::ASC) Order by the is_used column
|
||||
* @method ChildCouponQuery orderByIsEnabled($order = Criteria::ASC) Order by the is_enabled column
|
||||
@@ -44,9 +41,6 @@ use Thelia\Model\Map\CouponTableMap;
|
||||
* @method ChildCouponQuery groupById() Group by the id column
|
||||
* @method ChildCouponQuery groupByCode() Group by the code column
|
||||
* @method ChildCouponQuery groupByType() Group by the type column
|
||||
* @method ChildCouponQuery groupByTitle() Group by the title column
|
||||
* @method ChildCouponQuery groupByShortDescription() Group by the short_description column
|
||||
* @method ChildCouponQuery groupByDescription() Group by the description column
|
||||
* @method ChildCouponQuery groupByAmount() Group by the amount column
|
||||
* @method ChildCouponQuery groupByIsUsed() Group by the is_used column
|
||||
* @method ChildCouponQuery groupByIsEnabled() Group by the is_enabled column
|
||||
@@ -64,10 +58,6 @@ use Thelia\Model\Map\CouponTableMap;
|
||||
* @method ChildCouponQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
|
||||
* @method ChildCouponQuery innerJoin($relation) Adds a INNER JOIN clause to the query
|
||||
*
|
||||
* @method ChildCouponQuery leftJoinCouponOrder($relationAlias = null) Adds a LEFT JOIN clause to the query using the CouponOrder relation
|
||||
* @method ChildCouponQuery rightJoinCouponOrder($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CouponOrder relation
|
||||
* @method ChildCouponQuery innerJoinCouponOrder($relationAlias = null) Adds a INNER JOIN clause to the query using the CouponOrder relation
|
||||
*
|
||||
* @method ChildCouponQuery leftJoinCouponI18n($relationAlias = null) Adds a LEFT JOIN clause to the query using the CouponI18n relation
|
||||
* @method ChildCouponQuery rightJoinCouponI18n($relationAlias = null) Adds a RIGHT JOIN clause to the query using the CouponI18n relation
|
||||
* @method ChildCouponQuery innerJoinCouponI18n($relationAlias = null) Adds a INNER JOIN clause to the query using the CouponI18n relation
|
||||
@@ -82,9 +72,6 @@ use Thelia\Model\Map\CouponTableMap;
|
||||
* @method ChildCoupon findOneById(int $id) Return the first ChildCoupon filtered by the id column
|
||||
* @method ChildCoupon findOneByCode(string $code) Return the first ChildCoupon filtered by the code column
|
||||
* @method ChildCoupon findOneByType(string $type) Return the first ChildCoupon filtered by the type column
|
||||
* @method ChildCoupon findOneByTitle(string $title) Return the first ChildCoupon filtered by the title column
|
||||
* @method ChildCoupon findOneByShortDescription(string $short_description) Return the first ChildCoupon filtered by the short_description column
|
||||
* @method ChildCoupon findOneByDescription(string $description) Return the first ChildCoupon filtered by the description column
|
||||
* @method ChildCoupon findOneByAmount(double $amount) Return the first ChildCoupon filtered by the amount column
|
||||
* @method ChildCoupon findOneByIsUsed(int $is_used) Return the first ChildCoupon filtered by the is_used column
|
||||
* @method ChildCoupon findOneByIsEnabled(int $is_enabled) Return the first ChildCoupon filtered by the is_enabled column
|
||||
@@ -101,9 +88,6 @@ use Thelia\Model\Map\CouponTableMap;
|
||||
* @method array findById(int $id) Return ChildCoupon objects filtered by the id column
|
||||
* @method array findByCode(string $code) Return ChildCoupon objects filtered by the code column
|
||||
* @method array findByType(string $type) Return ChildCoupon objects filtered by the type column
|
||||
* @method array findByTitle(string $title) Return ChildCoupon objects filtered by the title column
|
||||
* @method array findByShortDescription(string $short_description) Return ChildCoupon objects filtered by the short_description column
|
||||
* @method array findByDescription(string $description) Return ChildCoupon objects filtered by the description column
|
||||
* @method array findByAmount(double $amount) Return ChildCoupon objects filtered by the amount column
|
||||
* @method array findByIsUsed(int $is_used) Return ChildCoupon objects filtered by the is_used column
|
||||
* @method array findByIsEnabled(int $is_enabled) Return ChildCoupon objects filtered by the is_enabled column
|
||||
@@ -211,7 +195,7 @@ abstract class CouponQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, CODE, TYPE, TITLE, SHORT_DESCRIPTION, DESCRIPTION, AMOUNT, IS_USED, IS_ENABLED, EXPIRATION_DATE, SERIALIZED_RULES, IS_CUMULATIVE, IS_REMOVING_POSTAGE, MAX_USAGE, IS_AVAILABLE_ON_SPECIAL_OFFERS, CREATED_AT, UPDATED_AT, VERSION FROM coupon WHERE ID = :p0';
|
||||
$sql = 'SELECT ID, CODE, TYPE, AMOUNT, IS_USED, IS_ENABLED, EXPIRATION_DATE, SERIALIZED_RULES, IS_CUMULATIVE, IS_REMOVING_POSTAGE, MAX_USAGE, IS_AVAILABLE_ON_SPECIAL_OFFERS, CREATED_AT, UPDATED_AT, VERSION FROM coupon WHERE ID = :p0';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key, PDO::PARAM_INT);
|
||||
@@ -399,93 +383,6 @@ abstract class CouponQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CouponTableMap::TYPE, $type, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the title column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
|
||||
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $title The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByTitle($title = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($title)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $title)) {
|
||||
$title = str_replace('*', '%', $title);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CouponTableMap::TITLE, $title, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the short_description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByShortDescription('fooValue'); // WHERE short_description = 'fooValue'
|
||||
* $query->filterByShortDescription('%fooValue%'); // WHERE short_description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $shortDescription The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByShortDescription($shortDescription = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($shortDescription)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $shortDescription)) {
|
||||
$shortDescription = str_replace('*', '%', $shortDescription);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CouponTableMap::SHORT_DESCRIPTION, $shortDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
|
||||
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $description The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDescription($description = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($description)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $description)) {
|
||||
$description = str_replace('*', '%', $description);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CouponTableMap::DESCRIPTION, $description, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the amount column
|
||||
*
|
||||
@@ -958,79 +855,6 @@ abstract class CouponQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CouponTableMap::VERSION, $version, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\CouponOrder object
|
||||
*
|
||||
* @param \Thelia\Model\CouponOrder|ObjectCollection $couponOrder the related object to use as filter
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByCouponOrder($couponOrder, $comparison = null)
|
||||
{
|
||||
if ($couponOrder instanceof \Thelia\Model\CouponOrder) {
|
||||
return $this
|
||||
->addUsingAlias(CouponTableMap::CODE, $couponOrder->getCode(), $comparison);
|
||||
} elseif ($couponOrder instanceof ObjectCollection) {
|
||||
return $this
|
||||
->useCouponOrderQuery()
|
||||
->filterByPrimaryKeys($couponOrder->getPrimaryKeys())
|
||||
->endUse();
|
||||
} else {
|
||||
throw new PropelException('filterByCouponOrder() only accepts arguments of type \Thelia\Model\CouponOrder or Collection');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a JOIN clause to the query using the CouponOrder relation
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return ChildCouponQuery The current query, for fluid interface
|
||||
*/
|
||||
public function joinCouponOrder($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
$tableMap = $this->getTableMap();
|
||||
$relationMap = $tableMap->getRelation('CouponOrder');
|
||||
|
||||
// create a ModelJoin object for this join
|
||||
$join = new ModelJoin();
|
||||
$join->setJoinType($joinType);
|
||||
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
|
||||
if ($previousJoin = $this->getPreviousJoin()) {
|
||||
$join->setPreviousJoin($previousJoin);
|
||||
}
|
||||
|
||||
// add the ModelJoin to the current object
|
||||
if ($relationAlias) {
|
||||
$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
|
||||
$this->addJoinObject($join, $relationAlias);
|
||||
} else {
|
||||
$this->addJoinObject($join, 'CouponOrder');
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the CouponOrder relation CouponOrder object
|
||||
*
|
||||
* @see useQuery()
|
||||
*
|
||||
* @param string $relationAlias optional alias for the relation,
|
||||
* to be used as main alias in the secondary query
|
||||
* @param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
|
||||
*
|
||||
* @return \Thelia\Model\CouponOrderQuery A secondary query class using the current class as primary query
|
||||
*/
|
||||
public function useCouponOrderQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
|
||||
{
|
||||
return $this
|
||||
->joinCouponOrder($relationAlias, $joinType)
|
||||
->useQuery($relationAlias ? $relationAlias : 'CouponOrder', '\Thelia\Model\CouponOrderQuery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query by a related \Thelia\Model\CouponI18n object
|
||||
*
|
||||
|
||||
@@ -73,24 +73,6 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
*/
|
||||
protected $type;
|
||||
|
||||
/**
|
||||
* The value for the title field.
|
||||
* @var string
|
||||
*/
|
||||
protected $title;
|
||||
|
||||
/**
|
||||
* The value for the short_description field.
|
||||
* @var string
|
||||
*/
|
||||
protected $short_description;
|
||||
|
||||
/**
|
||||
* The value for the description field.
|
||||
* @var string
|
||||
*/
|
||||
protected $description;
|
||||
|
||||
/**
|
||||
* The value for the amount field.
|
||||
* @var double
|
||||
@@ -477,39 +459,6 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [title] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [short_description] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getShortDescription()
|
||||
{
|
||||
|
||||
return $this->short_description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [description] column value.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the [amount] column value.
|
||||
*
|
||||
@@ -736,69 +685,6 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
return $this;
|
||||
} // setType()
|
||||
|
||||
/**
|
||||
* Set the value of [title] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CouponVersion The current object (for fluent API support)
|
||||
*/
|
||||
public function setTitle($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->title !== $v) {
|
||||
$this->title = $v;
|
||||
$this->modifiedColumns[] = CouponVersionTableMap::TITLE;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setTitle()
|
||||
|
||||
/**
|
||||
* Set the value of [short_description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CouponVersion The current object (for fluent API support)
|
||||
*/
|
||||
public function setShortDescription($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->short_description !== $v) {
|
||||
$this->short_description = $v;
|
||||
$this->modifiedColumns[] = CouponVersionTableMap::SHORT_DESCRIPTION;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setShortDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [description] column.
|
||||
*
|
||||
* @param string $v new value
|
||||
* @return \Thelia\Model\CouponVersion The current object (for fluent API support)
|
||||
*/
|
||||
public function setDescription($v)
|
||||
{
|
||||
if ($v !== null) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
||||
if ($this->description !== $v) {
|
||||
$this->description = $v;
|
||||
$this->modifiedColumns[] = CouponVersionTableMap::DESCRIPTION;
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
} // setDescription()
|
||||
|
||||
/**
|
||||
* Set the value of [amount] column.
|
||||
*
|
||||
@@ -1109,58 +995,49 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 2 + $startcol : CouponVersionTableMap::translateFieldName('Type', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->type = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponVersionTableMap::translateFieldName('Title', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->title = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponVersionTableMap::translateFieldName('ShortDescription', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->short_description = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CouponVersionTableMap::translateFieldName('Description', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->description = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CouponVersionTableMap::translateFieldName('Amount', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 3 + $startcol : CouponVersionTableMap::translateFieldName('Amount', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->amount = (null !== $col) ? (double) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CouponVersionTableMap::translateFieldName('IsUsed', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 4 + $startcol : CouponVersionTableMap::translateFieldName('IsUsed', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->is_used = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CouponVersionTableMap::translateFieldName('IsEnabled', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 5 + $startcol : CouponVersionTableMap::translateFieldName('IsEnabled', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->is_enabled = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CouponVersionTableMap::translateFieldName('ExpirationDate', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 6 + $startcol : CouponVersionTableMap::translateFieldName('ExpirationDate', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->expiration_date = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CouponVersionTableMap::translateFieldName('SerializedRules', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 7 + $startcol : CouponVersionTableMap::translateFieldName('SerializedRules', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->serialized_rules = (null !== $col) ? (string) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CouponVersionTableMap::translateFieldName('IsCumulative', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 8 + $startcol : CouponVersionTableMap::translateFieldName('IsCumulative', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->is_cumulative = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CouponVersionTableMap::translateFieldName('IsRemovingPostage', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 9 + $startcol : CouponVersionTableMap::translateFieldName('IsRemovingPostage', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->is_removing_postage = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CouponVersionTableMap::translateFieldName('MaxUsage', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 10 + $startcol : CouponVersionTableMap::translateFieldName('MaxUsage', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->max_usage = (null !== $col) ? (int) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CouponVersionTableMap::translateFieldName('IsAvailableOnSpecialOffers', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 11 + $startcol : CouponVersionTableMap::translateFieldName('IsAvailableOnSpecialOffers', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->is_available_on_special_offers = (null !== $col) ? (boolean) $col : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 15 + $startcol : CouponVersionTableMap::translateFieldName('CreatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 12 + $startcol : CouponVersionTableMap::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 ? 16 + $startcol : CouponVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 13 + $startcol : CouponVersionTableMap::translateFieldName('UpdatedAt', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
if ($col === '0000-00-00 00:00:00') {
|
||||
$col = null;
|
||||
}
|
||||
$this->updated_at = (null !== $col) ? PropelDateTime::newInstance($col, null, '\DateTime') : null;
|
||||
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 17 + $startcol : CouponVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$col = $row[TableMap::TYPE_NUM == $indexType ? 14 + $startcol : CouponVersionTableMap::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)];
|
||||
$this->version = (null !== $col) ? (int) $col : null;
|
||||
$this->resetModified();
|
||||
|
||||
@@ -1170,7 +1047,7 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
$this->ensureConsistency();
|
||||
}
|
||||
|
||||
return $startcol + 18; // 18 = CouponVersionTableMap::NUM_HYDRATE_COLUMNS.
|
||||
return $startcol + 15; // 15 = CouponVersionTableMap::NUM_HYDRATE_COLUMNS.
|
||||
|
||||
} catch (Exception $e) {
|
||||
throw new PropelException("Error populating \Thelia\Model\CouponVersion object", 0, $e);
|
||||
@@ -1400,15 +1277,6 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CouponVersionTableMap::TYPE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'TYPE';
|
||||
}
|
||||
if ($this->isColumnModified(CouponVersionTableMap::TITLE)) {
|
||||
$modifiedColumns[':p' . $index++] = 'TITLE';
|
||||
}
|
||||
if ($this->isColumnModified(CouponVersionTableMap::SHORT_DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'SHORT_DESCRIPTION';
|
||||
}
|
||||
if ($this->isColumnModified(CouponVersionTableMap::DESCRIPTION)) {
|
||||
$modifiedColumns[':p' . $index++] = 'DESCRIPTION';
|
||||
}
|
||||
if ($this->isColumnModified(CouponVersionTableMap::AMOUNT)) {
|
||||
$modifiedColumns[':p' . $index++] = 'AMOUNT';
|
||||
}
|
||||
@@ -1465,15 +1333,6 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
case 'TYPE':
|
||||
$stmt->bindValue($identifier, $this->type, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'TITLE':
|
||||
$stmt->bindValue($identifier, $this->title, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'SHORT_DESCRIPTION':
|
||||
$stmt->bindValue($identifier, $this->short_description, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'DESCRIPTION':
|
||||
$stmt->bindValue($identifier, $this->description, PDO::PARAM_STR);
|
||||
break;
|
||||
case 'AMOUNT':
|
||||
$stmt->bindValue($identifier, $this->amount, PDO::PARAM_STR);
|
||||
break;
|
||||
@@ -1575,48 +1434,39 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
return $this->getType();
|
||||
break;
|
||||
case 3:
|
||||
return $this->getTitle();
|
||||
break;
|
||||
case 4:
|
||||
return $this->getShortDescription();
|
||||
break;
|
||||
case 5:
|
||||
return $this->getDescription();
|
||||
break;
|
||||
case 6:
|
||||
return $this->getAmount();
|
||||
break;
|
||||
case 7:
|
||||
case 4:
|
||||
return $this->getIsUsed();
|
||||
break;
|
||||
case 8:
|
||||
case 5:
|
||||
return $this->getIsEnabled();
|
||||
break;
|
||||
case 9:
|
||||
case 6:
|
||||
return $this->getExpirationDate();
|
||||
break;
|
||||
case 10:
|
||||
case 7:
|
||||
return $this->getSerializedRules();
|
||||
break;
|
||||
case 11:
|
||||
case 8:
|
||||
return $this->getIsCumulative();
|
||||
break;
|
||||
case 12:
|
||||
case 9:
|
||||
return $this->getIsRemovingPostage();
|
||||
break;
|
||||
case 13:
|
||||
case 10:
|
||||
return $this->getMaxUsage();
|
||||
break;
|
||||
case 14:
|
||||
case 11:
|
||||
return $this->getIsAvailableOnSpecialOffers();
|
||||
break;
|
||||
case 15:
|
||||
case 12:
|
||||
return $this->getCreatedAt();
|
||||
break;
|
||||
case 16:
|
||||
case 13:
|
||||
return $this->getUpdatedAt();
|
||||
break;
|
||||
case 17:
|
||||
case 14:
|
||||
return $this->getVersion();
|
||||
break;
|
||||
default:
|
||||
@@ -1651,21 +1501,18 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
$keys[0] => $this->getId(),
|
||||
$keys[1] => $this->getCode(),
|
||||
$keys[2] => $this->getType(),
|
||||
$keys[3] => $this->getTitle(),
|
||||
$keys[4] => $this->getShortDescription(),
|
||||
$keys[5] => $this->getDescription(),
|
||||
$keys[6] => $this->getAmount(),
|
||||
$keys[7] => $this->getIsUsed(),
|
||||
$keys[8] => $this->getIsEnabled(),
|
||||
$keys[9] => $this->getExpirationDate(),
|
||||
$keys[10] => $this->getSerializedRules(),
|
||||
$keys[11] => $this->getIsCumulative(),
|
||||
$keys[12] => $this->getIsRemovingPostage(),
|
||||
$keys[13] => $this->getMaxUsage(),
|
||||
$keys[14] => $this->getIsAvailableOnSpecialOffers(),
|
||||
$keys[15] => $this->getCreatedAt(),
|
||||
$keys[16] => $this->getUpdatedAt(),
|
||||
$keys[17] => $this->getVersion(),
|
||||
$keys[3] => $this->getAmount(),
|
||||
$keys[4] => $this->getIsUsed(),
|
||||
$keys[5] => $this->getIsEnabled(),
|
||||
$keys[6] => $this->getExpirationDate(),
|
||||
$keys[7] => $this->getSerializedRules(),
|
||||
$keys[8] => $this->getIsCumulative(),
|
||||
$keys[9] => $this->getIsRemovingPostage(),
|
||||
$keys[10] => $this->getMaxUsage(),
|
||||
$keys[11] => $this->getIsAvailableOnSpecialOffers(),
|
||||
$keys[12] => $this->getCreatedAt(),
|
||||
$keys[13] => $this->getUpdatedAt(),
|
||||
$keys[14] => $this->getVersion(),
|
||||
);
|
||||
$virtualColumns = $this->virtualColumns;
|
||||
foreach($virtualColumns as $key => $virtualColumn)
|
||||
@@ -1721,48 +1568,39 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
$this->setType($value);
|
||||
break;
|
||||
case 3:
|
||||
$this->setTitle($value);
|
||||
break;
|
||||
case 4:
|
||||
$this->setShortDescription($value);
|
||||
break;
|
||||
case 5:
|
||||
$this->setDescription($value);
|
||||
break;
|
||||
case 6:
|
||||
$this->setAmount($value);
|
||||
break;
|
||||
case 7:
|
||||
case 4:
|
||||
$this->setIsUsed($value);
|
||||
break;
|
||||
case 8:
|
||||
case 5:
|
||||
$this->setIsEnabled($value);
|
||||
break;
|
||||
case 9:
|
||||
case 6:
|
||||
$this->setExpirationDate($value);
|
||||
break;
|
||||
case 10:
|
||||
case 7:
|
||||
$this->setSerializedRules($value);
|
||||
break;
|
||||
case 11:
|
||||
case 8:
|
||||
$this->setIsCumulative($value);
|
||||
break;
|
||||
case 12:
|
||||
case 9:
|
||||
$this->setIsRemovingPostage($value);
|
||||
break;
|
||||
case 13:
|
||||
case 10:
|
||||
$this->setMaxUsage($value);
|
||||
break;
|
||||
case 14:
|
||||
case 11:
|
||||
$this->setIsAvailableOnSpecialOffers($value);
|
||||
break;
|
||||
case 15:
|
||||
case 12:
|
||||
$this->setCreatedAt($value);
|
||||
break;
|
||||
case 16:
|
||||
case 13:
|
||||
$this->setUpdatedAt($value);
|
||||
break;
|
||||
case 17:
|
||||
case 14:
|
||||
$this->setVersion($value);
|
||||
break;
|
||||
} // switch()
|
||||
@@ -1792,21 +1630,18 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
|
||||
if (array_key_exists($keys[1], $arr)) $this->setCode($arr[$keys[1]]);
|
||||
if (array_key_exists($keys[2], $arr)) $this->setType($arr[$keys[2]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setTitle($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setShortDescription($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setDescription($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setAmount($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setIsUsed($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setIsEnabled($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setExpirationDate($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setSerializedRules($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setIsCumulative($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setIsRemovingPostage($arr[$keys[12]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setMaxUsage($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setIsAvailableOnSpecialOffers($arr[$keys[14]]);
|
||||
if (array_key_exists($keys[15], $arr)) $this->setCreatedAt($arr[$keys[15]]);
|
||||
if (array_key_exists($keys[16], $arr)) $this->setUpdatedAt($arr[$keys[16]]);
|
||||
if (array_key_exists($keys[17], $arr)) $this->setVersion($arr[$keys[17]]);
|
||||
if (array_key_exists($keys[3], $arr)) $this->setAmount($arr[$keys[3]]);
|
||||
if (array_key_exists($keys[4], $arr)) $this->setIsUsed($arr[$keys[4]]);
|
||||
if (array_key_exists($keys[5], $arr)) $this->setIsEnabled($arr[$keys[5]]);
|
||||
if (array_key_exists($keys[6], $arr)) $this->setExpirationDate($arr[$keys[6]]);
|
||||
if (array_key_exists($keys[7], $arr)) $this->setSerializedRules($arr[$keys[7]]);
|
||||
if (array_key_exists($keys[8], $arr)) $this->setIsCumulative($arr[$keys[8]]);
|
||||
if (array_key_exists($keys[9], $arr)) $this->setIsRemovingPostage($arr[$keys[9]]);
|
||||
if (array_key_exists($keys[10], $arr)) $this->setMaxUsage($arr[$keys[10]]);
|
||||
if (array_key_exists($keys[11], $arr)) $this->setIsAvailableOnSpecialOffers($arr[$keys[11]]);
|
||||
if (array_key_exists($keys[12], $arr)) $this->setCreatedAt($arr[$keys[12]]);
|
||||
if (array_key_exists($keys[13], $arr)) $this->setUpdatedAt($arr[$keys[13]]);
|
||||
if (array_key_exists($keys[14], $arr)) $this->setVersion($arr[$keys[14]]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1821,9 +1656,6 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
if ($this->isColumnModified(CouponVersionTableMap::ID)) $criteria->add(CouponVersionTableMap::ID, $this->id);
|
||||
if ($this->isColumnModified(CouponVersionTableMap::CODE)) $criteria->add(CouponVersionTableMap::CODE, $this->code);
|
||||
if ($this->isColumnModified(CouponVersionTableMap::TYPE)) $criteria->add(CouponVersionTableMap::TYPE, $this->type);
|
||||
if ($this->isColumnModified(CouponVersionTableMap::TITLE)) $criteria->add(CouponVersionTableMap::TITLE, $this->title);
|
||||
if ($this->isColumnModified(CouponVersionTableMap::SHORT_DESCRIPTION)) $criteria->add(CouponVersionTableMap::SHORT_DESCRIPTION, $this->short_description);
|
||||
if ($this->isColumnModified(CouponVersionTableMap::DESCRIPTION)) $criteria->add(CouponVersionTableMap::DESCRIPTION, $this->description);
|
||||
if ($this->isColumnModified(CouponVersionTableMap::AMOUNT)) $criteria->add(CouponVersionTableMap::AMOUNT, $this->amount);
|
||||
if ($this->isColumnModified(CouponVersionTableMap::IS_USED)) $criteria->add(CouponVersionTableMap::IS_USED, $this->is_used);
|
||||
if ($this->isColumnModified(CouponVersionTableMap::IS_ENABLED)) $criteria->add(CouponVersionTableMap::IS_ENABLED, $this->is_enabled);
|
||||
@@ -1909,9 +1741,6 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
$copyObj->setId($this->getId());
|
||||
$copyObj->setCode($this->getCode());
|
||||
$copyObj->setType($this->getType());
|
||||
$copyObj->setTitle($this->getTitle());
|
||||
$copyObj->setShortDescription($this->getShortDescription());
|
||||
$copyObj->setDescription($this->getDescription());
|
||||
$copyObj->setAmount($this->getAmount());
|
||||
$copyObj->setIsUsed($this->getIsUsed());
|
||||
$copyObj->setIsEnabled($this->getIsEnabled());
|
||||
@@ -2010,9 +1839,6 @@ abstract class CouponVersion implements ActiveRecordInterface
|
||||
$this->id = null;
|
||||
$this->code = null;
|
||||
$this->type = null;
|
||||
$this->title = null;
|
||||
$this->short_description = null;
|
||||
$this->description = null;
|
||||
$this->amount = null;
|
||||
$this->is_used = null;
|
||||
$this->is_enabled = null;
|
||||
|
||||
@@ -24,9 +24,6 @@ use Thelia\Model\Map\CouponVersionTableMap;
|
||||
* @method ChildCouponVersionQuery orderById($order = Criteria::ASC) Order by the id column
|
||||
* @method ChildCouponVersionQuery orderByCode($order = Criteria::ASC) Order by the code column
|
||||
* @method ChildCouponVersionQuery orderByType($order = Criteria::ASC) Order by the type column
|
||||
* @method ChildCouponVersionQuery orderByTitle($order = Criteria::ASC) Order by the title column
|
||||
* @method ChildCouponVersionQuery orderByShortDescription($order = Criteria::ASC) Order by the short_description column
|
||||
* @method ChildCouponVersionQuery orderByDescription($order = Criteria::ASC) Order by the description column
|
||||
* @method ChildCouponVersionQuery orderByAmount($order = Criteria::ASC) Order by the amount column
|
||||
* @method ChildCouponVersionQuery orderByIsUsed($order = Criteria::ASC) Order by the is_used column
|
||||
* @method ChildCouponVersionQuery orderByIsEnabled($order = Criteria::ASC) Order by the is_enabled column
|
||||
@@ -43,9 +40,6 @@ use Thelia\Model\Map\CouponVersionTableMap;
|
||||
* @method ChildCouponVersionQuery groupById() Group by the id column
|
||||
* @method ChildCouponVersionQuery groupByCode() Group by the code column
|
||||
* @method ChildCouponVersionQuery groupByType() Group by the type column
|
||||
* @method ChildCouponVersionQuery groupByTitle() Group by the title column
|
||||
* @method ChildCouponVersionQuery groupByShortDescription() Group by the short_description column
|
||||
* @method ChildCouponVersionQuery groupByDescription() Group by the description column
|
||||
* @method ChildCouponVersionQuery groupByAmount() Group by the amount column
|
||||
* @method ChildCouponVersionQuery groupByIsUsed() Group by the is_used column
|
||||
* @method ChildCouponVersionQuery groupByIsEnabled() Group by the is_enabled column
|
||||
@@ -73,9 +67,6 @@ use Thelia\Model\Map\CouponVersionTableMap;
|
||||
* @method ChildCouponVersion findOneById(int $id) Return the first ChildCouponVersion filtered by the id column
|
||||
* @method ChildCouponVersion findOneByCode(string $code) Return the first ChildCouponVersion filtered by the code column
|
||||
* @method ChildCouponVersion findOneByType(string $type) Return the first ChildCouponVersion filtered by the type column
|
||||
* @method ChildCouponVersion findOneByTitle(string $title) Return the first ChildCouponVersion filtered by the title column
|
||||
* @method ChildCouponVersion findOneByShortDescription(string $short_description) Return the first ChildCouponVersion filtered by the short_description column
|
||||
* @method ChildCouponVersion findOneByDescription(string $description) Return the first ChildCouponVersion filtered by the description column
|
||||
* @method ChildCouponVersion findOneByAmount(double $amount) Return the first ChildCouponVersion filtered by the amount column
|
||||
* @method ChildCouponVersion findOneByIsUsed(int $is_used) Return the first ChildCouponVersion filtered by the is_used column
|
||||
* @method ChildCouponVersion findOneByIsEnabled(int $is_enabled) Return the first ChildCouponVersion filtered by the is_enabled column
|
||||
@@ -92,9 +83,6 @@ use Thelia\Model\Map\CouponVersionTableMap;
|
||||
* @method array findById(int $id) Return ChildCouponVersion objects filtered by the id column
|
||||
* @method array findByCode(string $code) Return ChildCouponVersion objects filtered by the code column
|
||||
* @method array findByType(string $type) Return ChildCouponVersion objects filtered by the type column
|
||||
* @method array findByTitle(string $title) Return ChildCouponVersion objects filtered by the title column
|
||||
* @method array findByShortDescription(string $short_description) Return ChildCouponVersion objects filtered by the short_description column
|
||||
* @method array findByDescription(string $description) Return ChildCouponVersion objects filtered by the description column
|
||||
* @method array findByAmount(double $amount) Return ChildCouponVersion objects filtered by the amount column
|
||||
* @method array findByIsUsed(int $is_used) Return ChildCouponVersion objects filtered by the is_used column
|
||||
* @method array findByIsEnabled(int $is_enabled) Return ChildCouponVersion objects filtered by the is_enabled column
|
||||
@@ -195,7 +183,7 @@ abstract class CouponVersionQuery extends ModelCriteria
|
||||
*/
|
||||
protected function findPkSimple($key, $con)
|
||||
{
|
||||
$sql = 'SELECT ID, CODE, TYPE, TITLE, SHORT_DESCRIPTION, DESCRIPTION, AMOUNT, IS_USED, IS_ENABLED, EXPIRATION_DATE, SERIALIZED_RULES, IS_CUMULATIVE, IS_REMOVING_POSTAGE, MAX_USAGE, IS_AVAILABLE_ON_SPECIAL_OFFERS, CREATED_AT, UPDATED_AT, VERSION FROM coupon_version WHERE ID = :p0 AND VERSION = :p1';
|
||||
$sql = 'SELECT ID, CODE, TYPE, AMOUNT, IS_USED, IS_ENABLED, EXPIRATION_DATE, SERIALIZED_RULES, IS_CUMULATIVE, IS_REMOVING_POSTAGE, MAX_USAGE, IS_AVAILABLE_ON_SPECIAL_OFFERS, CREATED_AT, UPDATED_AT, VERSION FROM coupon_version WHERE ID = :p0 AND VERSION = :p1';
|
||||
try {
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->bindValue(':p0', $key[0], PDO::PARAM_INT);
|
||||
@@ -397,93 +385,6 @@ abstract class CouponVersionQuery extends ModelCriteria
|
||||
return $this->addUsingAlias(CouponVersionTableMap::TYPE, $type, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the title column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByTitle('fooValue'); // WHERE title = 'fooValue'
|
||||
* $query->filterByTitle('%fooValue%'); // WHERE title LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $title The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponVersionQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByTitle($title = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($title)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $title)) {
|
||||
$title = str_replace('*', '%', $title);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CouponVersionTableMap::TITLE, $title, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the short_description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByShortDescription('fooValue'); // WHERE short_description = 'fooValue'
|
||||
* $query->filterByShortDescription('%fooValue%'); // WHERE short_description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $shortDescription The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponVersionQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByShortDescription($shortDescription = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($shortDescription)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $shortDescription)) {
|
||||
$shortDescription = str_replace('*', '%', $shortDescription);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CouponVersionTableMap::SHORT_DESCRIPTION, $shortDescription, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the description column
|
||||
*
|
||||
* Example usage:
|
||||
* <code>
|
||||
* $query->filterByDescription('fooValue'); // WHERE description = 'fooValue'
|
||||
* $query->filterByDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
|
||||
* </code>
|
||||
*
|
||||
* @param string $description The value to use as filter.
|
||||
* Accepts wildcards (* and % trigger a LIKE)
|
||||
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||
*
|
||||
* @return ChildCouponVersionQuery The current query, for fluid interface
|
||||
*/
|
||||
public function filterByDescription($description = null, $comparison = null)
|
||||
{
|
||||
if (null === $comparison) {
|
||||
if (is_array($description)) {
|
||||
$comparison = Criteria::IN;
|
||||
} elseif (preg_match('/[\%\*]/', $description)) {
|
||||
$description = str_replace('*', '%', $description);
|
||||
$comparison = Criteria::LIKE;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->addUsingAlias(CouponVersionTableMap::DESCRIPTION, $description, $comparison);
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter the query on the amount column
|
||||
*
|
||||
|
||||
@@ -2842,31 +2842,6 @@ abstract class Order implements ActiveRecordInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* If this collection has already been initialized with
|
||||
* an identical criteria, it returns the collection.
|
||||
* Otherwise if this Order is new, it will return
|
||||
* an empty collection; or if this Order has previously
|
||||
* been saved, it will retrieve related CouponOrders from storage.
|
||||
*
|
||||
* This method is protected by default in order to keep the public
|
||||
* api reasonable. You can provide public methods for those you
|
||||
* actually need in Order.
|
||||
*
|
||||
* @param Criteria $criteria optional Criteria object to narrow the query
|
||||
* @param ConnectionInterface $con optional connection object
|
||||
* @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN)
|
||||
* @return Collection|ChildCouponOrder[] List of ChildCouponOrder objects
|
||||
*/
|
||||
public function getCouponOrdersJoinCoupon($criteria = null, $con = null, $joinBehavior = Criteria::LEFT_JOIN)
|
||||
{
|
||||
$query = ChildCouponOrderQuery::create(null, $criteria);
|
||||
$query->joinWith('Coupon', $joinBehavior);
|
||||
|
||||
return $this->getCouponOrders($query, $con);
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the current object and sets all attributes to their default values
|
||||
*/
|
||||
|
||||
@@ -75,9 +75,9 @@ class AddressTableMap extends TableMap
|
||||
const ID = 'address.ID';
|
||||
|
||||
/**
|
||||
* the column name for the NAME field
|
||||
* the column name for the LABEL field
|
||||
*/
|
||||
const NAME = 'address.NAME';
|
||||
const LABEL = 'address.LABEL';
|
||||
|
||||
/**
|
||||
* the column name for the CUSTOMER_ID field
|
||||
@@ -171,11 +171,11 @@ class AddressTableMap extends TableMap
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'Name', 'CustomerId', 'TitleId', 'Company', 'Firstname', 'Lastname', 'Address1', 'Address2', 'Address3', 'Zipcode', 'City', 'CountryId', 'Phone', 'Cellphone', 'IsDefault', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'name', 'customerId', 'titleId', 'company', 'firstname', 'lastname', 'address1', 'address2', 'address3', 'zipcode', 'city', 'countryId', 'phone', 'cellphone', 'isDefault', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(AddressTableMap::ID, AddressTableMap::NAME, AddressTableMap::CUSTOMER_ID, AddressTableMap::TITLE_ID, AddressTableMap::COMPANY, AddressTableMap::FIRSTNAME, AddressTableMap::LASTNAME, AddressTableMap::ADDRESS1, AddressTableMap::ADDRESS2, AddressTableMap::ADDRESS3, AddressTableMap::ZIPCODE, AddressTableMap::CITY, AddressTableMap::COUNTRY_ID, AddressTableMap::PHONE, AddressTableMap::CELLPHONE, AddressTableMap::IS_DEFAULT, AddressTableMap::CREATED_AT, AddressTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'NAME', 'CUSTOMER_ID', 'TITLE_ID', 'COMPANY', 'FIRSTNAME', 'LASTNAME', 'ADDRESS1', 'ADDRESS2', 'ADDRESS3', 'ZIPCODE', 'CITY', 'COUNTRY_ID', 'PHONE', 'CELLPHONE', 'IS_DEFAULT', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'name', 'customer_id', 'title_id', 'company', 'firstname', 'lastname', 'address1', 'address2', 'address3', 'zipcode', 'city', 'country_id', 'phone', 'cellphone', 'is_default', 'created_at', 'updated_at', ),
|
||||
self::TYPE_PHPNAME => array('Id', 'Label', 'CustomerId', 'TitleId', 'Company', 'Firstname', 'Lastname', 'Address1', 'Address2', 'Address3', 'Zipcode', 'City', 'CountryId', 'Phone', 'Cellphone', 'IsDefault', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'label', 'customerId', 'titleId', 'company', 'firstname', 'lastname', 'address1', 'address2', 'address3', 'zipcode', 'city', 'countryId', 'phone', 'cellphone', 'isDefault', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(AddressTableMap::ID, AddressTableMap::LABEL, AddressTableMap::CUSTOMER_ID, AddressTableMap::TITLE_ID, AddressTableMap::COMPANY, AddressTableMap::FIRSTNAME, AddressTableMap::LASTNAME, AddressTableMap::ADDRESS1, AddressTableMap::ADDRESS2, AddressTableMap::ADDRESS3, AddressTableMap::ZIPCODE, AddressTableMap::CITY, AddressTableMap::COUNTRY_ID, AddressTableMap::PHONE, AddressTableMap::CELLPHONE, AddressTableMap::IS_DEFAULT, AddressTableMap::CREATED_AT, AddressTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'LABEL', 'CUSTOMER_ID', 'TITLE_ID', 'COMPANY', 'FIRSTNAME', 'LASTNAME', 'ADDRESS1', 'ADDRESS2', 'ADDRESS3', 'ZIPCODE', 'CITY', 'COUNTRY_ID', 'PHONE', 'CELLPHONE', 'IS_DEFAULT', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'label', 'customer_id', 'title_id', 'company', 'firstname', 'lastname', 'address1', 'address2', 'address3', 'zipcode', 'city', 'country_id', 'phone', 'cellphone', 'is_default', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
);
|
||||
|
||||
@@ -186,11 +186,11 @@ class AddressTableMap extends TableMap
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Name' => 1, 'CustomerId' => 2, 'TitleId' => 3, 'Company' => 4, 'Firstname' => 5, 'Lastname' => 6, 'Address1' => 7, 'Address2' => 8, 'Address3' => 9, 'Zipcode' => 10, 'City' => 11, 'CountryId' => 12, 'Phone' => 13, 'Cellphone' => 14, 'IsDefault' => 15, 'CreatedAt' => 16, 'UpdatedAt' => 17, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'name' => 1, 'customerId' => 2, 'titleId' => 3, 'company' => 4, 'firstname' => 5, 'lastname' => 6, 'address1' => 7, 'address2' => 8, 'address3' => 9, 'zipcode' => 10, 'city' => 11, 'countryId' => 12, 'phone' => 13, 'cellphone' => 14, 'isDefault' => 15, 'createdAt' => 16, 'updatedAt' => 17, ),
|
||||
self::TYPE_COLNAME => array(AddressTableMap::ID => 0, AddressTableMap::NAME => 1, AddressTableMap::CUSTOMER_ID => 2, AddressTableMap::TITLE_ID => 3, AddressTableMap::COMPANY => 4, AddressTableMap::FIRSTNAME => 5, AddressTableMap::LASTNAME => 6, AddressTableMap::ADDRESS1 => 7, AddressTableMap::ADDRESS2 => 8, AddressTableMap::ADDRESS3 => 9, AddressTableMap::ZIPCODE => 10, AddressTableMap::CITY => 11, AddressTableMap::COUNTRY_ID => 12, AddressTableMap::PHONE => 13, AddressTableMap::CELLPHONE => 14, AddressTableMap::IS_DEFAULT => 15, AddressTableMap::CREATED_AT => 16, AddressTableMap::UPDATED_AT => 17, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'NAME' => 1, 'CUSTOMER_ID' => 2, 'TITLE_ID' => 3, 'COMPANY' => 4, 'FIRSTNAME' => 5, 'LASTNAME' => 6, 'ADDRESS1' => 7, 'ADDRESS2' => 8, 'ADDRESS3' => 9, 'ZIPCODE' => 10, 'CITY' => 11, 'COUNTRY_ID' => 12, 'PHONE' => 13, 'CELLPHONE' => 14, 'IS_DEFAULT' => 15, 'CREATED_AT' => 16, 'UPDATED_AT' => 17, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'name' => 1, 'customer_id' => 2, 'title_id' => 3, 'company' => 4, 'firstname' => 5, 'lastname' => 6, 'address1' => 7, 'address2' => 8, 'address3' => 9, 'zipcode' => 10, 'city' => 11, 'country_id' => 12, 'phone' => 13, 'cellphone' => 14, 'is_default' => 15, 'created_at' => 16, 'updated_at' => 17, ),
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Label' => 1, 'CustomerId' => 2, 'TitleId' => 3, 'Company' => 4, 'Firstname' => 5, 'Lastname' => 6, 'Address1' => 7, 'Address2' => 8, 'Address3' => 9, 'Zipcode' => 10, 'City' => 11, 'CountryId' => 12, 'Phone' => 13, 'Cellphone' => 14, 'IsDefault' => 15, 'CreatedAt' => 16, 'UpdatedAt' => 17, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'label' => 1, 'customerId' => 2, 'titleId' => 3, 'company' => 4, 'firstname' => 5, 'lastname' => 6, 'address1' => 7, 'address2' => 8, 'address3' => 9, 'zipcode' => 10, 'city' => 11, 'countryId' => 12, 'phone' => 13, 'cellphone' => 14, 'isDefault' => 15, 'createdAt' => 16, 'updatedAt' => 17, ),
|
||||
self::TYPE_COLNAME => array(AddressTableMap::ID => 0, AddressTableMap::LABEL => 1, AddressTableMap::CUSTOMER_ID => 2, AddressTableMap::TITLE_ID => 3, AddressTableMap::COMPANY => 4, AddressTableMap::FIRSTNAME => 5, AddressTableMap::LASTNAME => 6, AddressTableMap::ADDRESS1 => 7, AddressTableMap::ADDRESS2 => 8, AddressTableMap::ADDRESS3 => 9, AddressTableMap::ZIPCODE => 10, AddressTableMap::CITY => 11, AddressTableMap::COUNTRY_ID => 12, AddressTableMap::PHONE => 13, AddressTableMap::CELLPHONE => 14, AddressTableMap::IS_DEFAULT => 15, AddressTableMap::CREATED_AT => 16, AddressTableMap::UPDATED_AT => 17, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'LABEL' => 1, 'CUSTOMER_ID' => 2, 'TITLE_ID' => 3, 'COMPANY' => 4, 'FIRSTNAME' => 5, 'LASTNAME' => 6, 'ADDRESS1' => 7, 'ADDRESS2' => 8, 'ADDRESS3' => 9, 'ZIPCODE' => 10, 'CITY' => 11, 'COUNTRY_ID' => 12, 'PHONE' => 13, 'CELLPHONE' => 14, 'IS_DEFAULT' => 15, 'CREATED_AT' => 16, 'UPDATED_AT' => 17, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'label' => 1, 'customer_id' => 2, 'title_id' => 3, 'company' => 4, 'firstname' => 5, 'lastname' => 6, 'address1' => 7, 'address2' => 8, 'address3' => 9, 'zipcode' => 10, 'city' => 11, 'country_id' => 12, 'phone' => 13, 'cellphone' => 14, 'is_default' => 15, 'created_at' => 16, 'updated_at' => 17, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
);
|
||||
|
||||
@@ -211,7 +211,7 @@ class AddressTableMap extends TableMap
|
||||
$this->setUseIdGenerator(true);
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addColumn('NAME', 'Name', 'VARCHAR', false, 255, null);
|
||||
$this->addColumn('LABEL', 'Label', 'VARCHAR', false, 255, null);
|
||||
$this->addForeignKey('CUSTOMER_ID', 'CustomerId', 'INTEGER', 'customer', 'ID', true, null, null);
|
||||
$this->addForeignKey('TITLE_ID', 'TitleId', 'INTEGER', 'customer_title', 'ID', true, null, null);
|
||||
$this->addColumn('COMPANY', 'Company', 'VARCHAR', false, 255, null);
|
||||
@@ -394,7 +394,7 @@ class AddressTableMap extends TableMap
|
||||
{
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(AddressTableMap::ID);
|
||||
$criteria->addSelectColumn(AddressTableMap::NAME);
|
||||
$criteria->addSelectColumn(AddressTableMap::LABEL);
|
||||
$criteria->addSelectColumn(AddressTableMap::CUSTOMER_ID);
|
||||
$criteria->addSelectColumn(AddressTableMap::TITLE_ID);
|
||||
$criteria->addSelectColumn(AddressTableMap::COMPANY);
|
||||
@@ -413,7 +413,7 @@ class AddressTableMap extends TableMap
|
||||
$criteria->addSelectColumn(AddressTableMap::UPDATED_AT);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.NAME');
|
||||
$criteria->addSelectColumn($alias . '.LABEL');
|
||||
$criteria->addSelectColumn($alias . '.CUSTOMER_ID');
|
||||
$criteria->addSelectColumn($alias . '.TITLE_ID');
|
||||
$criteria->addSelectColumn($alias . '.COMPANY');
|
||||
|
||||
@@ -57,7 +57,7 @@ class CouponI18nTableMap extends TableMap
|
||||
/**
|
||||
* The total number of columns
|
||||
*/
|
||||
const NUM_COLUMNS = 2;
|
||||
const NUM_COLUMNS = 5;
|
||||
|
||||
/**
|
||||
* The number of lazy-loaded columns
|
||||
@@ -67,7 +67,7 @@ class CouponI18nTableMap extends TableMap
|
||||
/**
|
||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||
*/
|
||||
const NUM_HYDRATE_COLUMNS = 2;
|
||||
const NUM_HYDRATE_COLUMNS = 5;
|
||||
|
||||
/**
|
||||
* the column name for the ID field
|
||||
@@ -79,6 +79,21 @@ class CouponI18nTableMap extends TableMap
|
||||
*/
|
||||
const LOCALE = 'coupon_i18n.LOCALE';
|
||||
|
||||
/**
|
||||
* the column name for the TITLE field
|
||||
*/
|
||||
const TITLE = 'coupon_i18n.TITLE';
|
||||
|
||||
/**
|
||||
* the column name for the SHORT_DESCRIPTION field
|
||||
*/
|
||||
const SHORT_DESCRIPTION = 'coupon_i18n.SHORT_DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the DESCRIPTION field
|
||||
*/
|
||||
const DESCRIPTION = 'coupon_i18n.DESCRIPTION';
|
||||
|
||||
/**
|
||||
* The default string format for model objects of the related table
|
||||
*/
|
||||
@@ -91,12 +106,12 @@ class CouponI18nTableMap extends TableMap
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'Locale', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'locale', ),
|
||||
self::TYPE_COLNAME => array(CouponI18nTableMap::ID, CouponI18nTableMap::LOCALE, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'locale', ),
|
||||
self::TYPE_NUM => array(0, 1, )
|
||||
self::TYPE_PHPNAME => array('Id', 'Locale', 'Title', 'ShortDescription', 'Description', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'locale', 'title', 'shortDescription', 'description', ),
|
||||
self::TYPE_COLNAME => array(CouponI18nTableMap::ID, CouponI18nTableMap::LOCALE, CouponI18nTableMap::TITLE, CouponI18nTableMap::SHORT_DESCRIPTION, CouponI18nTableMap::DESCRIPTION, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'LOCALE', 'TITLE', 'SHORT_DESCRIPTION', 'DESCRIPTION', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'locale', 'title', 'short_description', 'description', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -106,12 +121,12 @@ class CouponI18nTableMap extends TableMap
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, ),
|
||||
self::TYPE_COLNAME => array(CouponI18nTableMap::ID => 0, CouponI18nTableMap::LOCALE => 1, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, ),
|
||||
self::TYPE_NUM => array(0, 1, )
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Locale' => 1, 'Title' => 2, 'ShortDescription' => 3, 'Description' => 4, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'shortDescription' => 3, 'description' => 4, ),
|
||||
self::TYPE_COLNAME => array(CouponI18nTableMap::ID => 0, CouponI18nTableMap::LOCALE => 1, CouponI18nTableMap::TITLE => 2, CouponI18nTableMap::SHORT_DESCRIPTION => 3, CouponI18nTableMap::DESCRIPTION => 4, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'LOCALE' => 1, 'TITLE' => 2, 'SHORT_DESCRIPTION' => 3, 'DESCRIPTION' => 4, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'locale' => 1, 'title' => 2, 'short_description' => 3, 'description' => 4, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -132,6 +147,9 @@ class CouponI18nTableMap extends TableMap
|
||||
// columns
|
||||
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'coupon', 'ID', true, null, null);
|
||||
$this->addPrimaryKey('LOCALE', 'Locale', 'VARCHAR', true, 5, 'en_US');
|
||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('SHORT_DESCRIPTION', 'ShortDescription', 'LONGVARCHAR', true, null, null);
|
||||
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', true, null, null);
|
||||
} // initialize()
|
||||
|
||||
/**
|
||||
@@ -331,9 +349,15 @@ class CouponI18nTableMap extends TableMap
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(CouponI18nTableMap::ID);
|
||||
$criteria->addSelectColumn(CouponI18nTableMap::LOCALE);
|
||||
$criteria->addSelectColumn(CouponI18nTableMap::TITLE);
|
||||
$criteria->addSelectColumn(CouponI18nTableMap::SHORT_DESCRIPTION);
|
||||
$criteria->addSelectColumn(CouponI18nTableMap::DESCRIPTION);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.LOCALE');
|
||||
$criteria->addSelectColumn($alias . '.TITLE');
|
||||
$criteria->addSelectColumn($alias . '.SHORT_DESCRIPTION');
|
||||
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ class CouponOrderTableMap extends TableMap
|
||||
/**
|
||||
* The total number of columns
|
||||
*/
|
||||
const NUM_COLUMNS = 6;
|
||||
const NUM_COLUMNS = 5;
|
||||
|
||||
/**
|
||||
* The number of lazy-loaded columns
|
||||
@@ -67,7 +67,7 @@ class CouponOrderTableMap extends TableMap
|
||||
/**
|
||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||
*/
|
||||
const NUM_HYDRATE_COLUMNS = 6;
|
||||
const NUM_HYDRATE_COLUMNS = 5;
|
||||
|
||||
/**
|
||||
* the column name for the ID field
|
||||
@@ -79,11 +79,6 @@ class CouponOrderTableMap extends TableMap
|
||||
*/
|
||||
const ORDER_ID = 'coupon_order.ORDER_ID';
|
||||
|
||||
/**
|
||||
* the column name for the CODE field
|
||||
*/
|
||||
const CODE = 'coupon_order.CODE';
|
||||
|
||||
/**
|
||||
* the column name for the VALUE field
|
||||
*/
|
||||
@@ -111,12 +106,12 @@ class CouponOrderTableMap extends TableMap
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'OrderId', 'Code', 'Value', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'orderId', 'code', 'value', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(CouponOrderTableMap::ID, CouponOrderTableMap::ORDER_ID, CouponOrderTableMap::CODE, CouponOrderTableMap::VALUE, CouponOrderTableMap::CREATED_AT, CouponOrderTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'ORDER_ID', 'CODE', 'VALUE', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'order_id', 'code', 'value', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
||||
self::TYPE_PHPNAME => array('Id', 'OrderId', 'Value', 'CreatedAt', 'UpdatedAt', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'orderId', 'value', 'createdAt', 'updatedAt', ),
|
||||
self::TYPE_COLNAME => array(CouponOrderTableMap::ID, CouponOrderTableMap::ORDER_ID, CouponOrderTableMap::VALUE, CouponOrderTableMap::CREATED_AT, CouponOrderTableMap::UPDATED_AT, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'ORDER_ID', 'VALUE', 'CREATED_AT', 'UPDATED_AT', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'order_id', 'value', 'created_at', 'updated_at', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -126,12 +121,12 @@ class CouponOrderTableMap extends TableMap
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'OrderId' => 1, 'Code' => 2, 'Value' => 3, 'CreatedAt' => 4, 'UpdatedAt' => 5, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'orderId' => 1, 'code' => 2, 'value' => 3, 'createdAt' => 4, 'updatedAt' => 5, ),
|
||||
self::TYPE_COLNAME => array(CouponOrderTableMap::ID => 0, CouponOrderTableMap::ORDER_ID => 1, CouponOrderTableMap::CODE => 2, CouponOrderTableMap::VALUE => 3, CouponOrderTableMap::CREATED_AT => 4, CouponOrderTableMap::UPDATED_AT => 5, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'ORDER_ID' => 1, 'CODE' => 2, 'VALUE' => 3, 'CREATED_AT' => 4, 'UPDATED_AT' => 5, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'order_id' => 1, 'code' => 2, 'value' => 3, 'created_at' => 4, 'updated_at' => 5, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, )
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'OrderId' => 1, 'Value' => 2, 'CreatedAt' => 3, 'UpdatedAt' => 4, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'orderId' => 1, 'value' => 2, 'createdAt' => 3, 'updatedAt' => 4, ),
|
||||
self::TYPE_COLNAME => array(CouponOrderTableMap::ID => 0, CouponOrderTableMap::ORDER_ID => 1, CouponOrderTableMap::VALUE => 2, CouponOrderTableMap::CREATED_AT => 3, CouponOrderTableMap::UPDATED_AT => 4, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'ORDER_ID' => 1, 'VALUE' => 2, 'CREATED_AT' => 3, 'UPDATED_AT' => 4, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'order_id' => 1, 'value' => 2, 'created_at' => 3, 'updated_at' => 4, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -152,7 +147,6 @@ class CouponOrderTableMap extends TableMap
|
||||
// columns
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addForeignKey('ORDER_ID', 'OrderId', 'INTEGER', 'order', 'ID', true, null, null);
|
||||
$this->addForeignKey('CODE', 'Code', 'VARCHAR', 'coupon', 'CODE', true, 45, null);
|
||||
$this->addColumn('VALUE', 'Value', 'FLOAT', true, null, null);
|
||||
$this->addColumn('CREATED_AT', 'CreatedAt', 'TIMESTAMP', false, null, null);
|
||||
$this->addColumn('UPDATED_AT', 'UpdatedAt', 'TIMESTAMP', false, null, null);
|
||||
@@ -164,7 +158,6 @@ class CouponOrderTableMap extends TableMap
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('Order', '\\Thelia\\Model\\Order', RelationMap::MANY_TO_ONE, array('order_id' => 'id', ), 'CASCADE', 'RESTRICT');
|
||||
$this->addRelation('Coupon', '\\Thelia\\Model\\Coupon', RelationMap::MANY_TO_ONE, array('code' => 'code', ), null, null);
|
||||
} // buildRelations()
|
||||
|
||||
/**
|
||||
@@ -320,14 +313,12 @@ class CouponOrderTableMap extends TableMap
|
||||
if (null === $alias) {
|
||||
$criteria->addSelectColumn(CouponOrderTableMap::ID);
|
||||
$criteria->addSelectColumn(CouponOrderTableMap::ORDER_ID);
|
||||
$criteria->addSelectColumn(CouponOrderTableMap::CODE);
|
||||
$criteria->addSelectColumn(CouponOrderTableMap::VALUE);
|
||||
$criteria->addSelectColumn(CouponOrderTableMap::CREATED_AT);
|
||||
$criteria->addSelectColumn(CouponOrderTableMap::UPDATED_AT);
|
||||
} else {
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.ORDER_ID');
|
||||
$criteria->addSelectColumn($alias . '.CODE');
|
||||
$criteria->addSelectColumn($alias . '.VALUE');
|
||||
$criteria->addSelectColumn($alias . '.CREATED_AT');
|
||||
$criteria->addSelectColumn($alias . '.UPDATED_AT');
|
||||
|
||||
@@ -57,7 +57,7 @@ class CouponTableMap extends TableMap
|
||||
/**
|
||||
* The total number of columns
|
||||
*/
|
||||
const NUM_COLUMNS = 18;
|
||||
const NUM_COLUMNS = 15;
|
||||
|
||||
/**
|
||||
* The number of lazy-loaded columns
|
||||
@@ -67,7 +67,7 @@ class CouponTableMap extends TableMap
|
||||
/**
|
||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||
*/
|
||||
const NUM_HYDRATE_COLUMNS = 18;
|
||||
const NUM_HYDRATE_COLUMNS = 15;
|
||||
|
||||
/**
|
||||
* the column name for the ID field
|
||||
@@ -84,21 +84,6 @@ class CouponTableMap extends TableMap
|
||||
*/
|
||||
const TYPE = 'coupon.TYPE';
|
||||
|
||||
/**
|
||||
* the column name for the TITLE field
|
||||
*/
|
||||
const TITLE = 'coupon.TITLE';
|
||||
|
||||
/**
|
||||
* the column name for the SHORT_DESCRIPTION field
|
||||
*/
|
||||
const SHORT_DESCRIPTION = 'coupon.SHORT_DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the DESCRIPTION field
|
||||
*/
|
||||
const DESCRIPTION = 'coupon.DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the AMOUNT field
|
||||
*/
|
||||
@@ -180,12 +165,12 @@ class CouponTableMap extends TableMap
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'Code', 'Type', 'Title', 'ShortDescription', 'Description', 'Amount', 'IsUsed', 'IsEnabled', 'ExpirationDate', 'SerializedRules', 'IsCumulative', 'IsRemovingPostage', 'MaxUsage', 'IsAvailableOnSpecialOffers', 'CreatedAt', 'UpdatedAt', 'Version', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'code', 'type', 'title', 'shortDescription', 'description', 'amount', 'isUsed', 'isEnabled', 'expirationDate', 'serializedRules', 'isCumulative', 'isRemovingPostage', 'maxUsage', 'isAvailableOnSpecialOffers', 'createdAt', 'updatedAt', 'version', ),
|
||||
self::TYPE_COLNAME => array(CouponTableMap::ID, CouponTableMap::CODE, CouponTableMap::TYPE, CouponTableMap::TITLE, CouponTableMap::SHORT_DESCRIPTION, CouponTableMap::DESCRIPTION, CouponTableMap::AMOUNT, CouponTableMap::IS_USED, CouponTableMap::IS_ENABLED, CouponTableMap::EXPIRATION_DATE, CouponTableMap::SERIALIZED_RULES, CouponTableMap::IS_CUMULATIVE, CouponTableMap::IS_REMOVING_POSTAGE, CouponTableMap::MAX_USAGE, CouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS, CouponTableMap::CREATED_AT, CouponTableMap::UPDATED_AT, CouponTableMap::VERSION, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'TYPE', 'TITLE', 'SHORT_DESCRIPTION', 'DESCRIPTION', 'AMOUNT', 'IS_USED', 'IS_ENABLED', 'EXPIRATION_DATE', 'SERIALIZED_RULES', 'IS_CUMULATIVE', 'IS_REMOVING_POSTAGE', 'MAX_USAGE', 'IS_AVAILABLE_ON_SPECIAL_OFFERS', 'CREATED_AT', 'UPDATED_AT', 'VERSION', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'code', 'type', 'title', 'short_description', 'description', 'amount', 'is_used', 'is_enabled', 'expiration_date', 'serialized_rules', 'is_cumulative', 'is_removing_postage', 'max_usage', 'is_available_on_special_offers', 'created_at', 'updated_at', 'version', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
self::TYPE_PHPNAME => array('Id', 'Code', 'Type', 'Amount', 'IsUsed', 'IsEnabled', 'ExpirationDate', 'SerializedRules', 'IsCumulative', 'IsRemovingPostage', 'MaxUsage', 'IsAvailableOnSpecialOffers', 'CreatedAt', 'UpdatedAt', 'Version', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'code', 'type', 'amount', 'isUsed', 'isEnabled', 'expirationDate', 'serializedRules', 'isCumulative', 'isRemovingPostage', 'maxUsage', 'isAvailableOnSpecialOffers', 'createdAt', 'updatedAt', 'version', ),
|
||||
self::TYPE_COLNAME => array(CouponTableMap::ID, CouponTableMap::CODE, CouponTableMap::TYPE, CouponTableMap::AMOUNT, CouponTableMap::IS_USED, CouponTableMap::IS_ENABLED, CouponTableMap::EXPIRATION_DATE, CouponTableMap::SERIALIZED_RULES, CouponTableMap::IS_CUMULATIVE, CouponTableMap::IS_REMOVING_POSTAGE, CouponTableMap::MAX_USAGE, CouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS, CouponTableMap::CREATED_AT, CouponTableMap::UPDATED_AT, CouponTableMap::VERSION, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'TYPE', 'AMOUNT', 'IS_USED', 'IS_ENABLED', 'EXPIRATION_DATE', 'SERIALIZED_RULES', 'IS_CUMULATIVE', 'IS_REMOVING_POSTAGE', 'MAX_USAGE', 'IS_AVAILABLE_ON_SPECIAL_OFFERS', 'CREATED_AT', 'UPDATED_AT', 'VERSION', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'code', 'type', 'amount', 'is_used', 'is_enabled', 'expiration_date', 'serialized_rules', 'is_cumulative', 'is_removing_postage', 'max_usage', 'is_available_on_special_offers', 'created_at', 'updated_at', 'version', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -195,12 +180,12 @@ class CouponTableMap extends TableMap
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Type' => 2, 'Title' => 3, 'ShortDescription' => 4, 'Description' => 5, 'Amount' => 6, 'IsUsed' => 7, 'IsEnabled' => 8, 'ExpirationDate' => 9, 'SerializedRules' => 10, 'IsCumulative' => 11, 'IsRemovingPostage' => 12, 'MaxUsage' => 13, 'IsAvailableOnSpecialOffers' => 14, 'CreatedAt' => 15, 'UpdatedAt' => 16, 'Version' => 17, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'title' => 3, 'shortDescription' => 4, 'description' => 5, 'amount' => 6, 'isUsed' => 7, 'isEnabled' => 8, 'expirationDate' => 9, 'serializedRules' => 10, 'isCumulative' => 11, 'isRemovingPostage' => 12, 'maxUsage' => 13, 'isAvailableOnSpecialOffers' => 14, 'createdAt' => 15, 'updatedAt' => 16, 'version' => 17, ),
|
||||
self::TYPE_COLNAME => array(CouponTableMap::ID => 0, CouponTableMap::CODE => 1, CouponTableMap::TYPE => 2, CouponTableMap::TITLE => 3, CouponTableMap::SHORT_DESCRIPTION => 4, CouponTableMap::DESCRIPTION => 5, CouponTableMap::AMOUNT => 6, CouponTableMap::IS_USED => 7, CouponTableMap::IS_ENABLED => 8, CouponTableMap::EXPIRATION_DATE => 9, CouponTableMap::SERIALIZED_RULES => 10, CouponTableMap::IS_CUMULATIVE => 11, CouponTableMap::IS_REMOVING_POSTAGE => 12, CouponTableMap::MAX_USAGE => 13, CouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS => 14, CouponTableMap::CREATED_AT => 15, CouponTableMap::UPDATED_AT => 16, CouponTableMap::VERSION => 17, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'TYPE' => 2, 'TITLE' => 3, 'SHORT_DESCRIPTION' => 4, 'DESCRIPTION' => 5, 'AMOUNT' => 6, 'IS_USED' => 7, 'IS_ENABLED' => 8, 'EXPIRATION_DATE' => 9, 'SERIALIZED_RULES' => 10, 'IS_CUMULATIVE' => 11, 'IS_REMOVING_POSTAGE' => 12, 'MAX_USAGE' => 13, 'IS_AVAILABLE_ON_SPECIAL_OFFERS' => 14, 'CREATED_AT' => 15, 'UPDATED_AT' => 16, 'VERSION' => 17, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'title' => 3, 'short_description' => 4, 'description' => 5, 'amount' => 6, 'is_used' => 7, 'is_enabled' => 8, 'expiration_date' => 9, 'serialized_rules' => 10, 'is_cumulative' => 11, 'is_removing_postage' => 12, 'max_usage' => 13, 'is_available_on_special_offers' => 14, 'created_at' => 15, 'updated_at' => 16, 'version' => 17, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Type' => 2, 'Amount' => 3, 'IsUsed' => 4, 'IsEnabled' => 5, 'ExpirationDate' => 6, 'SerializedRules' => 7, 'IsCumulative' => 8, 'IsRemovingPostage' => 9, 'MaxUsage' => 10, 'IsAvailableOnSpecialOffers' => 11, 'CreatedAt' => 12, 'UpdatedAt' => 13, 'Version' => 14, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'amount' => 3, 'isUsed' => 4, 'isEnabled' => 5, 'expirationDate' => 6, 'serializedRules' => 7, 'isCumulative' => 8, 'isRemovingPostage' => 9, 'maxUsage' => 10, 'isAvailableOnSpecialOffers' => 11, 'createdAt' => 12, 'updatedAt' => 13, 'version' => 14, ),
|
||||
self::TYPE_COLNAME => array(CouponTableMap::ID => 0, CouponTableMap::CODE => 1, CouponTableMap::TYPE => 2, CouponTableMap::AMOUNT => 3, CouponTableMap::IS_USED => 4, CouponTableMap::IS_ENABLED => 5, CouponTableMap::EXPIRATION_DATE => 6, CouponTableMap::SERIALIZED_RULES => 7, CouponTableMap::IS_CUMULATIVE => 8, CouponTableMap::IS_REMOVING_POSTAGE => 9, CouponTableMap::MAX_USAGE => 10, CouponTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS => 11, CouponTableMap::CREATED_AT => 12, CouponTableMap::UPDATED_AT => 13, CouponTableMap::VERSION => 14, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'TYPE' => 2, 'AMOUNT' => 3, 'IS_USED' => 4, 'IS_ENABLED' => 5, 'EXPIRATION_DATE' => 6, 'SERIALIZED_RULES' => 7, 'IS_CUMULATIVE' => 8, 'IS_REMOVING_POSTAGE' => 9, 'MAX_USAGE' => 10, 'IS_AVAILABLE_ON_SPECIAL_OFFERS' => 11, 'CREATED_AT' => 12, 'UPDATED_AT' => 13, 'VERSION' => 14, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'amount' => 3, 'is_used' => 4, 'is_enabled' => 5, 'expiration_date' => 6, 'serialized_rules' => 7, 'is_cumulative' => 8, 'is_removing_postage' => 9, 'max_usage' => 10, 'is_available_on_special_offers' => 11, 'created_at' => 12, 'updated_at' => 13, 'version' => 14, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -222,9 +207,6 @@ class CouponTableMap extends TableMap
|
||||
$this->addPrimaryKey('ID', 'Id', 'INTEGER', true, null, null);
|
||||
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
|
||||
$this->addColumn('TYPE', 'Type', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('SHORT_DESCRIPTION', 'ShortDescription', 'LONGVARCHAR', true, null, null);
|
||||
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', true, null, null);
|
||||
$this->addColumn('AMOUNT', 'Amount', 'FLOAT', true, null, null);
|
||||
$this->addColumn('IS_USED', 'IsUsed', 'TINYINT', true, null, null);
|
||||
$this->addColumn('IS_ENABLED', 'IsEnabled', 'TINYINT', true, null, null);
|
||||
@@ -244,7 +226,6 @@ class CouponTableMap extends TableMap
|
||||
*/
|
||||
public function buildRelations()
|
||||
{
|
||||
$this->addRelation('CouponOrder', '\\Thelia\\Model\\CouponOrder', RelationMap::ONE_TO_MANY, array('code' => 'code', ), null, null, 'CouponOrders');
|
||||
$this->addRelation('CouponI18n', '\\Thelia\\Model\\CouponI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'CouponI18ns');
|
||||
$this->addRelation('CouponVersion', '\\Thelia\\Model\\CouponVersion', RelationMap::ONE_TO_MANY, array('id' => 'id', ), 'CASCADE', null, 'CouponVersions');
|
||||
} // buildRelations()
|
||||
@@ -259,7 +240,7 @@ class CouponTableMap extends TableMap
|
||||
{
|
||||
return array(
|
||||
'timestampable' => array('create_column' => 'created_at', 'update_column' => 'updated_at', ),
|
||||
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => '', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
||||
'i18n' => array('i18n_table' => '%TABLE%_i18n', 'i18n_phpname' => '%PHPNAME%I18n', 'i18n_columns' => 'title, short_description, description', 'locale_column' => 'locale', 'locale_length' => '5', 'default_locale' => '', 'locale_alias' => '', ),
|
||||
'versionable' => array('version_column' => 'version', 'version_table' => '', 'log_created_at' => 'false', 'log_created_by' => 'false', 'log_comment' => 'false', 'version_created_at_column' => 'version_created_at', 'version_created_by_column' => 'version_created_by', 'version_comment_column' => 'version_comment', ),
|
||||
);
|
||||
} // getBehaviors()
|
||||
@@ -415,9 +396,6 @@ class CouponTableMap extends TableMap
|
||||
$criteria->addSelectColumn(CouponTableMap::ID);
|
||||
$criteria->addSelectColumn(CouponTableMap::CODE);
|
||||
$criteria->addSelectColumn(CouponTableMap::TYPE);
|
||||
$criteria->addSelectColumn(CouponTableMap::TITLE);
|
||||
$criteria->addSelectColumn(CouponTableMap::SHORT_DESCRIPTION);
|
||||
$criteria->addSelectColumn(CouponTableMap::DESCRIPTION);
|
||||
$criteria->addSelectColumn(CouponTableMap::AMOUNT);
|
||||
$criteria->addSelectColumn(CouponTableMap::IS_USED);
|
||||
$criteria->addSelectColumn(CouponTableMap::IS_ENABLED);
|
||||
@@ -434,9 +412,6 @@ class CouponTableMap extends TableMap
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.CODE');
|
||||
$criteria->addSelectColumn($alias . '.TYPE');
|
||||
$criteria->addSelectColumn($alias . '.TITLE');
|
||||
$criteria->addSelectColumn($alias . '.SHORT_DESCRIPTION');
|
||||
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
||||
$criteria->addSelectColumn($alias . '.AMOUNT');
|
||||
$criteria->addSelectColumn($alias . '.IS_USED');
|
||||
$criteria->addSelectColumn($alias . '.IS_ENABLED');
|
||||
|
||||
@@ -57,7 +57,7 @@ class CouponVersionTableMap extends TableMap
|
||||
/**
|
||||
* The total number of columns
|
||||
*/
|
||||
const NUM_COLUMNS = 18;
|
||||
const NUM_COLUMNS = 15;
|
||||
|
||||
/**
|
||||
* The number of lazy-loaded columns
|
||||
@@ -67,7 +67,7 @@ class CouponVersionTableMap extends TableMap
|
||||
/**
|
||||
* The number of columns to hydrate (NUM_COLUMNS - NUM_LAZY_LOAD_COLUMNS)
|
||||
*/
|
||||
const NUM_HYDRATE_COLUMNS = 18;
|
||||
const NUM_HYDRATE_COLUMNS = 15;
|
||||
|
||||
/**
|
||||
* the column name for the ID field
|
||||
@@ -84,21 +84,6 @@ class CouponVersionTableMap extends TableMap
|
||||
*/
|
||||
const TYPE = 'coupon_version.TYPE';
|
||||
|
||||
/**
|
||||
* the column name for the TITLE field
|
||||
*/
|
||||
const TITLE = 'coupon_version.TITLE';
|
||||
|
||||
/**
|
||||
* the column name for the SHORT_DESCRIPTION field
|
||||
*/
|
||||
const SHORT_DESCRIPTION = 'coupon_version.SHORT_DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the DESCRIPTION field
|
||||
*/
|
||||
const DESCRIPTION = 'coupon_version.DESCRIPTION';
|
||||
|
||||
/**
|
||||
* the column name for the AMOUNT field
|
||||
*/
|
||||
@@ -171,12 +156,12 @@ class CouponVersionTableMap extends TableMap
|
||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||
*/
|
||||
protected static $fieldNames = array (
|
||||
self::TYPE_PHPNAME => array('Id', 'Code', 'Type', 'Title', 'ShortDescription', 'Description', 'Amount', 'IsUsed', 'IsEnabled', 'ExpirationDate', 'SerializedRules', 'IsCumulative', 'IsRemovingPostage', 'MaxUsage', 'IsAvailableOnSpecialOffers', 'CreatedAt', 'UpdatedAt', 'Version', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'code', 'type', 'title', 'shortDescription', 'description', 'amount', 'isUsed', 'isEnabled', 'expirationDate', 'serializedRules', 'isCumulative', 'isRemovingPostage', 'maxUsage', 'isAvailableOnSpecialOffers', 'createdAt', 'updatedAt', 'version', ),
|
||||
self::TYPE_COLNAME => array(CouponVersionTableMap::ID, CouponVersionTableMap::CODE, CouponVersionTableMap::TYPE, CouponVersionTableMap::TITLE, CouponVersionTableMap::SHORT_DESCRIPTION, CouponVersionTableMap::DESCRIPTION, CouponVersionTableMap::AMOUNT, CouponVersionTableMap::IS_USED, CouponVersionTableMap::IS_ENABLED, CouponVersionTableMap::EXPIRATION_DATE, CouponVersionTableMap::SERIALIZED_RULES, CouponVersionTableMap::IS_CUMULATIVE, CouponVersionTableMap::IS_REMOVING_POSTAGE, CouponVersionTableMap::MAX_USAGE, CouponVersionTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS, CouponVersionTableMap::CREATED_AT, CouponVersionTableMap::UPDATED_AT, CouponVersionTableMap::VERSION, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'TYPE', 'TITLE', 'SHORT_DESCRIPTION', 'DESCRIPTION', 'AMOUNT', 'IS_USED', 'IS_ENABLED', 'EXPIRATION_DATE', 'SERIALIZED_RULES', 'IS_CUMULATIVE', 'IS_REMOVING_POSTAGE', 'MAX_USAGE', 'IS_AVAILABLE_ON_SPECIAL_OFFERS', 'CREATED_AT', 'UPDATED_AT', 'VERSION', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'code', 'type', 'title', 'short_description', 'description', 'amount', 'is_used', 'is_enabled', 'expiration_date', 'serialized_rules', 'is_cumulative', 'is_removing_postage', 'max_usage', 'is_available_on_special_offers', 'created_at', 'updated_at', 'version', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
self::TYPE_PHPNAME => array('Id', 'Code', 'Type', 'Amount', 'IsUsed', 'IsEnabled', 'ExpirationDate', 'SerializedRules', 'IsCumulative', 'IsRemovingPostage', 'MaxUsage', 'IsAvailableOnSpecialOffers', 'CreatedAt', 'UpdatedAt', 'Version', ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id', 'code', 'type', 'amount', 'isUsed', 'isEnabled', 'expirationDate', 'serializedRules', 'isCumulative', 'isRemovingPostage', 'maxUsage', 'isAvailableOnSpecialOffers', 'createdAt', 'updatedAt', 'version', ),
|
||||
self::TYPE_COLNAME => array(CouponVersionTableMap::ID, CouponVersionTableMap::CODE, CouponVersionTableMap::TYPE, CouponVersionTableMap::AMOUNT, CouponVersionTableMap::IS_USED, CouponVersionTableMap::IS_ENABLED, CouponVersionTableMap::EXPIRATION_DATE, CouponVersionTableMap::SERIALIZED_RULES, CouponVersionTableMap::IS_CUMULATIVE, CouponVersionTableMap::IS_REMOVING_POSTAGE, CouponVersionTableMap::MAX_USAGE, CouponVersionTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS, CouponVersionTableMap::CREATED_AT, CouponVersionTableMap::UPDATED_AT, CouponVersionTableMap::VERSION, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID', 'CODE', 'TYPE', 'AMOUNT', 'IS_USED', 'IS_ENABLED', 'EXPIRATION_DATE', 'SERIALIZED_RULES', 'IS_CUMULATIVE', 'IS_REMOVING_POSTAGE', 'MAX_USAGE', 'IS_AVAILABLE_ON_SPECIAL_OFFERS', 'CREATED_AT', 'UPDATED_AT', 'VERSION', ),
|
||||
self::TYPE_FIELDNAME => array('id', 'code', 'type', 'amount', 'is_used', 'is_enabled', 'expiration_date', 'serialized_rules', 'is_cumulative', 'is_removing_postage', 'max_usage', 'is_available_on_special_offers', 'created_at', 'updated_at', 'version', ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -186,12 +171,12 @@ class CouponVersionTableMap extends TableMap
|
||||
* e.g. self::$fieldKeys[self::TYPE_PHPNAME]['Id'] = 0
|
||||
*/
|
||||
protected static $fieldKeys = array (
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Type' => 2, 'Title' => 3, 'ShortDescription' => 4, 'Description' => 5, 'Amount' => 6, 'IsUsed' => 7, 'IsEnabled' => 8, 'ExpirationDate' => 9, 'SerializedRules' => 10, 'IsCumulative' => 11, 'IsRemovingPostage' => 12, 'MaxUsage' => 13, 'IsAvailableOnSpecialOffers' => 14, 'CreatedAt' => 15, 'UpdatedAt' => 16, 'Version' => 17, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'title' => 3, 'shortDescription' => 4, 'description' => 5, 'amount' => 6, 'isUsed' => 7, 'isEnabled' => 8, 'expirationDate' => 9, 'serializedRules' => 10, 'isCumulative' => 11, 'isRemovingPostage' => 12, 'maxUsage' => 13, 'isAvailableOnSpecialOffers' => 14, 'createdAt' => 15, 'updatedAt' => 16, 'version' => 17, ),
|
||||
self::TYPE_COLNAME => array(CouponVersionTableMap::ID => 0, CouponVersionTableMap::CODE => 1, CouponVersionTableMap::TYPE => 2, CouponVersionTableMap::TITLE => 3, CouponVersionTableMap::SHORT_DESCRIPTION => 4, CouponVersionTableMap::DESCRIPTION => 5, CouponVersionTableMap::AMOUNT => 6, CouponVersionTableMap::IS_USED => 7, CouponVersionTableMap::IS_ENABLED => 8, CouponVersionTableMap::EXPIRATION_DATE => 9, CouponVersionTableMap::SERIALIZED_RULES => 10, CouponVersionTableMap::IS_CUMULATIVE => 11, CouponVersionTableMap::IS_REMOVING_POSTAGE => 12, CouponVersionTableMap::MAX_USAGE => 13, CouponVersionTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS => 14, CouponVersionTableMap::CREATED_AT => 15, CouponVersionTableMap::UPDATED_AT => 16, CouponVersionTableMap::VERSION => 17, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'TYPE' => 2, 'TITLE' => 3, 'SHORT_DESCRIPTION' => 4, 'DESCRIPTION' => 5, 'AMOUNT' => 6, 'IS_USED' => 7, 'IS_ENABLED' => 8, 'EXPIRATION_DATE' => 9, 'SERIALIZED_RULES' => 10, 'IS_CUMULATIVE' => 11, 'IS_REMOVING_POSTAGE' => 12, 'MAX_USAGE' => 13, 'IS_AVAILABLE_ON_SPECIAL_OFFERS' => 14, 'CREATED_AT' => 15, 'UPDATED_AT' => 16, 'VERSION' => 17, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'title' => 3, 'short_description' => 4, 'description' => 5, 'amount' => 6, 'is_used' => 7, 'is_enabled' => 8, 'expiration_date' => 9, 'serialized_rules' => 10, 'is_cumulative' => 11, 'is_removing_postage' => 12, 'max_usage' => 13, 'is_available_on_special_offers' => 14, 'created_at' => 15, 'updated_at' => 16, 'version' => 17, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, )
|
||||
self::TYPE_PHPNAME => array('Id' => 0, 'Code' => 1, 'Type' => 2, 'Amount' => 3, 'IsUsed' => 4, 'IsEnabled' => 5, 'ExpirationDate' => 6, 'SerializedRules' => 7, 'IsCumulative' => 8, 'IsRemovingPostage' => 9, 'MaxUsage' => 10, 'IsAvailableOnSpecialOffers' => 11, 'CreatedAt' => 12, 'UpdatedAt' => 13, 'Version' => 14, ),
|
||||
self::TYPE_STUDLYPHPNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'amount' => 3, 'isUsed' => 4, 'isEnabled' => 5, 'expirationDate' => 6, 'serializedRules' => 7, 'isCumulative' => 8, 'isRemovingPostage' => 9, 'maxUsage' => 10, 'isAvailableOnSpecialOffers' => 11, 'createdAt' => 12, 'updatedAt' => 13, 'version' => 14, ),
|
||||
self::TYPE_COLNAME => array(CouponVersionTableMap::ID => 0, CouponVersionTableMap::CODE => 1, CouponVersionTableMap::TYPE => 2, CouponVersionTableMap::AMOUNT => 3, CouponVersionTableMap::IS_USED => 4, CouponVersionTableMap::IS_ENABLED => 5, CouponVersionTableMap::EXPIRATION_DATE => 6, CouponVersionTableMap::SERIALIZED_RULES => 7, CouponVersionTableMap::IS_CUMULATIVE => 8, CouponVersionTableMap::IS_REMOVING_POSTAGE => 9, CouponVersionTableMap::MAX_USAGE => 10, CouponVersionTableMap::IS_AVAILABLE_ON_SPECIAL_OFFERS => 11, CouponVersionTableMap::CREATED_AT => 12, CouponVersionTableMap::UPDATED_AT => 13, CouponVersionTableMap::VERSION => 14, ),
|
||||
self::TYPE_RAW_COLNAME => array('ID' => 0, 'CODE' => 1, 'TYPE' => 2, 'AMOUNT' => 3, 'IS_USED' => 4, 'IS_ENABLED' => 5, 'EXPIRATION_DATE' => 6, 'SERIALIZED_RULES' => 7, 'IS_CUMULATIVE' => 8, 'IS_REMOVING_POSTAGE' => 9, 'MAX_USAGE' => 10, 'IS_AVAILABLE_ON_SPECIAL_OFFERS' => 11, 'CREATED_AT' => 12, 'UPDATED_AT' => 13, 'VERSION' => 14, ),
|
||||
self::TYPE_FIELDNAME => array('id' => 0, 'code' => 1, 'type' => 2, 'amount' => 3, 'is_used' => 4, 'is_enabled' => 5, 'expiration_date' => 6, 'serialized_rules' => 7, 'is_cumulative' => 8, 'is_removing_postage' => 9, 'max_usage' => 10, 'is_available_on_special_offers' => 11, 'created_at' => 12, 'updated_at' => 13, 'version' => 14, ),
|
||||
self::TYPE_NUM => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, )
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -213,9 +198,6 @@ class CouponVersionTableMap extends TableMap
|
||||
$this->addForeignPrimaryKey('ID', 'Id', 'INTEGER' , 'coupon', 'ID', true, null, null);
|
||||
$this->addColumn('CODE', 'Code', 'VARCHAR', true, 45, null);
|
||||
$this->addColumn('TYPE', 'Type', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('TITLE', 'Title', 'VARCHAR', true, 255, null);
|
||||
$this->addColumn('SHORT_DESCRIPTION', 'ShortDescription', 'LONGVARCHAR', true, null, null);
|
||||
$this->addColumn('DESCRIPTION', 'Description', 'CLOB', true, null, null);
|
||||
$this->addColumn('AMOUNT', 'Amount', 'FLOAT', true, null, null);
|
||||
$this->addColumn('IS_USED', 'IsUsed', 'TINYINT', true, null, null);
|
||||
$this->addColumn('IS_ENABLED', 'IsEnabled', 'TINYINT', true, null, null);
|
||||
@@ -305,11 +287,11 @@ class CouponVersionTableMap extends TableMap
|
||||
public static function getPrimaryKeyHashFromRow($row, $offset = 0, $indexType = TableMap::TYPE_NUM)
|
||||
{
|
||||
// If the PK cannot be derived from the row, return NULL.
|
||||
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 17 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) {
|
||||
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)] === null && $row[TableMap::TYPE_NUM == $indexType ? 14 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)] === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 17 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]));
|
||||
return serialize(array((string) $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('Id', TableMap::TYPE_PHPNAME, $indexType)], (string) $row[TableMap::TYPE_NUM == $indexType ? 14 + $offset : static::translateFieldName('Version', TableMap::TYPE_PHPNAME, $indexType)]));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -428,9 +410,6 @@ class CouponVersionTableMap extends TableMap
|
||||
$criteria->addSelectColumn(CouponVersionTableMap::ID);
|
||||
$criteria->addSelectColumn(CouponVersionTableMap::CODE);
|
||||
$criteria->addSelectColumn(CouponVersionTableMap::TYPE);
|
||||
$criteria->addSelectColumn(CouponVersionTableMap::TITLE);
|
||||
$criteria->addSelectColumn(CouponVersionTableMap::SHORT_DESCRIPTION);
|
||||
$criteria->addSelectColumn(CouponVersionTableMap::DESCRIPTION);
|
||||
$criteria->addSelectColumn(CouponVersionTableMap::AMOUNT);
|
||||
$criteria->addSelectColumn(CouponVersionTableMap::IS_USED);
|
||||
$criteria->addSelectColumn(CouponVersionTableMap::IS_ENABLED);
|
||||
@@ -447,9 +426,6 @@ class CouponVersionTableMap extends TableMap
|
||||
$criteria->addSelectColumn($alias . '.ID');
|
||||
$criteria->addSelectColumn($alias . '.CODE');
|
||||
$criteria->addSelectColumn($alias . '.TYPE');
|
||||
$criteria->addSelectColumn($alias . '.TITLE');
|
||||
$criteria->addSelectColumn($alias . '.SHORT_DESCRIPTION');
|
||||
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
||||
$criteria->addSelectColumn($alias . '.AMOUNT');
|
||||
$criteria->addSelectColumn($alias . '.IS_USED');
|
||||
$criteria->addSelectColumn($alias . '.IS_ENABLED');
|
||||
|
||||
@@ -455,7 +455,7 @@ DROP TABLE IF EXISTS `address`;
|
||||
CREATE TABLE `address`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(255),
|
||||
`label` VARCHAR(255),
|
||||
`customer_id` INTEGER NOT NULL,
|
||||
`title_id` INTEGER NOT NULL,
|
||||
`company` VARCHAR(255),
|
||||
@@ -1040,9 +1040,6 @@ CREATE TABLE `coupon`
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`code` VARCHAR(45) NOT NULL,
|
||||
`type` VARCHAR(255) NOT NULL,
|
||||
`title` VARCHAR(255) NOT NULL,
|
||||
`short_description` TEXT NOT NULL,
|
||||
`description` LONGTEXT NOT NULL,
|
||||
`amount` FLOAT NOT NULL,
|
||||
`is_used` TINYINT NOT NULL,
|
||||
`is_enabled` TINYINT NOT NULL,
|
||||
@@ -1078,21 +1075,16 @@ CREATE TABLE `coupon_order`
|
||||
(
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`order_id` INTEGER NOT NULL,
|
||||
`code` VARCHAR(45) NOT NULL,
|
||||
`value` FLOAT NOT NULL,
|
||||
`created_at` DATETIME,
|
||||
`updated_at` DATETIME,
|
||||
PRIMARY KEY (`id`),
|
||||
INDEX `idx_coupon_order_order_id` (`order_id`),
|
||||
INDEX `fk_coupon_order_coupon_idx` (`code`),
|
||||
CONSTRAINT `fk_coupon_order_order_id`
|
||||
FOREIGN KEY (`order_id`)
|
||||
REFERENCES `order` (`id`)
|
||||
ON UPDATE RESTRICT
|
||||
ON DELETE CASCADE,
|
||||
CONSTRAINT `fk_coupon_order_coupon`
|
||||
FOREIGN KEY (`code`)
|
||||
REFERENCES `coupon` (`code`)
|
||||
ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
@@ -1923,6 +1915,9 @@ CREATE TABLE `coupon_i18n`
|
||||
(
|
||||
`id` INTEGER NOT NULL,
|
||||
`locale` VARCHAR(5) DEFAULT 'en_US' NOT NULL,
|
||||
`title` VARCHAR(255) NOT NULL,
|
||||
`short_description` TEXT NOT NULL,
|
||||
`description` LONGTEXT NOT NULL,
|
||||
PRIMARY KEY (`id`,`locale`),
|
||||
CONSTRAINT `coupon_i18n_FK_1`
|
||||
FOREIGN KEY (`id`)
|
||||
@@ -2186,9 +2181,6 @@ CREATE TABLE `coupon_version`
|
||||
`id` INTEGER NOT NULL,
|
||||
`code` VARCHAR(45) NOT NULL,
|
||||
`type` VARCHAR(255) NOT NULL,
|
||||
`title` VARCHAR(255) NOT NULL,
|
||||
`short_description` TEXT NOT NULL,
|
||||
`description` LONGTEXT NOT NULL,
|
||||
`amount` FLOAT NOT NULL,
|
||||
`is_used` TINYINT NOT NULL,
|
||||
`is_enabled` TINYINT NOT NULL,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user