You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.2 KiB
52 lines
1.2 KiB
<?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;
|
|
}
|
|
}
|
|
|