src/Entity/Client.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ClientRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity(repositoryClass=ClientRepository::class)
  9. */
  10. class Client
  11. {
  12. /**
  13. * @ORM\Id()
  14. * @ORM\GeneratedValue()
  15. * @ORM\Column(type="integer")
  16. */
  17. private $id;
  18. /**
  19. * @ORM\Column(type="integer", nullable=true)
  20. */
  21. private $idOrg;
  22. /**
  23. * @ORM\Column(type="string", length=255, nullable=true)
  24. */
  25. private $code;
  26. /**
  27. * @ORM\Column(type="string", length=255, nullable=true)
  28. */
  29. private $nom;
  30. /**
  31. * @ORM\Column(type="integer", nullable=true)
  32. */
  33. private $status;
  34. /**
  35. * @ORM\Column(type="integer", nullable=true)
  36. */
  37. private $nombreProjet;
  38. /**
  39. * @ORM\Column(name="zendeskName",type="string", length=255, nullable=true)
  40. */
  41. private $zendeskName;
  42. /**
  43. * @ORM\Column(type="string", length=255, nullable=true)
  44. */
  45. private $pathImage;
  46. /**
  47. * @ORM\Column(name="dateMaj",type="string", length=255, nullable=true)
  48. */
  49. private $dateMaj;
  50. /**
  51. * @ORM\OneToOne(targetEntity=Statistique::class, cascade={"persist", "remove"})
  52. * @ORM\JoinColumn(name="id_stat")
  53. */
  54. private $statistique;
  55. /**
  56. * @ORM\OneToOne(targetEntity=CustomStat::class, cascade={"persist", "remove"})
  57. * @ORM\JoinColumn(name="id_custom_stat")
  58. */
  59. private $customStat;
  60. /**
  61. * @ORM\OneToMany(targetEntity=Mooc::class, mappedBy="client")
  62. */
  63. private $moocs;
  64. /**
  65. * @ORM\OneToMany(targetEntity=Projet::class, mappedBy="client")
  66. */
  67. private $projets;
  68. /**
  69. * @ORM\ManyToOne(targetEntity=Utilisateur::class, inversedBy="clients")
  70. * @ORM\JoinColumn(name="id_user")
  71. */
  72. private $idUser;
  73. /**
  74. * @ORM\Column(type="string", length=255, nullable=true)
  75. */
  76. private $smsLabel;
  77. public function __construct()
  78. {
  79. $this->moocs = new ArrayCollection();
  80. $this->projets = new ArrayCollection();
  81. }
  82. public function getId(): ?int
  83. {
  84. return $this->id;
  85. }
  86. public function getIdOrg(): ?int
  87. {
  88. return $this->idOrg;
  89. }
  90. public function setIdOrg(?int $idOrg): self
  91. {
  92. $this->idOrg = $idOrg;
  93. return $this;
  94. }
  95. public function getCode(): ?string
  96. {
  97. return $this->code;
  98. }
  99. public function setCode(?string $code): self
  100. {
  101. $this->code = $code;
  102. return $this;
  103. }
  104. public function getNom(): ?string
  105. {
  106. return $this->nom;
  107. }
  108. public function setNom(?string $nom): self
  109. {
  110. $this->nom = $nom;
  111. return $this;
  112. }
  113. public function getStatus(): ?int
  114. {
  115. return $this->status;
  116. }
  117. public function setStatus(?int $status): self
  118. {
  119. $this->status = $status;
  120. return $this;
  121. }
  122. public function getNombreProjet(): ?int
  123. {
  124. return $this->nombreProjet;
  125. }
  126. public function setNombreProjet(?int $nombreProjet): self
  127. {
  128. $this->nombreProjet = $nombreProjet;
  129. return $this;
  130. }
  131. public function getZendeskName(): ?string
  132. {
  133. return $this->zendeskName;
  134. }
  135. public function setZendeskName(?string $zendeskName): self
  136. {
  137. $this->zendeskName = $zendeskName;
  138. return $this;
  139. }
  140. public function getPathImage(): ?string
  141. {
  142. return $this->pathImage;
  143. }
  144. public function setPathImage(?string $pathImage): self
  145. {
  146. $this->pathImage = $pathImage;
  147. return $this;
  148. }
  149. public function getDateMaj(): ?string
  150. {
  151. return $this->dateMaj;
  152. }
  153. public function setDateMaj(?string $dateMaj): self
  154. {
  155. $this->dateMaj = $dateMaj;
  156. return $this;
  157. }
  158. public function getStatistique(): ?Statistique
  159. {
  160. return $this->statistique;
  161. }
  162. public function setStatistique(?Statistique $statistique): self
  163. {
  164. $this->statistique = $statistique;
  165. return $this;
  166. }
  167. public function getCustomStat(): ?CustomStat
  168. {
  169. return $this->customStat;
  170. }
  171. public function setCustomStat(?CustomStat $customStat): self
  172. {
  173. $this->customStat = $customStat;
  174. return $this;
  175. }
  176. /**
  177. * @return Collection|Mooc[]
  178. */
  179. public function getMoocs(): Collection
  180. {
  181. return $this->moocs;
  182. }
  183. public function addMooc(Mooc $mooc): self
  184. {
  185. if (!$this->moocs->contains($mooc)) {
  186. $this->moocs[] = $mooc;
  187. $mooc->setClient($this);
  188. }
  189. return $this;
  190. }
  191. public function removeMooc(Mooc $mooc): self
  192. {
  193. if ($this->moocs->contains($mooc)) {
  194. $this->moocs->removeElement($mooc);
  195. // set the owning side to null (unless already changed)
  196. if ($mooc->getClient() === $this) {
  197. $mooc->setClient(null);
  198. }
  199. }
  200. return $this;
  201. }
  202. /**
  203. * @return Collection|Projet[]
  204. */
  205. public function getProjets(): Collection
  206. {
  207. return $this->projets;
  208. }
  209. public function addProjet(Projet $projet): self
  210. {
  211. if (!$this->projets->contains($projet)) {
  212. $this->projets[] = $projet;
  213. $projet->setClient($this);
  214. }
  215. return $this;
  216. }
  217. public function removeProjet(Projet $projet): self
  218. {
  219. if ($this->projets->contains($projet)) {
  220. $this->projets->removeElement($projet);
  221. // set the owning side to null (unless already changed)
  222. if ($projet->getClient() === $this) {
  223. $projet->setClient(null);
  224. }
  225. }
  226. return $this;
  227. }
  228. public function getIdUser(): ?Utilisateur
  229. {
  230. return $this->idUser;
  231. }
  232. public function setIdUser(?Utilisateur $idUser): self
  233. {
  234. $this->idUser = $idUser;
  235. return $this;
  236. }
  237. public function getSmsLabel(): ?string
  238. {
  239. return $this->smsLabel;
  240. }
  241. public function setSmsLabel(?string $smsLabel): self
  242. {
  243. $this->smsLabel = $smsLabel;
  244. return $this;
  245. }
  246. }