src/Entity/Contador.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContadorRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. #[ORM\Table(name'`contador`')]
  8. #[ORM\Entity(repositoryClassContadorRepository::class)]
  9. class Contador extends User
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column(type'integer')]
  14.     private $id;
  15.     #[ORM\Column(type'string'length255nullabletrue)]
  16.     private $matricula;
  17.     #[ORM\Column(type'string'length255nullabletrue)]
  18.     private $domicilio;
  19.     #[ORM\Column(type'string'length20nullabletrue)]
  20.     private $telefonoFijo;
  21.     #[ORM\Column(type'string'length20)]
  22.     private $celular;
  23.     #[ORM\Column(type'string'length255nullabletrue)]
  24.     private $NombreDelEstudio;
  25.     #[ORM\Column(type'integer'nullabletrue)]
  26.     private $id_viejo;
  27.     #[ORM\ManyToOne(targetEntityLocalidad::class, inversedBy'contadors')]
  28.     private $localidad;
  29.     #[ORM\ManyToMany(targetEntityEmpresa::class, mappedBy'contador')]
  30.     private $empresas;
  31.     #[ORM\OneToMany(mappedBy'contador'targetEntitySolicitarEmpresa::class)]
  32.     private $solicitarEmpresas;
  33.     #[ORM\OneToMany(mappedBy'contador'targetEntityInformarPago::class)]
  34.     private $informarPagos;
  35.     public function __construct()
  36.     {
  37.        // parent::__construct();
  38.         $this->roles[] = 'ROLE_CONTADOR';
  39.         $this->empresas = new ArrayCollection();
  40.         $this->solicitarEmpresas = new ArrayCollection();
  41.         $this->informarPagos = new ArrayCollection();
  42.     }
  43.     // public function getId(): ?int
  44.     // {
  45.     //     return $this->id;
  46.     // }
  47.     public function getMatricula(): ?string
  48.     {
  49.         return $this->matricula;
  50.     }
  51.     public function setMatricula(?string $matricula): self
  52.     {
  53.         $this->matricula $matricula;
  54.         return $this;
  55.     }
  56.     public function getDomicilio(): ?string
  57.     {
  58.         return $this->domicilio;
  59.     }
  60.     public function setDomicilio(?string $domicilio): self
  61.     {
  62.         $this->domicilio $domicilio;
  63.         return $this;
  64.     }
  65.     public function getTelefonoFijo(): ?string
  66.     {
  67.         return $this->telefonoFijo;
  68.     }
  69.     public function setTelefonoFijo(?string $telefonoFijo): self
  70.     {
  71.         $this->telefonoFijo $telefonoFijo;
  72.         return $this;
  73.     }
  74.     public function getCelular(): ?string
  75.     {
  76.         return $this->celular;
  77.     }
  78.     public function setCelular(string $celular): self
  79.     {
  80.         $this->celular $celular;
  81.         return $this;
  82.     }
  83.     public function getNombreDelEstudio(): ?string
  84.     {
  85.         return $this->NombreDelEstudio;
  86.     }
  87.     public function setNombreDelEstudio(?string $NombreDelEstudio): self
  88.     {
  89.         $this->NombreDelEstudio $NombreDelEstudio;
  90.         return $this;
  91.     }
  92.     public function getLocalidad(): ?Localidad
  93.     {
  94.         return $this->localidad;
  95.     }
  96.     public function setLocalidad(?Localidad $localidad): self
  97.     {
  98.         $this->localidad $localidad;
  99.         return $this;
  100.     }
  101.     /**
  102.      * Get the value of id_viejo
  103.      */ 
  104.     public function getId_viejo()
  105.     {
  106.         return $this->id_viejo;
  107.     }
  108.     /**
  109.      * Set the value of id_viejo
  110.      *
  111.      * @return  self
  112.      */ 
  113.     public function setId_viejo($id_viejo)
  114.     {
  115.         $this->id_viejo $id_viejo;
  116.         return $this;
  117.     }
  118.     /**
  119.      * @return Collection<int, Empresa>
  120.      */
  121.     public function getEmpresas(): Collection
  122.     {
  123.         return $this->empresas;
  124.     }
  125.     public function addEmpresa(Empresa $empresa): self
  126.     {
  127.         if (!$this->empresas->contains($empresa)) {
  128.             $this->empresas[] = $empresa;
  129.             $empresa->addContador($this);
  130.         }
  131.         return $this;
  132.     }
  133.     public function removeEmpresa(Empresa $empresa): self
  134.     {
  135.         if ($this->empresas->removeElement($empresa)) {
  136.             $empresa->removeContador($this);
  137.         }
  138.         return $this;
  139.     }
  140.     /**
  141.      * @return Collection<int, SolicitarEmpresa>
  142.      */
  143.     public function getSolicitarEmpresas(): Collection
  144.     {
  145.         return $this->solicitarEmpresas;
  146.     }
  147.     public function addSolicitarEmpresa(SolicitarEmpresa $solicitarEmpresa): self
  148.     {
  149.         if (!$this->solicitarEmpresas->contains($solicitarEmpresa)) {
  150.             $this->solicitarEmpresas[] = $solicitarEmpresa;
  151.             $solicitarEmpresa->setContador($this);
  152.         }
  153.         return $this;
  154.     }
  155.     public function removeSolicitarEmpresa(SolicitarEmpresa $solicitarEmpresa): self
  156.     {
  157.         if ($this->solicitarEmpresas->removeElement($solicitarEmpresa)) {
  158.             // set the owning side to null (unless already changed)
  159.             if ($solicitarEmpresa->getContador() === $this) {
  160.                 $solicitarEmpresa->setContador(null);
  161.             }
  162.         }
  163.         return $this;
  164.     }
  165.     /**
  166.      * @return Collection<int, InformarPago>
  167.      */
  168.     public function getInformarPagos(): Collection
  169.     {
  170.         return $this->informarPagos;
  171.     }
  172.     public function addInformarPago(InformarPago $informarPago): self
  173.     {
  174.         if (!$this->informarPagos->contains($informarPago)) {
  175.             $this->informarPagos[] = $informarPago;
  176.             $informarPago->setContador($this);
  177.         }
  178.         return $this;
  179.     }
  180.     public function removeInformarPago(InformarPago $informarPago): self
  181.     {
  182.         if ($this->informarPagos->removeElement($informarPago)) {
  183.             // set the owning side to null (unless already changed)
  184.             if ($informarPago->getContador() === $this) {
  185.                 $informarPago->setContador(null);
  186.             }
  187.         }
  188.         return $this;
  189.     }
  190. }