<?php
namespace App\Entity;
use App\Repository\UtilitiesPropertyRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
#[ORM\Entity(repositoryClass: UtilitiesPropertyRepository::class)]
class UtilitiesProperty
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'utilitiesProperties')]
#[ORM\JoinColumn(nullable: false)]
private ?PropertyList $property = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nameFile = null;
#[ORM\ManyToOne(inversedBy: 'utilitiesProperties')]
private ?MonthlyReport $monthlyReport = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $periodStart = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $periodEnd = null;
#[ORM\ManyToOne(inversedBy: 'utilitiesProperties')]
#[ORM\JoinColumn(nullable: false)]
private ?UtilitiesType $utilitiesType = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $Observaciones = null;
#[ORM\Column]
private ?float $importe = null;
private ?File $file=null;
#[ORM\Column(nullable: true)]
private ?bool $pasado = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $empresaSuministro = null;
#[ORM\ManyToMany(targetEntity: RecibosUtilities::class, mappedBy: 'utilityProperty')]
private Collection $recibosUtilities;
public function __construct()
{
$this->recibosUtilities = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getProperty(): ?PropertyList
{
return $this->property;
}
public function setProperty(?PropertyList $property): static
{
$this->property = $property;
return $this;
}
public function getNameFile(): ?string
{
return $this->nameFile;
}
public function setNameFile(?string $nameFile): static
{
$this->nameFile = $nameFile;
return $this;
}
public function getMonthlyReport(): ?MonthlyReport
{
return $this->monthlyReport;
}
public function setMonthlyReport(?MonthlyReport $monthlyReport): static
{
$this->monthlyReport = $monthlyReport;
return $this;
}
public function getPeriodStart(): ?\DateTimeInterface
{
return $this->periodStart;
}
public function setPeriodStart(?\DateTimeInterface $periodStart): static
{
$this->periodStart = $periodStart;
return $this;
}
public function getPeriodEnd(): ?\DateTimeInterface
{
return $this->periodEnd;
}
public function setPeriodEnd(?\DateTimeInterface $periodEnd): static
{
$this->periodEnd = $periodEnd;
return $this;
}
public function getUtilitiesType(): ?UtilitiesType
{
return $this->utilitiesType;
}
public function setUtilitiesType(?UtilitiesType $utilitiesType): static
{
$this->utilitiesType = $utilitiesType;
return $this;
}
public function getObservaciones(): ?string
{
return $this->Observaciones;
}
public function setObservaciones(?string $Observaciones): static
{
$this->Observaciones = $Observaciones;
return $this;
}
public function getImporte(): ?float
{
return $this->importe;
}
public function setImporte(float $importe): static
{
$this->importe = $importe;
return $this;
}
/**
* Get the value of file
*/
public function getFile():?File
{
return $this->file;
}
/**
* Set the value of file
*
* @return self
*/
public function setFile(?File $file):self
{
$this->file = $file;
return $this;
}
public function isPasado(): ?bool
{
return $this->pasado;
}
public function setPasado(?bool $pasado): static
{
$this->pasado = $pasado;
return $this;
}
public function getEmpresaSuministro(): ?string
{
return $this->empresaSuministro;
}
public function setEmpresaSuministro(?string $empresaSuministro): static
{
$this->empresaSuministro = $empresaSuministro;
return $this;
}
/**
* @return Collection<int, RecibosUtilities>
*/
public function getRecibosUtilities(): Collection
{
return $this->recibosUtilities;
}
public function addRecibosUtility(RecibosUtilities $recibosUtility): static
{
if (!$this->recibosUtilities->contains($recibosUtility)) {
$this->recibosUtilities->add($recibosUtility);
$recibosUtility->addUtilityProperty($this);
}
return $this;
}
public function removeRecibosUtility(RecibosUtilities $recibosUtility): static
{
if ($this->recibosUtilities->removeElement($recibosUtility)) {
$recibosUtility->removeUtilityProperty($this);
}
return $this;
}
}