src/Entity/OnlineShop/OrderSupplierShippingCost.php line 16

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 Gedmo\Mapping\Annotation as Gedmo;
  6. use Money\Currency;
  7. use Money\Money;
  8. /**
  9.  * @ORM\Table(name="vulco_order_supplier_shipping_cost")
  10.  * @ORM\Entity()
  11.  * @Gedmo\SoftDeleteable(fieldName="removedAt", timeAware=false)
  12.  */
  13. class OrderSupplierShippingCost extends AbstractBase
  14. {
  15.     /**
  16.      * @ORM\Column(type="money")
  17.      */
  18.     private Money $price;
  19.     /**
  20.      * @ORM\ManyToOne(targetEntity="App\Entity\OnlineShop\Order", inversedBy="shipments")
  21.      * @ORM\JoinColumn(name="order_id", referencedColumnName="id")
  22.      */
  23.     private Order $order;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\OnlineShop\Supplier")
  26.      * @ORM\JoinColumn(name="supplier_id", referencedColumnName="id")
  27.      */
  28.     private Supplier $supplier;
  29.     private bool $blocked false;
  30.     public function __construct()
  31.     {
  32.         $this->price = new Money(0, new Currency(self::DEFAULT_EURO_CURRENCY));
  33.     }
  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 getOrder(): Order
  44.     {
  45.         return $this->order;
  46.     }
  47.     public function setOrder(Order $order): self
  48.     {
  49.         $this->order $order;
  50.         return $this;
  51.     }
  52.     public function getSupplier(): Supplier
  53.     {
  54.         return $this->supplier;
  55.     }
  56.     public function setSupplier(Supplier $supplier): self
  57.     {
  58.         $this->supplier $supplier;
  59.         return $this;
  60.     }
  61.     public function isBlocked(): bool
  62.     {
  63.         return $this->blocked;
  64.     }
  65.     public function getBlocked(): bool
  66.     {
  67.         return $this->isBlocked();
  68.     }
  69.     public function setBlocked(bool $blocked): self
  70.     {
  71.         $this->blocked $blocked;
  72.         return $this;
  73.     }
  74. }