src/CoreBundle/Entity/GradeComponents.php
<?php
declare(strict_types=1);
/* For licensing terms, see /license.txt */
namespace Chamilo\CoreBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* GradeComponents.
*/
#[ORM\Table(name: 'grade_components')]
#[ORM\Entity]
class GradeComponents
{
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue]
protected ?int $id = null;
#[ORM\Column(name: 'percentage', type: 'string', length: 255, nullable: false)]
protected string $percentage;
#[ORM\Column(name: 'title', type: 'string', length: 255, nullable: false)]
protected string $title;
#[ORM\Column(name: 'acronym', type: 'string', length: 255, nullable: false)]
protected string $acronym;
#[ORM\ManyToOne(targetEntity: GradeModel::class)]
#[ORM\JoinColumn(name: 'grade_model_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
protected GradeModel $gradeModel;
public function setPercentage(string $percentage): self
{
$this->percentage = $percentage;
return $this;
}
/**
* Get percentage.
*
* @return string
*/
public function getPercentage()
{
return $this->percentage;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
/**
* Get title.
*
* @return string
*/
public function getTitle()
{
return $this->title;
}
public function setAcronym(string $acronym): self
{
$this->acronym = $acronym;
return $this;
}
/**
* Get acronym.
*
* @return string
*/
public function getAcronym()
{
return $this->acronym;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
public function getGradeModel(): GradeModel
{
return $this->gradeModel;
}
public function setGradeModel(GradeModel $gradeModel): self
{
$this->gradeModel = $gradeModel;
return $this;
}
}