<?php
namespace App\Entity;
use App\Repository\ContactInvestissementImmoRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use DateTimeImmutable;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
#[ORM\Entity(repositoryClass: ContactInvestissementImmoRepository::class)]
/**
* @Vich\Uploadable
*/
class ContactInvestissementImmo
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: AccountingFirm::class, inversedBy: 'contactInvestissementImmos')]
private $accountingFirm;
// projet
#[ORM\Column(type: 'string', length: 255)]
private $purchasePrice;
#[ORM\Column(type: 'boolean')]
private $contribution;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $amountContribution;
#[ORM\Column(type: 'boolean', nullable: true)]
private $bankLoan;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $amountLoan;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $durationLoan;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $rateLoan;
#[ORM\Column(type: 'boolean')]
private $agencyFees;
#[ORM\Column(type: 'boolean')]
private $notaryFees;
#[ORM\Column(type: 'string', nullable: true)]
private $notaryFeesAmount;
#[ORM\Column(type: 'string', nullable: true)]
private $agencyFeesAmount;
#[ORM\Column(type: 'boolean')]
private $work;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $amountsWork;
// immobilier
#[ORM\Column(type: 'string', length: 255)]
private $businessStructure;
#[ORM\Column(type: 'string', length: 255)]
private $numberProperties;
// properties
#[ORM\OneToMany(mappedBy: 'contactInvestissementImmo', targetEntity: ContactInvestissementImmoProperty::class)]
private $properties;
// foyer fiscal
#[ORM\Column(type: 'string', length: 255)]
private $numberPartTax;
#[ORM\Column(type: 'string', length: 255)]
private $taxReferanceIncome;
//detail
#[ORM\Column(type: 'text')]
private $messageFree;
//récapitulatif
#[ORM\Column(type: 'string', length: 255)]
private $name;
#[ORM\Column(type: 'string', length: 255)]
private $firstname;
#[ORM\Column(type: 'string', length: 50)]
private $phone;
#[ORM\Column(type: 'string', length: 255)]
private $email;
#[ORM\Column(type: 'string', length: 255)]
private $adress;
#[ORM\Column(type: 'string', length: 20)]
private ?string $paymentMethod = null;
#[ORM\Column(type: 'string', length: 255)]
private $zipCode;
#[ORM\Column(type: 'string', length: 255)]
private $city;
#[ORM\Column(type: 'datetime_immutable')]
private $createdAt;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $reference;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $status;
#[ORM\Column(type: 'string', nullable: true)]
private $pdfName;
#[ORM\Column(type: 'integer', nullable: true)]
private $pdfSize;
#[ORM\Column(type: 'datetime', nullable: true)]
private $pdfUpdatedAt;
/**
* @Vich\UploadableField(mapping="contactCreationSociete", fileNameProperty="pdfName", size="pdfSize")
* @var File|null
*/
private $pdfFile;
public function __construct()
{
$this->properties = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getFirstname(): ?string
{
return $this->firstname;
}
public function setFirstname(string $firstname): self
{
$this->firstname = $firstname;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getAdress(): ?string
{
return $this->adress;
}
public function setAdress(string $adress): self
{
$this->adress = $adress;
return $this;
}
public function getBusinessStructure(): ?string
{
return $this->businessStructure;
}
public function setBusinessStructure(string $businessStructure): self
{
$this->businessStructure = $businessStructure;
return $this;
}
public function getNumberProperties(): ?string
{
return $this->numberProperties;
}
public function setNumberProperties(string $numberProperties): self
{
$this->numberProperties = $numberProperties;
return $this;
}
public function getPurchasePrice(): ?string
{
return $this->purchasePrice;
}
public function setPurchasePrice(string $purchasePrice): self
{
$this->purchasePrice = $purchasePrice;
return $this;
}
public function getContribution(): ?bool
{
return $this->contribution;
}
public function setContribution(bool $contribution): self
{
$this->contribution = $contribution;
return $this;
}
public function getAmountContribution(): ?string
{
return $this->amountContribution;
}
public function setAmountContribution(string $amountContribution): self
{
$this->amountContribution = $amountContribution;
return $this;
}
public function isBankLoan(): ?bool
{
return $this->bankLoan;
}
public function setBankLoan(?bool $bankLoan): self
{
$this->bankLoan = $bankLoan;
return $this;
}
public function getAmountLoan(): ?string
{
return $this->amountLoan;
}
public function setAmountLoan(?string $amountLoan): self
{
$this->amountLoan = $amountLoan;
return $this;
}
public function getDurationLoan(): ?string
{
return $this->durationLoan;
}
public function setDurationLoan(?string $durationLoan): self
{
$this->durationLoan = $durationLoan;
return $this;
}
public function getRateLoan(): ?string
{
return $this->rateLoan;
}
public function setRateLoan(?string $rateLoan): self
{
$this->rateLoan = $rateLoan;
return $this;
}
public function getAgencyFees(): ?bool
{
return $this->agencyFees;
}
public function setAgencyFees(bool $agencyFees): self
{
$this->agencyFees = $agencyFees;
return $this;
}
public function getAgencyFeesAmount(): ?string
{
return $this->agencyFeesAmount;
}
public function setAgencyFeesAmount(string $agencyFeesAmount): self
{
$this->agencyFeesAmount = $agencyFeesAmount;
return $this;
}
public function getNotaryFees(): ?bool
{
return $this->notaryFees;
}
public function setNotaryFees(bool $notaryFees): self
{
$this->notaryFees = $notaryFees;
return $this;
}
public function getNotaryFeesAmount(): ?string
{
return $this->notaryFeesAmount;
}
public function setNotaryFeesAmount(string $notaryFeesAmount): self
{
$this->notaryFeesAmount = $notaryFeesAmount;
return $this;
}
public function getWork(): ?bool
{
return $this->work;
}
public function setWork(bool $work): self
{
$this->work = $work;
return $this;
}
public function getAmountsWork(): ?string
{
return $this->amountsWork;
}
public function setAmountsWork(?string $amountsWork): self
{
$this->amountsWork = $amountsWork;
return $this;
}
public function getAccountingFirm(): ?AccountingFirm
{
return $this->accountingFirm;
}
public function setAccountingFirm(?AccountingFirm $accountingFirm): self
{
$this->accountingFirm = $accountingFirm;
return $this;
}
public function getPaymentMethod(): ?string
{
return $this->paymentMethod;
}
public function setPaymentMethod(string $paymentMethod): self
{
$this->paymentMethod = $paymentMethod;
return $this;
}
/**
* @return Collection<int, ContactInvestissementImmoProperty>
*/
public function getProperties(): Collection
{
return $this->properties;
}
public function addProperty(ContactInvestissementImmoProperty $property): self
{
if (!$this->properties->contains($property)) {
$this->properties[] = $property;
$property->setContactInvestissementImmo($this);
}
return $this;
}
public function removeProperty(ContactInvestissementImmoProperty $property): self
{
if ($this->properties->removeElement($property)) {
// set the owning side to null (unless already changed)
if ($property->getContactInvestissementImmo() === $this) {
$property->setContactInvestissementImmo(null);
}
}
return $this;
}
public function getNumberPartTax(): ?string
{
return $this->numberPartTax;
}
public function setNumberPartTax(string $numberPartTax): self
{
$this->numberPartTax = $numberPartTax;
return $this;
}
public function getTaxReferanceIncome(): ?string
{
return $this->taxReferanceIncome;
}
public function setTaxReferanceIncome(string $taxReferanceIncome): self
{
$this->taxReferanceIncome = $taxReferanceIncome;
return $this;
}
public function getMessageFree(): ?string
{
return $this->messageFree;
}
public function setMessageFree(string $messageFree): self
{
$this->messageFree = $messageFree;
return $this;
}
public function getZipCode(): ?string
{
return $this->zipCode;
}
public function setZipCode(string $zipCode): self
{
$this->zipCode = $zipCode;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(string $city): self
{
$this->city = $city;
return $this;
}
public function getCreatedAt(): ?DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): self
{
$this->reference = $reference;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): self
{
$this->status = $status;
return $this;
}
public function getPdfName(): ?string
{
return $this->pdfName;
}
public function setPdfName(?string $pdfName): self
{
$this->pdfName = $pdfName;
$extension = pathinfo($pdfName, PATHINFO_EXTENSION);
if ($extension != null) {
$this->setPdfExtension($extension);
}
return $this;
}
public function getPdfSize(): ?int
{
return $this->pdfSize;
}
public function setPdfSize(?int $pdfSize): self
{
$this->pdfSize = $pdfSize;
return $this;
}
public function getPdfUpdatedAt(): ?\DateTimeInterface
{
return $this->pdfUpdatedAt;
}
public function setPdfUpdatedAt(?\DateTimeInterface $pdfUpdatedAt): self
{
$this->pdfUpdatedAt = $pdfUpdatedAt;
return $this;
}
public function getPdfFile(): ?File
{
return $this->pdfFile;
}
public function setPdfFile(?File $pdfFile): self
{
$this->pdfFile = $pdfFile;
if (null !== $this->pdfFile) {
$this->pdfUpdatedAt = new \DateTimeImmutable();
}
return $this;
}
}