src/CourseBundle/Entity/CStudentPublicationRelUser.php
<?php
/* For licensing terms, see /license.txt */
declare(strict_types=1);
namespace Chamilo\CourseBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'c_student_publication_rel_user')]
#[ORM\Entity]
class CStudentPublicationRelUser
{
#[ORM\Column(name: 'iid', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue]
protected ?int $iid = null;
#[ORM\ManyToOne(targetEntity: CStudentPublication::class)]
#[ORM\JoinColumn(name: 'work_id', referencedColumnName: 'iid', onDelete: 'CASCADE')]
protected CStudentPublication $publication;
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
protected User $user;
public function getPublication(): CStudentPublication
{
return $this->publication;
}
public function setPublication(CStudentPublication $publication): self
{
$this->publication = $publication;
return $this;
}
public function getUser(): User
{
return $this->user;
}
public function setUser(User $user): self
{
$this->user = $user;
return $this;
}
}