Ecodev /
felix
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace EcodevTests\Felix\Blog\Model; |
||
| 6 | |||
| 7 | use Doctrine\ORM\Mapping as ORM; |
||
| 8 | |||
| 9 | /** |
||
| 10 | * A blog post with title and body. |
||
| 11 | */ |
||
| 12 | #[ORM\Entity(repositoryClass: 'EcodevTests\Felix\Blog\Repository\PostRepository')] |
||
| 13 | final class Post extends AbstractModel |
||
| 14 | { |
||
| 15 | #[ORM\Column(type: 'string', length: 50, options: ['default' => ''])] |
||
| 16 | private string $title = ''; |
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 17 | |||
| 18 | #[ORM\Column(type: 'text')] |
||
| 19 | private string $body = ''; |
||
|
0 ignored issues
–
show
|
|||
| 20 | |||
| 21 | #[ORM\ManyToOne(targetEntity: 'EcodevTests\Felix\Blog\Model\User', inversedBy: 'posts')] |
||
| 22 | private User $user; |
||
|
0 ignored issues
–
show
|
|||
| 23 | } |
||
| 24 |