chamilo/chamilo-lms

View on GitHub
src/CoreBundle/Entity/SkillRelProfile.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

/* For licensing terms, see /license.txt */

declare(strict_types=1);

namespace Chamilo\CoreBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

#[ORM\Table(name: 'skill_rel_profile')]
#[ORM\Entity]
class SkillRelProfile
{
    #[ORM\Column(name: 'id', type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue]
    protected ?int $id = null;

    #[ORM\ManyToOne(targetEntity: Skill::class, cascade: ['persist'])]
    #[ORM\JoinColumn(name: 'skill_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
    protected Skill $skill;

    #[ORM\ManyToOne(targetEntity: SkillProfile::class, cascade: ['persist'])]
    #[ORM\JoinColumn(name: 'profile_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
    protected SkillProfile $profile;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getSkill(): Skill
    {
        return $this->skill;
    }

    public function setSkill(Skill $skill): self
    {
        $this->skill = $skill;

        return $this;
    }

    public function getProfile(): SkillProfile
    {
        return $this->profile;
    }

    public function setProfile(SkillProfile $profile): self
    {
        $this->profile = $profile;

        return $this;
    }
}