<?php
namespace App\Entity\Engagement;
use App\Entity\Project;
use App\Entity\Etaps;
use App\Entity\EtapsCategory;
use App\Repository\EngagementBudgetEngageDetailRepository;
use Doctrine\ORM\Mapping as ORM;
use App\Annotation\CustomAnnotation;
/**
* @ORM\Entity(repositoryClass=EngagementBudgetEngageDetailRepository::class)
*/
class EngagementBudgetEngageDetail
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $classificationBudget;
/**
* @ORM\Column(type="float", nullable=true)
* @CustomAnnotation("Budget engagé")
*/
private $engageMontant;
/**
* @ORM\ManyToOne(targetEntity="\App\Entity\Project", cascade={"persist"})
* @ORM\JoinColumn(name="project_id", referencedColumnName="id",nullable=true,onDelete="SET NULL")
* @CustomAnnotation("Projet")
*/
private $projet;
/**
* @ORM\ManyToOne(targetEntity="EngagementBudgetEngage", inversedBy="engagementBudgetEngageDetail", cascade={"persist"})
* @ORM\JoinColumn(name="engagement_budget_engage_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
*/
private $engagementBudgetEngage;
/**
* Ligne budget (dépense/type) à laquelle ce détail d'engagé est rattaché.
* Permet à une même ligne budget de porter PLUSIEURS engagés (un détail par engagé).
* @ORM\ManyToOne(targetEntity="EngagementBudget", inversedBy="engagementBudgetEngageDetails", cascade={"persist"})
* @ORM\JoinColumn(name="engagement_budget_id", referencedColumnName="id", nullable=true, onDelete="CASCADE")
*/
private $engagementBudget;
/**
* Timeline (catégorie d'étapes) du projet associé à la ligne.
* @ORM\ManyToOne(targetEntity="\App\Entity\EtapsCategory", cascade={"persist"})
* @ORM\JoinColumn(name="timeline_id", referencedColumnName="id", nullable=true, onDelete="SET NULL")
* @CustomAnnotation("Timeline")
*/
private $timeline;
/**
* Étape du projet associé à la ligne.
* @ORM\ManyToOne(targetEntity="\App\Entity\Etaps", cascade={"persist"})
* @ORM\JoinColumn(name="etape_id", referencedColumnName="id", nullable=true, onDelete="SET NULL")
* @CustomAnnotation("Étape")
*/
private $etape;
public function getId(): ?int
{
return $this->id;
}
public function getEngagementBudgetEngage(): ?EngagementBudgetEngage
{
return $this->engagementBudgetEngage;
}
public function setEngagementBudgetEngage(?EngagementBudgetEngage $engagementBudgetEngage): self
{
$this->engagementBudgetEngage = $engagementBudgetEngage;
return $this;
}
public function getClassificationBudget(): ?string
{
return $this->classificationBudget;
}
public function setClassificationBudget(?string $classificationBudget): self
{
$this->classificationBudget = $classificationBudget;
return $this;
}
public function getEngageMontant(): ?float
{
return $this->engageMontant;
}
public function setEngageMontant(?float $engageMontant): self
{
$this->engageMontant = $engageMontant;
return $this;
}
public function getProjet(): ?Project
{
return $this->projet;
}
public function setProjet(?Project $projet): self
{
$this->projet = $projet;
return $this;
}
public function getTimeline(): ?EtapsCategory
{
return $this->timeline;
}
public function setTimeline(?EtapsCategory $timeline): self
{
$this->timeline = $timeline;
return $this;
}
public function getEtape(): ?Etaps
{
return $this->etape;
}
public function setEtape(?Etaps $etape): self
{
$this->etape = $etape;
return $this;
}
public function getEngagementBudget(): ?EngagementBudget
{
return $this->engagementBudget;
}
public function setEngagementBudget(?EngagementBudget $engagementBudget): self
{
$this->engagementBudget = $engagementBudget;
return $this;
}
}