|
- <?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;
- }
- }
|