|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 |
- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use Doctrine\ORM\Mapping as ORM;
- use Lc\ShopBundle\Context\SortableInterface;
-
- /**
- * @ORM\MappedSuperclass()
- */
- abstract class Product extends AbstractEntity implements SortableInterface
- {
- use SortableTrait;
- /**
- * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ProductFamilyInterface", inversedBy="products")
- * @ORM\JoinColumn(nullable=false)
- */
- protected $productFamily;
-
- /**
- * @ORM\Column(type="string", length=255, nullable=true)
- */
- protected $title;
-
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $price;
-
- /**
- * @ORM\Column(type="string", length=31, nullable=true)
- */
- protected $unit;
-
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $step;
-
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $weight;
-
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $availableQuantity;
-
- /**
- * @ORM\Column(type="float", nullable=true)
- */
- protected $stock;
-
-
- public function getProductFamily(): ?ProductFamily
- {
- return $this->productFamily;
- }
-
- public function setProductFamily(?ProductFamily $productFamily): self
- {
- $this->productFamily = $productFamily;
-
- return $this;
- }
-
- public function getPrice(): ?float
- {
- return $this->price;
- }
-
- public function setPrice(?float $price): self
- {
- $this->price = $price;
-
- return $this;
- }
-
- public function getUnit(): ?string
- {
- return $this->unit;
- }
-
- public function setUnit(?string $unit): self
- {
- $this->unit = $unit;
-
- return $this;
- }
-
- public function getStep(): ?float
- {
- return $this->step;
- }
-
- public function setStep(?float $step): self
- {
- $this->step = $step;
-
- return $this;
- }
-
- public function getWeight(): ?float
- {
- return $this->weight;
- }
-
- public function setWeight(?float $weight): self
- {
- $this->weight = $weight;
-
- return $this;
- }
-
- public function getAvailableQuantity(): ?float
- {
- return $this->availableQuantity;
- }
-
- public function setAvailableQuantity(?float $availableQuantity): self
- {
- $this->availableQuantity = $availableQuantity;
-
- return $this;
- }
-
- public function getStock(): ?float
- {
- return $this->stock;
- }
-
- public function setStock(?float $stock): self
- {
- $this->stock = $stock;
-
- return $this;
- }
-
- public function getTitle(): ?string
- {
- return $this->title;
- }
-
- public function setTitle(?string $title): self
- {
- $this->title = $title;
-
- return $this;
- }
- }
|