diff --git a/src/Entity/Notes.php b/src/Entity/Notes.php index 02d461c..ce3ad0b 100644 --- a/src/Entity/Notes.php +++ b/src/Entity/Notes.php @@ -2,6 +2,7 @@ namespace App\Entity; +use Doctrine\DBAL\Types\Types; use JsonSerializable; use App\Repository\NotesRepository; use Doctrine\ORM\Mapping as ORM; @@ -10,7 +11,6 @@ use Doctrine\ORM\Mapping as ORM; class Notes implements JsonSerializable { #[ORM\Id] - #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; @@ -27,11 +27,21 @@ class Notes implements JsonSerializable #[ORM\Column(length: 4096)] private ?string $text = null; + #[ORM\Column(type: Types::DATE_MUTABLE)] + private ?\DateTimeInterface $date = null; + public function getId(): ?int { return $this->id; } + public function setId(int $id): static + { + $this->id = $id; + + return $this; + } + public function getTitle(): ?string { return $this->title; @@ -90,4 +100,16 @@ class Notes implements JsonSerializable 'text' => $this->text, ]; } + + public function getDate(): ?\DateTimeInterface + { + return $this->date; + } + + public function setDate(\DateTimeInterface $date): static + { + $this->date = $date; + + return $this; + } }