Pārlūkot izejas kodu

Correctifs updatedBy / createdBy produits

feature/export_comptable
Guillaume pirms 4 gadiem
vecāks
revīzija
2ff35d0dbb
2 mainītis faili ar 30 papildinājumiem un 0 dzēšanām
  1. +15
    -0
      ShopBundle/Model/Product.php
  2. +15
    -0
      ShopBundle/Model/ProductFamily.php

+ 15
- 0
ShopBundle/Model/Product.php Parādīt failu

@@ -11,6 +11,7 @@ use Lc\ShopBundle\Context\ProductInterface;
use Lc\ShopBundle\Context\ProductPropertyInterface;
use Lc\ShopBundle\Context\SortableInterface;
use Lc\ShopBundle\Services\Price;
use Gedmo\Mapping\Annotation as Gedmo;

/**
* @ORM\MappedSuperclass()
@@ -20,6 +21,20 @@ abstract class Product extends AbstractEntity implements SortableInterface, Prod
use SortableTrait;
use ProductPropertyTrait;

/**
* @Gedmo\Blameable(on="create")
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface")
* @ORM\JoinColumn(nullable=true)
*/
protected $createdBy;

/**
* @Gedmo\Blameable(on="update")
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface")
* @ORM\JoinColumn(nullable=true)
*/
protected $updatedBy;

/**
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface", inversedBy="products")
* @ORM\JoinColumn(nullable=false)

+ 15
- 0
ShopBundle/Model/ProductFamily.php Parādīt failu

@@ -9,6 +9,7 @@ use Lc\ShopBundle\Context\FilterMerchantInterface;
use Lc\ShopBundle\Context\PriceInterface;
use Lc\ShopBundle\Context\ProductInterface;
use Lc\ShopBundle\Context\ProductPropertyInterface;
use Gedmo\Mapping\Annotation as Gedmo;


/**
@@ -54,6 +55,20 @@ abstract class ProductFamily extends AbstractDocumentEntity implements ProductPr
//Champ hydraté par ProductFamilyUtils
protected $reductionCatalog;

/**
* @Gedmo\Blameable(on="create")
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface")
* @ORM\JoinColumn(nullable=true)
*/
protected $createdBy;

/**
* @Gedmo\Blameable(on="update")
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface")
* @ORM\JoinColumn(nullable=true)
*/
protected $updatedBy;

/**
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", inversedBy="productFamilies")
* @ORM\JoinColumn(nullable=false)

Notiek ielāde…
Atcelt
Saglabāt