1<?php
2
3declare(strict_types=1);
4
5namespace JMS\Serializer\Tests\Fixtures\Doctrine\SingleTableInheritance;
6
7use Doctrine\Common\Collections\ArrayCollection;
8use Doctrine\ORM\Mapping as ORM;
9
10/**
11 * @ORM\Entity
12 */
13class Clazz extends AbstractModel
14{
15    /** @ORM\Id @ORM\GeneratedValue(strategy = "AUTO") @ORM\Column(type = "integer") */
16    private $id;
17
18    /** @ORM\ManyToOne(targetEntity = "JMS\Serializer\Tests\Fixtures\Doctrine\SingleTableInheritance\Teacher") */
19    private $teacher;
20
21    /** @ORM\ManyToMany(targetEntity = "JMS\Serializer\Tests\Fixtures\Doctrine\SingleTableInheritance\Student") */
22    private $students;
23
24    public function __construct(Teacher $teacher, array $students)
25    {
26        $this->teacher = $teacher;
27        $this->students = new ArrayCollection($students);
28    }
29
30    public function getId()
31    {
32        return $this->id;
33    }
34
35    public function getTeacher()
36    {
37        return $this->teacher;
38    }
39
40    public function getStudents()
41    {
42        return $this->students;
43    }
44}
45