src/CourseBundle/Entity/CBlogRelUser.php
<?php
declare(strict_types=1);
/* For licensing terms, see /license.txt */
namespace Chamilo\CourseBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Traits\UserTrait;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'c_blog_rel_user')]
#[ORM\Entity]
class CBlogRelUser
{
use UserTrait;
#[ORM\Column(name: 'iid', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue]
protected ?int $iid = null;
#[ORM\ManyToOne(targetEntity: CBlog::class)]
#[ORM\JoinColumn(name: 'blog_id', referencedColumnName: 'iid', onDelete: 'CASCADE')]
protected ?CBlog $blog = null;
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
protected User $user;
public function getIid(): ?int
{
return $this->iid;
}
public function getBlog(): ?CBlog
{
return $this->blog;
}
public function setBlog(?CBlog $blog): self
{
$this->blog = $blog;
return $this;
}
}