1<?php
2
3declare(strict_types=1);
4
5namespace JMS\Serializer\Tests\Fixtures\Doctrine;
6
7use Doctrine\Common\Collections\ArrayCollection;
8use Doctrine\ORM\Mapping as ORM;
9
10/** @ORM\Entity */
11class Comment
12{
13    /**
14     * @ORM\Id @ORM\Column(type="integer")
15     */
16    protected $id;
17
18    /**
19     * @ORM\Column(type="Author")
20     */
21    private $author;
22
23    /** @ORM\ManyToOne(targetEntity="BlogPost") */
24    private $blogPost;
25
26    /**
27     * @ORM\Column(type="string")
28     */
29    private $text;
30
31    public function __construct(Author $author, $text)
32    {
33        $this->author = $author;
34        $this->text = $text;
35        $this->blogPost = new ArrayCollection();
36    }
37
38    public function getAuthor()
39    {
40        return $this->author;
41    }
42}
43