src/CourseBundle/Entity/CBlogAttachment.php
<?php
declare(strict_types=1);
/* For licensing terms, see /license.txt */
namespace Chamilo\CourseBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'c_blog_attachment')]
#[ORM\Entity]
class CBlogAttachment
{
#[ORM\Column(name: 'iid', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue]
protected ?int $iid = null;
#[ORM\Column(name: 'path', type: 'string', length: 255, nullable: false)]
protected string $path;
#[ORM\Column(name: 'comment', type: 'text', nullable: true)]
protected ?string $comment = null;
#[ORM\Column(name: 'size', type: 'integer', nullable: false)]
protected int $size;
#[ORM\Column(name: 'filename', type: 'string', length: 255, nullable: false)]
protected string $filename;
#[ORM\ManyToOne(targetEntity: CBlog::class, inversedBy: 'attachments')]
#[ORM\JoinColumn(name: 'blog_id', referencedColumnName: 'iid', onDelete: 'CASCADE')]
protected ?CBlog $blog = null;
public function getIid(): ?int
{
return $this->iid;
}
public function getPath(): string
{
return $this->path;
}
public function setPath(string $path): self
{
$this->path = $path;
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): self
{
$this->comment = $comment;
return $this;
}
public function getSize(): int
{
return $this->size;
}
public function setSize(int $size): self
{
$this->size = $size;
return $this;
}
public function getFilename(): string
{
return $this->filename;
}
public function setFilename(string $filename): self
{
$this->filename = $filename;
return $this;
}
public function getBlog(): ?CBlog
{
return $this->blog;
}
public function setBlog(?CBlog $blog): self
{
$this->blog = $blog;
return $this;
}
}