<?phpnamespace App\Entity;use Doctrine\ORM\Mapping as ORM;use Ramsey\Uuid\UuidInterface;use Ramsey\Uuid\Doctrine\UuidGenerator;/** * @ORM\Entity() */class DocumentoRiga{ /** * @var UuidInterface * * @ORM\Id() * @ORM\Column(type="uuid", unique=true) * @ORM\GeneratedValue(strategy="CUSTOM") * @ORM\CustomIdGenerator(class=UuidGenerator::class) */ private $uid; /** * Codice prodotto * * @var string * * @ORM\Column(type="string") */ private $code; /** * Nome articolo * * @var string * * @ORM\Column(type="string") */ private $name; /** * Unità di misura per il prodotto * * @var string * * @ORM\Column(type="string") */ private $um; /** * Quantità di prodotto * * @var double * * @ORM\Column(type="float") */ private $quantity; /** * Descrizione del prodotto * * @var string * * @ORM\Column(type="string") */ private $description; /** * Prezzo unitario netto (IVA esclusa) * * @var double * * @ORM\Column(type="float") */ private $unitPrice; /** * Prezzo unitario lordo (comprensivo di IVA) * * @var double * * @ORM\Column(type="float") */ private $totalPrice; /** * Valore IVA (percentuale) * * @var double * * @ORM\Column(type="float") */ private $vatRate; /** * Descrizione della tipologia di IVA * * @var string * * @ORM\Column(type="string") */ private $vatDescription; /** * @var Documento * * @ORM\ManyToOne(targetEntity="Documento", inversedBy="rows") * @ORM\JoinColumn(referencedColumnName="uid") */ private $document; public function __toString() { return $this->getCode().' '.$this->getName().' '.$this->getQuantity(); } public function getUid(): UuidInterface { return $this->uid; } public function setUid(UuidInterface $uid): DocumentoRiga { $this->uid = $uid; return $this; } public function getCode(): string { return $this->code; } public function setCode(string $code): DocumentoRiga { $this->code = $code; return $this; } public function getName(): string { return $this->name; } public function setName(string $name): DocumentoRiga { $this->name = $name; return $this; } public function getUm(): string { return $this->um; } public function setUm(string $um): DocumentoRiga { $this->um = $um; return $this; } public function getQuantity(): float { return $this->quantity; } public function setQuantity(float $quantity): DocumentoRiga { $this->quantity = $quantity; return $this; } public function getDescription(): string { return $this->description; } public function setDescription(string $description): DocumentoRiga { $this->description = $description; return $this; } public function getUnitPrice(): float { return $this->unitPrice; } public function setUnitPrice(float $unitPrice): DocumentoRiga { $this->unitPrice = $unitPrice; return $this; } public function getTotalPrice(): float { return $this->totalPrice; } public function setTotalPrice(float $totalPrice): DocumentoRiga { $this->totalPrice = $totalPrice; return $this; } public function getVatRate(): float { return $this->vatRate; } public function setVatRate(float $vatRate): DocumentoRiga { $this->vatRate = $vatRate; return $this; } public function getVatDescription(): string { return $this->vatDescription; } public function setVatDescription(string $vatDescription): DocumentoRiga { $this->vatDescription = $vatDescription; return $this; } public function getDocument():? Documento { return $this->document; } public function setDocument(Documento $document): DocumentoRiga { $this->document = $document; return $this; }}