113 lines
2.2 KiB
PHP
113 lines
2.2 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\CommentRepository;
|
|
use Doctrine\DBAL\Types\Types;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: CommentRepository::class)]
|
|
class Comment
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $author = null;
|
|
|
|
#[ORM\Column(type: Types::TEXT)]
|
|
private ?string $text = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $email = null;
|
|
|
|
#[ORM\Column]
|
|
private ?\DateTimeImmutable $createdAt = null;
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'comments')]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private ?Conference $conference = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $photoFilename = null;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getAuthor(): ?string
|
|
{
|
|
return $this->author;
|
|
}
|
|
|
|
public function setAuthor(string $author): static
|
|
{
|
|
$this->author = $author;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getText(): ?string
|
|
{
|
|
return $this->text;
|
|
}
|
|
|
|
public function setText(string $text): static
|
|
{
|
|
$this->text = $text;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getEmail(): ?string
|
|
{
|
|
return $this->email;
|
|
}
|
|
|
|
public function setEmail(string $email): static
|
|
{
|
|
$this->email = $email;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getCreatedAt(): ?\DateTimeImmutable
|
|
{
|
|
return $this->createdAt;
|
|
}
|
|
|
|
public function setCreatedAt(\DateTimeImmutable $createdAt): static
|
|
{
|
|
$this->createdAt = $createdAt;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getConference(): ?Conference
|
|
{
|
|
return $this->conference;
|
|
}
|
|
|
|
public function setConference(?Conference $conference): static
|
|
{
|
|
$this->conference = $conference;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getPhotoFilename(): ?string
|
|
{
|
|
return $this->photoFilename;
|
|
}
|
|
|
|
public function setPhotoFilename(?string $photoFilename): static
|
|
{
|
|
$this->photoFilename = $photoFilename;
|
|
|
|
return $this;
|
|
}
|
|
}
|