src/Entity/System/Newsletter.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Entity(repositoryClass="App\Repository\System\NewsletterRepository")
  6. *
  7. * @ORM\Table(name="ps_newsletter")
  8. */
  9. class Newsletter
  10. {
  11. public const WHOLESALE = 1;
  12. public const NONE = 8;
  13. /**
  14. * @ORM\Id
  15. *
  16. * @ORM\GeneratedValue(strategy="AUTO")
  17. *
  18. * @ORM\Column(type="integer", name="id")
  19. */
  20. private int $id;
  21. /**
  22. * @ORM\Column(type="string", name="email", length=255)
  23. */
  24. private string $email;
  25. /**
  26. * @ORM\Column(type="datetime", options={"default":"CURRENT_TIMESTAMP"}, name="newsletter_date_add")
  27. */
  28. private \DateTime $dateAdd;
  29. /**
  30. * @ORM\Column(type="string", name="ip_registration_newsletter", length=15)
  31. */
  32. private string $ipRegister;
  33. /**
  34. * @ORM\Column(type="boolean", options={"unsigned":true, "default":0})
  35. */
  36. private ?bool $active;
  37. /**
  38. * @ORM\ManyToOne(targetEntity="Language")
  39. *
  40. * @ORM\JoinColumn(name="id_lang", referencedColumnName="id_lang")
  41. */
  42. private ?Language $language;
  43. /**
  44. * @ORM\Column(type="string", name="sectores", nullable=true)
  45. */
  46. private ?string $sections;
  47. /**
  48. * @ORM\Column(type="string", name="servicios", nullable=true)
  49. */
  50. private ?string $services;
  51. /**
  52. * @deprecated
  53. *
  54. * @ORM\Column(type="boolean", nullable=true, options={"default":0})
  55. */
  56. private ?bool $newStock;
  57. /**
  58. * @deprecated
  59. *
  60. * @ORM\Column(type="boolean", nullable=true, options={"default":0})
  61. */
  62. private ?bool $newProduct;
  63. /**
  64. * @deprecated
  65. *
  66. * @ORM\Column(type="boolean", nullable=true, options={"default":0})
  67. */
  68. private ?bool $priceChange;
  69. /**
  70. * @deprecated
  71. *
  72. * @ORM\Column(type="boolean", nullable=true, options={"default":0})
  73. */
  74. private ?bool $newsletterGestor;
  75. public function getId(): int
  76. {
  77. return $this->id;
  78. }
  79. public function getEmail(): string
  80. {
  81. return $this->email;
  82. }
  83. public function setEmail(string $email): void
  84. {
  85. $this->email = $email;
  86. }
  87. public function getActive(): ?bool
  88. {
  89. return $this->active;
  90. }
  91. public function setActive(?bool $active): void
  92. {
  93. $this->active = $active;
  94. }
  95. public function getLanguage(): ?Language
  96. {
  97. return $this->language;
  98. }
  99. public function setLanguage(Language $language): void
  100. {
  101. $this->language = $language;
  102. }
  103. public function getDateAdd(): \DateTime
  104. {
  105. return $this->dateAdd;
  106. }
  107. public function setDateAdd(\DateTime $dateAdd): void
  108. {
  109. $this->dateAdd = $dateAdd;
  110. }
  111. public function getIpRegister(): string
  112. {
  113. return $this->ipRegister;
  114. }
  115. public function setIpRegister(string $ipRegister): void
  116. {
  117. $this->ipRegister = $ipRegister;
  118. }
  119. public function getSections(): ?string
  120. {
  121. return $this->sections;
  122. }
  123. public function setSections(?string $sections): void
  124. {
  125. $this->sections = $sections;
  126. }
  127. public function getServices(): ?string
  128. {
  129. return $this->services;
  130. }
  131. public function setServices(?string $services): void
  132. {
  133. $this->services = $services;
  134. }
  135. public function getNewStock(): ?bool
  136. {
  137. return $this->newStock;
  138. }
  139. public function setNewStock(?bool $newStock): Newsletter
  140. {
  141. $this->newStock = $newStock;
  142. return $this;
  143. }
  144. public function getNewProduct(): ?bool
  145. {
  146. return $this->newProduct;
  147. }
  148. public function setNewProduct(?bool $newProduct): Newsletter
  149. {
  150. $this->newProduct = $newProduct;
  151. return $this;
  152. }
  153. public function getPriceChange(): ?bool
  154. {
  155. return $this->priceChange;
  156. }
  157. public function setPriceChange(?bool $priceChange): Newsletter
  158. {
  159. $this->priceChange = $priceChange;
  160. return $this;
  161. }
  162. public function getNewsletterGestor(): ?bool
  163. {
  164. return $this->newsletterGestor;
  165. }
  166. public function setNewsletterGestor(?bool $newsletterGestor): Newsletter
  167. {
  168. $this->newsletterGestor = $newsletterGestor;
  169. return $this;
  170. }
  171. }