src/Entity/Events.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EventsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=EventsRepository::class)
  7. */
  8. class Events
  9. {
  10. /**
  11. * @ORM\Id
  12. * @ORM\GeneratedValue
  13. * @ORM\Column(type="integer")
  14. */
  15. private $id;
  16. /**
  17. * @ORM\Column(type="string", length=255)
  18. */
  19. private $title;
  20. /**
  21. * @ORM\Column(type="text", nullable=true)
  22. */
  23. private $note;
  24. /**
  25. * @ORM\Column(type="date")
  26. */
  27. private $due;
  28. /**
  29. * @ORM\Column(type="datetime")
  30. */
  31. private $created;
  32. /**
  33. * @ORM\Column(type="boolean", nullable=true, options={"default"=true})
  34. */
  35. private $internal_mail;
  36. /**
  37. * @ORM\Column(type="datetime", nullable=true)
  38. */
  39. private $sended;
  40. /**
  41. * @ORM\Column(type="integer")
  42. */
  43. private $notiBeforeDays;
  44. /**
  45. * @ORM\ManyToOne(targetEntity=ProjectProducts::class, inversedBy="events")
  46. */
  47. private $product;
  48. /**
  49. * @ORM\Column(type="boolean")
  50. */
  51. private $isPublic;
  52. public function __construct(){
  53. $this->created = new \DateTime();
  54. $this->notiBeforeDays = 1;
  55. }
  56. public function getId(): ?int
  57. {
  58. return $this->id;
  59. }
  60. public function getTitle(): ?string
  61. {
  62. return $this->title;
  63. }
  64. public function setTitle(string $title): self
  65. {
  66. $this->title = $title;
  67. return $this;
  68. }
  69. public function getNote(): ?string
  70. {
  71. return $this->note;
  72. }
  73. public function setNote(?string $note): self
  74. {
  75. $this->note = $note;
  76. return $this;
  77. }
  78. public function getDue(): ?\DateTimeInterface
  79. {
  80. return $this->due;
  81. }
  82. public function setDue(\DateTimeInterface $due): self
  83. {
  84. $this->due = $due;
  85. return $this;
  86. }
  87. public function getCreated(): ?\DateTimeInterface
  88. {
  89. return $this->created;
  90. }
  91. public function setCreated(\DateTimeInterface $created): self
  92. {
  93. $this->created = $created;
  94. return $this;
  95. }
  96. public function getInternalMail(): ?bool
  97. {
  98. return $this->internal_mail==null?true:$this->internal_mail;
  99. }
  100. public function setInternalMail(?bool $internal_mail): self
  101. {
  102. $this->internal_mail = $internal_mail;
  103. return $this;
  104. }
  105. public function getSended(): ?\DateTimeInterface
  106. {
  107. return $this->sended;
  108. }
  109. public function setSended(?\DateTimeInterface $sended): self
  110. {
  111. $this->sended = $sended;
  112. return $this;
  113. }
  114. public function getNotiBeforeDays(): ?int
  115. {
  116. return $this->notiBeforeDays;
  117. }
  118. public function setNotiBeforeDays(int $notiBeforeDays): self
  119. {
  120. $this->notiBeforeDays = $notiBeforeDays;
  121. return $this;
  122. }
  123. public function getProduct(): ?ProjectProducts
  124. {
  125. return $this->product;
  126. }
  127. public function setProduct(?ProjectProducts $product): self
  128. {
  129. $this->product = $product;
  130. return $this;
  131. }
  132. public function getIsPublic(): ?bool
  133. {
  134. return $this->isPublic;
  135. }
  136. public function setIsPublic(bool $isPublic): self
  137. {
  138. $this->isPublic = $isPublic;
  139. return $this;
  140. }
  141. }