<?php
namespace App\Entity;
use App\Repository\CustomerBPRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity;
/**
* @ORM\Entity(repositoryClass=CustomerBPRepository::class)
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
*/
class CustomerBP extends BaseEntity
{
use SoftDeleteableEntity;
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var User $createdBy
* @Gedmo\Blameable(on="create")
* @ORM\ManyToOne(targetEntity="User")
*
*/
/**
* @Assert\Valid
* @ORM\ManyToOne(targetEntity=ImageManager::class, cascade={"persist", "remove"})
*/
private $cover;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $businessName;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $projectDescription;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $beneficiaryFirstName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $beneficiaryLastName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $beneficiarySex;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $beneficiaryMaritalStatus;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $beneficiaryPhoneNumber;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $beneficiaryAddress;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $beneficiaryStudyLevel;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $marketDescription;
/**
* @ORM\ManyToOne(targetEntity=BPModel::class, inversedBy="customerBPs")
* @ORM\JoinColumn(nullable=false)
*/
private $bpModel;
/**
* @ORM\OneToMany(targetEntity=CustomerVariable::class, mappedBy="customerBp", cascade={"persist", "remove"})
*/
private $customerVariables;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $projectSummary;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $customerDateOfBirth;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $customerPlaceOfBirth;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $humanResource;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $planningDescription;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $materialResource;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $workingCapital;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $fundNeed;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $previsionRevenue;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $statement;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $cashflowYear;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $cashflowMonth;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $pAndl;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $immobilisation;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $charges;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $businessTitle;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $financialFees;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $isDefault = false;
/**
* @ORM\Column(type="boolean", nullable="false", options={"default" : 0})
*/
private $generation = false;
/**
* @ORM\ManyToOne(targetEntity=Subscription::class)
*/
private $subscription;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $reference;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $van;
public function __construct()
{
$this->customerVariables = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getCover(): ?ImageManager
{
return $this->cover;
}
public function setCover(?ImageManager $cover): self
{
$this->cover = $cover;
return $this;
}
public function getBusinessName(): ?string
{
return $this->businessName;
}
public function setBusinessName(?string $businessName): self
{
$this->businessName = $businessName;
return $this;
}
public function getProjectDescription(): ?string
{
return $this->projectDescription;
}
public function setProjectDescription(?string $projectDescription): self
{
$this->projectDescription = $projectDescription;
return $this;
}
public function getBeneficiaryFirstName(): ?string
{
return $this->beneficiaryFirstName;
}
public function setBeneficiaryFirstName(?string $beneficiaryFirstName): self
{
$this->beneficiaryFirstName = $beneficiaryFirstName;
return $this;
}
public function getBeneficiaryLastName(): ?string
{
return $this->beneficiaryLastName;
}
public function setBeneficiaryLastName(?string $beneficiaryLastName): self
{
$this->beneficiaryLastName = $beneficiaryLastName;
return $this;
}
public function getBeneficiarySex(): ?string
{
return $this->beneficiarySex;
}
public function setBeneficiarySex(?string $beneficiarySex): self
{
$this->beneficiarySex = $beneficiarySex;
return $this;
}
public function getBeneficiaryMaritalStatus(): ?string
{
return $this->beneficiaryMaritalStatus;
}
public function setBeneficiaryMaritalStatus(?string $beneficiaryMaritalStatus): self
{
$this->beneficiaryMaritalStatus = $beneficiaryMaritalStatus;
return $this;
}
public function getBeneficiaryPhoneNumber(): ?string
{
return $this->beneficiaryPhoneNumber;
}
public function setBeneficiaryPhoneNumber(?string $beneficiaryPhoneNumber): self
{
$this->beneficiaryPhoneNumber = $beneficiaryPhoneNumber;
return $this;
}
public function getBeneficiaryAddress(): ?string
{
return $this->beneficiaryAddress;
}
public function setBeneficiaryAddress(?string $beneficiaryAddress): self
{
$this->beneficiaryAddress = $beneficiaryAddress;
return $this;
}
public function getBeneficiaryStudyLevel(): ?string
{
return $this->beneficiaryStudyLevel;
}
public function setBeneficiaryStudyLevel(?string $beneficiaryStudyLevel): self
{
$this->beneficiaryStudyLevel = $beneficiaryStudyLevel;
return $this;
}
public function getMarketDescription(): ?string
{
return $this->marketDescription;
}
public function setMarketDescription(?string $marketDescription): self
{
$this->marketDescription = $marketDescription;
return $this;
}
public function getBpModel(): ?BPModel
{
return $this->bpModel;
}
public function setBpModel(?BPModel $bpModel): self
{
$this->bpModel = $bpModel;
return $this;
}
/**
* @return Collection<int, CustomerVariable>
*/
public function getCustomerVariables(): Collection
{
return $this->customerVariables;
}
public function addCustomerVariable(CustomerVariable $customerVariable): self
{
if (!$this->customerVariables->contains($customerVariable)) {
$this->customerVariables[] = $customerVariable;
$customerVariable->setCustomerBp($this);
}
return $this;
}
public function removeCustomerVariable(CustomerVariable $customerVariable): self
{
if ($this->customerVariables->removeElement($customerVariable)) {
// set the owning side to null (unless already changed)
if ($customerVariable->getCustomerBp() === $this) {
$customerVariable->setCustomerBp(null);
}
}
return $this;
}
public function getProjectSummary(): ?string
{
return $this->projectSummary;
}
public function setProjectSummary(?string $projectSummary): self
{
$this->projectSummary = $projectSummary;
return $this;
}
public function getCustomerDateOfBirth(): ?\DateTimeInterface
{
return $this->customerDateOfBirth;
}
public function setCustomerDateOfBirth(?\DateTimeInterface $customerDateOfBirth): self
{
$this->customerDateOfBirth = $customerDateOfBirth;
return $this;
}
public function getCustomerPlaceOfBirth(): ?string
{
return $this->customerPlaceOfBirth;
}
public function setCustomerPlaceOfBirth(?string $customerPlaceOfBirth): self
{
$this->customerPlaceOfBirth = $customerPlaceOfBirth;
return $this;
}
public function getHumanResource(): ?string
{
return $this->humanResource;
}
public function setHumanResource(?string $humanResource): self
{
$this->humanResource = $humanResource;
return $this;
}
public function getPlanningDescription(): ?string
{
return $this->planningDescription;
}
public function setPlanningDescription(?string $planningDescription): self
{
$this->planningDescription = $planningDescription;
return $this;
}
public function getMaterialResource(): ?string
{
return $this->materialResource;
}
public function setMaterialResource(?string $materialResource): self
{
$this->materialResource = $materialResource;
return $this;
}
public function getWorkingCapital(): ?string
{
return $this->workingCapital;
}
public function setWorkingCapital(?string $workingCapital): self
{
$this->workingCapital = $workingCapital;
return $this;
}
public function getFundNeed(): ?string
{
return $this->fundNeed;
}
public function setFundNeed(?string $fundNeed): self
{
$this->fundNeed = $fundNeed;
return $this;
}
public function getPrevisionRevenue(): ?string
{
return $this->previsionRevenue;
}
public function setPrevisionRevenue(?string $previsionRevenue): self
{
$this->previsionRevenue = $previsionRevenue;
return $this;
}
public function getStatement(): ?string
{
return $this->statement;
}
public function setStatement(?string $statement): self
{
$this->statement = $statement;
return $this;
}
public function getCashflowYear(): ?string
{
return $this->cashflowYear;
}
public function setCashflowYear(?string $cashflowYear): self
{
$this->cashflowYear = $cashflowYear;
return $this;
}
public function getCashflowMonth(): ?string
{
return $this->cashflowMonth;
}
public function setCashflowMonth(?string $cashflowMonth): self
{
$this->cashflowMonth = $cashflowMonth;
return $this;
}
public function getPAndl(): ?string
{
return $this->pAndl;
}
public function setPAndl(?string $pAndl): self
{
$this->pAndl = $pAndl;
return $this;
}
public function getImmobilisation(): ?string
{
return $this->immobilisation;
}
public function setImmobilisation(?string $immobilisation): self
{
$this->immobilisation = $immobilisation;
return $this;
}
public function getCharges(): ?string
{
return $this->charges;
}
public function setCharges(?string $charges): self
{
$this->charges = $charges;
return $this;
}
public function getBusinessTitle(): ?string
{
return $this->businessTitle;
}
public function setBusinessTitle(?string $businessTitle): self
{
$this->businessTitle = $businessTitle;
return $this;
}
public function getBeneficiaryFullName(): ?string
{
return $this->getBeneficiaryLastName().' '.$this->getBeneficiaryFirstName();
}
public function getFinancialFees(): ?string
{
return $this->financialFees;
}
public function setFinancialFees(?string $financialFees): self
{
$this->financialFees = $financialFees;
return $this;
}
public function getIsDefault(): ?bool
{
return $this->isDefault;
}
public function setIsDefault(?bool $isDefault): self
{
$this->isDefault = $isDefault;
return $this;
}
/**
* @return bool
*/
public function isGeneration(): bool
{
return $this->generation;
}
/**
* @param bool $generation
*/
public function setGeneration(bool $generation): void
{
$this->generation = $generation;
}
public function getSubscription(): ?Subscription
{
return $this->subscription;
}
public function setSubscription(?Subscription $subscription): self
{
$this->subscription = $subscription;
return $this;
}
public function resetId(): void
{
$this->id = null;
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): self
{
$this->reference = $reference;
return $this;
}
public function getVan(): ?string
{
return $this->van;
}
public function setVan(?string $van): self
{
$this->van = $van;
return $this;
}
}