<?phpnamespace App\Entity;use App\Repository\EventsRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=EventsRepository::class) */class Events{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $title; /** * @ORM\Column(type="text", nullable=true) */ private $note; /** * @ORM\Column(type="date") */ private $due; /** * @ORM\Column(type="datetime") */ private $created; /** * @ORM\Column(type="boolean", nullable=true, options={"default"=true}) */ private $internal_mail; /** * @ORM\Column(type="datetime", nullable=true) */ private $sended; /** * @ORM\Column(type="integer") */ private $notiBeforeDays; /** * @ORM\ManyToOne(targetEntity=ProjectProducts::class, inversedBy="events") */ private $product; /** * @ORM\Column(type="boolean") */ private $isPublic; public function __construct(){ $this->created = new \DateTime(); $this->notiBeforeDays = 1; } public function getId(): ?int { return $this->id; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): self { $this->title = $title; return $this; } public function getNote(): ?string { return $this->note; } public function setNote(?string $note): self { $this->note = $note; return $this; } public function getDue(): ?\DateTimeInterface { return $this->due; } public function setDue(\DateTimeInterface $due): self { $this->due = $due; return $this; } public function getCreated(): ?\DateTimeInterface { return $this->created; } public function setCreated(\DateTimeInterface $created): self { $this->created = $created; return $this; } public function getInternalMail(): ?bool { return $this->internal_mail==null?true:$this->internal_mail; } public function setInternalMail(?bool $internal_mail): self { $this->internal_mail = $internal_mail; return $this; } public function getSended(): ?\DateTimeInterface { return $this->sended; } public function setSended(?\DateTimeInterface $sended): self { $this->sended = $sended; return $this; } public function getNotiBeforeDays(): ?int { return $this->notiBeforeDays; } public function setNotiBeforeDays(int $notiBeforeDays): self { $this->notiBeforeDays = $notiBeforeDays; return $this; } public function getProduct(): ?ProjectProducts { return $this->product; } public function setProduct(?ProjectProducts $product): self { $this->product = $product; return $this; } public function getIsPublic(): ?bool { return $this->isPublic; } public function setIsPublic(bool $isPublic): self { $this->isPublic = $isPublic; return $this; }}