src/Entity/Tache.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TacheRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity(repositoryClass=TacheRepository::class)
  9. */
  10. class Tache
  11. {
  12. /**
  13. * @ORM\Id()
  14. * @ORM\GeneratedValue()
  15. * @ORM\Column(type="integer")
  16. */
  17. private $id;
  18. /**
  19. * @ORM\OneToMany(targetEntity=Appel::class, mappedBy="tache")
  20. */
  21. private $appels;
  22. /**
  23. * @ORM\ManyToOne(targetEntity=Apprenant::class, inversedBy="taches")
  24. * @ORM\JoinColumn(name="IdApprenant")
  25. */
  26. private $apprenant;
  27. /**
  28. * @ORM\Column(type="integer", nullable=true, options={"default" : 0,"comment":"(0=Non abouti) (1=abouti) (2: RDV => à rappeler)"})
  29. */
  30. private $Etat;
  31. /**
  32. * @ORM\ManyToOne(targetEntity=Utilisateur::class, inversedBy="taches")
  33. * @ORM\JoinColumn(name="IdAgent")
  34. */
  35. private $agent;
  36. /**
  37. * @ORM\ManyToOne(targetEntity=Compagne::class, inversedBy="taches")
  38. * @ORM\JoinColumn(name="IdCompagne")
  39. */
  40. private $compagne;
  41. /**
  42. * @ORM\Column(type="string", length=255, nullable=true)
  43. */
  44. private $last_access;
  45. /**
  46. * @ORM\Column(type="integer",nullable=true,options={"default" : 0,"comment":"nombre des appels par apprenant"})
  47. */
  48. private $couche;
  49. public function __construct()
  50. {
  51. $this->appels = new ArrayCollection();
  52. }
  53. public function getId(): ?int
  54. {
  55. return $this->id;
  56. }
  57. /**
  58. * @return Collection|Appel[]
  59. */
  60. public function getAppels(): Collection
  61. {
  62. return $this->appels;
  63. }
  64. public function addAppel(Appel $appel): self
  65. {
  66. if (!$this->appels->contains($appel)) {
  67. $this->appels[] = $appel;
  68. $appel->setTache($this);
  69. }
  70. return $this;
  71. }
  72. public function removeAppel(Appel $appel): self
  73. {
  74. if ($this->appels->contains($appel)) {
  75. $this->appels->removeElement($appel);
  76. // set the owning side to null (unless already changed)
  77. if ($appel->getTache() === $this) {
  78. $appel->setTache(null);
  79. }
  80. }
  81. return $this;
  82. }
  83. public function getApprenant(): ?Apprenant
  84. {
  85. return $this->apprenant;
  86. }
  87. public function setApprenant(?Apprenant $apprenant): self
  88. {
  89. $this->apprenant = $apprenant;
  90. return $this;
  91. }
  92. public function getEtat(): ?int
  93. {
  94. return $this->Etat;
  95. }
  96. public function setEtat(?int $Etat): self
  97. {
  98. $this->Etat = $Etat;
  99. return $this;
  100. }
  101. public function getAgent(): ?Utilisateur
  102. {
  103. return $this->agent;
  104. }
  105. public function setAgent(?Utilisateur $agent): self
  106. {
  107. $this->agent = $agent;
  108. return $this;
  109. }
  110. public function getCompagne(): ?Compagne
  111. {
  112. return $this->compagne;
  113. }
  114. public function setCompagne(?Compagne $compagne): self
  115. {
  116. $this->compagne = $compagne;
  117. return $this;
  118. }
  119. public function getLastAccess(): ?string
  120. {
  121. return $this->last_access;
  122. }
  123. public function setLastAccess(?string $last_access): self
  124. {
  125. $this->last_access = $last_access;
  126. return $this;
  127. }
  128. public function getCouche(): ?int
  129. {
  130. return $this->couche;
  131. }
  132. public function setCouche(int $couche): self
  133. {
  134. $this->couche = $couche;
  135. return $this;
  136. }
  137. }