@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Address; | |||
interface AddressInterface | |||
{ |
@@ -3,12 +3,12 @@ | |||
namespace Lc\CaracoleBundle\Model\Address; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\StatusInterface; | |||
use Lc\SovBundle\Doctrine\Extension\StatusInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class Address extends AbstractEntity implements StatusInterface | |||
abstract class AddressModel extends AbstractEntity implements StatusInterface | |||
{ | |||
use StatusTrait; | |||
@@ -16,7 +16,7 @@ abstract class Address extends AbstractEntity implements StatusInterface | |||
const TYPE_LEGAL_PERSON = 'legal-person'; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="addresses") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", inversedBy="addresses") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $user; | |||
@@ -92,12 +92,12 @@ abstract class Address extends AbstractEntity implements StatusInterface | |||
protected $comment; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\PointSaleInterface", mappedBy="address", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\PointSale\PointSaleInterface", mappedBy="address", cascade={"persist", "remove"}) | |||
*/ | |||
protected $pointSale; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", mappedBy="address", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", mappedBy="address", cascade={"persist", "remove"}) | |||
*/ | |||
protected $merchant; | |||
@@ -0,0 +1,8 @@ | |||
<?php | |||
namespace Lc\CaracoleBundle\Model\Common; | |||
interface TaxRateInterface | |||
{ | |||
} |
@@ -1,13 +1,13 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Common; | |||
use Doctrine\ORM\Mapping as ORM; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class TaxRate extends AbstractEntity | |||
abstract class TaxRateModel extends AbstractEntity | |||
{ | |||
/** |
@@ -0,0 +1,8 @@ | |||
<?php | |||
namespace Lc\CaracoleBundle\Model\Common ; | |||
interface UnitInterface | |||
{ | |||
} |
@@ -1,14 +1,14 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Common; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Model\AbstractEntity; | |||
use Lc\CaracoleBundle\Model\AbstractEntity; | |||
/** | |||
* @ORM\MappedSuperclass | |||
*/ | |||
abstract class Unit extends AbstractEntity | |||
abstract class UnitModel extends AbstractEntity | |||
{ | |||
/** | |||
* @ORM\Column(type="string", length=32) | |||
@@ -36,7 +36,7 @@ abstract class Unit extends AbstractEntity | |||
protected $coefficient; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="App\Entity\Unit") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Common\UnitInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $unitReference; |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Credit; | |||
interface CreditConfigInterface | |||
{ |
@@ -1,13 +1,13 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Credit; | |||
use Doctrine\ORM\Mapping as ORM; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class CreditConfig | |||
abstract class CreditConfigModel | |||
{ | |||
/** | |||
* @ORM\Column(type="boolean") |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Credit; | |||
interface CreditHistoryInterface | |||
{ |
@@ -1,21 +1,21 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Credit; | |||
use App\Entity\OrderPayment; | |||
use App\Entity\OrderRefund; | |||
use App\Entity\UserMerchant; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\OrderPaymentInterface; | |||
use Lc\ShopBundle\Context\OrderRefundInterface; | |||
use Lc\ShopBundle\Context\PayoffInterface; | |||
use Lc\ShopBundle\Context\UserMerchantInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderPaymentInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderRefundInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\PayoffInterface; | |||
use Lc\CaracoleBundle\Model\User\UserMerchantInterface; | |||
use Gedmo\Mapping\Annotation as Gedmo; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class CreditHistory extends AbstractEntity implements PayoffInterface | |||
abstract class CreditHistoryModel extends AbstractEntity implements PayoffInterface | |||
{ | |||
use PayoffTrait; | |||
@@ -33,31 +33,31 @@ abstract class CreditHistory extends AbstractEntity implements PayoffInterface | |||
protected $type; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserMerchantInterface", inversedBy="creditHistories") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserMerchantInterface", inversedBy="creditHistories") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $userMerchant; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\OrderPaymentInterface", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderPaymentInterface", cascade={"persist", "remove"}) | |||
*/ | |||
protected $orderPayment; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\OrderRefundInterface", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderRefundInterface", cascade={"persist", "remove"}) | |||
*/ | |||
protected $orderRefund; | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\File; | |||
interface DocumentInterface | |||
{ |
@@ -1,17 +1,17 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\File; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
use Gedmo\Mapping\Annotation as Gedmo; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class Document extends AbstractDocumentEntity implements FilterMerchantInterface | |||
abstract class DocumentModel extends AbstractDocumentEntity implements FilterMerchantInterface | |||
{ | |||
const TYPE_INVOICE = 'invoice'; | |||
const TYPE_QUOTATION = 'quotation'; | |||
@@ -19,7 +19,7 @@ abstract class Document extends AbstractDocumentEntity implements FilterMerchant | |||
const TYPE_DELIVERY_NOTE = 'delivery-note'; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
@@ -40,13 +40,13 @@ abstract class Document extends AbstractDocumentEntity implements FilterMerchant | |||
protected $logo; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\AddressInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Address\AddressInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchantAddress; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\AddressInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Address\AddressInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $buyerAddress; | |||
@@ -72,27 +72,27 @@ abstract class Document extends AbstractDocumentEntity implements FilterMerchant | |||
protected $isSent; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", mappedBy="documents") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShopInterface", mappedBy="documents") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $orderShops; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\OrderRefundInterface", mappedBy="document", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderRefundInterface", mappedBy="document", cascade={"persist", "remove"}) | |||
*/ | |||
protected $orderRefund; | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
interface TaxRateInterface | |||
{ | |||
} |
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context ; | |||
interface UnitInterface | |||
{ | |||
} |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Merchant; | |||
interface MerchantConfigInterface | |||
{ |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Merchant; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Symfony\Component\HttpFoundation\File\File; | |||
@@ -9,10 +9,10 @@ use Symfony\Component\HttpFoundation\File\File; | |||
* @ORM\MappedSuperclass() | |||
* @Vich\Uploadable | |||
*/ | |||
abstract class MerchantConfig extends AbstractEntity | |||
abstract class MerchantConfigModel extends AbstractEntity | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="merchantConfigs") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="merchantConfigs") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
@@ -34,12 +34,12 @@ abstract class MerchantConfig extends AbstractEntity | |||
public static $availableOptions = []; | |||
public function getMerchant(): ?Merchant | |||
public function getMerchant(): ?MerchantModel | |||
{ | |||
return $this->merchant; | |||
} | |||
public function setMerchant(?Merchant $merchant): self | |||
public function setMerchant(?MerchantModel $merchant): self | |||
{ | |||
$this->merchant = $merchant; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Merchant; | |||
interface MerchantInterface | |||
{ |
@@ -1,73 +1,73 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Merchant; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\CreditConfigInterface; | |||
use Lc\ShopBundle\Context\GroupUserInterface; | |||
use Lc\CaracoleBundle\Model\Credit\CreditConfigInterface; | |||
use Lc\CaracoleBundle\Model\User\GroupUserInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class Merchant extends AbstractDocumentEntity | |||
abstract class MerchantModel extends AbstractDocumentEntity | |||
{ | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\CreditConfigInterface", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Credit\CreditConfigInterface", cascade={"persist", "remove"}) | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $creditConfig; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\TaxRateInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Common\TaxRateInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $taxRate; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\PointSaleInterface", mappedBy="merchants") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\PointSale\PointSaleInterface", mappedBy="merchants") | |||
*/ | |||
protected $pointSales; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface", mappedBy="merchant") | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductFamilyInterface", mappedBy="merchant") | |||
*/ | |||
protected $productFamilies; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\MerchantConfigInterface", mappedBy="merchant", orphanRemoval=true, cascade={"persist"}) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantConfigInterface", mappedBy="merchant", orphanRemoval=true, cascade={"persist"}) | |||
*/ | |||
protected $merchantConfigs; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\AddressInterface", inversedBy="merchant", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Address\AddressInterface", inversedBy="merchant", cascade={"persist", "remove"}) | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $address; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\ProductCategoryInterface", mappedBy="merchant", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductCategoryInterface", mappedBy="merchant", orphanRemoval=true) | |||
*/ | |||
protected $productCategories; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\NewsInterface", mappedBy="merchant", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\News\NewsInterface", mappedBy="merchant", orphanRemoval=true) | |||
*/ | |||
protected $news; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\PageInterface", mappedBy="merchant", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Site\PageInterface", mappedBy="merchant", orphanRemoval=true) | |||
*/ | |||
protected $pages; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\NewsletterInterface", mappedBy="merchant") | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Newsletter\NewsletterInterface", mappedBy="merchant") | |||
*/ | |||
protected $newsletters; | |||
/** | |||
* @ORM\OneToMany(targetEntity="App\Entity\GroupUser", mappedBy="merchant") | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\User\GroupUser", mappedBy="merchant") | |||
*/ | |||
protected $groupUsers; | |||
@@ -167,14 +167,14 @@ abstract class Merchant extends AbstractDocumentEntity | |||
} | |||
/** | |||
* @return Collection|MerchantConfig[] | |||
* @return Collection|MerchantConfigModel[] | |||
*/ | |||
public function getMerchantConfigs(): Collection | |||
{ | |||
return $this->merchantConfigs; | |||
} | |||
public function addMerchantConfig(MerchantConfig $merchantConfig): self | |||
public function addMerchantConfig(MerchantConfigModel $merchantConfig): self | |||
{ | |||
if (!$this->merchantConfigs->contains($merchantConfig)) { | |||
$this->merchantConfigs[] = $merchantConfig; | |||
@@ -184,7 +184,7 @@ abstract class Merchant extends AbstractDocumentEntity | |||
return $this; | |||
} | |||
public function removeMerchantConfig(MerchantConfig $merchantConfig): self | |||
public function removeMerchantConfig(MerchantConfigModel $merchantConfig): self | |||
{ | |||
if ($this->merchantConfigs->contains($merchantConfig)) { | |||
$this->merchantConfigs->removeElement($merchantConfig); |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context ; | |||
namespace Lc\CaracoleBundle\Model\Newsletter ; | |||
interface NewsletterInterface | |||
{ |
@@ -1,26 +1,26 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Newsletter; | |||
use App\Entity\Hub; | |||
use App\Entity\User; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class Newsletter extends AbstractDocumentEntity implements FilterMerchantInterface | |||
abstract class NewsletterModel extends AbstractDocumentEntity implements FilterMerchantInterface | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="newsletters") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="newsletters") | |||
*/ | |||
protected $merchant; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\UserInterface", mappedBy="newsletters") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", mappedBy="newsletters") | |||
*/ | |||
protected $users; | |||
@@ -1,17 +0,0 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\OrderPaymentInterface; | |||
use Lc\ShopBundle\Context\OrderPayoffInterface; | |||
use Lc\ShopBundle\Context\ReductionInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class OrderPayment extends AbstractEntity implements OrderPayoffInterface | |||
{ | |||
use OrderPayoffTrait; | |||
} |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context ; | |||
namespace Lc\CaracoleBundle\Model\Order ; | |||
interface OrderPaymentInterface | |||
{ |
@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\CaracoleBundle\Model\Order\OrderPaymentInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderPayoffInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class OrderPaymentModel extends AbstractEntity implements OrderPayoffInterface | |||
{ | |||
use OrderPayoffTrait; | |||
} |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
interface OrderPayoffInterface | |||
{ |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
interface OrderProductInterface | |||
{ |
@@ -1,26 +1,26 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
use App\Entity\OrderProductReductionCatalog; | |||
use Lc\CaracoleBundle\Model\Order\OrderProductReductionCatalog; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\PriceInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\PriceInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class OrderProduct implements PriceInterface | |||
abstract class OrderProductModel implements PriceInterface | |||
{ | |||
use PriceTrait ; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="orderProducts", cascade={"persist"}) | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShopInterface", inversedBy="orderProducts", cascade={"persist"}) | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $orderShop; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ProductInterface")) | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Product\ProductInterface")) | |||
*/ | |||
protected $product; | |||
@@ -40,12 +40,12 @@ abstract class OrderProduct implements PriceInterface | |||
protected $title; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\OrderProductReductionCatalogInterface", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderProductReductionCatalogInterface", cascade={"persist", "remove"}) | |||
*/ | |||
protected $orderProductReductionCatalog; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\OrderProductRefundInterface", mappedBy="orderProduct", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderProductRefundInterface", mappedBy="orderProduct", cascade={"persist", "remove"}) | |||
*/ | |||
protected $orderProductRefund; | |||
@@ -111,12 +111,12 @@ abstract class OrderProduct implements PriceInterface | |||
return $title ; | |||
} | |||
public function getOrderShop(): ?OrderShop | |||
public function getOrderShop(): ?OrderShopModel | |||
{ | |||
return $this->orderShop; | |||
} | |||
public function setOrderShop(?OrderShop $orderShop): self | |||
public function setOrderShop(?OrderShopModel $orderShop): self | |||
{ | |||
$this->orderShop = $orderShop; | |||
@@ -182,12 +182,12 @@ abstract class OrderProduct implements PriceInterface | |||
return $this; | |||
} | |||
public function getOrderProductRefund(): ?OrderProductRefund | |||
public function getOrderProductRefund(): ?OrderProductRefundModel | |||
{ | |||
return $this->orderProductRefund; | |||
} | |||
public function setOrderProductRefund(OrderProductRefund $orderProductRefund): self | |||
public function setOrderProductRefund(OrderProductRefundModel $orderProductRefund): self | |||
{ | |||
$this->orderProductRefund = $orderProductRefund; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context ; | |||
namespace Lc\CaracoleBundle\Model\Order ; | |||
interface OrderProductReductionCatalogInterface | |||
{ |
@@ -1,14 +1,14 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\OrderProductReductionCatalogInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderProductReductionCatalogInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class OrderProductReductionCatalog implements OrderProductReductionCatalogInterface | |||
abstract class OrderProductReductionCatalogModel implements OrderProductReductionCatalogInterface | |||
{ | |||
use ReductionTrait ; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
interface OrderProductRefundInterface | |||
{ |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
use Doctrine\ORM\Mapping as ORM; | |||
@@ -8,7 +8,7 @@ use Doctrine\ORM\Mapping as ORM; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class OrderProductRefund | |||
abstract class OrderProductRefundModel | |||
{ | |||
/** | |||
* @ORM\Column(type="integer") | |||
@@ -26,7 +26,7 @@ abstract class OrderProductRefund | |||
protected $price; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\OrderProductInterface", inversedBy="orderProductRefund", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderProductInterface", inversedBy="orderProductRefund", cascade={"persist", "remove"}) | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $orderProduct; | |||
@@ -72,12 +72,12 @@ abstract class OrderProductRefund | |||
return $this; | |||
} | |||
public function getOrderProduct(): ?OrderProduct | |||
public function getOrderProduct(): ?OrderProductModel | |||
{ | |||
return $this->orderProduct; | |||
} | |||
public function setOrderProduct(OrderProduct $orderProduct): self | |||
public function setOrderProduct(OrderProductModel $orderProduct): self | |||
{ | |||
$this->orderProduct = $orderProduct; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
interface OrderReductionCartInterface | |||
{ |
@@ -1,15 +1,15 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\ReductionCartPropertyInterface; | |||
use Lc\ShopBundle\Context\ReductionInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\ReductionCartPropertyInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class OrderReductionCart implements ReductionInterface, ReductionCartPropertyInterface | |||
abstract class OrderReductionCartModel implements ReductionInterface, ReductionCartPropertyInterface | |||
{ | |||
use ReductionTrait; | |||
use ReductionCartPropertyTrait; | |||
@@ -20,14 +20,14 @@ abstract class OrderReductionCart implements ReductionInterface, ReductionCartPr | |||
protected $title; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="orderReductionCarts") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShopInterface", inversedBy="orderReductionCarts") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $orderShop; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ReductionCartInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $reductionCart; | |||
@@ -49,12 +49,12 @@ abstract class OrderReductionCart implements ReductionInterface, ReductionCartPr | |||
return $this; | |||
} | |||
public function getOrderShop(): ?OrderShop | |||
public function getOrderShop(): ?OrderShopModel | |||
{ | |||
return $this->orderShop; | |||
} | |||
public function setOrderShop(?OrderShop $orderShop): self | |||
public function setOrderShop(?OrderShopModel $orderShop): self | |||
{ | |||
$this->orderShop = $orderShop; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
interface OrderReductionCreditInterface | |||
{ |
@@ -1,14 +1,14 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\ReductionInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class OrderReductionCredit implements ReductionInterface | |||
abstract class OrderReductionCreditModel implements ReductionInterface | |||
{ | |||
use ReductionTrait ; | |||
@@ -19,13 +19,13 @@ abstract class OrderReductionCredit implements ReductionInterface | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="orderReductionCredits") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShopInterface", inversedBy="orderReductionCredits") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $orderShop; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ReductionCreditInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $reductionCredit; | |||
@@ -54,12 +54,12 @@ abstract class OrderReductionCredit implements ReductionInterface | |||
return $this; | |||
} | |||
public function getOrderShop(): ?OrderShop | |||
public function getOrderShop(): ?OrderShopModel | |||
{ | |||
return $this->orderShop; | |||
} | |||
public function setOrderShop(?OrderShop $orderShop): self | |||
public function setOrderShop(?OrderShopModel $orderShop): self | |||
{ | |||
$this->orderShop = $orderShop; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
interface OrderRefundInterface | |||
{ |
@@ -1,16 +1,16 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\OrderPaymentInterface; | |||
use Lc\ShopBundle\Context\OrderPayoffInterface; | |||
use Lc\ShopBundle\Context\ReductionInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderPaymentInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\OrderPayoffInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class OrderRefund extends AbstractEntity implements OrderPayoffInterface | |||
abstract class OrderRefundModel extends AbstractEntity implements OrderPayoffInterface | |||
{ | |||
use OrderPayoffTrait; | |||
@@ -20,7 +20,7 @@ abstract class OrderRefund extends AbstractEntity implements OrderPayoffInterfac | |||
protected $deliveryRefundAmount; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\DocumentInterface", inversedBy="orderRefund", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\File\DocumentInterface", inversedBy="orderRefund", cascade={"persist", "remove"}) | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $document; |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
interface OrderShopInterface | |||
{ |
@@ -1,39 +1,39 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Gedmo\Mapping\Annotation as Gedmo; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\DocumentInterface; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\ShopBundle\Services\Order\OrderUtils; | |||
use Lc\ShopBundle\Model\OrderStatus ; | |||
use Lc\CaracoleBundle\Model\File\DocumentInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Services\Order\OrderUtils; | |||
use Lc\CaracoleBundle\Model\OrderStatus ; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class OrderShop extends AbstractEntity implements FilterMerchantInterface | |||
abstract class OrderShopModel extends AbstractEntity implements FilterMerchantInterface | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="productFamilies") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="productFamilies") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="orders", fetch="EAGER") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", inversedBy="orders", fetch="EAGER") | |||
*/ | |||
protected $user; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="App\Entity\Visitor", inversedBy="orders") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\VisitorInterface", inversedBy="orders") | |||
*/ | |||
protected $visitor; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\AddressInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Address\AddressInterface") | |||
*/ | |||
protected $invoiceAddress; | |||
@@ -63,17 +63,17 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
protected $meanPayment; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\OrderStatusHistoryInterface", mappedBy="orderShop", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderStatusHistoryInterface", mappedBy="orderShop", orphanRemoval=true) | |||
*/ | |||
protected $orderStatusHistories; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\OrderPaymentInterface", mappedBy="orderShop", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderPaymentInterface", mappedBy="orderShop", orphanRemoval=true) | |||
*/ | |||
protected $orderPayments; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\OrderProductInterface", mappedBy="orderShop", cascade={"persist", "remove"}, orphanRemoval=true, fetch="EAGER") | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderProductInterface", mappedBy="orderShop", cascade={"persist", "remove"}, orphanRemoval=true, fetch="EAGER") | |||
*/ | |||
protected $orderProducts; | |||
@@ -83,47 +83,47 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
protected $deliveryInfos; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderStatusInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderStatusInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $orderStatus; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\OrderReductionCartInterface", mappedBy="orderShop", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderReductionCartInterface", mappedBy="orderShop", orphanRemoval=true) | |||
*/ | |||
protected $orderReductionCarts; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\OrderReductionCreditInterface", mappedBy="orderShop", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderReductionCreditInterface", mappedBy="orderShop", orphanRemoval=true) | |||
*/ | |||
protected $orderReductionCredits; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\DocumentInterface", inversedBy="orderShops") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Order\DocumentInterface", inversedBy="orderShops") | |||
*/ | |||
protected $documents; | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\TicketInterface", mappedBy="orderShop") | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Ticket\TicketInterface", mappedBy="orderShop") | |||
*/ | |||
protected $tickets; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\SectionInterface", inversedBy="orderShops") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface", inversedBy="orderShops") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $section; | |||
@@ -270,14 +270,14 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
} | |||
/** | |||
* @return Collection|OrderStatusHistory[] | |||
* @return Collection|OrderStatusHistoryModel[] | |||
*/ | |||
public function getOrderStatusHistories(): Collection | |||
{ | |||
return $this->orderStatusHistories; | |||
} | |||
public function addOrderStatusHistory(OrderStatusHistory $orderStatusHistory): self | |||
public function addOrderStatusHistory(OrderStatusHistoryModel $orderStatusHistory): self | |||
{ | |||
if (!$this->orderStatusHistories->contains($orderStatusHistory)) { | |||
$this->orderStatusHistories[] = $orderStatusHistory; | |||
@@ -287,7 +287,7 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
return $this; | |||
} | |||
public function removeOrderStatusHistory(OrderStatusHistory $orderStatusHistory): self | |||
public function removeOrderStatusHistory(OrderStatusHistoryModel $orderStatusHistory): self | |||
{ | |||
if ($this->orderStatusHistories->contains($orderStatusHistory)) { | |||
$this->orderStatusHistories->removeElement($orderStatusHistory); | |||
@@ -301,7 +301,7 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
} | |||
/** | |||
* @return Collection|OrderPayment[] | |||
* @return Collection|OrderPaymentModel[] | |||
*/ | |||
public function getOrderPayments($meanPayment = null): Collection | |||
{ | |||
@@ -320,7 +320,7 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
return $this->orderPayments; | |||
} | |||
public function addOrderPayment(OrderPayment $orderPayment): self | |||
public function addOrderPayment(OrderPaymentModel $orderPayment): self | |||
{ | |||
if (!$this->orderPayments->contains($orderPayment)) { | |||
$this->orderPayments[] = $orderPayment; | |||
@@ -330,7 +330,7 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
return $this; | |||
} | |||
public function removeOrderPayment(OrderPayment $orderPayment): self | |||
public function removeOrderPayment(OrderPaymentModel $orderPayment): self | |||
{ | |||
if ($this->orderPayments->contains($orderPayment)) { | |||
$this->orderPayments->removeElement($orderPayment); | |||
@@ -344,14 +344,14 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
} | |||
/** | |||
* @return Collection|OrderProduct[] | |||
* @return Collection|OrderProductModel[] | |||
*/ | |||
public function getOrderProducts(): Collection | |||
{ | |||
return $this->orderProducts; | |||
} | |||
public function addOrderProduct(OrderProduct $orderProduct): self | |||
public function addOrderProduct(OrderProductModel $orderProduct): self | |||
{ | |||
if (!$this->orderProducts->contains($orderProduct)) { | |||
$this->orderProducts[] = $orderProduct; | |||
@@ -361,7 +361,7 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
return $this; | |||
} | |||
public function removeOrderProduct(OrderProduct $orderProduct): self | |||
public function removeOrderProduct(OrderProductModel $orderProduct): self | |||
{ | |||
if ($this->orderProducts->contains($orderProduct)) { | |||
$this->orderProducts->removeElement($orderProduct); | |||
@@ -444,14 +444,14 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
/** | |||
* @return Collection|OrderReductionCart[] | |||
* @return Collection|OrderReductionCartModel[] | |||
*/ | |||
public function getOrderReductionCarts(): Collection | |||
{ | |||
return $this->orderReductionCarts; | |||
} | |||
public function addOrderReductionCart(OrderReductionCart $orderReductionCart): self | |||
public function addOrderReductionCart(OrderReductionCartModel $orderReductionCart): self | |||
{ | |||
if (!$this->orderReductionCarts->contains($orderReductionCart)) { | |||
$this->orderReductionCarts[] = $orderReductionCart; | |||
@@ -461,7 +461,7 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
return $this; | |||
} | |||
public function removeOrderReductionCart(OrderReductionCart $orderReductionCart): self | |||
public function removeOrderReductionCart(OrderReductionCartModel $orderReductionCart): self | |||
{ | |||
if ($this->orderReductionCarts->contains($orderReductionCart)) { | |||
$this->orderReductionCarts->removeElement($orderReductionCart); | |||
@@ -475,14 +475,14 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
} | |||
/** | |||
* @return Collection|OrderReductionCart[] | |||
* @return Collection|OrderReductionCartModel[] | |||
*/ | |||
public function getOrderReductionCredits(): Collection | |||
{ | |||
return $this->orderReductionCredits; | |||
} | |||
public function addOrderReductionCredit(OrderReductionCredit $orderReductionCredit): self | |||
public function addOrderReductionCredit(OrderReductionCreditModel $orderReductionCredit): self | |||
{ | |||
if (!$this->orderReductionCredits->contains($orderReductionCredit)) { | |||
$this->orderReductionCredits[] = $orderReductionCredit; | |||
@@ -492,7 +492,7 @@ abstract class OrderShop extends AbstractEntity implements FilterMerchantInterfa | |||
return $this; | |||
} | |||
public function removeOrderReductionCredit(OrderReductionCredit $orderReductionCredit): self | |||
public function removeOrderReductionCredit(OrderReductionCreditModel $orderReductionCredit): self | |||
{ | |||
if ($this->orderReductionCredits->contains($orderReductionCredit)) { | |||
$this->orderReductionCredits->removeElement($orderReductionCredit); |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context ; | |||
namespace Lc\CaracoleBundle\Model\Order ; | |||
interface OrderShopPriceUtilsInterface | |||
{ |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
interface OrderStatusHistoryInterface | |||
{ |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Gedmo\Mapping\Annotation as Gedmo; | |||
@@ -9,16 +9,16 @@ use Gedmo\Mapping\Annotation as Gedmo; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class OrderStatusHistory extends AbstractEntity | |||
abstract class OrderStatusHistoryModel extends AbstractEntity | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="orderStatusHistories") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShopInterface", inversedBy="orderStatusHistories") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $orderShop; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderStatusInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderStatusInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $orderStatus; | |||
@@ -30,14 +30,14 @@ abstract class OrderStatusHistory extends AbstractEntity | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; | |||
@@ -46,24 +46,24 @@ abstract class OrderStatusHistory extends AbstractEntity | |||
return $this->getOrderStatus()->getAlias(). ' le : '.$this->getCreatedAt()->format('d-m-Y H:i').'('.$this->getOrigin().')'; | |||
} | |||
public function getOrderShop(): ?OrderShop | |||
public function getOrderShop(): ?OrderShopModel | |||
{ | |||
return $this->orderShop; | |||
} | |||
public function setOrderShop(?OrderShop $orderShop): self | |||
public function setOrderShop(?OrderShopModel $orderShop): self | |||
{ | |||
$this->orderShop = $orderShop; | |||
return $this; | |||
} | |||
public function getOrderStatus(): ?OrderStatus | |||
public function getOrderStatus(): ?OrderStatusModel | |||
{ | |||
return $this->orderStatus; | |||
} | |||
public function setOrderStatus(?OrderStatus $orderStatus): self | |||
public function setOrderStatus(?OrderStatusModel $orderStatus): self | |||
{ | |||
$this->orderStatus = $orderStatus; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
interface OrderStatusInterface | |||
{ |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Order; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
@@ -9,7 +9,7 @@ use Doctrine\Common\Collections\Collection; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class OrderStatus | |||
abstract class OrderStatusModel | |||
{ | |||
const ALIAS_CART = 'cart' ; | |||
const ALIAS_CART_CANCELED = 'cart-canceled' ; | |||
@@ -60,7 +60,7 @@ abstract class OrderStatus | |||
protected $description; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\OrderStatusInterface") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderStatusInterface") | |||
*/ | |||
protected $nextStatusAllowed; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\PointSale; | |||
interface PointSaleDayInfoInterface | |||
{ |
@@ -1,13 +1,13 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\PointSale; | |||
use Doctrine\ORM\Mapping as ORM; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class PointSaleDayInfo extends AbstractEntity | |||
abstract class PointSaleDayInfoModel extends AbstractEntity | |||
{ | |||
/** | |||
* @ORM\Column(type="boolean") | |||
@@ -25,7 +25,7 @@ abstract class PointSaleDayInfo extends AbstractEntity | |||
protected $description; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\PointSaleInterface", inversedBy="pointSaleDayInfos") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\PointSale\PointSaleInterface", inversedBy="pointSaleDayInfos") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $pointSale; | |||
@@ -66,12 +66,12 @@ abstract class PointSaleDayInfo extends AbstractEntity | |||
return $this; | |||
} | |||
public function getPointSale(): ?PointSale | |||
public function getPointSale(): ?PointSaleModel | |||
{ | |||
return $this->pointSale; | |||
} | |||
public function setPointSale(?PointSale $pointSale): self | |||
public function setPointSale(?PointSaleModel $pointSale): self | |||
{ | |||
$this->pointSale = $pointSale; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\PointSale; | |||
interface PointSaleInterface | |||
{ |
@@ -1,24 +1,24 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\PointSale; | |||
use App\Entity\User; | |||
use App\Entity\UserPointSale; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMultipleMerchantsInterface; | |||
use Lc\ShopBundle\Context\OrderAmountMinInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMultipleMerchantsInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\OrderAmountMinInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class PointSale extends AbstractDocumentEntity implements FilterMultipleMerchantsInterface, OrderAmountMinInterface | |||
abstract class PointSaleModel extends AbstractDocumentEntity implements FilterMultipleMerchantsInterface, OrderAmountMinInterface | |||
{ | |||
use OrderAmountMin; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="pointSales") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="pointSales") | |||
*/ | |||
protected $merchants; | |||
@@ -28,18 +28,18 @@ abstract class PointSale extends AbstractDocumentEntity implements FilterMultipl | |||
protected $code; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\PointSaleDayInfoInterface", mappedBy="pointSale", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Pointsale\PointSaleDayInfoInterface", mappedBy="pointSale", orphanRemoval=true) | |||
*/ | |||
protected $pointSaleDayInfos; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\AddressInterface", inversedBy="pointSale", cascade={"persist", "remove"}) | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Address\AddressInterface", inversedBy="pointSale", cascade={"persist", "remove"}) | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $address; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\UserPointSaleInterface", mappedBy="pointSale", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\User\UserPointSaleInterface", mappedBy="pointSale", orphanRemoval=true) | |||
*/ | |||
protected $userPointSales; | |||
@@ -100,14 +100,14 @@ abstract class PointSale extends AbstractDocumentEntity implements FilterMultipl | |||
} | |||
/** | |||
* @return Collection|PointSaleDayInfo[] | |||
* @return Collection|PointSaleDayInfoModel[] | |||
*/ | |||
public function getPointSaleDayInfos(): Collection | |||
{ | |||
return $this->pointSaleDayInfos; | |||
} | |||
public function addPointSaleDayInfo(PointSaleDayInfo $pointSaleDayInfo): self | |||
public function addPointSaleDayInfo(PointSaleDayInfoModel $pointSaleDayInfo): self | |||
{ | |||
if (!$this->pointSaleDayInfos->contains($pointSaleDayInfo)) { | |||
$this->pointSaleDayInfos[] = $pointSaleDayInfo; | |||
@@ -117,7 +117,7 @@ abstract class PointSale extends AbstractDocumentEntity implements FilterMultipl | |||
return $this; | |||
} | |||
public function removePointSaleDayInfo(PointSaleDayInfo $pointSaleDayInfo): self | |||
public function removePointSaleDayInfo(PointSaleDayInfoModel $pointSaleDayInfo): self | |||
{ | |||
if ($this->pointSaleDayInfos->contains($pointSaleDayInfo)) { | |||
$this->pointSaleDayInfos->removeElement($pointSaleDayInfo); |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Product; | |||
interface ProductCategoryInterface | |||
{ |
@@ -1,38 +1,38 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Product; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\ShopBundle\Context\TreeInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
use Lc\SovBundle\Doctrine\Extension\TreeInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class ProductCategory extends AbstractDocumentEntity implements TreeInterface, FilterMerchantInterface | |||
abstract class ProductCategoryModel extends AbstractDocumentEntity implements TreeInterface, FilterMerchantInterface | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="productCategories") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="productCategories") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ProductCategoryInterface", inversedBy="childrens") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Product\ProductCategoryInterface", inversedBy="childrens") | |||
*/ | |||
protected $parent; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\ProductCategoryInterface", mappedBy="parent" , fetch="EAGER")) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductCategoryInterface", mappedBy="parent" , fetch="EAGER")) | |||
* @ORM\OrderBy({"position" = "ASC"}) | |||
*/ | |||
protected $childrens; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface", mappedBy="productCategories") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductFamilyInterface", mappedBy="productCategories") | |||
*/ | |||
protected $productFamilies; | |||
@@ -43,7 +43,7 @@ abstract class ProductCategory extends AbstractDocumentEntity implements TreeInt | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\SectionInterface", inversedBy="productCategories") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface", inversedBy="productCategories") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $section; | |||
@@ -120,14 +120,14 @@ abstract class ProductCategory extends AbstractDocumentEntity implements TreeInt | |||
} | |||
/** | |||
* @return Collection|ProductFamily[] | |||
* @return Collection|ProductFamilyModel[] | |||
*/ | |||
public function getProductFamilies(): Collection | |||
{ | |||
return $this->productFamilies; | |||
} | |||
public function addProductFamily(ProductFamily $productFamily): self | |||
public function addProductFamily(ProductFamilyModel $productFamily): self | |||
{ | |||
if (!$this->productFamilies->contains($productFamily)) { | |||
$this->productFamilies[] = $productFamily; | |||
@@ -137,7 +137,7 @@ abstract class ProductCategory extends AbstractDocumentEntity implements TreeInt | |||
return $this; | |||
} | |||
public function removeProductFamily(ProductFamily $productFamily): self | |||
public function removeProductFamily(ProductFamilyModel $productFamily): self | |||
{ | |||
if ($this->productFamilies->contains($productFamily)) { | |||
$this->productFamilies->removeElement($productFamily); |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Product; | |||
interface ProductFamilyInterface | |||
{ |
@@ -1,14 +1,14 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Product; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\ShopBundle\Context\PriceInterface; | |||
use Lc\ShopBundle\Context\ProductInterface; | |||
use Lc\ShopBundle\Context\ProductPropertyInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\PriceInterface; | |||
use Lc\CaracoleBundle\Model\Product\ProductInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\ProductPropertyInterface; | |||
use Gedmo\Mapping\Annotation as Gedmo; | |||
@@ -16,7 +16,7 @@ use Gedmo\Mapping\Annotation as Gedmo; | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class ProductFamily extends AbstractDocumentEntity implements ProductPropertyInterface, PriceInterface, FilterMerchantInterface | |||
abstract class ProductFamilyModel extends AbstractDocumentEntity implements ProductPropertyInterface, PriceInterface, FilterMerchantInterface | |||
{ | |||
use ProductPropertyTrait; | |||
@@ -60,26 +60,26 @@ abstract class ProductFamily extends AbstractDocumentEntity implements ProductPr | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="productFamilies") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="productFamilies") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\ProductCategoryInterface", inversedBy="productFamilies") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductCategoryInterface", inversedBy="productFamilies") | |||
*/ | |||
protected $productCategories; | |||
@@ -104,13 +104,13 @@ abstract class ProductFamily extends AbstractDocumentEntity implements ProductPr | |||
protected $quantityLabel; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\ProductInterface", mappedBy="productFamily", orphanRemoval=true, cascade={"persist"}) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductInterface", mappedBy="productFamily", orphanRemoval=true, cascade={"persist"}) | |||
* @ORM\OrderBy({"position" = "ASC"}) | |||
*/ | |||
protected $products; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\TaxRateInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Common\TaxRateInterface") | |||
*/ | |||
protected $supplierTaxRate; | |||
@@ -236,7 +236,7 @@ abstract class ProductFamily extends AbstractDocumentEntity implements ProductPr | |||
protected $saleStatus; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\SectionInterface", inversedBy="productFamilies") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface", inversedBy="productFamilies") | |||
*/ | |||
protected $sections; | |||
@@ -409,7 +409,7 @@ abstract class ProductFamily extends AbstractDocumentEntity implements ProductPr | |||
return $this; | |||
} | |||
/** | |||
* @return Collection|ProductCategory[] | |||
* @return Collection|ProductCategoryModel[] | |||
*/ | |||
public function getProductCategories(): Collection | |||
{ | |||
@@ -421,7 +421,7 @@ abstract class ProductFamily extends AbstractDocumentEntity implements ProductPr | |||
$this->productCategories = new ArrayCollection(); | |||
} | |||
public function addProductCategory(ProductCategory $productCategory): self | |||
public function addProductCategory(ProductCategoryModel $productCategory): self | |||
{ | |||
if (!$this->productCategories->contains($productCategory)) { | |||
$this->productCategories[] = $productCategory; | |||
@@ -430,7 +430,7 @@ abstract class ProductFamily extends AbstractDocumentEntity implements ProductPr | |||
return $this; | |||
} | |||
public function removeProductCategory(ProductCategory $productCategory): self | |||
public function removeProductCategory(ProductCategoryModel $productCategory): self | |||
{ | |||
if ($this->productCategories->contains($productCategory)) { | |||
$this->productCategories->removeElement($productCategory); |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Product; | |||
interface ProductInterface | |||
{ |
@@ -1,22 +1,22 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Product; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\OrderProductInterface; | |||
use Lc\ShopBundle\Context\PriceInterface; | |||
use Lc\ShopBundle\Context\ProductInterface; | |||
use Lc\ShopBundle\Context\ProductPropertyInterface; | |||
use Lc\ShopBundle\Context\SortableInterface; | |||
use Lc\ShopBundle\Services\Price; | |||
use Lc\CaracoleBundle\Model\Order\OrderProductInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\PriceInterface; | |||
use Lc\CaracoleBundle\Model\Product\ProductInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\ProductPropertyInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\SortableInterface; | |||
use Lc\CaracoleBundle\Services\Price; | |||
use Gedmo\Mapping\Annotation as Gedmo; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class Product extends AbstractEntity implements SortableInterface, ProductPropertyInterface, PriceInterface | |||
abstract class ProductModel extends AbstractEntity implements SortableInterface, ProductPropertyInterface, PriceInterface | |||
{ | |||
use SortableTrait; | |||
use ProductPropertyTrait; | |||
@@ -24,20 +24,20 @@ abstract class Product extends AbstractEntity implements SortableInterface, Prod | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface", inversedBy="products", cascade={"persist"}) | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Product\ProductFamilyInterface", inversedBy="products", cascade={"persist"}) | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $productFamily; | |||
@@ -165,14 +165,14 @@ abstract class Product extends AbstractEntity implements SortableInterface, Prod | |||
public function getAvailableQuantityInherited() | |||
{ | |||
switch ($this->getProductFamily()->getBehaviorCountStock()) { | |||
case ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT_FAMILY : | |||
case ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE : | |||
case ProductFamilyModel::BEHAVIOR_COUNT_STOCK_BY_PRODUCT_FAMILY : | |||
case ProductFamilyModel::BEHAVIOR_COUNT_STOCK_BY_MEASURE : | |||
return $this->getProductFamily()->getAvailableQuantity(); | |||
break; | |||
case ProductFamily::BEHAVIOR_COUNT_STOCK_BY_PRODUCT : | |||
case ProductFamilyModel::BEHAVIOR_COUNT_STOCK_BY_PRODUCT : | |||
return $this->getAvailableQuantity(); | |||
break; | |||
case ProductFamily::BEHAVIOR_COUNT_STOCK_UNLIMITED : | |||
case ProductFamilyModel::BEHAVIOR_COUNT_STOCK_UNLIMITED : | |||
return false; | |||
break; | |||
} | |||
@@ -183,12 +183,12 @@ abstract class Product extends AbstractEntity implements SortableInterface, Prod | |||
return $this->getProductFamily()->getTaxRateInherited(); | |||
} | |||
public function getProductFamily(): ?ProductFamily | |||
public function getProductFamily(): ?ProductFamilyModel | |||
{ | |||
return $this->productFamily; | |||
} | |||
public function setProductFamily(?ProductFamily $productFamily): self | |||
public function setProductFamily(?ProductFamilyModel $productFamily): self | |||
{ | |||
$this->productFamily = $productFamily; | |||
@@ -1,9 +1,9 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Reduction; | |||
use Doctrine\Common\Collections\Collection; | |||
use Lc\ShopBundle\Model\PointSale; | |||
use Lc\CaracoleBundle\Model\PointSale; | |||
interface ReductionCartInterface | |||
{ |
@@ -1,21 +1,21 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Reduction; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\ShopBundle\Context\OrderAmountMinInterface; | |||
use Lc\ShopBundle\Context\ReductionCartPropertyInterface; | |||
use Lc\ShopBundle\Context\ReductionInterface; | |||
use Lc\ShopBundle\Context\ReductionPropertyInterface; | |||
use Lc\ShopBundle\Context\StatusInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\OrderAmountMinInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\ReductionCartPropertyInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\ReductionPropertyInterface; | |||
use Lc\SovBundle\Doctrine\Extension\StatusInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class ReductionCart extends AbstractEntity implements ReductionPropertyInterface, ReductionInterface, ReductionCartPropertyInterface, FilterMerchantInterface, OrderAmountMinInterface, StatusInterface | |||
abstract class ReductionCartModel extends AbstractEntity implements ReductionPropertyInterface, ReductionInterface, ReductionCartPropertyInterface, FilterMerchantInterface, OrderAmountMinInterface, StatusInterface | |||
{ | |||
const APPLIED_TO_DELIVERY = 'delivery'; | |||
@@ -35,7 +35,7 @@ abstract class ReductionCart extends AbstractEntity implements ReductionProperty | |||
protected $title; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
@@ -56,12 +56,12 @@ abstract class ReductionCart extends AbstractEntity implements ReductionProperty | |||
protected $availableQuantityPerUser; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\PointSaleInterface") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\PointSale\PointSaleInterface") | |||
*/ | |||
protected $pointSales; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\ReductionCartInterface") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Reduction\ReductionCartInterface") | |||
*/ | |||
protected $uncombinables; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Reduction; | |||
interface ReductionCatalogInterface | |||
{ |
@@ -1,21 +1,21 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Reduction; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\ShopBundle\Context\ReductionCatalogInterface; | |||
use Lc\ShopBundle\Context\ReductionInterface; | |||
use Lc\ShopBundle\Context\ReductionPropertyInterface; | |||
use Lc\ShopBundle\Context\StatusInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionCatalogInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\ReductionPropertyInterface; | |||
use Lc\SovBundle\Doctrine\Extension\StatusInterface; | |||
use phpDocumentor\Reflection\Types\Integer; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class ReductionCatalog extends AbstractEntity implements ReductionCatalogInterface, ReductionPropertyInterface, FilterMerchantInterface, StatusInterface | |||
abstract class ReductionCatalogModel extends AbstractEntity implements ReductionCatalogInterface, ReductionPropertyInterface, FilterMerchantInterface, StatusInterface | |||
{ | |||
use StatusTrait; | |||
use ReductionTrait; | |||
@@ -29,23 +29,23 @@ abstract class ReductionCatalog extends AbstractEntity implements ReductionCatal | |||
protected $title; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductFamilyInterface") | |||
*/ | |||
protected $productFamilies; | |||
/** | |||
* @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface") | |||
* @ORM\OneToOne(targetEntity="Lc\CaracoleBundle\Model\Product\ProductFamilyInterface") | |||
*/ | |||
protected $productFamily; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\ProductCategoryInterface") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductCategoryInterface") | |||
*/ | |||
protected $productCategories; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Reduction; | |||
interface ReductionCreditInterface | |||
{ |
@@ -1,19 +1,19 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Reduction; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\ShopBundle\Context\ReductionInterface; | |||
use Lc\ShopBundle\Context\ReductionPropertyInterface; | |||
use Lc\ShopBundle\Context\StatusInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionInterface; | |||
use Lc\CaracoleBundle\Model\Reduction\ReductionPropertyInterface; | |||
use Lc\SovBundle\Doctrine\Extension\StatusInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class ReductionCredit extends AbstractEntity implements ReductionInterface, FilterMerchantInterface, StatusInterface | |||
abstract class ReductionCreditModel extends AbstractEntity implements ReductionInterface, FilterMerchantInterface, StatusInterface | |||
{ | |||
const TYPE_CREDIT = 'credit'; | |||
const TYPE_GIFT = 'gift'; | |||
@@ -29,13 +29,13 @@ abstract class ReductionCredit extends AbstractEntity implements ReductionInterf | |||
protected $title; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="reductionCredits") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", inversedBy="reductionCredits") | |||
*/ | |||
protected $users; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
@@ -51,7 +51,7 @@ abstract class ReductionCredit extends AbstractEntity implements ReductionInterf | |||
protected $sended; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
*/ | |||
protected $owner; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Reminder; | |||
interface ReminderInterface | |||
{ |
@@ -1,21 +1,21 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Reminder; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class Reminder extends AbstractEntity implements FilterMerchantInterface | |||
abstract class ReminderModel extends AbstractEntity implements FilterMerchantInterface | |||
{ | |||
public $relatedPage; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
@@ -46,7 +46,7 @@ abstract class Reminder extends AbstractEntity implements FilterMerchantInterfac | |||
protected $entityAction; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
*/ | |||
protected $users; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Section; | |||
interface SectionInterface | |||
{ |
@@ -1,20 +1,20 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Section; | |||
use App\Entity\Hub; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class Section extends AbstractDocumentEntity implements FilterMerchantInterface | |||
abstract class SectionModel extends AbstractDocumentEntity implements FilterMerchantInterface | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
@@ -30,18 +30,18 @@ abstract class Section extends AbstractDocumentEntity implements FilterMerchantI | |||
const SECTION_CYCLE_YEAR = 'year' ; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface", mappedBy="sections") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductFamilyInterface", mappedBy="sections") | |||
*/ | |||
protected $productFamilies; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", mappedBy="section") | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShopInterface", mappedBy="section") | |||
*/ | |||
protected $orderShops; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\ProductCategoryInterface", mappedBy="section") | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductCategoryInterface", mappedBy="section") | |||
*/ | |||
protected $productCategories; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context ; | |||
namespace Lc\CaracoleBundle\Model\Site ; | |||
interface NewsInterface | |||
{ |
@@ -1,20 +1,20 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Site; | |||
use App\Entity\Hub; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\ShopBundle\Model\AbstractDocumentEntity; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Model\AbstractDocumentEntity; | |||
use Gedmo\Mapping\Annotation as Gedmo; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class News extends AbstractDocumentEntity implements FilterMerchantInterface | |||
abstract class NewsModel extends AbstractDocumentEntity implements FilterMerchantInterface | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="news") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="news") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\Site; | |||
interface PageInterface | |||
{ |
@@ -1,15 +1,15 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Site; | |||
use App\Entity\Hub; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class Page extends AbstractDocumentEntity implements FilterMerchantInterface | |||
abstract class PageModel extends AbstractDocumentEntity implements FilterMerchantInterface | |||
{ | |||
/** | |||
* @ORM\Column(type="text", nullable=true) | |||
@@ -17,7 +17,7 @@ abstract class Page extends AbstractDocumentEntity implements FilterMerchantInte | |||
protected $content; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="pages") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="pages") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context ; | |||
namespace Lc\CaracoleBundle\Model\Ticket ; | |||
interface TicketInterface | |||
{ |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context ; | |||
namespace Lc\CaracoleBundle\Model\Ticket ; | |||
interface TicketMessageInterface | |||
{ |
@@ -1,29 +1,28 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Ticket; | |||
use App\Entity\Ticket; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\TicketInterface; | |||
use Lc\CaracoleBundle\Model\Ticket\TicketInterface; | |||
use Gedmo\Mapping\Annotation as Gedmo; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class TicketMessage extends AbstractEntity | |||
abstract class TicketMessageModel extends AbstractEntity | |||
{ | |||
use StatusTrait; | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; | |||
@@ -34,7 +33,7 @@ abstract class TicketMessage extends AbstractEntity | |||
protected $message; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\TicketInterface", inversedBy="ticketMessages") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Ticket\TicketInterface", inversedBy="ticketMessages") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $ticket; |
@@ -1,22 +1,22 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\Ticket; | |||
use App\Entity\TicketMessage; | |||
use App\Entity\User; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\ShopBundle\Context\MerchantInterface; | |||
use Lc\ShopBundle\Context\OrderShopInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\Order\OrderShopInterface; | |||
use Gedmo\Mapping\Annotation as Gedmo; | |||
use Lc\ShopBundle\Context\UserInterface; | |||
use Lc\CaracoleBundle\Model\User\UserInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class Ticket extends AbstractEntity implements FilterMerchantInterface | |||
abstract class TicketModel extends AbstractEntity implements FilterMerchantInterface | |||
{ | |||
const TYPE_PRODUCT_UNAVAILABLE = 'product-unavailable' ; | |||
const TYPE_PRODUCT_ERROR = 'product-error' ; | |||
@@ -32,20 +32,20 @@ abstract class Ticket extends AbstractEntity implements FilterMerchantInterface | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
@@ -61,7 +61,7 @@ abstract class Ticket extends AbstractEntity implements FilterMerchantInterface | |||
protected $status; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", inversedBy="tickets") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShopInterface", inversedBy="tickets") | |||
*/ | |||
protected $orderShop; | |||
@@ -96,13 +96,13 @@ abstract class Ticket extends AbstractEntity implements FilterMerchantInterface | |||
protected $visitorToken; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\TicketMessageInterface", mappedBy="ticket", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Ticket\TicketMessageInterface", mappedBy="ticket", orphanRemoval=true) | |||
* @ORM\OrderBy({"id" = "ASC"}) | |||
*/ | |||
protected $ticketMessages; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="tickets") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", inversedBy="tickets") | |||
*/ | |||
protected $user; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\User; | |||
interface GroupUserInterface | |||
{ |
@@ -1,27 +1,27 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\User; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class GroupUser extends AbstractDocumentEntity implements FilterMerchantInterface | |||
abstract class GroupUserModel extends AbstractDocumentEntity implements FilterMerchantInterface | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="groupUsers") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="groupUsers") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\UserInterface", mappedBy="groupUsers") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", mappedBy="groupUsers") | |||
*/ | |||
protected $users; | |||
@@ -50,14 +50,14 @@ abstract class GroupUser extends AbstractDocumentEntity implements FilterMerchan | |||
} | |||
/** | |||
* @return Collection|User[] | |||
* @return Collection|UserModel[] | |||
*/ | |||
public function getUsers(): Collection | |||
{ | |||
return $this->users; | |||
} | |||
public function addUser(User $user): self | |||
public function addUser(UserModel $user): self | |||
{ | |||
if (!$this->users->contains($user)) { | |||
$this->users[] = $user; | |||
@@ -66,7 +66,7 @@ abstract class GroupUser extends AbstractDocumentEntity implements FilterMerchan | |||
return $this; | |||
} | |||
public function removeUser(User $user): self | |||
public function removeUser(UserModel $user): self | |||
{ | |||
if ($this->users->contains($user)) { | |||
$this->users->removeElement($user); |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\User; | |||
interface UserInterface | |||
{ |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\User; | |||
interface UserMerchantInterface | |||
{ |
@@ -1,28 +1,28 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\User; | |||
use App\Entity\CreditHistory; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\ShopBundle\Context\CreditHistoryInterface; | |||
use Lc\ShopBundle\Context\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
* | |||
*/ | |||
abstract class UserMerchant implements FilterMerchantInterface | |||
abstract class UserMerchantModel implements FilterMerchantInterface | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="userMerchants") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", inversedBy="userMerchants") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $user; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $merchant; | |||
@@ -38,7 +38,7 @@ abstract class UserMerchant implements FilterMerchantInterface | |||
protected $creditActive; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\CreditHistoryInterface", mappedBy="userMerchant", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface", mappedBy="userMerchant", orphanRemoval=true) | |||
*/ | |||
protected $creditHistories; | |||
@@ -52,12 +52,12 @@ abstract class UserMerchant implements FilterMerchantInterface | |||
$this->creditHistories = new ArrayCollection(); | |||
} | |||
public function getUser(): ?User | |||
public function getUser(): ?UserModel | |||
{ | |||
return $this->user; | |||
} | |||
public function setUser(?User $user): self | |||
public function setUser(?UserModel $user): self | |||
{ | |||
$this->user = $user; | |||
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\User; | |||
use App\Entity\Newsletter; | |||
use App\Entity\Ticket; | |||
@@ -10,14 +10,14 @@ use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Gedmo\Mapping\Annotation as Gedmo; | |||
use Lc\SovBundle\Model\User\User as SovUserModel; | |||
use Lc\ShopBundle\Context\MerchantInterface; | |||
use Lc\ShopBundle\Context\TicketInterface; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\Ticket\TicketInterface; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
* | |||
*/ | |||
abstract class User extends SovUserModel | |||
abstract class UserModel extends SovUserModel | |||
{ | |||
/** | |||
* @ORM\Column(type="string", length=20, nullable=true) | |||
@@ -30,17 +30,17 @@ abstract class User extends SovUserModel | |||
protected $behaviorDisplayPrice; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface") | |||
*/ | |||
protected $merchant; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\AddressInterface", mappedBy="user", cascade={"persist"}) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Address\AddressInterface", mappedBy="user", cascade={"persist"}) | |||
*/ | |||
protected $addresses; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\OrderShopInterface", mappedBy="user") | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShopInterface", mappedBy="user") | |||
*/ | |||
protected $orders; | |||
@@ -60,32 +60,32 @@ abstract class User extends SovUserModel | |||
protected $gender; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\NewsletterInterface", inversedBy="users") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Newsletter\NewsletterInterface", inversedBy="users") | |||
*/ | |||
protected $newsletters; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\GroupUserInterface", inversedBy="users") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\User\GroupUserInterface", inversedBy="users") | |||
*/ | |||
protected $groupUsers; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductFamilyInterface") | |||
*/ | |||
protected $favoriteProductFamilies; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\UserPointSaleInterface", mappedBy="user", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\User\UserPointSaleInterface", mappedBy="user", orphanRemoval=true) | |||
*/ | |||
protected $userPointSales; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\UserMerchantInterface", mappedBy="user", orphanRemoval=true) | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\User\UserMerchantInterface", mappedBy="user", orphanRemoval=true) | |||
*/ | |||
protected $userMerchants; | |||
/** | |||
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\TicketInterface", mappedBy="user") | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Ticket\TicketInterface", mappedBy="user") | |||
*/ | |||
protected $tickets; | |||
@@ -96,7 +96,7 @@ abstract class User extends SovUserModel | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\ShopBundle\Context\ReductionCreditInterface", mappedBy="users") | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface", mappedBy="users") | |||
*/ | |||
protected $reductionCredits; | |||
@@ -308,14 +308,14 @@ abstract class User extends SovUserModel | |||
} | |||
/** | |||
* @return Collection|GroupUser[] | |||
* @return Collection|GroupUserModel[] | |||
*/ | |||
public function getGroupUsers(): Collection | |||
{ | |||
return $this->groupUsers; | |||
} | |||
public function addGroupUser(GroupUser $groupUser): self | |||
public function addGroupUser(GroupUserModel $groupUser): self | |||
{ | |||
if (!$this->groupUsers->contains($groupUser)) { | |||
$this->groupUsers[] = $groupUser; | |||
@@ -325,7 +325,7 @@ abstract class User extends SovUserModel | |||
return $this; | |||
} | |||
public function removeGroupUser(GroupUser $groupUser): self | |||
public function removeGroupUser(GroupUserModel $groupUser): self | |||
{ | |||
if ($this->groupUsers->contains($groupUser)) { | |||
$this->groupUsers->removeElement($groupUser); | |||
@@ -362,7 +362,7 @@ abstract class User extends SovUserModel | |||
} | |||
/** | |||
* @return Collection|UserPointSale[] | |||
* @return Collection|UserPointSaleModel[] | |||
*/ | |||
public function getUserPointSales(): Collection | |||
{ |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\User; | |||
interface UserPointSaleInterface | |||
{ |
@@ -1,22 +1,22 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\User; | |||
use Doctrine\ORM\Mapping as ORM; | |||
/** | |||
* @ORM\MappedSuperclass | |||
*/ | |||
abstract class UserPointSale | |||
abstract class UserPointSaleModel | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="userPointSales") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", inversedBy="userPointSales") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $user; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\PointSaleInterface", inversedBy="userPointSales") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\PointSale\PointSaleInterface", inversedBy="userPointSales") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $pointSale; | |||
@@ -26,12 +26,12 @@ abstract class UserPointSale | |||
*/ | |||
protected $comment; | |||
public function getUser(): ?User | |||
public function getUser(): ?UserModel | |||
{ | |||
return $this->user; | |||
} | |||
public function setUser(?User $user): self | |||
public function setUser(?UserModel $user): self | |||
{ | |||
$this->user = $user; | |||
@@ -1,8 +0,0 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
interface UserUtilsInterface | |||
{ | |||
} |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
namespace Lc\CaracoleBundle\Model\User; | |||
interface VisitorInterface | |||
{ |
@@ -1,6 +1,6 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Model; | |||
namespace Lc\CaracoleBundle\Model\User; | |||
use App\Entity\OrderShop; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
@@ -10,7 +10,7 @@ use Doctrine\ORM\Mapping as ORM; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class Visitor | |||
abstract class VisitorModel | |||
{ | |||
/** | |||
* @ORM\Column(type="string", length=255) | |||
@@ -33,7 +33,7 @@ abstract class Visitor | |||
protected $totalVisit; | |||
/** | |||
* @ORM\OneToMany(targetEntity="App\Entity\OrderShop", mappedBy="visitor") | |||
* @ORM\OneToMany(targetEntity="Lc\CaracoleBundle\Model\Order\OrderShop", mappedBy="visitor") | |||
*/ | |||
protected $orders; | |||