123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <?php
- namespace References\Fixture\ORM;
- use Doctrine\ORM\Mapping as ORM;
- use Gedmo\Mapping\Annotation as Gedmo;
- use References\Fixture\ODM\MongoDB\Product;
- /**
- * @ORM\Entity
- */
- class StockItem
- {
- /**
- * @ORM\Id
- * @ORM\Column(type="integer")
- * @ORM\GeneratedValue(strategy="IDENTITY")
- */
- private $id;
- /**
- * @ORM\Column
- */
- private $name;
- /**
- * @ORM\Column
- */
- private $sku;
- /**
- * @ORM\Column(type="integer")
- */
- private $quantity;
- /**
- * @Gedmo\ReferenceOne(type="document", class="References\Fixture\ODM\MongoDB\Product", inversedBy="stockItems", identifier="productId")
- */
- private $product;
- /**
- * @ORM\Column(type="string")
- */
- private $productId;
- public function getId()
- {
- return $this->id;
- }
- public function getName()
- {
- return $this->name;
- }
- public function setName($name)
- {
- $this->name = $name;
- }
- public function getSku()
- {
- return $this->sku;
- }
- public function setSku($sku)
- {
- $this->sku = $sku;
- }
- public function getQuantity()
- {
- return $this->quantity;
- }
- public function setQuantity($quantity)
- {
- $this->quantity = $quantity;
- }
- public function setProduct(Product $product)
- {
- $this->product = $product;
- }
- public function getProduct()
- {
- return $this->product;
- }
- public function setProductId($productId)
- {
- $this->productId = $productId;
- }
- public function getProductId()
- {
- return $this->productId;
- }
- }
|