<?php
namespace App\Entity;
use App\Repository\UtilitiesRepository;
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;
//use Vich\UploaderBundle\Entity\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
#[ORM\Entity(repositoryClass: UtilitiesRepository::class)]
#[Vich\Uploadable]
class Utilities
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $gas = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $water = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $electricity = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $internet = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $other = null;
#[ORM\ManyToOne(inversedBy: 'utilities')]
private ?PropertyList $property = null;
//#[ORM\Column(length: 255, nullable: true)]
#[Vich\UploadableField(mapping: 'utility_gas', fileNameProperty: 'gasName')]
private ?File $gasBill = null;
//#[ORM\Column(length: 255, nullable: true)]
#[Vich\UploadableField(mapping: 'utility_water', fileNameProperty: 'waterName')]
private ?File $waterBill = null;
//#[ORM\Column(length: 255, nullable: true)]
#[Vich\UploadableField(mapping: 'utility_electricity', fileNameProperty: 'electricityName')]
private ?File $electricityBill = null;
//#[ORM\Column(length: 255, nullable: true)]
#[Vich\UploadableField(mapping: 'utility_internet', fileNameProperty: 'internetName')]
private ?File $internetBill = null;
//#[ORM\Column(length: 255, nullable: true)]
#[Vich\UploadableField(mapping: 'utility_other', fileNameProperty: 'otherName')]
private ?File $otherBill = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $gasName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $waterName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $electricityName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $internetName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $otherName = 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: 'monthlyBills')]
private ?MonthlyReport $monthlyReport = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $extra = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $extra2 = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $extra3 = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $extra4 = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $extra5 = null;
//#[ORM\Column(length: 255, nullable: true)]
#[Vich\UploadableField(mapping: 'utility_extra', fileNameProperty: 'extraName')]
private ?File $extraBill = null;
//#[ORM\Column(length: 255, nullable: true)]
#[Vich\UploadableField(mapping: 'utility_extra2', fileNameProperty: 'extra2Name')]
private ?File $extra2Bill = null;
//#[ORM\Column(length: 255, nullable: true)]
#[Vich\UploadableField(mapping: 'utility_extra3', fileNameProperty: 'extra3Name')]
private ?File $extra3Bill = null;
//#[ORM\Column(length: 255, nullable: true)]
#[Vich\UploadableField(mapping: 'utility_extra4', fileNameProperty: 'extra4Name')]
private ?File $extra4Bill = null;
//#[ORM\Column(length: 255, nullable: true)]
#[Vich\UploadableField(mapping: 'utility_extra5', fileNameProperty: 'extra5Name')]
private ?File $extra5Bill = null;
#[ORM\ManyToMany(targetEntity: MonthlyPayments::class, mappedBy: 'utilities')]
private Collection $monthlyPayments;
#[ORM\Column(length: 255, nullable: true)]
private ?string $extraName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $extra2Name = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $extra3Name = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $extra4Name = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $extra5Name = null;
public function __construct()
{
$this->monthlyPayments = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getGas(): ?string
{
return $this->gas;
}
public function setGas(?string $gas): self
{
$this->gas = $gas;
return $this;
}
public function getWater(): ?string
{
return $this->water;
}
public function setWater(?string $water): self
{
$this->water = $water;
return $this;
}
public function getElectricity(): ?string
{
return $this->electricity;
}
public function setElectricity(?string $electricity): self
{
$this->electricity = $electricity;
return $this;
}
public function getInternet(): ?string
{
return $this->internet;
}
public function setInternet(?string $internet): self
{
$this->internet = $internet;
return $this;
}
public function getOther(): ?string
{
return $this->other;
}
public function setOther(?string $other): self
{
$this->other = $other;
return $this;
}
public function getProperty(): ?PropertyList
{
return $this->property;
}
public function setProperty(?PropertyList $property): self
{
$this->property = $property;
return $this;
}
//////////////// UPLOADS ////////////////
public function getGasBill(): ?File
{
return $this->gasBill;
}
/**
* @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $gasBill
*/
public function setGasBill(?File $gasBill = null): void
{
$this->gasBill = $gasBill;
//return $this;
}
public function getWaterBill(): ?File
{
return $this->waterBill;
}
/**
* @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $waterBill
*/
public function setWaterBill(?File $waterBill = null): void
{
$this->waterBill = $waterBill;
//return $this;
}
public function getElectricityBill(): ?File
{
return $this->electricityBill;
}
/**
* @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $electricityBill
*/
public function setElectricityBill(?File $electricityBill = null): void
{
$this->electricityBill = $electricityBill;
//return $this;
}
public function getInternetBill(): ?File
{
return $this->internetBill;
}
/**
* @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $internetBill
*/
public function setInternetBill(?File $internetBill = null): void
{
$this->internetBill = $internetBill;
//return $this;
}
public function getOtherBill(): ?File
{
return $this->otherBill;
}
/**
* @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $otherBill
*/
public function setOtherBill(?File $otherBill = null): void
{
$this->otherBill = $otherBill;
//return $this;
}
public function getGasName(): ?string
{
return $this->gasName;
}
public function setGasName(?string $gasName): self
{
$this->gasName = $gasName;
return $this;
}
public function getWaterName(): ?string
{
return $this->waterName;
}
public function setWaterName(?string $waterName): self
{
$this->waterName = $waterName;
return $this;
}
public function getElectricityName(): ?string
{
return $this->electricityName;
}
public function setElectricityName(?string $electricityName): self
{
$this->electricityName = $electricityName;
return $this;
}
public function getInternetName(): ?string
{
return $this->internetName;
}
public function setInternetName(?string $internetName): self
{
$this->internetName = $internetName;
return $this;
}
public function getOtherName(): ?string
{
return $this->otherName;
}
public function setOtherName(?string $otherName): self
{
$this->otherName = $otherName;
return $this;
}
public function getPeriodStart(): ?\DateTimeInterface
{
return $this->periodStart;
}
public function setPeriodStart(?\DateTimeInterface $periodStart): self
{
$this->periodStart = $periodStart;
return $this;
}
public function getPeriodEnd(): ?\DateTimeInterface
{
return $this->periodEnd;
}
public function setPeriodEnd(?\DateTimeInterface $periodEnd): self
{
$this->periodEnd = $periodEnd;
return $this;
}
public function getMonthlyReport(): ?MonthlyReport
{
return $this->monthlyReport;
}
public function setMonthlyReport(?MonthlyReport $monthlyReport): self
{
$this->monthlyReport = $monthlyReport;
return $this;
}
///////// EXTRA BILLS ///////////
public function getExtra(): ?string
{
return $this->extra;
}
public function setExtra(?string $extra): self
{
$this->extra = $extra;
return $this;
}
public function getExtra2(): ?string
{
return $this->extra2;
}
public function setExtra2(?string $extra2): self
{
$this->extra2 = $extra2;
return $this;
}
public function getExtra3(): ?string
{
return $this->extra3;
}
public function setExtra3(?string $extra3): self
{
$this->extra3 = $extra3;
return $this;
}
public function getExtra4(): ?string
{
return $this->extra4;
}
public function setExtra4(?string $extra4): self
{
$this->extra4 = $extra4;
return $this;
}
public function getExtra5(): ?string
{
return $this->extra5;
}
public function setExtra5(?string $extra5): self
{
$this->extra5 = $extra5;
return $this;
}
public function getExtraBill(): ?File
{
return $this->extraBill;
}
public function setExtraBill(?File $extraBill=null): void
{
$this->extraBill = $extraBill;
//return $this;
}
public function getExtra2Bill(): ?File
{
return $this->extra2Bill;
}
public function setExtra2Bill(?File $extra2Bill=null): void
{
$this->extra2Bill = $extra2Bill;
//return $this;
}
public function getExtra3Bill(): ?File
{
return $this->extra3Bill;
}
public function setExtra3Bill(?File $extra3Bill=null): void
{
$this->extra3Bill = $extra3Bill;
//return $this;
}
public function getExtra4Bill(): ?File
{
return $this->extra4Bill;
}
public function setExtra4Bill(?File $extra4Bill=null): void
{
$this->extra4Bill = $extra4Bill;
//return $this;
}
public function getExtra5Bill(): ?File
{
return $this->extra5Bill;
}
public function setExtra5Bill(?File $extra5Bill=null): void
{
$this->extra5Bill = $extra5Bill;
//return $this;
}
/**
* @return Collection<int, MonthlyPayments>
*/
public function getMonthlyPayments(): Collection
{
return $this->monthlyPayments;
}
public function addMonthlyPayment(MonthlyPayments $monthlyPayment): self
{
if (!$this->monthlyPayments->contains($monthlyPayment)) {
$this->monthlyPayments->add($monthlyPayment);
$monthlyPayment->addUtility($this);
}
return $this;
}
public function removeMonthlyPayment(MonthlyPayments $monthlyPayment): self
{
if ($this->monthlyPayments->removeElement($monthlyPayment)) {
$monthlyPayment->removeUtility($this);
}
return $this;
}
public function getExtraName(): ?string
{
return $this->extraName;
}
public function setExtraName(?string $extraName): self
{
$this->extraName = $extraName;
return $this;
}
public function getExtra2Name(): ?string
{
return $this->extra2Name;
}
public function setExtra2Name(?string $extra2Name): self
{
$this->extra2Name = $extra2Name;
return $this;
}
public function getExtra3Name(): ?string
{
return $this->extra3Name;
}
public function setExtra3Name(?string $extra3Name): self
{
$this->extra3Name = $extra3Name;
return $this;
}
public function getExtra4Name(): ?string
{
return $this->extra4Name;
}
public function setExtra4Name(?string $extra4Name): self
{
$this->extra4Name = $extra4Name;
return $this;
}
public function getExtra5Name(): ?string
{
return $this->extra5Name;
}
public function setExtra5Name(?string $extra5Name): self
{
$this->extra5Name = $extra5Name;
return $this;
}
}