src/Entity/Banco.php line 16

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\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. /**
  9.  * @ORM\Entity(repositoryClass="App\Repository\BancoRepository")
  10.  * @ORM\Table(name="banco", schema="perseo")
  11.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
  12.  */
  13. class Banco
  14. {
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\Column(type="bigint", options={"unsigned":true})
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="string", nullable=true)
  23.      */
  24.     private $nombre;
  25.     /**
  26.      * @ORM\Column(type="string", nullable=true)
  27.      */
  28.     private $entidad;
  29.     /**
  30.      * @ORM\Column(type="string", nullable=true)
  31.      */
  32.     private $ciudad;
  33.     /**
  34.      * @ORM\Column(type="string", nullable=true)
  35.      */
  36.     private $iban;
  37.     /**
  38.      * @ORM\Column(type="string", nullable=true)
  39.      */
  40.     private $swift;
  41.     /**
  42.      * @ORM\Column(type="string", nullable=true)
  43.      */
  44.     private $propietario;
  45.     /**
  46.      * @ORM\Column(type="string", nullable=true)
  47.      */
  48.     private $vat;
  49.     /**
  50.      * @ORM\Column(type="boolean", nullable=true)
  51.      */
  52.     private $active;
  53.     /**
  54.      * @ORM\Column(type="datetime", nullable=true, name="deleted_at")
  55.      */
  56.     private $deletedAt;
  57.     /**
  58.      * @ORM\Column(type="datetime", nullable=false, name="updated_at", options={"default":"2022-01-01 00:00:00"})
  59.      * @Gedmo\Timestampable(on="update")
  60.      */
  61.     private $updatedAt;
  62.     /**
  63.      * @ORM\Column(type="datetime", nullable=false, name="created_at", options={"default":"2022-01-01 00:00:00"})
  64.      * @Gedmo\Timestampable(on="create")
  65.      */
  66.     private $createdAt;
  67.     /**
  68.      * @ORM\OneToMany(targetEntity="App\Entity\Operacion", mappedBy="banco")
  69.      */
  70.     private $operaciones;
  71.     /*
  72.      * @ORM\ManyToOne(targetEntity="App\Entity\Ciudad", inversedBy="bancos")
  73.      * @ORM\JoinColumn(name="ciudad_id", referencedColumnName="id")
  74.      */
  75.     //private $ciudad;
  76.     public function __construct()
  77.     {
  78.         $this->operaciones = new ArrayCollection();
  79.     }
  80.     public function __toString(): string
  81.     {
  82.         return $this->getEntidad()??'---';
  83.     }
  84.     public function getId(): ?string
  85.     {
  86.         return $this->id;
  87.     }
  88.     public function getEntidad(): ?string
  89.     {
  90.         return $this->entidad;
  91.     }
  92.     public function setEntidad(?string $entidad): self
  93.     {
  94.         $this->entidad $entidad;
  95.         return $this;
  96.     }
  97.     public function getIban(): ?string
  98.     {
  99.         return $this->iban;
  100.     }
  101.     public function setIban(?string $iban): self
  102.     {
  103.         $this->iban $iban;
  104.         return $this;
  105.     }
  106.     public function getSwift(): ?string
  107.     {
  108.         return $this->swift;
  109.     }
  110.     public function setSwift(?string $swift): self
  111.     {
  112.         $this->swift $swift;
  113.         return $this;
  114.     }
  115.     public function getPropietario(): ?string
  116.     {
  117.         return $this->propietario;
  118.     }
  119.     public function setPropietario(?string $propietario): self
  120.     {
  121.         $this->propietario $propietario;
  122.         return $this;
  123.     }
  124.     public function getVat(): ?string
  125.     {
  126.         return $this->vat;
  127.     }
  128.     public function setVat(?string $vat): self
  129.     {
  130.         $this->vat $vat;
  131.         return $this;
  132.     }
  133.     public function getActive(): ?bool
  134.     {
  135.         return $this->active;
  136.     }
  137.     public function setActive(?bool $active): self
  138.     {
  139.         $this->active $active;
  140.         return $this;
  141.     }
  142.     public function getDeletedAt(): ?\DateTimeInterface
  143.     {
  144.         return $this->deletedAt;
  145.     }
  146.     public function setDeletedAt(?\DateTimeInterface $deletedAt): self
  147.     {
  148.         $this->deletedAt $deletedAt;
  149.         return $this;
  150.     }
  151.     public function getUpdatedAt(): ?\DateTimeInterface
  152.     {
  153.         return $this->updatedAt;
  154.     }
  155.     public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  156.     {
  157.         $this->updatedAt $updatedAt;
  158.         return $this;
  159.     }
  160.     public function getCreatedAt(): ?\DateTimeInterface
  161.     {
  162.         return $this->createdAt;
  163.     }
  164.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  165.     {
  166.         $this->createdAt $createdAt;
  167.         return $this;
  168.     }
  169.     /**
  170.      * @return Collection|Operacion[]
  171.      */
  172.     public function getOperaciones(): Collection
  173.     {
  174.         return $this->operaciones;
  175.     }
  176.     public function addOperacione(Operacion $operacione): self
  177.     {
  178.         if (!$this->operaciones->contains($operacione)) {
  179.             $this->operaciones[] = $operacione;
  180.             $operacione->setBanco($this);
  181.         }
  182.         return $this;
  183.     }
  184.     public function removeOperacione(Operacion $operacione): self
  185.     {
  186.         if ($this->operaciones->removeElement($operacione)) {
  187.             // set the owning side to null (unless already changed)
  188.             if ($operacione->getBanco() === $this) {
  189.                 $operacione->setBanco(null);
  190.             }
  191.         }
  192.         return $this;
  193.     }
  194.     public function getCiudad(): ?string
  195.     {
  196.         return $this->ciudad;
  197.     }
  198.     public function setCiudad(?string $ciudad): self
  199.     {
  200.         $this->ciudad $ciudad;
  201.         return $this;
  202.     }
  203.     public function isActivo(): ?bool
  204.     {
  205.         return $this->activo;
  206.     }
  207.     public function getNombre(): ?string
  208.     {
  209.         return $this->nombre;
  210.     }
  211.     public function setNombre(?string $nombre): static
  212.     {
  213.         $this->nombre $nombre;
  214.         return $this;
  215.     }
  216.     public function isActive(): ?bool
  217.     {
  218.         return $this->active;
  219.     }
  220. }