src/Entity/Appel.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AppelRepository;
  4. use Doctrine\Persistence\ObjectManagerAware;
  5. use Doctrine\Persistence\Mapping\ClassMetadata;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity(repositoryClass=AppelRepository::class)
  9. */
  10. class Appel implements ObjectManagerAware
  11. {
  12. /**
  13. * @ORM\Id()
  14. * @ORM\GeneratedValue()
  15. * @ORM\Column(type="integer")
  16. */
  17. private $id;
  18. /**
  19. * @ORM\ManyToOne(targetEntity=Apprenant::class, inversedBy="appels")
  20. * @ORM\JoinColumn(name="id_apprenant", referencedColumnName="id")
  21. */
  22. private $apprenant;
  23. /**
  24. * @ORM\ManyToOne(targetEntity=AppelSujet::class, inversedBy="appels")
  25. * @ORM\JoinColumn(name="sujet", referencedColumnName="id")
  26. */
  27. private $sujet;
  28. /**
  29. * @ORM\Column(type="string", length=1024, nullable=true)
  30. */
  31. private $details;
  32. /**
  33. * @ORM\Column(type="string", length=255, nullable=true)
  34. */
  35. private $date;
  36. /**
  37. * @ORM\ManyToOne(targetEntity=Utilisateur::class, inversedBy="appels")
  38. * @ORM\JoinColumn(name="agent", referencedColumnName="id")
  39. */
  40. private $agent;
  41. /**
  42. * @ORM\ManyToOne(targetEntity=AppelStatut::class, inversedBy="appels")
  43. * @ORM\JoinColumn(name="statut", referencedColumnName="id")
  44. */
  45. private $statut;
  46. /**
  47. * @ORM\Column(type="integer", nullable=true)
  48. */
  49. private $type;
  50. /**
  51. * @ORM\ManyToOne(targetEntity=Tache::class, inversedBy="appels")
  52. * @ORM\JoinColumn(name="id_tache", referencedColumnName="id")
  53. */
  54. private $tache;
  55. /**
  56. * @ORM\Column(type="integer")
  57. */
  58. private $brouillon;
  59. /**
  60. * @ORM\Column(type="integer", nullable=true)
  61. */
  62. private $qualification;
  63. /**
  64. * @ORM\Column(name="technical_issues", type="text", nullable=true, options={"comment":"Technical issues"})
  65. */
  66. private $technical_issues;
  67. /**
  68. * @ORM\Column(name="points_discussed", type="text", nullable=true, options={"comment":"Points discussed"})
  69. */
  70. private $points_discussed;
  71. /**
  72. * @ORM\Column(name="assignment", type="text", nullable=true, options={"comment":"Assignment"})
  73. */
  74. private $assignment;
  75. /**
  76. * @ORM\Column(name="rate_session", type="integer", nullable=true, options={"comment":"Rate the session"})
  77. */
  78. private $rate_session;
  79. /**
  80. * Init Object Manager
  81. */
  82. private $em;
  83. /**
  84. * @ORM\OneToOne(targetEntity=Incident::class, cascade={"persist", "remove"})
  85. */
  86. private $incident;
  87. /**
  88. * Initialiser ObjectManager pour qu'on puisse utiliser Reporistory dans l'entity
  89. *
  90. * @param ObjectManager $objectManager
  91. * @param ClassMetadata $classMetadata
  92. * @return void
  93. */
  94. public function injectObjectManager(\Doctrine\Persistence\ObjectManager $objectManager, ClassMetadata $classMetadata = null)
  95. {
  96. $this->em = $objectManager;
  97. }
  98. public function getId(): ?int
  99. {
  100. return $this->id;
  101. }
  102. public function getApprenant(): ?Apprenant
  103. {
  104. return $this->apprenant;
  105. }
  106. public function setApprenant(?Apprenant $apprenant): self
  107. {
  108. $this->apprenant = $apprenant;
  109. return $this;
  110. }
  111. public function getSujet(): ?AppelSujet
  112. {
  113. return $this->sujet;
  114. }
  115. public function setSujet(?AppelSujet $sujet): self
  116. {
  117. $this->sujet = $sujet;
  118. return $this;
  119. }
  120. public function getDetails(): ?string
  121. {
  122. return $this->details;
  123. }
  124. public function setDetails(?string $details): self
  125. {
  126. $this->details = $details;
  127. return $this;
  128. }
  129. public function getDate(): ?string
  130. {
  131. return $this->date;
  132. }
  133. public function setDate(?string $date): self
  134. {
  135. $this->date = $date;
  136. return $this;
  137. }
  138. public function getAgent(): ?Utilisateur
  139. {
  140. return $this->agent;
  141. }
  142. public function setAgent(?Utilisateur $agent): self
  143. {
  144. $this->agent = $agent;
  145. return $this;
  146. }
  147. public function getStatut(): ?AppelStatut
  148. {
  149. return $this->statut;
  150. }
  151. public function setStatut(?AppelStatut $statut): self
  152. {
  153. $this->statut = $statut;
  154. return $this;
  155. }
  156. public function getType(): ?int
  157. {
  158. return $this->type;
  159. }
  160. public function setType(?int $type): self
  161. {
  162. $this->type = $type;
  163. return $this;
  164. }
  165. public function getTache(): ?Tache
  166. {
  167. return $this->tache;
  168. }
  169. public function setTache(?Tache $tache): self
  170. {
  171. $this->tache = $tache;
  172. return $this;
  173. }
  174. public function getBrouillon(): ?int
  175. {
  176. return $this->brouillon;
  177. }
  178. public function setBrouillon(int $brouillon): self
  179. {
  180. $this->brouillon = $brouillon;
  181. return $this;
  182. }
  183. public function getQualification(): ?int
  184. {
  185. return $this->qualification;
  186. }
  187. public function setQualification(?int $qualification): self
  188. {
  189. $this->qualification = $qualification;
  190. return $this;
  191. }
  192. public function getTechnicalIssues(): ?string
  193. {
  194. return $this->technical_issues;
  195. }
  196. public function setTechnicalIssues(?string $technical_issues): self
  197. {
  198. $this->technical_issues = $technical_issues;
  199. return $this;
  200. }
  201. public function getPointsDiscussed(): ?string
  202. {
  203. return $this->points_discussed;
  204. }
  205. public function setPointsDiscussed(?string $points_discussed): self
  206. {
  207. $this->points_discussed = $points_discussed;
  208. return $this;
  209. }
  210. public function getAssignment(): ?string
  211. {
  212. return $this->assignment;
  213. }
  214. public function setAssignment(?string $assignment): self
  215. {
  216. $this->assignment = $assignment;
  217. return $this;
  218. }
  219. public function getRateSession(): ?int
  220. {
  221. return $this->rate_session;
  222. }
  223. public function setRateSession(?int $rate_session): self
  224. {
  225. $this->rate_session = $rate_session;
  226. return $this;
  227. }
  228. public function getRdv()
  229. {
  230. $rdv = $this->em->getRepository(Rdv::class)->findOneByAppel($this);
  231. return $rdv;
  232. }
  233. public function getIncident(): ?Incident
  234. {
  235. return $this->incident;
  236. }
  237. public function setIncident(?Incident $incident): self
  238. {
  239. $this->incident = $incident;
  240. return $this;
  241. }
  242. }