<?php
namespace App\Entity;
use App\Repository\RecibosUtilitiesRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: RecibosUtilitiesRepository::class)]
class RecibosUtilities
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $fecha = null;
#[ORM\Column(length: 150)]
private ?string $nombre = null;
#[ORM\Column(length: 500)]
private ?string $descripcion = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
private ?\DateTimeInterface $fecharegistro = null;
#[ORM\Column]
private ?float $importe = null;
#[ORM\Column]
private ?bool $pagado = null;
#[ORM\ManyToOne(inversedBy: 'recibosUtilities')]
#[ORM\JoinColumn(nullable: true)]
private ?Tenants $tenant = null;
#[ORM\ManyToOne(inversedBy: 'recibosUtilities')]
private ?RemesasRecibos $remesa = null;
#[ORM\ManyToMany(targetEntity: UtilitiesProperty::class, inversedBy: 'recibosUtilities', cascade: ['persist'] )]
private Collection $utilityProperty;
public function __toString(): string{
return " ";
}
public function __construct()
{
$this->utilityProperty = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getFecha(): ?\DateTimeInterface
{
return $this->fecha;
}
public function setFecha(\DateTimeInterface $fecha): static
{
$this->fecha = $fecha;
return $this;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(string $nombre): static
{
$this->nombre = $nombre;
return $this;
}
public function getDescripcion(): ?string
{
return $this->descripcion;
}
public function setDescripcion(string $descripcion): static
{
$this->descripcion = $descripcion;
return $this;
}
public function getFecharegistro(): ?\DateTimeInterface
{
return $this->fecharegistro;
}
public function setFecharegistro(\DateTimeInterface $fecharegistro): static
{
$this->fecharegistro = $fecharegistro;
return $this;
}
public function getImporte(): ?float
{
return $this->importe;
}
public function setImporte(float $importe): static
{
$this->importe = $importe;
return $this;
}
public function isPagado(): ?bool
{
return $this->pagado;
}
public function setPagado(bool $pagado): static
{
$this->pagado = $pagado;
return $this;
}
public function getTenant(): ?Tenants
{
return $this->tenant;
}
public function setTenant(?Tenants $tenant): static
{
$this->tenant = $tenant;
return $this;
}
public function getRemesa(): ?RemesasRecibos
{
return $this->remesa;
}
public function setRemesa(?RemesasRecibos $remesa): static
{
$this->remesa = $remesa;
return $this;
}
/**
* @return Collection<int, UtilitiesProperty>
*/
public function getUtilityProperty(): Collection
{
return $this->utilityProperty;
}
public function addUtilityProperty(UtilitiesProperty $utilityProperty): static
{
if (!$this->utilityProperty->contains($utilityProperty)) {
$this->utilityProperty->add($utilityProperty);
}
return $this;
}
public function removeUtilityProperty(UtilitiesProperty $utilityProperty): static
{
$this->utilityProperty->removeElement($utilityProperty);
return $this;
}
}