Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App\Entity;
- use Doctrine\Common\Collections\Collection;
- use Doctrine\ORM\Mapping as ORM;
- use Doctrine\Common\Collections\ArrayCollection;
- use Symfony\Component\Validator\Constraints as Assert;
- /**
- * @ORM\Entity
- * @ORM\Table()
- */
- class Item
- {
- /**
- * @ORM\Id
- * @ORM\Column(type="integer")
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- protected $id;
- /**
- *
- * @ORM\ManyToOne(targetEntity="Transaction", inversedBy="items")
- * @ORM\JoinColumn(nullable=false)
- */
- protected $transaction;
- /**
- * @ORM\Column(type="string", length=250)
- *
- */
- private $nome;
- /**
- * @ORM\Column(type="integer", nullable=TRUE, options={"default" : 0})
- *
- */
- private $quantita;
- /**
- * @ORM\Column(type="float", nullable=TRUE)
- *
- */
- private $prezzo;
- /**
- * @ORM\Column(type="datetime")
- */
- protected $dataRegistrazione;
- public function getId(): ?int
- {
- return $this->id;
- }
- public function getNome(): ?string
- {
- return $this->nome;
- }
- public function setNome(string $nome): self
- {
- $this->nome = $nome;
- return $this;
- }
- public function getQuantita(): ?int
- {
- return $this->quantita;
- }
- public function setQuantita(?int $quantita): self
- {
- $this->quantita = $quantita;
- return $this;
- }
- public function getPrezzo(): ?float
- {
- return $this->prezzo;
- }
- public function setPrezzo(?float $prezzo): self
- {
- $this->prezzo = $prezzo;
- return $this;
- }
- public function getDataRegistrazione(): ?\DateTimeInterface
- {
- return $this->dataRegistrazione;
- }
- public function setDataRegistrazione(\DateTimeInterface $dataRegistrazione): self
- {
- $this->dataRegistrazione = $dataRegistrazione;
- return $this;
- }
- public function getTransaction(): ?Transaction
- {
- return $this->transaction;
- }
- public function setTransaction(?Transaction $transaction): self
- {
- $this->transaction = $transaction;
- return $this;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement