src/Entity/Core/Tools.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Core;
  3. use Doctrine\DBAL\Types\Types;
  4. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * Tools
  9. *
  10. * @ORM\Table("core_tools")
  11. * @ORM\Entity(repositoryClass="App\Repository\Core\ToolsRepository")
  12. * @ORM\HasLifecycleCallbacks()
  13. */
  14. class Tools
  15. {
  16. /**
  17. * @var integer
  18. *
  19. * @ORM\Column(name="id", type="integer")
  20. * @ORM\Id
  21. * @ORM\GeneratedValue(strategy="AUTO")
  22. */
  23. protected $id;
  24. /**
  25. * @var string
  26. *
  27. * @ORM\Column(name="created_at", type="date", nullable=true)
  28. */
  29. private $createdAt;
  30. /**
  31. * @var string
  32. *
  33. * @ORM\Column(name="updated_at", type="date", nullable=true)
  34. */
  35. private $updatedAt;
  36. /**
  37. * @var string
  38. *
  39. * @ORM\Column(name="title_page", type="string", length=255, nullable=true)
  40. */
  41. private $titlePage;
  42. /**
  43. * @var string
  44. *
  45. * @ORM\Column(name="name", type="string", length=255, nullable=true)
  46. */
  47. private $name;
  48. /**
  49. * @var string
  50. *
  51. * @ORM\Column(name="description", type="text", nullable=true)
  52. */
  53. private $value;
  54. /**
  55. * @var integer
  56. *
  57. * @ORM\Column(name="sequence", type="integer", length=11, nullable=true)
  58. */
  59. private $sequence;
  60. /**
  61. * @var string
  62. *
  63. * @ORM\Column(name="type", type="string", length=255, nullable=true)
  64. */
  65. private $type;
  66. /**
  67. * @var string
  68. *
  69. * @ORM\Column(name="category", type="string", length=255, nullable=true)
  70. */
  71. private $category;
  72. /**
  73. * @var string
  74. *
  75. * @ORM\Column(name="type_website", type="string", length=255, nullable=true)
  76. */
  77. private $typeWebsite;
  78. /**
  79. * @var \Fiches
  80. *
  81. * @ORM\ManyToOne(targetEntity="App\Entity\Core\Tools")
  82. * @ORM\JoinColumns({
  83. * @ORM\JoinColumn(name="tool_id", referencedColumnName="id", nullable=true)
  84. * })
  85. */
  86. protected $tool;
  87. /**
  88. * @ORM\PrePersist
  89. */
  90. public function setCreatedAtValue(): void {
  91. $this->setCreatedAt(new \DateTime("now"));
  92. $this->setUpdatedAt(new \DateTime("now"));
  93. }
  94. /**
  95. * @ORM\PreUpdate
  96. */
  97. public function setUpdatedAtValue(): void {
  98. $this->setUpdatedAt(new \DateTime("now"));
  99. }
  100. public function __toString() {
  101. return $this->name;
  102. }
  103. public function getId(): ?int
  104. {
  105. return $this->id;
  106. }
  107. public function getCreatedAt(): ?\DateTimeInterface
  108. {
  109. return $this->createdAt;
  110. }
  111. public function setCreatedAt(\DateTimeInterface $createdAt): self
  112. {
  113. $this->createdAt = $createdAt;
  114. return $this;
  115. }
  116. public function getUpdatedAt(): ?\DateTimeInterface
  117. {
  118. return $this->updatedAt;
  119. }
  120. public function setUpdatedAt(\DateTimeInterface $updatedAt): self
  121. {
  122. $this->updatedAt = $updatedAt;
  123. return $this;
  124. }
  125. public function getTag(): ?string
  126. {
  127. return $this->tag;
  128. }
  129. public function setTag(string $tag): self
  130. {
  131. $this->tag = $tag;
  132. return $this;
  133. }
  134. public function getTitlePage(): ?string
  135. {
  136. return $this->titlePage;
  137. }
  138. public function setTitlePage(string $titlePage): self
  139. {
  140. $this->titlePage = $titlePage;
  141. return $this;
  142. }
  143. public function getName(): ?string
  144. {
  145. return $this->name;
  146. }
  147. public function setName(string $name): self
  148. {
  149. $this->name = $name;
  150. return $this;
  151. }
  152. public function getValue(): ?string
  153. {
  154. return $this->value;
  155. }
  156. public function setValue(string $value): self
  157. {
  158. $this->value = $value;
  159. return $this;
  160. }
  161. public function getSequence(): ?int
  162. {
  163. return $this->sequence;
  164. }
  165. public function setSequence(int $sequence): self
  166. {
  167. $this->sequence = $sequence;
  168. return $this;
  169. }
  170. public function getType(): ?string
  171. {
  172. return $this->type;
  173. }
  174. public function setType(?string $type): self
  175. {
  176. $this->type = $type;
  177. return $this;
  178. }
  179. public function getCategory(): ?string
  180. {
  181. return $this->category;
  182. }
  183. public function setCategory(?string $category): self
  184. {
  185. $this->category = $category;
  186. return $this;
  187. }
  188. public function getTypeWebsite(): ?string
  189. {
  190. return $this->typeWebsite;
  191. }
  192. public function setTypeWebsite(?string $type): self
  193. {
  194. $this->typeWebsite = $type;
  195. return $this;
  196. }
  197. public function getTool(): ?self
  198. {
  199. return $this->tool;
  200. }
  201. public function setTool(?self $tool): self
  202. {
  203. $this->tool = $tool;
  204. return $this;
  205. }
  206. }