Advertisement
Guest User

Item.php

a guest
Jan 17th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Entity;
  4.  
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9.  
  10.  
  11. /**
  12. * @ORM\Entity
  13. * @ORM\Table()
  14. */
  15. class Item
  16. {
  17. /**
  18. * @ORM\Id
  19. * @ORM\Column(type="integer")
  20. * @ORM\GeneratedValue(strategy="AUTO")
  21. */
  22. protected $id;
  23.  
  24. /**
  25. *
  26. * @ORM\ManyToOne(targetEntity="Transaction", inversedBy="items")
  27. * @ORM\JoinColumn(nullable=false)
  28. */
  29. protected $transaction;
  30.  
  31.  
  32. /**
  33. * @ORM\Column(type="string", length=250)
  34. *
  35. */
  36. private $nome;
  37.  
  38.  
  39. /**
  40. * @ORM\Column(type="integer", nullable=TRUE, options={"default" : 0})
  41. *
  42. */
  43. private $quantita;
  44.  
  45.  
  46. /**
  47. * @ORM\Column(type="float", nullable=TRUE)
  48. *
  49. */
  50. private $prezzo;
  51.  
  52.  
  53.  
  54. /**
  55. * @ORM\Column(type="datetime")
  56. */
  57. protected $dataRegistrazione;
  58.  
  59. public function getId(): ?int
  60. {
  61. return $this->id;
  62. }
  63.  
  64. public function getNome(): ?string
  65. {
  66. return $this->nome;
  67. }
  68.  
  69. public function setNome(string $nome): self
  70. {
  71. $this->nome = $nome;
  72.  
  73. return $this;
  74. }
  75.  
  76. public function getQuantita(): ?int
  77. {
  78. return $this->quantita;
  79. }
  80.  
  81. public function setQuantita(?int $quantita): self
  82. {
  83. $this->quantita = $quantita;
  84.  
  85. return $this;
  86. }
  87.  
  88. public function getPrezzo(): ?float
  89. {
  90. return $this->prezzo;
  91. }
  92.  
  93. public function setPrezzo(?float $prezzo): self
  94. {
  95. $this->prezzo = $prezzo;
  96.  
  97. return $this;
  98. }
  99.  
  100. public function getDataRegistrazione(): ?\DateTimeInterface
  101. {
  102. return $this->dataRegistrazione;
  103. }
  104.  
  105. public function setDataRegistrazione(\DateTimeInterface $dataRegistrazione): self
  106. {
  107. $this->dataRegistrazione = $dataRegistrazione;
  108.  
  109. return $this;
  110. }
  111.  
  112. public function getTransaction(): ?Transaction
  113. {
  114. return $this->transaction;
  115. }
  116.  
  117. public function setTransaction(?Transaction $transaction): self
  118. {
  119. $this->transaction = $transaction;
  120.  
  121. return $this;
  122. }
  123.  
  124. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement