src/Entity/Distribution.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DistributionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=DistributionRepository::class)
  9.  */
  10. class Distribution
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $responsable;
  22.     /**
  23.      * @ORM\Column(type="integer", nullable=true)
  24.      */
  25.     private $structure_fbb;
  26.     /**
  27.      * @ORM\Column(type="string", length=40)
  28.      */
  29.     private $nom;
  30.     /**
  31.      * @ORM\Column(type="string", length=30)
  32.      */
  33.     private $prenom;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity=DistributionDetail::class, mappedBy="distribution")
  36.      * @ORM\OrderBy({"article" = "ASC"})
  37.      */
  38.     private $distributionDetails;
  39.     /**
  40.      * @ORM\Column(type="datetime")
  41.      */
  42.     private $date_distribution;
  43.     /**
  44.      * @ORM\Column(type="boolean")
  45.      */
  46.     private $traite;
  47.     public function __construct()
  48.     {
  49.         $this->distributionDetails = new ArrayCollection();
  50.     }
  51.     public function __toString()
  52.     {
  53.         return $this->date_distribution;
  54.     }
  55.     public function getId(): ?int
  56.     {
  57.         return $this->id;
  58.     }
  59.     public function getResponsable(): ?string
  60.     {
  61.         return $this->responsable;
  62.     }
  63.     public function setResponsable(string $responsable): self
  64.     {
  65.         $this->responsable $responsable;
  66.         return $this;
  67.     }
  68.     public function getStructureFbb(): ?int
  69.     {
  70.         return $this->structure_fbb;
  71.     }
  72.     public function setStructureFbb(?int $structure_fbb): self
  73.     {
  74.         $this->structure_fbb $structure_fbb;
  75.         return $this;
  76.     }
  77.     public function getNom(): ?string
  78.     {
  79.         return $this->nom;
  80.     }
  81.     public function setNom(string $nom): self
  82.     {
  83.         $this->nom $nom;
  84.         return $this;
  85.     }
  86.     public function getPrenom(): ?string
  87.     {
  88.         return $this->prenom;
  89.     }
  90.     public function setPrenom(string $prenom): self
  91.     {
  92.         $this->prenom $prenom;
  93.         return $this;
  94.     }
  95.     /**
  96.      * @return Collection<int, DistributionDetail>
  97.      */
  98.     public function getDistributionDetails(): Collection
  99.     {
  100.         return $this->distributionDetails;
  101.     }
  102.     public function addDistributionDetail(DistributionDetail $distributionDetail): self
  103.     {
  104.         if (!$this->distributionDetails->contains($distributionDetail)) {
  105.             $this->distributionDetails[] = $distributionDetail;
  106.             $distributionDetail->setDistribution($this);
  107.         }
  108.         return $this;
  109.     }
  110.     public function removeDistributionDetail(DistributionDetail $distributionDetail): self
  111.     {
  112.         if ($this->distributionDetails->removeElement($distributionDetail)) {
  113.             // set the owning side to null (unless already changed)
  114.             if ($distributionDetail->getDistribution() === $this) {
  115.                 $distributionDetail->setDistribution(null);
  116.             }
  117.         }
  118.         return $this;
  119.     }
  120.     public function getDateDistribution(): ?\DateTimeInterface
  121.     {
  122.         return $this->date_distribution;
  123.     }
  124.     public function setDateDistribution(\DateTimeInterface $date_distribution): self
  125.     {
  126.         $this->date_distribution $date_distribution;
  127.         return $this;
  128.     }
  129.     public function isTraite(): ?bool
  130.     {
  131.         return $this->traite;
  132.     }
  133.     public function setTraite(bool $traite): self
  134.     {
  135.         $this->traite $traite;
  136.         return $this;
  137.     }
  138. }