<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass="App\Repository\BancoRepository")
* @ORM\Table(name="banco", schema="perseo")
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
*/
class Banco
{
/**
* @ORM\Id
* @ORM\Column(type="bigint", options={"unsigned":true})
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $nombre;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $entidad;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $ciudad;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $iban;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $swift;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $propietario;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $vat;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $active;
/**
* @ORM\Column(type="datetime", nullable=true, name="deleted_at")
*/
private $deletedAt;
/**
* @ORM\Column(type="datetime", nullable=false, name="updated_at", options={"default":"2022-01-01 00:00:00"})
* @Gedmo\Timestampable(on="update")
*/
private $updatedAt;
/**
* @ORM\Column(type="datetime", nullable=false, name="created_at", options={"default":"2022-01-01 00:00:00"})
* @Gedmo\Timestampable(on="create")
*/
private $createdAt;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Operacion", mappedBy="banco")
*/
private $operaciones;
/*
* @ORM\ManyToOne(targetEntity="App\Entity\Ciudad", inversedBy="bancos")
* @ORM\JoinColumn(name="ciudad_id", referencedColumnName="id")
*/
//private $ciudad;
public function __construct()
{
$this->operaciones = new ArrayCollection();
}
public function __toString(): string
{
return $this->getEntidad()??'---';
}
public function getId(): ?string
{
return $this->id;
}
public function getEntidad(): ?string
{
return $this->entidad;
}
public function setEntidad(?string $entidad): self
{
$this->entidad = $entidad;
return $this;
}
public function getIban(): ?string
{
return $this->iban;
}
public function setIban(?string $iban): self
{
$this->iban = $iban;
return $this;
}
public function getSwift(): ?string
{
return $this->swift;
}
public function setSwift(?string $swift): self
{
$this->swift = $swift;
return $this;
}
public function getPropietario(): ?string
{
return $this->propietario;
}
public function setPropietario(?string $propietario): self
{
$this->propietario = $propietario;
return $this;
}
public function getVat(): ?string
{
return $this->vat;
}
public function setVat(?string $vat): self
{
$this->vat = $vat;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(?bool $active): self
{
$this->active = $active;
return $this;
}
public function getDeletedAt(): ?\DateTimeInterface
{
return $this->deletedAt;
}
public function setDeletedAt(?\DateTimeInterface $deletedAt): self
{
$this->deletedAt = $deletedAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
/**
* @return Collection|Operacion[]
*/
public function getOperaciones(): Collection
{
return $this->operaciones;
}
public function addOperacione(Operacion $operacione): self
{
if (!$this->operaciones->contains($operacione)) {
$this->operaciones[] = $operacione;
$operacione->setBanco($this);
}
return $this;
}
public function removeOperacione(Operacion $operacione): self
{
if ($this->operaciones->removeElement($operacione)) {
// set the owning side to null (unless already changed)
if ($operacione->getBanco() === $this) {
$operacione->setBanco(null);
}
}
return $this;
}
public function getCiudad(): ?string
{
return $this->ciudad;
}
public function setCiudad(?string $ciudad): self
{
$this->ciudad = $ciudad;
return $this;
}
public function isActivo(): ?bool
{
return $this->activo;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(?string $nombre): static
{
$this->nombre = $nombre;
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
}