src/Entity/RentalApplication.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\RentalApplicationRepository;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. use Vich\UploaderBundle\Mapping\Annotation\UploadableField;
  8. /**
  9.  * @ORM\Entity(repositoryClass=RentalApplicationRepository::class)
  10.  * @Vich\Uploadable
  11.  */
  12. class RentalApplication
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @UploadableField(mapping="id_card_recto", fileNameProperty="idCardRectoName", size="idCardRectoSize")
  22.      */
  23.     private ?File $idCardRecto null;
  24.     /**
  25.      * @UploadableField(mapping="id_card_verso", fileNameProperty="idCardVersoName", size="idCardVersoSize")
  26.      */
  27.     private ?File $idCardVerso null;
  28.     /**
  29.      * @UploadableField(mapping="taxForm", fileNameProperty="taxFormName", size="taxFormSize")
  30.      */
  31.     private ?File $taxForm null;
  32.     /**
  33.      * @UploadableField(mapping="pay_stub_1", fileNameProperty="payStub1Name", size="payStub1Size")
  34.      */
  35.     private ?File $payStub1 null;
  36.     /**
  37.      * @UploadableField(mapping="pay_stub_2", fileNameProperty="payStub2Name", size="payStub2Size")
  38.      */
  39.     private ?File $payStub2 null;
  40.     /**
  41.      * @UploadableField(mapping="pay_stub_3", fileNameProperty="payStub3Name", size="payStub3Size")
  42.      */
  43.     private ?File $payStub3 null;
  44.     /**
  45.      * @UploadableField(mapping="proof_residence", fileNameProperty="proofResidenceName", size="proofResidenceSize")
  46.      */
  47.     private ?File $proofResidence null;
  48.     /**
  49.      * @UploadableField(mapping="guarantor_pay_stub_1", fileNameProperty="guarantorPayStub1Name", size="guarantorPayStub1Size")
  50.      */
  51.     private ?File $guarantorPayStub1 null;
  52.     /**
  53.      * @UploadableField(mapping="guarantor_pay_stub_2", fileNameProperty="guarantorPayStub2Name", size="guarantorPayStub2Size")
  54.      */
  55.     private ?File $guarantorPayStub2 null;
  56.     /**
  57.      * @UploadableField(mapping="guarantor_pay_stub_3", fileNameProperty="guarantorPayStub3Name", size="guarantorPayStub3Size")
  58.      */
  59.     private ?File $guarantorPayStub3 null;
  60.     /**
  61.      * @ORM\Column(type="boolean")
  62.      */
  63.     private ?Bool $guarantor null;
  64.     /**
  65.      * @ORM\Column(type="datetime_immutable")
  66.      */
  67.     private $updatedAt;
  68.     /**
  69.      * @ORM\Column(nullable=true)
  70.      */
  71.     private ?string $idCardRectoName null;
  72.     /**
  73.      * @ORM\Column(nullable=true)
  74.      */
  75.     private ?string $idCardVersoName null;
  76.     /**
  77.      * @ORM\Column(nullable=true)
  78.      */
  79.     private ?string $taxFormName null;
  80.     /**
  81.      * @ORM\Column(nullable=true)
  82.      */
  83.     private ?string $payStub1Name null;
  84.     /**
  85.      * @ORM\Column(nullable=true)
  86.      */
  87.     private ?string $payStub2Name null;
  88.     /**
  89.      * @ORM\Column(nullable=true)
  90.      */
  91.     private ?string $payStub3Name null;
  92.     /**
  93.      * @ORM\Column(nullable=true)
  94.      */
  95.     private ?string $proofResidenceName null;
  96.     /**
  97.      * @ORM\Column(nullable=true)
  98.      */
  99.     private ?string $guarantorPayStub1Name null;
  100.     /**
  101.      * @ORM\Column(nullable=true)
  102.      */
  103.     private ?string $guarantorPayStub2Name null;
  104.     /**
  105.      * @ORM\Column(nullable=true)
  106.      */
  107.     private ?string $guarantorPayStub3Name null;
  108.     /**
  109.      * @ORM\Column(nullable=true)
  110.      */
  111.     private ?int $idCardRectoSize null;
  112.     /**
  113.      * @ORM\Column(nullable=true)
  114.      */
  115.     private ?int $idCardVersoSize null;
  116.     /**
  117.      * @ORM\Column(nullable=true)
  118.      */
  119.     private ?int $taxFormSize null;
  120.     /**
  121.      * @ORM\Column(nullable=true)
  122.      */
  123.     private ?int $payStub1Size null;
  124.     /**
  125.      * @ORM\Column(nullable=true)
  126.      */
  127.     private ?int $payStub2Size null;
  128.     /**
  129.      * @ORM\Column(nullable=true)
  130.      */
  131.     private ?int $payStub3Size null;
  132.     /**
  133.      * @ORM\Column(nullable=true)
  134.      */
  135.     private ?int $proofResidenceSize null;
  136.     /**
  137.      * @ORM\Column(nullable=true)
  138.      */
  139.     private ?int $guarantorPayStub1Size null;
  140.     /**
  141.      * @ORM\Column(nullable=true)
  142.      */
  143.     private ?int $guarantorPayStub2Size null;
  144.     /**
  145.      * @ORM\Column(nullable=true)
  146.      */
  147.     private ?int $guarantorPayStub3Size null;
  148.     /**
  149.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="rentalApplications")
  150.      * @ORM\JoinColumn(nullable=false)
  151.      */
  152.     private $user;
  153. /**
  154.  * @ORM\ManyToOne(targetEntity=Properties::class, inversedBy="rentalApplications", cascade={"persist", "remove"})
  155.  * @ORM\JoinColumn(nullable=false)
  156.  */
  157. private $property;
  158.     public function getId(): ?int
  159.     {
  160.         return $this->id;
  161.     }
  162.     public function getIdCardRecto(): ?File
  163.     {
  164.         return $this->idCardRecto;
  165.     }
  166.     /**
  167.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $idCardRecto
  168.      */
  169.     public function setIdCardRecto(?File $idCardRecto): self
  170.     {
  171.         $this->idCardRecto $idCardRecto;
  172.         if (null !== $idCardRecto) {
  173.             // Il est nécessaire qu'au moins un champ change si vous utilisez Doctrine,
  174.             // sinon les écouteurs d'événements ne seront pas appelés et le fichier sera perdu
  175.             $this->updatedAt = new \DateTimeImmutable();
  176.         }
  177.         return $this;
  178.     }
  179.     public function getIdCardVerso(): ?File
  180.     {
  181.         return $this->idCardVerso;
  182.     }
  183.     /**
  184.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $idCardVerso
  185.      */
  186.     public function setIdCardVerso(?File $idCardVerso null): self
  187.     {
  188.         $this->idCardVerso $idCardVerso;
  189.         return $this;
  190.     }
  191.     public function getTaxForm(): ?File
  192.     {
  193.         return $this->taxForm;
  194.     }
  195.     /**
  196.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $taxForm
  197.      */
  198.     public function setTaxForm(?File $taxForm null): self
  199.     {
  200.         $this->taxForm $taxForm;
  201.         return $this;
  202.     }
  203.     public function getPayStub1(): ?File
  204.     {
  205.         return $this->payStub1;
  206.     }
  207.     /**
  208.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $payStub1
  209.      */
  210.     public function setPayStub1(?File $payStub1 null): self
  211.     {
  212.         $this->payStub1 $payStub1;
  213.         return $this;
  214.     }
  215.     public function getPayStub2(): ?File
  216.     {
  217.         return $this->payStub2;
  218.     }
  219.     /**
  220.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $payStub2
  221.      */
  222.     public function setPayStub2(?File $payStub2 null): self
  223.     {
  224.         $this->payStub2 $payStub2;
  225.         return $this;
  226.     }
  227.     public function getPayStub3(): ?File
  228.     {
  229.         return $this->payStub3;
  230.     }
  231.     /**
  232.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $payStub3
  233.      */
  234.     public function setPayStub3(?File $payStub3 null): self
  235.     {
  236.         $this->payStub3 $payStub3;
  237.         return $this;
  238.     }
  239.     public function getProofResidence(): ?File
  240.     {
  241.         return $this->proofResidence;
  242.     }
  243.     /**
  244.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $proofResidence
  245.      */
  246.     public function setProofResidence(?File $proofResidence null): self
  247.     {
  248.         $this->proofResidence $proofResidence;
  249.         return $this;
  250.     }
  251.     public function getGuarantorPayStub1(): ?File
  252.     {
  253.         return $this->guarantorPayStub1;
  254.     }
  255.     /**
  256.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $guarantorPayStub1
  257.      */
  258.     public function setGuarantorPayStub1(?File $guarantorPayStub1 null): self
  259.     {
  260.         $this->guarantorPayStub1 $guarantorPayStub1;
  261.         return $this;
  262.     }
  263.     public function getGuarantorPayStub2(): ?File
  264.     {
  265.         return $this->guarantorPayStub2;
  266.     }
  267.     /**
  268.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $guarantorPayStub2
  269.      */
  270.     public function setGuarantorPayStub2(?File $guarantorPayStub2 null): self
  271.     {
  272.         $this->guarantorPayStub2 $guarantorPayStub2;
  273.         return $this;
  274.     }
  275.     public function getGuarantorPayStub3(): ?File
  276.     {
  277.         return $this->guarantorPayStub3;
  278.     }
  279.     /**
  280.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $guarantorPayStub3
  281.      */
  282.     public function setGuarantorPayStub3(?File $guarantorPayStub3 null): self
  283.     {
  284.         $this->guarantorPayStub3 $guarantorPayStub3;
  285.         return $this;
  286.     }
  287.     public function isGuarantor(): ?bool
  288.     {
  289.         return $this->guarantor;
  290.     }
  291.     public function setGuarantor(bool $guarantor): self
  292.     {
  293.         $this->guarantor $guarantor;
  294.         return $this;
  295.     }
  296.     public function getUpdatedAt(): ?\DateTimeImmutable
  297.     {
  298.         return $this->updatedAt;
  299.     }
  300.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  301.     {
  302.         $this->updatedAt $updatedAt;
  303.         return $this;
  304.     }
  305.     public function getIdCardRectoName(): ?string
  306.     {
  307.         return $this->idCardRectoName;
  308.     }
  309.     public function setIdCardRectoName(?string $idCardRectoName): self
  310.     {
  311.         $this->idCardRectoName $idCardRectoName;
  312.         return $this;
  313.     }
  314.     public function getIdCardVersoName(): ?string
  315.     {
  316.         return $this->idCardVersoName;
  317.     }
  318.     public function setIdCardVersoName(?string $idCardVersoName): self
  319.     {
  320.         $this->idCardVersoName $idCardVersoName;
  321.         return $this;
  322.     }
  323.     public function getTaxFormName(): ?string
  324.     {
  325.         return $this->taxFormName;
  326.     }
  327.     public function setTaxFormName(?string $taxFormName): self
  328.     {
  329.         $this->taxFormName $taxFormName;
  330.         return $this;
  331.     }
  332.     public function getPayStub1Name(): ?string
  333.     {
  334.         return $this->payStub1Name;
  335.     }
  336.     public function setPayStub1Name(?string $payStub1Name): self
  337.     {
  338.         $this->payStub1Name $payStub1Name;
  339.         return $this;
  340.     }
  341.     public function getPayStub2Name(): ?string
  342.     {
  343.         return $this->payStub2Name;
  344.     }
  345.     public function setPayStub2Name(?string $payStub2Name): self
  346.     {
  347.         $this->payStub2Name $payStub2Name;
  348.         return $this;
  349.     }
  350.     public function getPayStub3Name(): ?string
  351.     {
  352.         return $this->payStub3Name;
  353.     }
  354.     public function setPayStub3Name(?string $payStub3Name): self
  355.     {
  356.         $this->payStub3Name $payStub3Name;
  357.         return $this;
  358.     }
  359.     public function getProofResidenceName(): ?string
  360.     {
  361.         return $this->proofResidenceName;
  362.     }
  363.     public function setProofResidenceName(?string $proofResidenceName): self
  364.     {
  365.         $this->proofResidenceName $proofResidenceName;
  366.         return $this;
  367.     }
  368.     public function getGuarantorPayStub1Name(): ?string
  369.     {
  370.         return $this->guarantorPayStub1Name;
  371.     }
  372.     public function setGuarantorPayStub1Name(?string $guarantorPayStub1Name): self
  373.     {
  374.         $this->guarantorPayStub1Name $guarantorPayStub1Name;
  375.         return $this;
  376.     }
  377.     public function getGuarantorPayStub2Name(): ?string
  378.     {
  379.         return $this->guarantorPayStub2Name;
  380.     }
  381.     public function setGuarantorPayStub2Name(?string $guarantorPayStub2Name): self
  382.     {
  383.         $this->guarantorPayStub2Name $guarantorPayStub2Name;
  384.         return $this;
  385.     }
  386.     public function getGuarantorPayStub3Name(): ?string
  387.     {
  388.         return $this->guarantorPayStub3Name;
  389.     }
  390.     public function setGuarantorPayStub3Name(?string $guarantorPayStub3Name): self
  391.     {
  392.         $this->guarantorPayStub3Name $guarantorPayStub3Name;
  393.         return $this;
  394.     }
  395.     public function getIdCardRectoSize(): ?int
  396.     {
  397.         return $this->idCardRectoSize;
  398.     }
  399.     public function setIdCardRectoSize(?int $idCardRectoSize): self
  400.     {
  401.         $this->idCardRectoSize $idCardRectoSize;
  402.         return $this;
  403.     }
  404.     public function getIdCardVersoSize(): ?int
  405.     {
  406.         return $this->idCardVersoSize;
  407.     }
  408.     public function setIdCardVersoSize(?int $idCardVersoSize): self
  409.     {
  410.         $this->idCardVersoSize $idCardVersoSize;
  411.         return $this;
  412.     }
  413.     public function getTaxFormSize(): ?int
  414.     {
  415.         return $this->taxFormSize;
  416.     }
  417.     public function setTaxFormSize(?int $taxFormSize): self
  418.     {
  419.         $this->taxFormSize $taxFormSize;
  420.         return $this;
  421.     }
  422.     public function getPayStub1Size(): ?int
  423.     {
  424.         return $this->payStub1Size;
  425.     }
  426.     public function setPayStub1Size(?int $payStub1Size): self
  427.     {
  428.         $this->payStub1Size $payStub1Size;
  429.         return $this;
  430.     }
  431.     public function getPayStub2Size(): ?int
  432.     {
  433.         return $this->payStub2Size;
  434.     }
  435.     public function setPayStub2Size(?int $payStub2Size): self
  436.     {
  437.         $this->payStub2Size $payStub2Size;
  438.         return $this;
  439.     }
  440.     public function getPayStub3Size(): ?int
  441.     {
  442.         return $this->payStub3Size;
  443.     }
  444.     public function setPayStub3Size(?int $payStub3Size): self
  445.     {
  446.         $this->payStub3Size $payStub3Size;
  447.         return $this;
  448.     }
  449.     public function getProofResidenceSize(): ?int
  450.     {
  451.         return $this->proofResidenceSize;
  452.     }
  453.     public function setProofResidenceSize(?int $proofResidenceSize): self
  454.     {
  455.         $this->proofResidenceSize $proofResidenceSize;
  456.         return $this;
  457.     }
  458.     public function getGuarantorPayStub1Size(): ?int
  459.     {
  460.         return $this->guarantorPayStub1Size;
  461.     }
  462.     public function setGuarantorPayStub1Size(?int $guarantorPayStub1Size): self
  463.     {
  464.         $this->guarantorPayStub1Size $guarantorPayStub1Size;
  465.         return $this;
  466.     }
  467.     public function getGuarantorPayStub2Size(): ?int
  468.     {
  469.         return $this->guarantorPayStub2Size;
  470.     }
  471.     public function setGuarantorPayStub2Size(?int $guarantorPayStub2Size): self
  472.     {
  473.         $this->guarantorPayStub2Size $guarantorPayStub2Size;
  474.         return $this;
  475.     }
  476.     public function getGuarantorPayStub3Size(): ?int
  477.     {
  478.         return $this->guarantorPayStub3Size;
  479.     }
  480.     public function setGuarantorPayStub3Size(?int $guarantorPayStub3Size): self
  481.     {
  482.         $this->guarantorPayStub3Size $guarantorPayStub3Size;
  483.         return $this;
  484.     }
  485.     public function getUser(): ?User
  486.     {
  487.         return $this->user;
  488.     }
  489.     public function setUser(?User $user): self
  490.     {
  491.         $this->user $user;
  492.         return $this;
  493.     }
  494.     public function getProperty(): ?properties
  495.     {
  496.         return $this->property;
  497.     }
  498.     public function setProperty(?properties $property): self
  499.     {
  500.         $this->property $property;
  501.         return $this;
  502.     }
  503. }