<?php
namespace App\Entity;
use App\Repository\ContactCreationSocieteRepository;
use DateTimeImmutable;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
#[ORM\Entity(repositoryClass: ContactCreationSocieteRepository::class)]
/**
* @Vich\Uploadable
*/
class ContactCreationSociete
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $category;
#[ORM\ManyToOne(targetEntity: AccountingFirm::class, inversedBy: 'contactCreationSocietes')]
private $cabinet;
#[ORM\Column(type: 'string', length: 20)]
private ?string $paymentMethod = null;
#[ORM\Column(type: 'datetime_immutable')]
private $createdAt;
// Entreprise
#[ORM\Column(type: 'string', length: 255)]
private $businessStructure;
#[ORM\Column(type: 'string', length: 255)]
private $societyName;
#[ORM\Column(type: 'string', length: 255)]
private $societyAddress;
#[ORM\Column(type: 'string', length: 255)]
private $societyCity;
#[ORM\Column(type: 'string', length: 255)]
private $societyZipCode;
#[ORM\Column(type: 'string', length: 255)]
private $taxRegime;
#[ORM\Column(type: 'string', length: 255)]
private $activity;
#[ORM\Column(type: 'datetime_immutable')]
private $startActivityAt;
#[ORM\Column(type: 'datetime_immutable')]
private $fiscalYearEndAt;
#[ORM\Column(type: 'string', length: 255)]
private $companyCapital;
#[ORM\Column(type: 'boolean')]
private $tva;
// Chiffres
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $investmentAmount;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $personalContribution;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $loanRequested;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $loanRateRequested;
#[ORM\Column(type: 'string', length: 255)]
private $ca_estimated;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $marginRate;
// Charges
#[ORM\Column(type: 'json', nullable: true)]
private $suppliesConsumable = [];
#[ORM\Column(type: 'json', nullable: true)]
private $externalServices = [];
#[ORM\OneToMany(mappedBy: 'contactCreationSociete', targetEntity: ContactCreationSocieteCharge::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
private $contactCreationSocieteCharges;
// Collaborateur
#[ORM\OneToMany(mappedBy: 'contactCreationSociete', targetEntity: ContactCreationSocieteSalaryEmployee::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
private $contactCreationSocieteSalaryEmployees;
#[ORM\Column(type: 'boolean', nullable: true)]
private $employees;
#[ORM\Column(type: 'integer', nullable: true)]
private $employeesNumber;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $netDirectorSalary;
#[ORM\Column(type: 'boolean', nullable: true)]
private $unemploymentRights;
#[ORM\Column(type: 'integer', nullable: true)]
private $apprenticesNumber;
// Projets
#[ORM\Column(type: 'text', nullable: true)]
private $additionalInformations;
#[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: 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->contactCreationSocieteCharges = new ArrayCollection();
$this->contactCreationSocieteSalaryEmployees = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getCategory(): ?string
{
return $this->category;
}
public function setCategory(string $category): self
{
$this->category = $category;
return $this;
}
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 getSocietyName(): ?string
{
return $this->societyName;
}
public function setSocietyName(string $societyName): self
{
$this->societyName = $societyName;
return $this;
}
public function getActivity(): ?string
{
return $this->activity;
}
public function setActivity(string $activity): self
{
$this->activity = $activity;
return $this;
}
public function getSocietyAddress(): ?string
{
return $this->societyAddress;
}
public function setSocietyAddress(string $societyAddress): self
{
$this->societyAddress = $societyAddress;
return $this;
}
public function getSocietyCity(): ?string
{
return $this->societyCity;
}
public function setSocietyCity(string $societyCity): self
{
$this->societyCity = $societyCity;
return $this;
}
public function getSocietyZipCode(): ?string
{
return $this->societyZipCode;
}
public function setSocietyZipCode(string $societyZipCode): self
{
$this->societyZipCode = $societyZipCode;
return $this;
}
public function getStartActivityAt(): ?DateTimeImmutable
{
return $this->startActivityAt;
}
public function setStartActivityAt(DateTimeImmutable $startActivityAt): self
{
$this->startActivityAt = $startActivityAt;
return $this;
}
public function getFiscalYearEndAt(): ?DateTimeImmutable
{
return $this->fiscalYearEndAt;
}
public function setFiscalYearEndAt(DateTimeImmutable $fiscalYearEndAt): self
{
$this->fiscalYearEndAt = $fiscalYearEndAt;
return $this;
}
public function getTaxRegime(): ?string
{
return $this->taxRegime;
}
public function setTaxRegime(string $taxRegime): self
{
$this->taxRegime = $taxRegime;
return $this;
}
public function isTva(): ?bool
{
return $this->tva;
}
public function setTva(bool $tva): self
{
$this->tva = $tva;
return $this;
}
public function getCompanyCapital(): ?string
{
return $this->companyCapital;
}
public function setCompanyCapital(string $companyCapital): self
{
$this->companyCapital = $companyCapital;
return $this;
}
public function getInvestmentAmount(): ?string
{
return $this->investmentAmount;
}
public function setInvestmentAmount(?string $investmentAmount): self
{
$this->investmentAmount = $investmentAmount;
return $this;
}
public function getPersonalContribution(): ?string
{
return $this->personalContribution;
}
public function setPersonalContribution(?string $personalContribution): self
{
$this->personalContribution = $personalContribution;
return $this;
}
public function getLoanRequested(): ?string
{
return $this->loanRequested;
}
public function setLoanRequested(?string $loanRequested): self
{
$this->loanRequested = $loanRequested;
return $this;
}
public function getLoanRateRequested(): ?string
{
return $this->loanRateRequested;
}
public function setLoanRateRequested(?string $loanRateRequested): self
{
$this->loanRateRequested = $loanRateRequested;
return $this;
}
public function getCaEstimated(): ?string
{
return $this->ca_estimated;
}
public function setCaEstimated(string $ca_estimated): self
{
$this->ca_estimated = $ca_estimated;
return $this;
}
public function getMarginRate(): ?string
{
return $this->marginRate;
}
public function setMarginRate(?string $marginRate): self
{
$this->marginRate = $marginRate;
return $this;
}
public function getSuppliesConsumable(): ?array
{
return $this->suppliesConsumable;
}
public function setSuppliesConsumable(?array $suppliesConsumable): self
{
$this->suppliesConsumable = $suppliesConsumable;
return $this;
}
public function getExternalServices(): ?array
{
return $this->externalServices;
}
public function setExternalServices(?array $externalServices): self
{
$this->externalServices = $externalServices;
return $this;
}
public function isEmployees(): ?bool
{
return $this->employees;
}
public function setEmployees(?bool $employees): self
{
$this->employees = $employees;
return $this;
}
public function getEmployeesNumber(): ?int
{
return $this->employeesNumber;
}
public function setEmployeesNumber(?int $employeesNumber): self
{
$this->employeesNumber = $employeesNumber;
return $this;
}
public function getNetDirectorSalary(): ?string
{
return $this->netDirectorSalary;
}
public function setNetDirectorSalary(?string $netDirectorSalary): self
{
$this->netDirectorSalary = $netDirectorSalary;
return $this;
}
public function isUnemploymentRights(): ?bool
{
return $this->unemploymentRights;
}
public function setUnemploymentRights(?bool $unemploymentRights): self
{
$this->unemploymentRights = $unemploymentRights;
return $this;
}
public function getAdditionalInformations(): ?string
{
return $this->additionalInformations;
}
public function setAdditionalInformations(?string $additionalInformations): self
{
$this->additionalInformations = $additionalInformations;
return $this;
}
public function getCabinet(): ?AccountingFirm
{
return $this->cabinet;
}
public function setCabinet(?AccountingFirm $cabinet): self
{
$this->cabinet = $cabinet;
return $this;
}
public function getPaymentMethod(): ?string
{
return $this->paymentMethod;
}
public function setPaymentMethod(string $paymentMethod): self
{
$this->paymentMethod = $paymentMethod;
return $this;
}
/**
* @return Collection<int, ContactCreationSocieteCharge>
*/
public function getContactCreationSocieteCharges(): Collection
{
return $this->contactCreationSocieteCharges;
}
public function addContactCreationSocieteCharge(ContactCreationSocieteCharge $contactCreationSocieteCharge): self
{
if (!$this->contactCreationSocieteCharges->contains($contactCreationSocieteCharge)) {
$this->contactCreationSocieteCharges[] = $contactCreationSocieteCharge;
$contactCreationSocieteCharge->setContactCreationSociete($this);
}
return $this;
}
public function removeContactCreationSocieteCharge(ContactCreationSocieteCharge $contactCreationSocieteCharge): self
{
if ($this->contactCreationSocieteCharges->removeElement($contactCreationSocieteCharge)) {
// set the owning side to null (unless already changed)
if ($contactCreationSocieteCharge->getContactCreationSociete() === $this) {
$contactCreationSocieteCharge->setContactCreationSociete(null);
}
}
return $this;
}
public function getApprenticesNumber(): ?int
{
return $this->apprenticesNumber;
}
public function setApprenticesNumber(int $apprenticesNumber): self
{
$this->apprenticesNumber = $apprenticesNumber;
return $this;
}
/**
* @return Collection<int, ContactCreationSocieteSalaryEmployee>
*/
public function getContactCreationSocieteSalaryEmployees(): Collection
{
return $this->contactCreationSocieteSalaryEmployees;
}
public function addContactCreationSocieteSalaryEmployee(ContactCreationSocieteSalaryEmployee $contactCreationSocieteSalaryEmployee): self
{
if (!$this->contactCreationSocieteSalaryEmployees->contains($contactCreationSocieteSalaryEmployee)) {
$this->contactCreationSocieteSalaryEmployees[] = $contactCreationSocieteSalaryEmployee;
$contactCreationSocieteSalaryEmployee->setContactCreationSociete($this);
}
return $this;
}
public function removeContactCreationSocieteSalaryEmployee(ContactCreationSocieteSalaryEmployee $contactCreationSocieteSalaryEmployee): self
{
if ($this->contactCreationSocieteSalaryEmployees->removeElement($contactCreationSocieteSalaryEmployee)) {
// set the owning side to null (unless already changed)
if ($contactCreationSocieteSalaryEmployee->getContactCreationSociete() === $this) {
$contactCreationSocieteSalaryEmployee->setContactCreationSociete(null);
}
}
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;
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;
}
}