<?php
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity]
class SettingNote
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $title = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $content = null;
#[ORM\ManyToOne(inversedBy: 'settingNotes')]
#[ORM\JoinColumn(nullable: false)]
private ?Setting $setting = null;
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): self
{
$this->content = $content;
return $this;
}
public function getSetting(): ?Setting
{
return $this->setting;
}
public function setSetting(?Setting $setting): self
{
$this->setting = $setting;
return $this;
}
public function __toString(): string
{
return $this->title ?? 'Nouvelle note';
}
}