204 lines
4.3 KiB
PHP
204 lines
4.3 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(type: Types::TEXT)]
|
|
private ?string $body = null;
|
|
|
|
#[ORM\Column(type: Types::DATETIME_MUTABLE)]
|
|
private ?\DateTimeInterface $created_at = null;
|
|
|
|
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
|
|
private ?\DateTimeInterface $updated_at = null;
|
|
|
|
#[ORM\Column]
|
|
private ?bool $is_public = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $attachment_location = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $attachment_content_type = null;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $attachment_name = null;
|
|
|
|
#[ORM\Column]
|
|
private ?bool $is_purchase = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $comment_type = null;
|
|
|
|
#[ORM\Column(nullable: true)]
|
|
private ?int $attachment_size = null;
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'comments')]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private ?Ticket $ticket = null;
|
|
|
|
#[ORM\ManyToOne(inversedBy: 'comments')]
|
|
#[ORM\JoinColumn(nullable: false)]
|
|
private ?User $created_by = null;
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getBody(): ?string
|
|
{
|
|
return $this->body;
|
|
}
|
|
|
|
public function setBody(string $body): static
|
|
{
|
|
$this->body = $body;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getCreatedAt(): ?\DateTimeInterface
|
|
{
|
|
return $this->created_at;
|
|
}
|
|
|
|
public function setCreatedAt(\DateTimeInterface $created_at): static
|
|
{
|
|
$this->created_at = $created_at;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getUpdatedAt(): ?\DateTimeInterface
|
|
{
|
|
return $this->updated_at;
|
|
}
|
|
|
|
public function setUpdatedAt(?\DateTimeInterface $updated_at): static
|
|
{
|
|
$this->updated_at = $updated_at;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isIsPublic(): ?bool
|
|
{
|
|
return $this->is_public;
|
|
}
|
|
|
|
public function setIsPublic(bool $is_public): static
|
|
{
|
|
$this->is_public = $is_public;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getAttachmentLocation(): ?string
|
|
{
|
|
return $this->attachment_location;
|
|
}
|
|
|
|
public function setAttachmentLocation(?string $attachment_location): static
|
|
{
|
|
$this->attachment_location = $attachment_location;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getAttachmentContentType(): ?string
|
|
{
|
|
return $this->attachment_content_type;
|
|
}
|
|
|
|
public function setAttachmentContentType(?string $attachment_content_type): static
|
|
{
|
|
$this->attachment_content_type = $attachment_content_type;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getAttachmentName(): ?string
|
|
{
|
|
return $this->attachment_name;
|
|
}
|
|
|
|
public function setAttachmentName(?string $attachment_name): static
|
|
{
|
|
$this->attachment_name = $attachment_name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isIsPurchase(): ?bool
|
|
{
|
|
return $this->is_purchase;
|
|
}
|
|
|
|
public function setIsPurchase(bool $is_purchase): static
|
|
{
|
|
$this->is_purchase = $is_purchase;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getCommentType(): ?string
|
|
{
|
|
return $this->comment_type;
|
|
}
|
|
|
|
public function setCommentType(string $comment_type): static
|
|
{
|
|
$this->comment_type = $comment_type;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getAttachmentSize(): ?int
|
|
{
|
|
return $this->attachment_size;
|
|
}
|
|
|
|
public function setAttachmentSize(?int $attachment_size): static
|
|
{
|
|
$this->attachment_size = $attachment_size;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getTicket(): ?Ticket
|
|
{
|
|
return $this->ticket;
|
|
}
|
|
|
|
public function setTicket(?Ticket $ticket): static
|
|
{
|
|
$this->ticket = $ticket;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getCreatedBy(): ?User
|
|
{
|
|
return $this->created_by;
|
|
}
|
|
|
|
public function setCreatedBy(?User $created_by): static
|
|
{
|
|
$this->created_by = $created_by;
|
|
|
|
return $this;
|
|
}
|
|
}
|