src/Entity/AppelStatut.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AppelStatutRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Table(name="appelStatut")
  9. * @ORM\Entity(repositoryClass=AppelStatutRepository::class)
  10. */
  11. class AppelStatut
  12. {
  13. /**
  14. * @ORM\Id()
  15. * @ORM\GeneratedValue()
  16. * @ORM\Column(type="integer")
  17. */
  18. private $id;
  19. /**
  20. * @ORM\OneToMany(targetEntity=Appel::class, mappedBy="statut")
  21. */
  22. private $appels;
  23. /**
  24. * @ORM\Column(type="string", length=100)
  25. */
  26. private $name;
  27. /**
  28. * @ORM\Column(type="integer")
  29. */
  30. private $joint;
  31. /**
  32. * @ORM\Column(type="string", length=100, nullable=true)
  33. */
  34. private $role;
  35. public function __construct()
  36. {
  37. $this->appels = new ArrayCollection();
  38. }
  39. public function getId(): ?int
  40. {
  41. return $this->id;
  42. }
  43. /**
  44. * @return Collection|Appel[]
  45. */
  46. public function getAppels(): Collection
  47. {
  48. return $this->appels;
  49. }
  50. public function addAppel(Appel $appel): self
  51. {
  52. if (!$this->appels->contains($appel)) {
  53. $this->appels[] = $appel;
  54. $appel->setStatut($this);
  55. }
  56. return $this;
  57. }
  58. public function removeAppel(Appel $appel): self
  59. {
  60. if ($this->appels->contains($appel)) {
  61. $this->appels->removeElement($appel);
  62. // set the owning side to null (unless already changed)
  63. if ($appel->getStatut() === $this) {
  64. $appel->setStatut(null);
  65. }
  66. }
  67. return $this;
  68. }
  69. public function getName(): ?string
  70. {
  71. return $this->name;
  72. }
  73. public function setName(string $name): self
  74. {
  75. $this->name = $name;
  76. return $this;
  77. }
  78. public function getJoint(): ?int
  79. {
  80. return $this->joint;
  81. }
  82. public function setJoint(int $joint): self
  83. {
  84. $this->joint = $joint;
  85. return $this;
  86. }
  87. public function getRole(): ?string
  88. {
  89. return $this->role;
  90. }
  91. public function setRole(?string $role): self
  92. {
  93. $this->role = $role;
  94. return $this;
  95. }
  96. }