src/Entity/BuildingFolder.php line 14

  1. <?php
  2. namespace App\Entity;
  3. use Symfony\Contracts\Translation\TranslatorInterface;
  4. use App\Repository\BuildingFolderRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use App\Entity\User;
  10. #[ORM\Entity(repositoryClassBuildingFolderRepository::class)]
  11. class BuildingFolder
  12. {
  13.     
  14.     CONST PROGRESS "REQUEST_PROGRESS";
  15.     CONST INCOMPLETE "REQUEST_INCOMPLETE";
  16.     CONST DECLINED "REQUEST_DECLINED";
  17.     CONST ACCEPTED "REQUEST_ACCEPTED";
  18.     CONST DISABLE "ROLE_DISABLE";
  19.     CONST SIGN_TENANT "REQUEST_SIGN_TENANT";
  20.     CONST SIGN_LESSOR "REQUEST_SIGN_LESSOR";
  21.     CONST SIGN "REQUEST_SIGN";
  22.     CONST ACCEPTED_PRO "REQUEST_ACCEPTED_PRO";
  23.     #[ORM\Id]
  24.     #[ORM\GeneratedValue]
  25.     #[ORM\Column]
  26.     private ?int $id null;
  27.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'buildingFolders')]
  28.     private ?User $tenant null;
  29.     #[ORM\Column(type"string"length255nullabletrue)]
  30.    private ?string $mailContact null;
  31.     
  32.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  33.     private ?\DateTimeInterface $createdAt null;
  34.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  35.     private ?\DateTimeInterface $refusedAt null;
  36.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  37.     private ?\DateTimeInterface $changeStateAt null;
  38.     #[ORM\Column(length255nullabletrue)]
  39.     private ?string $refusedTex null;
  40.     #[ORM\ManyToOne(targetEntityBuilding::class, inversedBy'buildingFolders')]
  41.     private ?Building $building null;
  42.     #[ORM\Column(length255nullabletrue)]
  43.     private ?string $state null;
  44.     #[ORM\ManyToOne(targetEntityResidence::class, inversedBy'buildingFolders')]
  45.     private ?Residence $residence null;
  46.     #[ORM\Column(nullabletrue)]
  47.     private ?bool $isBlockBuilding null;
  48.     #[ORM\Column]
  49.     private ?bool $asGarant false;
  50.     #[ORM\Column(length255nullabletrue)]
  51.     private ?string $lastNameGarant null;
  52.     #[ORM\Column(length255nullabletrue)]
  53.     private ?string $firstNameGarant null;
  54.     #[ORM\Column(length255nullabletrue)]
  55.     private ?string $phoneGarant null;
  56.     #[ORM\Column(length255nullabletrue)]
  57.     private ?string $emailGarant null;
  58.     #[ORM\Column(length255nullabletrue)]
  59.     private ?string $addressGarant null;
  60.     #[ORM\Column(length255nullabletrue)]
  61.     private ?string $incomeGarant null;
  62.     #[ORM\Column(nullabletrue)]
  63.     private ?bool $isOwnerGarant null;
  64.     #[ORM\Column(length255nullabletrue)]
  65.     private ?string $rentGarant null;
  66.     #[ORM\Column(nullabletrue)]
  67.     private ?bool $certificatGarantMe null;
  68.     #[ORM\OneToMany(mappedBy'buildingFolder'targetEntityBuildingFolderDocument::class, cascade: ['persist''remove'])]
  69.     private Collection $buildingFolderDocuments;
  70.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  71.     private ?string $refusedDescription null;
  72.     #[ORM\Column(length255nullabletrue)]
  73.     private ?string $garantMeKey null;
  74.     #[ORM\Column(nullabletrue)]
  75.     private ?bool $isPaid null;
  76.     #[ORM\Column(nullabletrue)]
  77.     private ?bool $isPaidTenant null;
  78.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  79.     private ?\DateTimeInterface $dateStartAt null;
  80.     
  81.     #[ORM\Column(nullabletrue)]
  82.     private ?int $rentalDuration null;
  83.     
  84.     #[ORM\Column(length255nullabletrue)]
  85.     private ?string $status null;
  86.     #[ORM\Column(length255nullabletrue)]
  87.     private ?string $formationName null;
  88.     #[ORM\Column(length255nullabletrue)]
  89.     private ?string $schoolName null;
  90.     #[ORM\Column(length255nullabletrue)]
  91.     private ?string $schoolAddress null;
  92.     #[ORM\Column(length255nullabletrue)]
  93.     private ?string $studyLevel null;
  94.     #[ORM\Column(length255nullabletrue)]
  95.     private ?string $company null;
  96.     #[ORM\Column(length255nullabletrue)]
  97.     private ?string $employementContract null;
  98.     #[ORM\Column(length255nullabletrue)]
  99.     private ?string $trialPeriod null;
  100.     #[ORM\Column(nullabletrue)]
  101.     private ?int $netMonthlySalary null;
  102.     #[ORM\Column(length255nullabletrue)]
  103.     private ?string $guarantorType null;
  104.     #[ORM\Column(length255nullabletrue)]
  105.     private ?string $physicalGuarantorType null;
  106.     #[ORM\Column(length255nullabletrue)]
  107.     private ?string $statutResidencePrincipale null;
  108.     #[ORM\Column(nullabletrue)]
  109.     private ?int $mensualRent null;
  110.     #[ORM\Column(length255nullabletrue)]
  111.     private ?string $contractType null;
  112.     #[ORM\Column(length255nullabletrue)]
  113.     private ?string $finishedTrialPeriod null;
  114.     #[ORM\Column(nullabletrue)]
  115.     private ?string $income null;
  116.     #[ORM\Column(length255nullabletrue)]
  117.     private ?string $additionalIncomeSources null;
  118.     #[ORM\Column(length255nullabletrue)]
  119.     private ?string $additionalIncomeSourcesStudent null;
  120.     #[ORM\Column(length255nullabletrue)]
  121.     private ?string $guarantorStatus null;
  122.     #[ORM\Column(length255nullabletrue)]
  123.     private ?string $professionalGuarantee null;
  124.     #[ORM\Column(length255nullabletrue)]
  125.     private ?string $physicalGuarantorNationality null;
  126.     #[ORM\Column(length255nullabletrue)]
  127.     private ?string $applicationMessage null;
  128.     #[ORM\Column]
  129.     private ?bool $applicationViewed false;
  130.     public function __construct()
  131.     {
  132.         $this->createdAt = new \DateTime();
  133.         $this->buildingFolderDocuments = new ArrayCollection();
  134.         $this->setState(BuildingFolder::PROGRESS);
  135.     }
  136.     public function getId(): ?int
  137.     {
  138.         return $this->id;
  139.     }
  140.     public function getTenant(): ?User
  141.     {
  142.         return $this->tenant;
  143.     }
  144.     public function setTenant(?User $tenant): self
  145.     {
  146.         $this->tenant $tenant;
  147.         return $this;
  148.     }
  149.     public function getMailContact(): ?string
  150.     {
  151.         return $this->mailContact;
  152.     }
  153.     public function setMailContact(?string $mailContact): self
  154.     {
  155.         $this->mailContact $mailContact;
  156.         return $this;
  157.     }
  158.     
  159.     public function getCreatedAt(): ?\DateTimeInterface
  160.     {
  161.         return $this->createdAt;
  162.     }
  163.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  164.     {
  165.         $this->createdAt $createdAt;
  166.         return $this;
  167.     }
  168.     public function getChangeStateAt(): ?\DateTimeInterface
  169.     {
  170.         return $this->changeStateAt;
  171.     }
  172.     public function setChangeStateAt(?\DateTimeInterface $changeStateAt): self
  173.     {
  174.         $this->changeStateAt $changeStateAt;
  175.         return $this;
  176.     }
  177.     public function getRefusedAt(): ?\DateTimeInterface
  178.     {
  179.         return $this->refusedAt;
  180.     }
  181.     public function setRefusedAt(?\DateTimeInterface $refusedAt): self
  182.     {
  183.         $this->refusedAt $refusedAt;
  184.         return $this;
  185.     }
  186.     public function getRefusedTex(): ?string
  187.     {
  188.         return $this->refusedTex;
  189.     }
  190.     public function setRefusedTex(?string $refusedTex): self
  191.     {
  192.         $this->refusedTex $refusedTex;
  193.         return $this;
  194.     }
  195.     public function getBuilding(): ?Building
  196.     {
  197.         return $this->building;
  198.     }
  199.     public function setBuilding(?Building $building): self
  200.     {
  201.         $this->building $building;
  202.         $this->mailContact $building->getMailContact();
  203.         return $this;
  204.     }
  205.     public function getState(): ?string
  206.     {
  207.         return $this->state;
  208.     }
  209.     public function setState(?string $state): self
  210.     {
  211.         $this->state $state;
  212.         $this->setChangeStateAt(new \DateTimeImmutable('now', new \DateTimeZone('Europe/Paris')));
  213.         return $this;
  214.     }
  215.     public function getResidence(): ?Residence
  216.     {
  217.         return $this->residence;
  218.     }
  219.     public function setResidence(?Residence $residence): self
  220.     {
  221.         $this->residence $residence;
  222.         return $this;
  223.     }
  224.     public function isIsBlockBuilding(): ?bool
  225.     {
  226.         return $this->isBlockBuilding;
  227.     }
  228.     public function setIsBlockBuilding(?bool $isBlockBuilding): self
  229.     {
  230.         $this->isBlockBuilding $isBlockBuilding;
  231.         return $this;
  232.     }
  233.     public function isAsGarant(): ?bool
  234.     {
  235.         return $this->asGarant;
  236.     }
  237.     public function setAsGarant(bool $asGarant): self
  238.     {
  239.         $this->asGarant $asGarant;
  240.         return $this;
  241.     }
  242.     public function getLastNameGarant(): ?string
  243.     {
  244.         return $this->lastNameGarant;
  245.     }
  246.     public function setLastNameGarant(?string $lastNameGarant): self
  247.     {
  248.         $this->lastNameGarant $lastNameGarant;
  249.         return $this;
  250.     }
  251.     public function getFirstNameGarant(): ?string
  252.     {
  253.         return $this->firstNameGarant;
  254.     }
  255.     public function setFirstNameGarant(?string $firstNameGarant): self
  256.     {
  257.         $this->firstNameGarant $firstNameGarant;
  258.         return $this;
  259.     }
  260.     public function getPhoneGarant(): ?string
  261.     {
  262.         return $this->phoneGarant;
  263.     }
  264.     public function setPhoneGarant(?string $phoneGarant): self
  265.     {
  266.         $this->phoneGarant $phoneGarant;
  267.         return $this;
  268.     }
  269.     public function getEmailGarant(): ?string
  270.     {
  271.         return $this->emailGarant;
  272.     }
  273.     public function setEmailGarant(?string $emailGarant): self
  274.     {
  275.         $this->emailGarant $emailGarant;
  276.         return $this;
  277.     }
  278.     public function getAddressGarant(): ?string
  279.     {
  280.         return $this->addressGarant;
  281.     }
  282.     public function setAddressGarant(?string $addressGarant): self
  283.     {
  284.         $this->addressGarant $addressGarant;
  285.         return $this;
  286.     }
  287.     public function getIncomeGarant(): ?string
  288.     {
  289.         return $this->incomeGarant;
  290.     }
  291.     public function setIncomeGarant(?string $incomeGarant): self
  292.     {
  293.         $this->incomeGarant $incomeGarant;
  294.         return $this;
  295.     }
  296.     public function isIsOwnerGarant(): ?bool
  297.     {
  298.         return $this->isOwnerGarant;
  299.     }
  300.     public function setIsOwnerGarant(?bool $isOwnerGarant): self
  301.     {
  302.         $this->isOwnerGarant $isOwnerGarant;
  303.         return $this;
  304.     }
  305.     public function getRentGarant(): ?string
  306.     {
  307.         return $this->rentGarant;
  308.     }
  309.     public function setRentGarant(?string $rentGarant): self
  310.     {
  311.         $this->rentGarant $rentGarant;
  312.         return $this;
  313.     }
  314.     public function isCertificatGarantMe(): ?bool
  315.     {
  316.         return $this->certificatGarantMe;
  317.     }
  318.     public function setCertificatGarantMe(?bool $certificatGarantMe): self
  319.     {
  320.         $this->certificatGarantMe $certificatGarantMe;
  321.         return $this;
  322.     }
  323.     /**
  324.      * @return Collection<int, BuildingFolderDocument>
  325.      */
  326.     public function getBuildingFolderDocuments(): Collection
  327.     {
  328.         return $this->buildingFolderDocuments;
  329.     }
  330.     public function addBuildingFolderDocument(BuildingFolderDocument $buildingFolderDocument): self
  331.     {
  332.         if (!$this->buildingFolderDocuments->contains($buildingFolderDocument)) {
  333.             $this->buildingFolderDocuments->add($buildingFolderDocument);
  334.             $buildingFolderDocument->setBuildingFolder($this);
  335.         }
  336.         return $this;
  337.     }
  338.     public function removeBuildingFolderDocument(BuildingFolderDocument $buildingFolderDocument): self
  339.     {
  340.         if ($this->buildingFolderDocuments->removeElement($buildingFolderDocument)) {
  341.             // set the owning side to null (unless already changed)
  342.             if ($buildingFolderDocument->getBuildingFolder() === $this) {
  343.                 $buildingFolderDocument->setBuildingFolder(null);
  344.             }
  345.         }
  346.         return $this;
  347.     }
  348.     public function getRefusedDescription(): ?string
  349.     {
  350.         return $this->refusedDescription;
  351.     }
  352.     public function setRefusedDescription(?string $refusedDescription): self
  353.     {
  354.         $this->refusedDescription $refusedDescription;
  355.         return $this;
  356.     }
  357.     public function getGarantMeKey(): ?string
  358.     {
  359.         return $this->garantMeKey;
  360.     }
  361.     public function setGarantMeKey(?string $garantMeKey): self
  362.     {
  363.         $this->garantMeKey $garantMeKey;
  364.         return $this;
  365.     }
  366.     public function isIsPaid(): ?bool
  367.     {
  368.         return $this->isPaid;
  369.     }
  370.     public function setIsPaid(?bool $isPaid): self
  371.     {
  372.         $this->isPaid $isPaid;
  373.         return $this;
  374.     }
  375.     public function isIsPaidTenant(): ?bool
  376.     {
  377.         return $this->isPaidTenant;
  378.     }
  379.     public function setIsPaidTenant(?bool $isPaidTenant): self
  380.     {
  381.         $this->isPaidTenant $isPaidTenant;
  382.         return $this;
  383.     }
  384.     public function getDateStartAt(): ?\DateTimeInterface
  385.     {
  386.         return $this->dateStartAt;
  387.     }
  388.     public function setDateStartAt(?\DateTimeInterface $dateStartAt): self
  389.     {
  390.         $this->dateStartAt $dateStartAt;
  391.         return $this;
  392.     }
  393.     public function getRentalDuration(): ?int
  394.     {
  395.         return $this->rentalDuration;
  396.     }
  397.     public function setRentalDuration(int $rentalDuration): static
  398.     {
  399.         $this->rentalDuration $rentalDuration;
  400.         return $this;
  401.     }
  402.     public function getStatus(): ?string
  403.     {
  404.         return $this->status;
  405.     }
  406.     public function setStatus(?string $status): static
  407.     {
  408.         $this->status $status;
  409.         return $this;
  410.     }
  411.     public function getFormationName(): ?string
  412.     {
  413.         return $this->formationName;
  414.     }
  415.     public function setFormationName(?string $formationName): static
  416.     {
  417.         $this->formationName $formationName;
  418.         return $this;
  419.     }
  420.     public function getSchoolName(): ?string
  421.     {
  422.         return $this->schoolName;
  423.     }
  424.     public function setSchoolName(?string $schoolName): static
  425.     {
  426.         $this->schoolName $schoolName;
  427.         return $this;
  428.     }
  429.     public function getSchoolAddress(): ?string
  430.     {
  431.         return $this->schoolAddress;
  432.     }
  433.     public function setSchoolAddress(?string $schoolAddress): static
  434.     {
  435.         $this->schoolAddress $schoolAddress;
  436.         return $this;
  437.     }
  438.     public function getStudylevel(): ?string
  439.     {
  440.         return $this->studyLevel;
  441.     }
  442.     public function setStudylevel(?string $studyLevel): static
  443.     {
  444.         $this->studyLevel $studyLevel;
  445.         return $this;
  446.     }
  447.     public function getCompany(): ?string
  448.     {
  449.         return $this->company;
  450.     }
  451.     public function setCompany(?string $company): static
  452.     {
  453.         $this->company $company;
  454.         return $this;
  455.     }
  456.     public function getEmployementContract(): ?string
  457.     {
  458.         return $this->employementContract;
  459.     }
  460.     public function setEmployementContract(?string $employementContract): static
  461.     {
  462.         $this->employementContract $employementContract;
  463.         return $this;
  464.     }
  465.     public function getTrialPeriod(): ?string
  466.     {
  467.         return $this->trialPeriod;
  468.     }
  469.     public function setTrialPeriod(?string $trialPeriod): static
  470.     {
  471.         $this->trialPeriod $trialPeriod;
  472.         return $this;
  473.     }
  474.     public function getNetMonthlySalary(): ?int
  475.     {
  476.         return $this->netMonthlySalary;
  477.     }
  478.     public function setNetMonthlySalary(?int $netMonthlySalary): static
  479.     {
  480.         $this->netMonthlySalary $netMonthlySalary;
  481.         return $this;
  482.     }
  483.     public function getGuarantorType(): ?string
  484.     {
  485.         return $this->guarantorType;
  486.     }
  487.     public function setGuarantorType(?string $guarantorType): static
  488.     {
  489.         $this->guarantorType $guarantorType;
  490.         return $this;
  491.     }
  492.     public function getPhysicalGuarantorType(): ?string
  493.     {
  494.         return $this->physicalGuarantorType;
  495.     }
  496.     public function setPhysicalGuarantorType(?string $physicalGuarantorType): static
  497.     {
  498.         $this->physicalGuarantorType $physicalGuarantorType;
  499.         return $this;
  500.     }
  501.     public function getStatutResidencePrincipale(): ?string
  502.     {
  503.         return $this->statutResidencePrincipale;
  504.     }
  505.     public function setStatutResidencePrincipale(?string $statutResidencePrincipale): static
  506.     {
  507.         $this->statutResidencePrincipale $statutResidencePrincipale;
  508.         return $this;
  509.     }
  510.     public function getMensualRent(): ?int
  511.     {
  512.         return $this->mensualRent;
  513.     }
  514.     public function setMensualRent(?int $mensualRent): static
  515.     {
  516.         $this->mensualRent $mensualRent;
  517.         return $this;
  518.     }
  519.     public function getContractType(): ?string
  520.     {
  521.         return $this->contractType;
  522.     }
  523.     public function setContractType(?string $contractType): static
  524.     {
  525.         $this->contractType $contractType;
  526.         return $this;
  527.     }
  528.     public function getFinishedTrialPeriod(): ?string
  529.     {
  530.         return $this->finishedTrialPeriod;
  531.     }
  532.     public function setFinishedTrialPeriod(?string $finishedTrialPeriod): static
  533.     {
  534.         $this->finishedTrialPeriod $finishedTrialPeriod;
  535.         return $this;
  536.     }
  537.     public function getIncome(): ?string
  538.     {
  539.         return $this->income;
  540.     }
  541.     public function setIncome(?string $income): static
  542.     {
  543.         $this->income $income;
  544.         return $this;
  545.     }
  546.     public function getAdditionalIncomeSources(): ?string
  547.     {
  548.         return $this->additionalIncomeSources;
  549.     }
  550.     public function setAdditionalIncomeSources(?string $additionalIncomeSources): static
  551.     {
  552.         $this->additionalIncomeSources $additionalIncomeSources;
  553.         return $this;
  554.     }
  555.     public function getAdditionalIncomeSourcesStudent(): ?string
  556.     {
  557.         return $this->additionalIncomeSourcesStudent;
  558.     }
  559.     public function setAdditionalIncomeSourcesStudent(?string $additionalIncomeSourcesStudent): static
  560.     {
  561.         $this->additionalIncomeSourcesStudent $additionalIncomeSourcesStudent;
  562.         return $this;
  563.     }
  564.     public function getGuarantorStatus(): ?string
  565.     {
  566.         return $this->guarantorStatus;
  567.     }
  568.     public function setGuarantorStatus(?string $guarantorStatus): static
  569.     {
  570.         $this->guarantorStatus $guarantorStatus;
  571.         return $this;
  572.     }
  573.     public function getProfessionalGuarantee(): ?string
  574.     {
  575.         return $this->professionalGuarantee;
  576.     }
  577.     public function setProfessionalGuarantee(?string $professionalGuarantee): static
  578.     {
  579.         $this->professionalGuarantee $professionalGuarantee;
  580.         return $this;
  581.     }
  582.     public function getPhysicalGuarantorNationality(): ?string
  583.     {
  584.         return $this->physicalGuarantorNationality;
  585.     }
  586.     public function setPhysicalGuarantorNationality(?string $physicalGuarantorNationality): static
  587.     {
  588.         $this->physicalGuarantorNationality $physicalGuarantorNationality;
  589.         return $this;
  590.     }
  591.     public function getApplicationMessage(): ?string
  592.     {
  593.         return $this->applicationMessage;
  594.     }
  595.     public function setApplicationMessage(?string $applicationMessage): static
  596.     {
  597.         $this->applicationMessage $applicationMessage;
  598.         return $this;
  599.     }
  600.     public function isApplicationViewed(): ?bool
  601.     {
  602.         return $this->applicationViewed;
  603.     }
  604.     public function setApplicationViewed(?bool $applicationViewed): self
  605.     {
  606.         $this->applicationViewed $applicationViewed;
  607.         return $this;
  608.     }
  609. }