<?php
namespace App\Entity;
use App\Repository\CategoryRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CategoryRepository::class)
*/
class Category
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(name="idCategory",type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=127)
*/
private $name;
/**
* @ORM\OneToMany(targetEntity=Course::class, mappedBy="category", orphanRemoval=true)
*/
private $courses;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
/**
* Get the value of courses
*/
public function getCourses()
{
return $this->courses;
}
/**
* Set the value of courses
*
* @return self
*/
public function setCourses($courses)
{
$this->courses = $courses;
return $this;
}
}