31 lines
509 B
PHP
31 lines
509 B
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity]
|
|
#[ORM\Table(name: 'book')]
|
|
class Book
|
|
{
|
|
#[ORM\Id, ORM\Column, ORM\GeneratedValue]
|
|
private int $id;
|
|
|
|
#[ORM\Column]
|
|
private string $title;
|
|
|
|
public function getId(): int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getTitle(): string
|
|
{
|
|
return $this->title;
|
|
}
|
|
|
|
public function setTitle(string $title): void
|
|
{
|
|
$this->title = $title;
|
|
}
|
|
} |