src/Entity/Notice.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NoticeRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassNoticeRepository::class)]
  7. class Notice
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255)]
  14.     private ?string $name null;
  15.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  16.     private ?\DateTimeInterface $createdAt null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $content null;
  19.     public function __construct()
  20.     {
  21.         $this->createdAt = new \DateTimeImmutable('now');
  22.     }
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getName(): ?string
  28.     {
  29.         return $this->name;
  30.     }
  31.     public function setName(string $name): self
  32.     {
  33.         $this->name $name;
  34.         return $this;
  35.     }
  36.     public function getCreatedAt(): ?\DateTimeInterface
  37.     {
  38.         return $this->createdAt;
  39.     }
  40.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  41.     {
  42.         $this->createdAt $createdAt;
  43.         return $this;
  44.     }
  45.     public function getContent(): ?string
  46.     {
  47.         return $this->content;
  48.     }
  49.     public function setContent(string $content): self
  50.     {
  51.         $this->content $content;
  52.         return $this;
  53.     }
  54. }