This repository has been archived on 2025-06-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
joeac.net-symfony/src/Entity/Note.php

67 lines
1.2 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\NoteRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: NoteRepository::class)]
class Note
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $content = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTime $publishedDate = null;
#[ORM\Column(length: 255)]
private ?string $slug = null;
public function getId(): ?int
{
return $this->id;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(string $content): static
{
$this->content = $content;
return $this;
}
public function getPublishedDate(): ?\DateTime
{
return $this->publishedDate;
}
public function setPublishedDate(\DateTime $publishedDate): static
{
$this->publishedDate = $publishedDate;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): static
{
$this->slug = $slug;
return $this;
}
}