src/Entity/ServicoBoletimMedicao.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\ServicoBoletimMedicaoRepository")
  8.  */
  9. class ServicoBoletimMedicao
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\PropostaComercial")
  19.      * @ORM\JoinColumn(nullable=false)
  20.      */
  21.     private $proposta;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity="App\Entity\BoletimMedicao", inversedBy="servicos")
  24.      * @ORM\JoinColumn(nullable=false)
  25.      */
  26.     private $boletim;
  27.     /**
  28.      * @ORM\ManyToOne(targetEntity="App\Entity\ServicoPropostaComercial")
  29.      * @ORM\JoinColumn(nullable=false)ServicoPropostaComercial
  30.      */
  31.     private $servico;
  32.     /**
  33.      * @ORM\Column(type="float", options={"default" : 0})
  34.      */
  35.     private $quantidade 0;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getProposta(): ?PropostaComercial
  41.     {
  42.         return $this->proposta;
  43.     }
  44.     public function setProposta(?PropostaComercial $proposta): self
  45.     {
  46.         $this->proposta $proposta;
  47.         return $this;
  48.     }
  49.     public function getBoletim(): ?BoletimMedicao
  50.     {
  51.         return $this->boletim;
  52.     }
  53.     public function setBoletim(?BoletimMedicao $boletim): self
  54.     {
  55.         $this->boletim $boletim;
  56.         return $this;
  57.     }
  58.     public function getServico(): ?ServicoPropostaComercial
  59.     {
  60.         return $this->servico;
  61.     }
  62.     public function setServico(?ServicoPropostaComercial $servico): self
  63.     {
  64.         $this->servico $servico;
  65.         return $this;
  66.     }
  67.     public function getQuantidade(): ?float
  68.     {
  69.         return $this->quantidade;
  70.     }
  71.     public function setQuantidade(?float $quantidade): self
  72.     {
  73.         if(!$quantidade){
  74.             $quantidade 0;
  75.         }
  76.         $this->quantidade $quantidade;
  77.         return $this;
  78.     }
  79. }