src/Entity/OnlineShop/OrderFamilyDiscount.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\OnlineShop;
  3. use App\Entity\AbstractBase;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Money\Money;
  6. /**
  7.  * @ORM\Table(name="vulco_order_family_discount")
  8.  * @ORM\Entity()
  9.  */
  10. class OrderFamilyDiscount extends AbstractBase
  11. {
  12.     /**
  13.      * @ORM\Column(type="money")
  14.      */
  15.     private Money $price;
  16.     /**
  17.      * @ORM\Column(type="money", options={"default": "EUR 0"})
  18.      */
  19.     private Money $costPrice;
  20.     /**
  21.      * @ORM\Column(type="string", nullable=true)
  22.      */
  23.     private ?string $description null;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\OnlineShop\Order", inversedBy="discounts")
  26.      * @ORM\JoinColumn(name="order_id", referencedColumnName="id")
  27.      */
  28.     private Order $order;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity="App\Entity\OnlineShop\Family")
  31.      * @ORM\JoinColumn(name="family_id", referencedColumnName="id")
  32.      */
  33.     private Family $family;
  34.     public function getPrice(): Money
  35.     {
  36.         return $this->price;
  37.     }
  38.     public function setPrice(Money $price): self
  39.     {
  40.         $this->price $price;
  41.         return $this;
  42.     }
  43.     public function getCostPrice(): Money
  44.     {
  45.         return $this->costPrice;
  46.     }
  47.     public function setCostPrice(Money $costPrice): self
  48.     {
  49.         $this->costPrice $costPrice;
  50.         return $this;
  51.     }
  52.     public function getDescription(): ?string
  53.     {
  54.         return $this->description;
  55.     }
  56.     public function setDescription(?string $description): self
  57.     {
  58.         $this->description $description;
  59.         return $this;
  60.     }
  61.     public function getOrder(): Order
  62.     {
  63.         return $this->order;
  64.     }
  65.     public function setOrder(Order $order): self
  66.     {
  67.         $this->order $order;
  68.         return $this;
  69.     }
  70.     public function getFamily(): Family
  71.     {
  72.         return $this->family;
  73.     }
  74.     public function setFamily(Family $family): self
  75.     {
  76.         $this->family $family;
  77.         return $this;
  78.     }
  79. }