<?php
namespace App\Entity;
use App\Repository\CourseViewRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CourseViewRepository::class)
*/
class CourseView extends BaseEntity
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Course::class, inversedBy="courseViews")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $course;
public function getId(): ?int
{
return $this->id;
}
public function getCourse(): ?Course
{
return $this->course;
}
public function setCourse(?Course $course): self
{
$this->course = $course;
return $this;
}
}