src/AtechNet/CoreBundle/Entity/StockReviewCount.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping\Column;
  5. use Doctrine\ORM\Mapping\Entity;
  6. use Doctrine\ORM\Mapping\JoinColumn;
  7. use Doctrine\ORM\Mapping\ManyToOne;
  8. use Doctrine\ORM\Mapping\OneToMany;
  9. use Doctrine\ORM\Mapping\Table as Table;
  10. /**
  11.  * Stock review counts
  12.  *
  13.  * @Table(name="stock_review_counts")
  14.  * @Entity
  15.  */
  16. class StockReviewCount extends AbstractSignedEntity
  17. {
  18.     public function __construct()
  19.     {
  20.         parent::__construct();
  21.         $this->stockReviewStockItems = new ArrayCollection();
  22.     }
  23.     /**
  24.      * @var StockReview
  25.      *
  26.      * @ManyToOne(targetEntity="App\AtechNet\CoreBundle\Entity\StockReview", inversedBy="stockReviewCounts")
  27.      * @JoinColumn(name="stock_review_id", referencedColumnName="id")
  28.      */
  29.     private $stockReview;
  30.     /**
  31.      * @var Product
  32.      *
  33.      * @ManyToOne(targetEntity="App\AtechNet\CoreBundle\Entity\Product")
  34.      * @JoinColumn(name="product_id", referencedColumnName="id", nullable=true)
  35.      */
  36.     private $product;
  37.     /**
  38.      * @var StockItem
  39.      *
  40.      * @OneToMany(targetEntity="App\AtechNet\CoreBundle\Entity\StockReviewStockItem", mappedBy="stockReviewCount", cascade={"persist", "remove"})
  41.      */
  42.     private $stockReviewStockItems;
  43.     /**
  44.      * @var int
  45.      *
  46.      * @Column(name="manual_count", type="integer", nullable=true)
  47.      */
  48.     private $manualCount = 0;
  49.     /**
  50.      * @var int
  51.      *
  52.      * @Column(name="auto_count", type="integer", nullable=true)
  53.      */
  54.     private $autoCount = 0;
  55.     /**
  56.      * @var int
  57.      *
  58.      * @Column(name="actual_manual_count", type="integer")
  59.      */
  60.     private $actualManualCount = 0;
  61.     public function getStockReview()
  62.     {
  63.         return $this->stockReview;
  64.     }
  65.     public function setStockReview(StockReview $stockReview)
  66.     {
  67.         $this->stockReview = $stockReview;
  68.         return $this;
  69.     }
  70.     public function getProduct()
  71.     {
  72.         return $this->product;
  73.     }
  74.     public function setProduct(Product $product)
  75.     {
  76.         $this->product = $product;
  77.         return $this;
  78.     }
  79.     public function getStockReviewStockItems()
  80.     {
  81.         return $this->stockReviewStockItems;
  82.     }
  83.     public function setStockReviewStockItems(StockItem $stockReviewStockItems)
  84.     {
  85.         $this->stockReviewStockItems = $stockReviewStockItems;
  86.         return $this;
  87.     }
  88.     public function getManualCount()
  89.     {
  90.         return $this->manualCount;
  91.     }
  92.     public function setManualCount($manualCount)
  93.     {
  94.         $this->manualCount = $manualCount;
  95.         return $this;
  96.     }
  97.     public function getAutoCount()
  98.     {
  99.         return $this->autoCount;
  100.     }
  101.     public function setAutoCount($autoCount)
  102.     {
  103.         $this->autoCount = $autoCount;
  104.         return $this;
  105.     }
  106.     public function getActualManualCount()
  107.     {
  108.         return $this->actualManualCount;
  109.     }
  110.     public function setActualManualCount($actualManualCount)
  111.     {
  112.         $this->actualManualCount = $actualManualCount;
  113.         return $this;
  114.     }
  115. }