src/Entity/DocumentoRiga.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Ramsey\Uuid\UuidInterface;
  5. use Ramsey\Uuid\Doctrine\UuidGenerator;
  6. /**
  7.  * @ORM\Entity()
  8.  */
  9. class DocumentoRiga
  10. {
  11.     /**
  12.      * @var UuidInterface
  13.      *
  14.      * @ORM\Id()
  15.      * @ORM\Column(type="uuid", unique=true)
  16.      * @ORM\GeneratedValue(strategy="CUSTOM")
  17.      * @ORM\CustomIdGenerator(class=UuidGenerator::class)
  18.      */
  19.     private $uid;
  20.     /**
  21.      * Codice prodotto
  22.      *
  23.      * @var string
  24.      *
  25.      * @ORM\Column(type="string")
  26.      */
  27.     private $code;
  28.     /**
  29.      * Nome articolo
  30.      *
  31.      * @var string
  32.      *
  33.      * @ORM\Column(type="string")
  34.      */
  35.     private $name;
  36.     /**
  37.      * Unità di misura per il prodotto
  38.      *
  39.      * @var string
  40.      *
  41.      * @ORM\Column(type="string")
  42.      */
  43.     private $um;
  44.     /**
  45.      * Quantità di prodotto
  46.      *
  47.      * @var double
  48.      *
  49.      * @ORM\Column(type="float")
  50.      */
  51.     private $quantity;
  52.     /**
  53.      * Descrizione del prodotto
  54.      *
  55.      * @var string
  56.      *
  57.      * @ORM\Column(type="string")
  58.      */
  59.     private $description;
  60.     /**
  61.      * Prezzo unitario netto (IVA esclusa)
  62.      *
  63.      * @var double
  64.      *
  65.      * @ORM\Column(type="float")
  66.      */
  67.     private $unitPrice;
  68.     /**
  69.      * Prezzo unitario lordo (comprensivo di IVA)
  70.      *
  71.      * @var double
  72.      *
  73.      * @ORM\Column(type="float")
  74.      */
  75.     private $totalPrice;
  76.     /**
  77.      * Valore IVA (percentuale)
  78.      *
  79.      * @var double
  80.      *
  81.      * @ORM\Column(type="float")
  82.      */
  83.     private $vatRate;
  84.     /**
  85.      * Descrizione della tipologia di IVA
  86.      *
  87.      * @var string
  88.      *
  89.      * @ORM\Column(type="string")
  90.      */
  91.     private $vatDescription;
  92.     /**
  93.      * @var Documento
  94.      *
  95.      * @ORM\ManyToOne(targetEntity="Documento", inversedBy="rows")
  96.      * @ORM\JoinColumn(referencedColumnName="uid")
  97.      */
  98.     private $document;
  99.     public function __toString()
  100.     {
  101.         return $this->getCode().' '.$this->getName().' '.$this->getQuantity();
  102.     }
  103.     public function getUid(): UuidInterface
  104.     {
  105.         return $this->uid;
  106.     }
  107.     public function setUid(UuidInterface $uid): DocumentoRiga
  108.     {
  109.         $this->uid $uid;
  110.         return $this;
  111.     }
  112.     public function getCode(): string
  113.     {
  114.         return $this->code;
  115.     }
  116.     public function setCode(string $code): DocumentoRiga
  117.     {
  118.         $this->code $code;
  119.         return $this;
  120.     }
  121.     public function getName(): string
  122.     {
  123.         return $this->name;
  124.     }
  125.     public function setName(string $name): DocumentoRiga
  126.     {
  127.         $this->name $name;
  128.         return $this;
  129.     }
  130.     public function getUm(): string
  131.     {
  132.         return $this->um;
  133.     }
  134.     public function setUm(string $um): DocumentoRiga
  135.     {
  136.         $this->um $um;
  137.         return $this;
  138.     }
  139.     public function getQuantity(): float
  140.     {
  141.         return $this->quantity;
  142.     }
  143.     public function setQuantity(float $quantity): DocumentoRiga
  144.     {
  145.         $this->quantity $quantity;
  146.         return $this;
  147.     }
  148.     public function getDescription(): string
  149.     {
  150.         return $this->description;
  151.     }
  152.     public function setDescription(string $description): DocumentoRiga
  153.     {
  154.         $this->description $description;
  155.         return $this;
  156.     }
  157.     public function getUnitPrice(): float
  158.     {
  159.         return $this->unitPrice;
  160.     }
  161.     public function setUnitPrice(float $unitPrice): DocumentoRiga
  162.     {
  163.         $this->unitPrice $unitPrice;
  164.         return $this;
  165.     }
  166.     public function getTotalPrice(): float
  167.     {
  168.         return $this->totalPrice;
  169.     }
  170.     public function setTotalPrice(float $totalPrice): DocumentoRiga
  171.     {
  172.         $this->totalPrice $totalPrice;
  173.         return $this;
  174.     }
  175.     public function getVatRate(): float
  176.     {
  177.         return $this->vatRate;
  178.     }
  179.     public function setVatRate(float $vatRate): DocumentoRiga
  180.     {
  181.         $this->vatRate $vatRate;
  182.         return $this;
  183.     }
  184.     public function getVatDescription(): string
  185.     {
  186.         return $this->vatDescription;
  187.     }
  188.     public function setVatDescription(string $vatDescription): DocumentoRiga
  189.     {
  190.         $this->vatDescription $vatDescription;
  191.         return $this;
  192.     }
  193.     public function getDocument():? Documento
  194.     {
  195.         return $this->document;
  196.     }
  197.     public function setDocument(Documento $document): DocumentoRiga
  198.     {
  199.         $this->document $document;
  200.         return $this;
  201.     }
  202. }