src/Entity/Utilities.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UtilitiesRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\HttpFoundation\File\File;
  9. //use Vich\UploaderBundle\Entity\File;
  10. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  11. #[ORM\Entity(repositoryClassUtilitiesRepository::class)]
  12. #[Vich\Uploadable]
  13. class Utilities
  14. {
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue]
  17.     #[ORM\Column]
  18.     private ?int $id null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $gas null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $water null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $electricity null;
  25.     #[ORM\Column(length255nullabletrue)]
  26.     private ?string $internet null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $other null;
  29.     #[ORM\ManyToOne(inversedBy'utilities')]
  30.     private ?PropertyList $property null;
  31.     //#[ORM\Column(length: 255, nullable: true)]
  32.     #[Vich\UploadableField(mapping'utility_gas'fileNameProperty'gasName')]
  33.     private ?File $gasBill null;
  34.     
  35.     //#[ORM\Column(length: 255, nullable: true)]
  36.     #[Vich\UploadableField(mapping'utility_water'fileNameProperty'waterName')]
  37.     private ?File $waterBill null;
  38.     //#[ORM\Column(length: 255, nullable: true)]
  39.     #[Vich\UploadableField(mapping'utility_electricity'fileNameProperty'electricityName')]
  40.     private ?File $electricityBill null;
  41.     //#[ORM\Column(length: 255, nullable: true)]
  42.     #[Vich\UploadableField(mapping'utility_internet'fileNameProperty'internetName')]
  43.     private ?File $internetBill null;
  44.     //#[ORM\Column(length: 255, nullable: true)]
  45.     #[Vich\UploadableField(mapping'utility_other'fileNameProperty'otherName')]
  46.     private ?File $otherBill null;
  47.     
  48.     #[ORM\Column(length255nullabletrue)]
  49.     private ?string $gasName null;
  50.     #[ORM\Column(length255nullabletrue)]
  51.     private ?string $waterName null;
  52.     #[ORM\Column(length255nullabletrue)]
  53.     private ?string $electricityName null;
  54.     #[ORM\Column(length255nullabletrue)]
  55.     private ?string $internetName null;
  56.     #[ORM\Column(length255nullabletrue)]
  57.     private ?string $otherName null;
  58.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  59.     private ?\DateTimeInterface $periodStart null;
  60.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  61.     private ?\DateTimeInterface $periodEnd null;
  62.     #[ORM\ManyToOne(inversedBy'monthlyBills')]
  63.     private ?MonthlyReport $monthlyReport null;
  64.     #[ORM\Column(length255nullabletrue)]
  65.     private ?string $extra null;
  66.     #[ORM\Column(length255nullabletrue)]
  67.     private ?string $extra2 null;
  68.     #[ORM\Column(length255nullabletrue)]
  69.     private ?string $extra3 null;
  70.     #[ORM\Column(length255nullabletrue)]
  71.     private ?string $extra4 null;
  72.     #[ORM\Column(length255nullabletrue)]
  73.     private ?string $extra5 null;
  74.     //#[ORM\Column(length: 255, nullable: true)]
  75.     #[Vich\UploadableField(mapping'utility_extra'fileNameProperty'extraName')]
  76.     private ?File $extraBill null;
  77.     //#[ORM\Column(length: 255, nullable: true)]
  78.     #[Vich\UploadableField(mapping'utility_extra2'fileNameProperty'extra2Name')]
  79.     private ?File $extra2Bill null;
  80.     //#[ORM\Column(length: 255, nullable: true)]
  81.     #[Vich\UploadableField(mapping'utility_extra3'fileNameProperty'extra3Name')]
  82.     private ?File $extra3Bill null;
  83.     //#[ORM\Column(length: 255, nullable: true)]
  84.     #[Vich\UploadableField(mapping'utility_extra4'fileNameProperty'extra4Name')]
  85.     private ?File $extra4Bill null;
  86.     //#[ORM\Column(length: 255, nullable: true)]
  87.     #[Vich\UploadableField(mapping'utility_extra5'fileNameProperty'extra5Name')]
  88.     private ?File $extra5Bill null;
  89.     #[ORM\ManyToMany(targetEntityMonthlyPayments::class, mappedBy'utilities')]
  90.     private Collection $monthlyPayments;
  91.     #[ORM\Column(length255nullabletrue)]
  92.     private ?string $extraName null;
  93.     #[ORM\Column(length255nullabletrue)]
  94.     private ?string $extra2Name null;
  95.     #[ORM\Column(length255nullabletrue)]
  96.     private ?string $extra3Name null;
  97.     #[ORM\Column(length255nullabletrue)]
  98.     private ?string $extra4Name null;
  99.     #[ORM\Column(length255nullabletrue)]
  100.     private ?string $extra5Name null;
  101.     public function __construct()
  102.     {
  103.         $this->monthlyPayments = new ArrayCollection();
  104.     }
  105.     
  106.     public function getId(): ?int
  107.     {
  108.         return $this->id;
  109.     }
  110.     public function getGas(): ?string
  111.     {
  112.         return $this->gas;
  113.     }
  114.     public function setGas(?string $gas): self
  115.     {
  116.         $this->gas $gas;
  117.         return $this;
  118.     }
  119.     public function getWater(): ?string
  120.     {
  121.         return $this->water;
  122.     }
  123.     public function setWater(?string $water): self
  124.     {
  125.         $this->water $water;
  126.         return $this;
  127.     }
  128.     public function getElectricity(): ?string
  129.     {
  130.         return $this->electricity;
  131.     }
  132.     public function setElectricity(?string $electricity): self
  133.     {
  134.         $this->electricity $electricity;
  135.         return $this;
  136.     }
  137.     public function getInternet(): ?string
  138.     {
  139.         return $this->internet;
  140.     }
  141.     public function setInternet(?string $internet): self
  142.     {
  143.         $this->internet $internet;
  144.         return $this;
  145.     }
  146.     public function getOther(): ?string
  147.     {
  148.         return $this->other;
  149.     }
  150.     public function setOther(?string $other): self
  151.     {
  152.         $this->other $other;
  153.         return $this;
  154.     }
  155.     public function getProperty(): ?PropertyList
  156.     {
  157.         return $this->property;
  158.     }
  159.     public function setProperty(?PropertyList $property): self
  160.     {
  161.         $this->property $property;
  162.         return $this;
  163.     }
  164.     
  165. //////////////// UPLOADS   ////////////////
  166.     
  167.     public function getGasBill(): ?File
  168.     {
  169.         return $this->gasBill;
  170.     }
  171.     /**
  172.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $gasBill
  173.      */
  174.     public function setGasBill(?File $gasBill null): void
  175.     {
  176.         $this->gasBill $gasBill;
  177.         //return $this;
  178.     }
  179.     public function getWaterBill(): ?File
  180.     {
  181.         return $this->waterBill;
  182.     }
  183.     /**
  184.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $waterBill
  185.      */
  186.     public function setWaterBill(?File $waterBill null): void
  187.     {
  188.         $this->waterBill $waterBill;
  189.         //return $this;
  190.     }
  191.     public function getElectricityBill(): ?File
  192.     {
  193.         return $this->electricityBill;
  194.     }
  195.     /**
  196.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $electricityBill
  197.      */
  198.     public function setElectricityBill(?File $electricityBill null): void
  199.     {
  200.         $this->electricityBill $electricityBill;
  201.         //return $this;
  202.     }
  203.     public function getInternetBill(): ?File
  204.     {
  205.         return $this->internetBill;
  206.     }
  207.     /**
  208.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $internetBill
  209.      */
  210.     public function setInternetBill(?File $internetBill null): void
  211.     {
  212.         $this->internetBill $internetBill;
  213.         //return $this;
  214.     }
  215.     public function getOtherBill(): ?File
  216.     {
  217.         return $this->otherBill;
  218.     }
  219.     /**
  220.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $otherBill
  221.      */
  222.     public function setOtherBill(?File $otherBill null): void
  223.     {
  224.         $this->otherBill $otherBill;
  225.         //return $this;
  226.     }
  227.     public function getGasName(): ?string
  228.     {
  229.         return $this->gasName;
  230.     }
  231.     public function setGasName(?string $gasName): self
  232.     {
  233.         $this->gasName $gasName;
  234.         return $this;
  235.     }
  236.     public function getWaterName(): ?string
  237.     {
  238.         return $this->waterName;
  239.     }
  240.     public function setWaterName(?string $waterName): self
  241.     {
  242.         $this->waterName $waterName;
  243.         return $this;
  244.     }
  245.     public function getElectricityName(): ?string
  246.     {
  247.         return $this->electricityName;
  248.     }
  249.     public function setElectricityName(?string $electricityName): self
  250.     {
  251.         $this->electricityName $electricityName;
  252.         return $this;
  253.     }
  254.     public function getInternetName(): ?string
  255.     {
  256.         return $this->internetName;
  257.     }
  258.     public function setInternetName(?string $internetName): self
  259.     {
  260.         $this->internetName $internetName;
  261.         return $this;
  262.     }
  263.     public function getOtherName(): ?string
  264.     {
  265.         return $this->otherName;
  266.     }
  267.     public function setOtherName(?string $otherName): self
  268.     {
  269.         $this->otherName $otherName;
  270.         return $this;
  271.     }
  272.     public function getPeriodStart(): ?\DateTimeInterface
  273.     {
  274.         return $this->periodStart;
  275.     }
  276.     public function setPeriodStart(?\DateTimeInterface $periodStart): self
  277.     {
  278.         $this->periodStart $periodStart;
  279.         return $this;
  280.     }
  281.     public function getPeriodEnd(): ?\DateTimeInterface
  282.     {
  283.         return $this->periodEnd;
  284.     }
  285.     public function setPeriodEnd(?\DateTimeInterface $periodEnd): self
  286.     {
  287.         $this->periodEnd $periodEnd;
  288.         return $this;
  289.     }
  290.     public function getMonthlyReport(): ?MonthlyReport
  291.     {
  292.         return $this->monthlyReport;
  293.     }
  294.     public function setMonthlyReport(?MonthlyReport $monthlyReport): self
  295.     {
  296.         $this->monthlyReport $monthlyReport;
  297.         return $this;
  298.     }
  299.     ///////// EXTRA BILLS ///////////
  300.     
  301.     public function getExtra(): ?string
  302.     {
  303.         return $this->extra;
  304.     }
  305.     public function setExtra(?string $extra): self
  306.     {
  307.         $this->extra $extra;
  308.         return $this;
  309.     }
  310.     public function getExtra2(): ?string
  311.     {
  312.         return $this->extra2;
  313.     }
  314.     public function setExtra2(?string $extra2): self
  315.     {
  316.         $this->extra2 $extra2;
  317.         return $this;
  318.     }
  319.     public function getExtra3(): ?string
  320.     {
  321.         return $this->extra3;
  322.     }
  323.     public function setExtra3(?string $extra3): self
  324.     {
  325.         $this->extra3 $extra3;
  326.         return $this;
  327.     }
  328.     public function getExtra4(): ?string
  329.     {
  330.         return $this->extra4;
  331.     }
  332.     public function setExtra4(?string $extra4): self
  333.     {
  334.         $this->extra4 $extra4;
  335.         return $this;
  336.     }
  337.     public function getExtra5(): ?string
  338.     {
  339.         return $this->extra5;
  340.     }
  341.     public function setExtra5(?string $extra5): self
  342.     {
  343.         $this->extra5 $extra5;
  344.         return $this;
  345.     }
  346.     public function getExtraBill(): ?File
  347.     {
  348.         return $this->extraBill;
  349.     }
  350.     public function setExtraBill(?File $extraBill=null): void
  351.     {
  352.         $this->extraBill $extraBill;
  353.         //return $this;
  354.     }
  355.     public function getExtra2Bill(): ?File
  356.     {
  357.         return $this->extra2Bill;
  358.     }
  359.     public function setExtra2Bill(?File $extra2Bill=null): void
  360.     {
  361.         $this->extra2Bill $extra2Bill;
  362.         //return $this;
  363.     }
  364.     public function getExtra3Bill(): ?File
  365.     {
  366.         return $this->extra3Bill;
  367.     }
  368.     public function setExtra3Bill(?File $extra3Bill=null): void
  369.     {
  370.         $this->extra3Bill $extra3Bill;
  371.         //return $this;
  372.     }
  373.     public function getExtra4Bill(): ?File
  374.     {
  375.         return $this->extra4Bill;
  376.     }
  377.     public function setExtra4Bill(?File $extra4Bill=null): void
  378.     {
  379.         $this->extra4Bill $extra4Bill;
  380.         //return $this;
  381.     }
  382.     public function getExtra5Bill(): ?File
  383.     {
  384.         return $this->extra5Bill;
  385.     }
  386.     public function setExtra5Bill(?File $extra5Bill=null): void
  387.     {
  388.         $this->extra5Bill $extra5Bill;
  389.         //return $this;
  390.     }
  391.     /**
  392.      * @return Collection<int, MonthlyPayments>
  393.      */
  394.     public function getMonthlyPayments(): Collection
  395.     {
  396.         return $this->monthlyPayments;
  397.     }
  398.     public function addMonthlyPayment(MonthlyPayments $monthlyPayment): self
  399.     {
  400.         if (!$this->monthlyPayments->contains($monthlyPayment)) {
  401.             $this->monthlyPayments->add($monthlyPayment);
  402.             $monthlyPayment->addUtility($this);
  403.         }
  404.         return $this;
  405.     }
  406.     public function removeMonthlyPayment(MonthlyPayments $monthlyPayment): self
  407.     {
  408.         if ($this->monthlyPayments->removeElement($monthlyPayment)) {
  409.             $monthlyPayment->removeUtility($this);
  410.         }
  411.         return $this;
  412.     }
  413.     public function getExtraName(): ?string
  414.     {
  415.         return $this->extraName;
  416.     }
  417.     public function setExtraName(?string $extraName): self
  418.     {
  419.         $this->extraName $extraName;
  420.         return $this;
  421.     }
  422.     public function getExtra2Name(): ?string
  423.     {
  424.         return $this->extra2Name;
  425.     }
  426.     public function setExtra2Name(?string $extra2Name): self
  427.     {
  428.         $this->extra2Name $extra2Name;
  429.         return $this;
  430.     }
  431.     public function getExtra3Name(): ?string
  432.     {
  433.         return $this->extra3Name;
  434.     }
  435.     public function setExtra3Name(?string $extra3Name): self
  436.     {
  437.         $this->extra3Name $extra3Name;
  438.         return $this;
  439.     }
  440.     public function getExtra4Name(): ?string
  441.     {
  442.         return $this->extra4Name;
  443.     }
  444.     public function setExtra4Name(?string $extra4Name): self
  445.     {
  446.         $this->extra4Name $extra4Name;
  447.         return $this;
  448.     }
  449.     public function getExtra5Name(): ?string
  450.     {
  451.         return $this->extra5Name;
  452.     }
  453.     public function setExtra5Name(?string $extra5Name): self
  454.     {
  455.         $this->extra5Name $extra5Name;
  456.         return $this;
  457.     }
  458.  
  459.     
  460. }