Add date to notes
This commit is contained in:
parent
2869e6f035
commit
d9acfd43c6
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user