src/Entity/PartnerAction.php line 21

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use App\Repository\PartnerActionRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. /**
  11. * PartnerAction.
  12. *
  13. * @ORM\Table(name="PartnerAction")
  14. *
  15. * @ORM\Entity(repositoryClass=PartnerActionRepository::class)
  16. */
  17. class PartnerAction
  18. {
  19. public $fichesAction;
  20. /**
  21. * @var int
  22. *
  23. * @ORM\Column(name="id", type="integer")
  24. *
  25. * @ORM\Id
  26. *
  27. * @ORM\GeneratedValue(strategy="AUTO")
  28. */
  29. private $id;
  30. /**
  31. * @var string
  32. *
  33. * @ORM\Column(name="intitule", type="string", length=255, nullable=true)
  34. */
  35. private $name;
  36. /**
  37. * @Gedmo\Timestampable(on="create")
  38. *
  39. * @ORM\Column(name="created", type="datetime")
  40. */
  41. private $created;
  42. /**
  43. * @ORM\Column(name="updated", type="datetime")
  44. *
  45. * @Gedmo\Timestampable(on="update")
  46. */
  47. private $updated;
  48. /**
  49. * @ORM\ManyToMany(targetEntity="FicheAction", mappedBy="actionPartners")
  50. */
  51. private $fichesActionAction;
  52. /**
  53. * @ORM\ManyToMany(targetEntity="FicheAction", mappedBy="financialPartners")
  54. */
  55. private $fichesActionPartners;
  56. /**
  57. * Constructor.
  58. */
  59. public function __construct()
  60. {
  61. $this->fichesAction = new \Doctrine\Common\Collections\ArrayCollection();
  62. $this->fichesActionAction = new ArrayCollection();
  63. $this->fichesActionPartners = new ArrayCollection();
  64. }
  65. #[\Override]
  66. public function __toString(): string
  67. {
  68. return $this->name;
  69. }
  70. /**
  71. * Get id.
  72. *
  73. * @return int
  74. */
  75. public function getId()
  76. {
  77. return $this->id;
  78. }
  79. /**
  80. * Set name.
  81. *
  82. * @param string $name
  83. *
  84. * @return DimensionAction
  85. */
  86. public function setName($name): static
  87. {
  88. $this->name = $name;
  89. return $this;
  90. }
  91. /**
  92. * Get name.
  93. *
  94. * @return string
  95. */
  96. public function getName()
  97. {
  98. return $this->name;
  99. }
  100. /**
  101. * Set created.
  102. *
  103. * @param \DateTime $created
  104. *
  105. * @return DimensionAction
  106. */
  107. public function setCreated($created): static
  108. {
  109. $this->created = $created;
  110. return $this;
  111. }
  112. /**
  113. * Get created.
  114. *
  115. * @return \DateTime
  116. */
  117. public function getCreated()
  118. {
  119. return $this->created;
  120. }
  121. /**
  122. * Set updated.
  123. *
  124. * @param \DateTime $updated
  125. *
  126. * @return DimensionAction
  127. */
  128. public function setUpdated($updated): static
  129. {
  130. $this->updated = $updated;
  131. return $this;
  132. }
  133. /**
  134. * Get updated.
  135. *
  136. * @return \DateTime
  137. */
  138. public function getUpdated()
  139. {
  140. return $this->updated;
  141. }
  142. /**
  143. * Add fichesAction.
  144. *
  145. * @return DimensionAction
  146. */
  147. public function addFichesAction(FicheAction $fichesAction): static
  148. {
  149. $this->fichesAction[] = $fichesAction;
  150. return $this;
  151. }
  152. /**
  153. * Remove fichesAction.
  154. */
  155. public function removeFichesAction(FicheAction $fichesAction): void
  156. {
  157. $this->fichesAction->removeElement($fichesAction);
  158. }
  159. /**
  160. * Get fichesAction.
  161. *
  162. * @return \Doctrine\Common\Collections\Collection
  163. */
  164. public function getFichesAction()
  165. {
  166. return $this->fichesAction;
  167. }
  168. /**
  169. * Add fichesActionAction.
  170. */
  171. public function addFichesActionAction(FicheAction $fichesActionAction): static
  172. {
  173. $this->fichesActionAction[] = $fichesActionAction;
  174. return $this;
  175. }
  176. /**
  177. * Remove fichesActionAction.
  178. */
  179. public function removeFichesActionAction(FicheAction $fichesActionAction): void
  180. {
  181. $this->fichesActionAction->removeElement($fichesActionAction);
  182. }
  183. /**
  184. * Get fichesActionAction.
  185. *
  186. * @return \Doctrine\Common\Collections\Collection
  187. */
  188. public function getFichesActionAction()
  189. {
  190. return $this->fichesActionAction;
  191. }
  192. /**
  193. * Add fichesActionPartners.
  194. */
  195. public function addFichesActionPartner(FicheAction $fichesActionPartners): static
  196. {
  197. $this->fichesActionPartners[] = $fichesActionPartners;
  198. return $this;
  199. }
  200. /**
  201. * Remove fichesActionPartners.
  202. */
  203. public function removeFichesActionPartner(FicheAction $fichesActionPartners): void
  204. {
  205. $this->fichesActionPartners->removeElement($fichesActionPartners);
  206. }
  207. /**
  208. * Get fichesActionPartners.
  209. *
  210. * @return \Doctrine\Common\Collections\Collection
  211. */
  212. public function getFichesActionPartners()
  213. {
  214. return $this->fichesActionPartners;
  215. }
  216. }