src/Entity/ComOfertaComercial.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ComOfertaComercialRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassComOfertaComercialRepository::class)]
  9. class ComOfertaComercial
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\ManyToOne(inversedBy'comOfertaComerciales')] // plural aquĆ­
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private ?TerEmpresa $terEmpresa null;
  18.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  19.     private ?\DateTimeInterface $fechaEmision null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $consecutivo null;
  22.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  23.     private ?\DateTimeInterface $vigenciaOferta null;
  24.     #[ORM\Column(length255nullabletrue)]
  25.     private ?string $observacionesOferta null;
  26.     #[ORM\Column(length255nullabletrue)]
  27.     private ?string $cargarOfertaPdf null;
  28.     #[ORM\Column(length255nullabletrue)]
  29.     private ?string $ofertaExcel null;
  30.     #[ORM\OneToMany(mappedBy'comOfertaComercial'targetEntityComResultadoNegociacion::class)]
  31.     private Collection $comResultadoNegociacion;
  32.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  33.     private ?\DateTimeInterface $createAt null;
  34.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  35.     private ?\DateTimeInterface $updateAt null;
  36.     #[ORM\Column(length255nullabletrue)]
  37.     private ?string $createUser null;
  38.     #[ORM\Column(length255nullabletrue)]
  39.     private ?string $updateUser null;
  40.     #[ORM\ManyToOne(inversedBy'comOfertaComercial')]
  41.     private ?TerPersona $terPersona null;
  42.     #[ORM\ManyToOne(inversedBy'comOfertaComercials')]
  43.     private ?TerEmpresaCliente $comProspectoCliente null;
  44.     #[ORM\ManyToMany(targetEntityComCreacionCliente::class, mappedBy'consecutivoAsociado')]
  45.     private Collection $comCreacionClientes;
  46.     #[ORM\OneToMany(mappedBy'comOfertaComercial'targetEntityComHojaVida::class)]
  47.     private Collection $comHojaVidas;
  48.     #[ORM\OneToMany(mappedBy'comOfertaComercial'targetEntityComServiciosContratados::class)]
  49.     private Collection $comServiciosContratados;
  50.     public function __construct()
  51.     {
  52.         $this->comResultadoNegociacion = new ArrayCollection();
  53.         $this->comCreacionClientes = new ArrayCollection();
  54.         $this->comHojaVidas = new ArrayCollection();
  55.         $this->comServiciosContratados = new ArrayCollection();
  56.     }
  57.     public function getId(): ?int
  58.     {
  59.         return $this->id;
  60.     }
  61.     public function getTerEmpresa(): ?TerEmpresa
  62.     {
  63.         return $this->terEmpresa;
  64.     }
  65.     public function setTerEmpresa(TerEmpresa $terEmpresa): static
  66.     {
  67.         $this->terEmpresa $terEmpresa;
  68.         return $this;
  69.     }
  70.     public function getFechaEmision(): ?\DateTimeInterface
  71.     {
  72.         return $this->fechaEmision;
  73.     }
  74.     public function setFechaEmision(\DateTimeInterface $fechaEmision): static
  75.     {
  76.         $this->fechaEmision $fechaEmision;
  77.         return $this;
  78.     }
  79.     public function getConsecutivo(): ?string
  80.     {
  81.         return $this->consecutivo;
  82.     }
  83.     public function setConsecutivo(?string $consecutivo): static
  84.     {
  85.         $this->consecutivo $consecutivo;
  86.         return $this;
  87.     }
  88.     public function getVigenciaOferta(): ?\DateTimeInterface
  89.     {
  90.         return $this->vigenciaOferta;
  91.     }
  92.     public function setVigenciaOferta(\DateTimeInterface $vigenciaOferta): static
  93.     {
  94.         $this->vigenciaOferta $vigenciaOferta;
  95.         return $this;
  96.     }
  97.     public function getObservacionesOferta(): ?string
  98.     {
  99.         return $this->observacionesOferta;
  100.     }
  101.     public function setObservacionesOferta(?string $observacionesOferta): static
  102.     {
  103.         $this->observacionesOferta $observacionesOferta;
  104.         return $this;
  105.     }
  106.     public function getCargarOfertaPdf(): ?string
  107.     {
  108.         return $this->cargarOfertaPdf;
  109.     }
  110.     public function setCargarOfertaPdf(string $cargarOfertaPdf): static
  111.     {
  112.         $this->cargarOfertaPdf $cargarOfertaPdf;
  113.         return $this;
  114.     }
  115.     public function getOfertaExcel(): ?string
  116.     {
  117.         return $this->ofertaExcel;
  118.     }
  119.     public function setOfertaExcel(string $ofertaExcel): static
  120.     {
  121.         $this->ofertaExcel $ofertaExcel;
  122.         return $this;
  123.     }
  124.     /**
  125.      * @return Collection<int, ComResultadoNegociacion>
  126.      */
  127.     public function getComResultadoNegociacion(): Collection
  128.     {
  129.         return $this->comResultadoNegociacion;
  130.     }
  131.     public function addComResultadoNegociacion(ComResultadoNegociacion $comResultadoNegociacion): static
  132.     {
  133.         if (!$this->comResultadoNegociacion->contains($comResultadoNegociacion)) {
  134.             $this->comResultadoNegociacion->add($comResultadoNegociacion);
  135.             $comResultadoNegociacion->setComOfertaComercial($this);
  136.         }
  137.         return $this;
  138.     }
  139.     public function removeComResultadoNegociacion(ComResultadoNegociacion $comResultadoNegociacion): static
  140.     {
  141.         if ($this->comResultadoNegociacion->removeElement($comResultadoNegociacion)) {
  142.             // set the owning side to null (unless already changed)
  143.             if ($comResultadoNegociacion->getComOfertaComercial() === $this) {
  144.                 $comResultadoNegociacion->setComOfertaComercial(null);
  145.             }
  146.         }
  147.         return $this;
  148.     }
  149.     public function getCreateAt(): ?\DateTimeInterface
  150.     {
  151.         return $this->createAt;
  152.     }
  153.     public function setCreateAt(?\DateTimeInterface $createAt): static
  154.     {
  155.         $this->createAt $createAt;
  156.         return $this;
  157.     }
  158.     public function getUpdateAt(): ?\DateTimeInterface
  159.     {
  160.         return $this->updateAt;
  161.     }
  162.     public function setUpdateAt(?\DateTimeInterface $updateAt): static
  163.     {
  164.         $this->updateAt $updateAt;
  165.         return $this;
  166.     }
  167.     public function getCreateUser(): ?string
  168.     {
  169.         return $this->createUser;
  170.     }
  171.     public function setCreateUser(?string $createUser): static
  172.     {
  173.         $this->createUser $createUser;
  174.         return $this;
  175.     }
  176.     public function getUpdateUser(): ?string
  177.     {
  178.         return $this->updateUser;
  179.     }
  180.     public function setUpdateUser(?string $updateUser): static
  181.     {
  182.         $this->updateUser $updateUser;
  183.         return $this;
  184.     }
  185.     public function getTerPersona(): ?TerPersona
  186.     {
  187.         return $this->terPersona;
  188.     }
  189.     public function setTerPersona(?TerPersona $terPersona): static
  190.     {
  191.         $this->terPersona $terPersona;
  192.         return $this;
  193.     }
  194.     public function getComProspectoCliente(): ?TerEmpresaCliente
  195.     {
  196.         return $this->comProspectoCliente;
  197.     }
  198.     public function setComProspectoCliente(?TerEmpresaCliente $comProspectoCliente): static
  199.     {
  200.         $this->comProspectoCliente $comProspectoCliente;
  201.         return $this;
  202.     }
  203.     /**
  204.      * @return Collection<int, ComCreacionCliente>
  205.      */
  206.     public function getComCreacionClientes(): Collection
  207.     {
  208.         return $this->comCreacionClientes;
  209.     }
  210.     public function addComCreacionCliente(ComCreacionCliente $comCreacionCliente): static
  211.     {
  212.         if (!$this->comCreacionClientes->contains($comCreacionCliente)) {
  213.             $this->comCreacionClientes->add($comCreacionCliente);
  214.             $comCreacionCliente->addConsecutivoAsociado($this);
  215.         }
  216.         return $this;
  217.     }
  218.     public function removeComCreacionCliente(ComCreacionCliente $comCreacionCliente): static
  219.     {
  220.         if ($this->comCreacionClientes->removeElement($comCreacionCliente)) {
  221.             $comCreacionCliente->removeConsecutivoAsociado($this);
  222.         }
  223.         return $this;
  224.     }
  225.     /**
  226.      * @return Collection<int, ComHojaVida>
  227.      */
  228.     public function getComHojaVidas(): Collection
  229.     {
  230.         return $this->comHojaVidas;
  231.     }
  232.     public function addComHojaVida(ComHojaVida $comHojaVida): static
  233.     {
  234.         if (!$this->comHojaVidas->contains($comHojaVida)) {
  235.             $this->comHojaVidas->add($comHojaVida);
  236.             $comHojaVida->setComOfertaComercial($this);
  237.         }
  238.         return $this;
  239.     }
  240.     public function removeComHojaVida(ComHojaVida $comHojaVida): static
  241.     {
  242.         if ($this->comHojaVidas->removeElement($comHojaVida)) {
  243.             // set the owning side to null (unless already changed)
  244.             if ($comHojaVida->getComOfertaComercial() === $this) {
  245.                 $comHojaVida->setComOfertaComercial(null);
  246.             }
  247.         }
  248.         return $this;
  249.     }
  250.     /**
  251.      * @return Collection<int, ComServiciosContratados>
  252.      */
  253.     public function getComServiciosContratados(): Collection
  254.     {
  255.         return $this->comServiciosContratados;
  256.     }
  257.     public function addComServiciosContratado(ComServiciosContratados $comServiciosContratado): static
  258.     {
  259.         if (!$this->comServiciosContratados->contains($comServiciosContratado)) {
  260.             $this->comServiciosContratados->add($comServiciosContratado);
  261.             $comServiciosContratado->setComOfertaComercial($this);
  262.         }
  263.         return $this;
  264.     }
  265.     public function removeComServiciosContratado(ComServiciosContratados $comServiciosContratado): static
  266.     {
  267.         if ($this->comServiciosContratados->removeElement($comServiciosContratado)) {
  268.             // set the owning side to null (unless already changed)
  269.             if ($comServiciosContratado->getComOfertaComercial() === $this) {
  270.                 $comServiciosContratado->setComOfertaComercial(null);
  271.             }
  272.         }
  273.         return $this;
  274.     }
  275. }