<?php
namespace App\Entity;
use App\Repository\CommunityPostsRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CommunityPostsRepository::class)
*/
class CommunityPosts
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="communityPosts")
* @ORM\JoinColumn(nullable=false)
*/
private $userId;
/**
* @ORM\Column(type="datetime")
*/
private $datePostComment;
/**
* @ORM\Column(type="text")
*/
private $comment;
/**
* @ORM\Column(type="integer")
*/
private $notation;
public function getId(): ?int
{
return $this->id;
}
public function getUserId(): ?User
{
return $this->userId;
}
public function setUserId(?User $userId): self
{
$this->userId = $userId;
return $this;
}
public function getDatePostComment(): ?\DateTimeInterface
{
return $this->datePostComment;
}
public function setDatePostComment(\DateTimeInterface $datePostComment): self
{
$this->datePostComment = $datePostComment;
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(string $comment): self
{
$this->comment = $comment;
return $this;
}
public function getNotation(): ?int
{
return $this->notation;
}
public function setNotation(int $notation): self
{
$this->notation = $notation;
return $this;
}
}