<?php
namespace App\Entity;
use App\Entity\Interfaces\AddressInterface;
use App\Repository\SaleOrderAddressRepository;
use App\Traits\AddressTrait;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation as Serializer;
/**
* @ORM\Entity(repositoryClass=SaleOrderAddressRepository::class)
*
* @Serializer\ExclusionPolicy("ALL")
*/
class SaleOrderAddress implements AddressInterface
{
use AddressTrait;
public const BILLING_ADDRESS = 'billing_address';
public const SHIPPING_ADDRESS = 'shipping_address';
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $tva = NULL;
public function __clone()
{
if ($this->id) {
$this->setId(NULL);
}
}
public function toArray()
{
$object = get_object_vars($this);
return($object);
}
public function getTva(): ?string
{
return $this->tva;
}
public function setTva(?string $tva): self
{
$this->tva = $tva;
return $this;
}
}