src/Entity/Pages/SaveTemplates.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Pages;
  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. * Save Templates
  9. *
  10. * @ORM\Table("pages_save_templates")
  11. * @ORM\Entity(repositoryClass="App\Repository\Pages\SaveTemplatesRepository")
  12. * @ORM\HasLifecycleCallbacks()
  13. */
  14. class SaveTemplates
  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="datetime", nullable=true, options={"comment":"Date de création"})
  28. */
  29. private $createdAt;
  30. /**
  31. * @var string
  32. *
  33. * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"Date de mise à jour"})
  34. */
  35. private $updatedAt;
  36. /**
  37. * @var string
  38. *
  39. * @ORM\Column(name="name", type="string", length=255, nullable=true)
  40. */
  41. private $name;
  42. /**
  43. * @var string
  44. *
  45. * @ORM\Column(name="description", type="text", nullable=true)
  46. */
  47. private $description;
  48. /**
  49. * @var string
  50. *
  51. * @ORM\Column(name="generation_html", type="text", nullable=true)
  52. */
  53. private $generationHTML;
  54. /**
  55. * @var string
  56. *
  57. * @ORM\Column(name="last_id_page", type="text", nullable=true)
  58. */
  59. private $last;
  60. /**
  61. * @ORM\PrePersist
  62. */
  63. public function setCreatedAtValue(): void
  64. {
  65. $this->setCreatedAt(new \DateTime("now"));
  66. $this->setUpdatedAt(new \DateTime("now"));
  67. }
  68. /**
  69. * @ORM\PreUpdate
  70. */
  71. public function setUpdatedAtValue(): void
  72. {
  73. $this->setUpdatedAt(new \DateTime("now"));
  74. }
  75. public function __toString()
  76. {
  77. return $this->name;
  78. }
  79. public function getId(): ?int
  80. {
  81. return $this->id;
  82. }
  83. public function getCreatedAt(): ?\DateTimeInterface
  84. {
  85. return $this->createdAt;
  86. }
  87. public function setCreatedAt(?\DateTimeInterface $createdAt): self
  88. {
  89. $this->createdAt = $createdAt;
  90. return $this;
  91. }
  92. public function getUpdatedAt(): ?\DateTimeInterface
  93. {
  94. return $this->updatedAt;
  95. }
  96. public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  97. {
  98. $this->updatedAt = $updatedAt;
  99. return $this;
  100. }
  101. public function getName(): ?string
  102. {
  103. return $this->name;
  104. }
  105. public function setName(?string $name): self
  106. {
  107. $this->name = $name;
  108. return $this;
  109. }
  110. public function getDescription(): ?string
  111. {
  112. return $this->description;
  113. }
  114. public function setDescription(?string $description): self
  115. {
  116. $this->description = $description;
  117. return $this;
  118. }
  119. public function getGenerationHTML(): ?string
  120. {
  121. return $this->generationHTML;
  122. }
  123. public function setGenerationHTML(?string $generationHTML): self
  124. {
  125. $this->generationHTML = $generationHTML;
  126. return $this;
  127. }
  128. public function getLast(): ?string
  129. {
  130. return $this->last;
  131. }
  132. public function setLast(?string $last): self
  133. {
  134. $this->last = $last;
  135. return $this;
  136. }
  137. }