<?phpnamespace App\Entity;use App\Repository\DistributionRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=DistributionRepository::class) */class Distribution{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $responsable; /** * @ORM\Column(type="integer", nullable=true) */ private $structure_fbb; /** * @ORM\Column(type="string", length=40) */ private $nom; /** * @ORM\Column(type="string", length=30) */ private $prenom; /** * @ORM\OneToMany(targetEntity=DistributionDetail::class, mappedBy="distribution") * @ORM\OrderBy({"article" = "ASC"}) */ private $distributionDetails; /** * @ORM\Column(type="datetime") */ private $date_distribution; /** * @ORM\Column(type="boolean") */ private $traite; public function __construct() { $this->distributionDetails = new ArrayCollection(); } public function __toString() { return $this->date_distribution; } public function getId(): ?int { return $this->id; } public function getResponsable(): ?string { return $this->responsable; } public function setResponsable(string $responsable): self { $this->responsable = $responsable; return $this; } public function getStructureFbb(): ?int { return $this->structure_fbb; } public function setStructureFbb(?int $structure_fbb): self { $this->structure_fbb = $structure_fbb; return $this; } public function getNom(): ?string { return $this->nom; } public function setNom(string $nom): self { $this->nom = $nom; return $this; } public function getPrenom(): ?string { return $this->prenom; } public function setPrenom(string $prenom): self { $this->prenom = $prenom; return $this; } /** * @return Collection<int, DistributionDetail> */ public function getDistributionDetails(): Collection { return $this->distributionDetails; } public function addDistributionDetail(DistributionDetail $distributionDetail): self { if (!$this->distributionDetails->contains($distributionDetail)) { $this->distributionDetails[] = $distributionDetail; $distributionDetail->setDistribution($this); } return $this; } public function removeDistributionDetail(DistributionDetail $distributionDetail): self { if ($this->distributionDetails->removeElement($distributionDetail)) { // set the owning side to null (unless already changed) if ($distributionDetail->getDistribution() === $this) { $distributionDetail->setDistribution(null); } } return $this; } public function getDateDistribution(): ?\DateTimeInterface { return $this->date_distribution; } public function setDateDistribution(\DateTimeInterface $date_distribution): self { $this->date_distribution = $date_distribution; return $this; } public function isTraite(): ?bool { return $this->traite; } public function setTraite(bool $traite): self { $this->traite = $traite; return $this; }}