<?php
namespace App\Entity;
use App\Repository\LMSFormationRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=LMSFormationRepository::class)
*/
class LMSFormation
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $title;
/**
* @ORM\Column(type="boolean")
*/
private $on_sale;
/**
* @ORM\Column(type="float")
*/
private $duration;
/**
* @ORM\ManyToOne(targetEntity=LMSCategory::class, inversedBy="lmsFormations")
* @ORM\JoinColumn(nullable=false)
*/
private $lmsCategory;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $Price;
/**
* @ORM\ManyToMany(targetEntity=User::class, inversedBy="lMSFormations")
*/
private $user;
/**
* @ORM\OneToMany(targetEntity=LMSModule::class, mappedBy="lmsFormation")
*/
private $lMSModules;
private $status;
private $progression;
private $note; /** * @ORM\Column(type="integer", nullable=true) */ private $idCourse;
public function __construct()
{
$this->user = new ArrayCollection();
$this->lMSModules = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getOnSale(): ?bool
{
return $this->on_sale;
}
public function setOnSale(bool $on_sale): self
{
$this->on_sale = $on_sale;
return $this;
}
public function getDuration(): ?float
{
return $this->duration;
}
public function setDuration(float $duration): self
{
$this->duration = $duration;
return $this;
}
public function getLmsCategory(): ?LMSCategory
{
return $this->lmsCategory;
}
public function setLmsCategory(?LMSCategory $lmsCategory): self
{
$this->lmsCategory = $lmsCategory;
return $this;
}
public function getPrice(): ?float
{
return $this->Price;
}
public function setPrice(float $Price): self
{
$this->Price = $Price;
return $this;
}
/**
* @return Collection<int, User>
*/
public function getUser(): Collection
{
return $this->user;
}
public function addUser(User $user): self
{
if (!$this->user->contains($user)) {
$this->user[] = $user;
}
return $this;
}
public function removeUser(User $user): self
{
$this->user->removeElement($user);
return $this;
}
/**
* Get the value of status
*/
public function getStatus()
{
return $this->status;
}
/**
* Set the value of status
*
* @return self
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Get the value of note
*/
public function getNote()
{
return $this->note;
}
/**
* Set the value of note
*
* @return self
*/
public function setNote($note)
{
$this->note = $note;
return $this;
}
/**
* Get the value of contentProgression
*/
public function getContentProgression()
{
return $this->contentProgression;
}
/**
* Set the value of contentProgression
*
* @return self
*/
public function setContentProgression($contentProgression)
{
$this->contentProgression = $contentProgression;
return $this;
}
/**
* @return Collection<int, LMSModule>
*/
public function getLMSModules(): Collection
{
return $this->lMSModules;
}
public function addLMSModule(LMSModule $lMSModule): self
{
if (!$this->lMSModules->contains($lMSModule)) {
$this->lMSModules[] = $lMSModule;
$lMSModule->setLmsFormation($this);
}
return $this;
}
public function removeLMSModule(LMSModule $lMSModule): self
{
if ($this->lMSModules->removeElement($lMSModule)) {
// set the owning side to null (unless already changed)
if ($lMSModule->getLmsFormation() === $this) {
$lMSModule->setLmsFormation(null);
}
}
return $this;
}
/**
* Get the value of progression
*/
public function getProgression()
{
return $this->progression;
}
/**
* Set the value of progression
*
* @return self
*/
public function setProgression($progression)
{
$this->progression = $progression;
return $this;
} public function getIdCourse(): ?int { return $this->idCourse; } public function setIdCourse(?int $idCourse): self { $this->idCourse = $idCourse; return $this; }
}