src/Entity/Events.php line 9

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