src/CourseBundle/Entity/CBlogComment.php
<?php
declare(strict_types=1);
/* For licensing terms, see /license.txt */
namespace Chamilo\CourseBundle\Entity;
use Chamilo\CoreBundle\Entity\User;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'c_blog_comment')]
#[ORM\Entity]
class CBlogComment
{
#[ORM\Column(name: 'iid', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue]
protected ?int $iid = null;
#[ORM\Column(name: 'comment_id', type: 'integer', nullable: false)]
protected int $commentId;
#[ORM\Column(name: 'title', type: 'string', length: 250, nullable: false)]
protected string $title;
#[ORM\Column(name: 'comment', type: 'text', nullable: false)]
protected string $comment;
#[ORM\ManyToOne(targetEntity: User::class)]
#[ORM\JoinColumn(name: 'author_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
protected User $author;
#[ORM\Column(name: 'date_creation', type: 'datetime', nullable: false)]
protected DateTime $dateCreation;
#[ORM\ManyToOne(targetEntity: CBlog::class)]
#[ORM\JoinColumn(name: 'blog_id', referencedColumnName: 'iid', onDelete: 'CASCADE')]
protected ?CBlog $blog = null;
public function getIid(): ?int
{
return $this->iid;
}
public function getCommentId(): int
{
return $this->commentId;
}
public function setCommentId(int $commentId): self
{
$this->commentId = $commentId;
return $this;
}
public function getTitle(): string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getComment(): string
{
return $this->comment;
}
public function setComment(string $comment): self
{
$this->comment = $comment;
return $this;
}
public function getAuthor(): User
{
return $this->author;
}
public function setAuthor(User $author): self
{
$this->author = $author;
return $this;
}
public function getDateCreation(): DateTime
{
return $this->dateCreation;
}
public function setDateCreation(DateTime $dateCreation): self
{
$this->dateCreation = $dateCreation;
return $this;
}
public function getBlog(): ?CBlog
{
return $this->blog;
}
public function setBlog(?CBlog $blog): self
{
$this->blog = $blog;
return $this;
}
}