<?php

namespace App\Entity;

use App\Repository\AnnouncementRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity(repositoryClass: AnnouncementRepository::class)]
class Announcement
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column]
    private ?int $id = null;

    #[ORM\Column]
    private ?int $year = null;

    #[ORM\Column]
    private ?int $month = null;

    #[ORM\ManyToOne(inversedBy: 'announcements')]
    #[ORM\JoinColumn(nullable: false)]
    private ?User $editedBy = null;

    #[ORM\Column]
    private ?\DateTime $editedDate = null;

    #[ORM\Column(type: Types::TEXT)]
    private ?string $announcement = null;

    #[ORM\Column]
    private ?bool $showEventDetail = null;

    #[ORM\Column]
    private ?bool $showAuthors = null;

    #[ORM\Column]
    private ?bool $sent = null;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getYear(): ?int
    {
        return $this->year;
    }

    public function setYear(int $year): static
    {
        $this->year = $year;

        return $this;
    }

    public function getMonth(): ?int
    {
        return $this->month;
    }

    public function setMonth(int $month): static
    {
        $this->month = $month;

        return $this;
    }

    public function getEditedBy(): ?User
    {
        return $this->editedBy;
    }

    public function setEditedBy(?User $editedBy): static
    {
        $this->editedBy = $editedBy;

        return $this;
    }

    public function getEditedDate(): ?\DateTime
    {
        return $this->editedDate;
    }

    public function setEditedDate(\DateTime $editedDate): static
    {
        $this->editedDate = $editedDate;

        return $this;
    }

    public function getAnnouncement(): ?string
    {
        return $this->announcement;
    }

    public function setAnnouncement(string $announcement): static
    {
        $this->announcement = $announcement;

        return $this;
    }

    public function isShowEventDetail(): ?bool
    {
        return $this->showEventDetail;
    }

    public function setShowEventDetail(bool $showEventDetail): static
    {
        $this->showEventDetail = $showEventDetail;

        return $this;
    }

    public function isShowAuthors(): ?bool
    {
        return $this->showAuthors;
    }

    public function setShowAuthors(bool $showAuthors): static
    {
        $this->showAuthors = $showAuthors;

        return $this;
    }

    public function isSent(): ?bool
    {
        return $this->sent;
    }

    public function setSent(bool $sent): static
    {
        $this->sent = $sent;

        return $this;
    }
}
