<?php
namespace App\Entity\OnlineShop;
use App\Entity\AbstractBase;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Money\Currency;
use Money\Money;
/**
* @ORM\Table(name="vulco_order_supplier_shipping_cost")
* @ORM\Entity()
* @Gedmo\SoftDeleteable(fieldName="removedAt", timeAware=false)
*/
class OrderSupplierShippingCost extends AbstractBase
{
/**
* @ORM\Column(type="money")
*/
private Money $price;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\OnlineShop\Order", inversedBy="shipments")
* @ORM\JoinColumn(name="order_id", referencedColumnName="id")
*/
private Order $order;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\OnlineShop\Supplier")
* @ORM\JoinColumn(name="supplier_id", referencedColumnName="id")
*/
private Supplier $supplier;
private bool $blocked = false;
public function __construct()
{
$this->price = new Money(0, new Currency(self::DEFAULT_EURO_CURRENCY));
}
public function getPrice(): Money
{
return $this->price;
}
public function setPrice(Money $price): self
{
$this->price = $price;
return $this;
}
public function getOrder(): Order
{
return $this->order;
}
public function setOrder(Order $order): self
{
$this->order = $order;
return $this;
}
public function getSupplier(): Supplier
{
return $this->supplier;
}
public function setSupplier(Supplier $supplier): self
{
$this->supplier = $supplier;
return $this;
}
public function isBlocked(): bool
{
return $this->blocked;
}
public function getBlocked(): bool
{
return $this->isBlocked();
}
public function setBlocked(bool $blocked): self
{
$this->blocked = $blocked;
return $this;
}
}