src/Entity/Like.php line 10
<?php
namespace App\Entity;
use App\Repository\LikeRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: LikeRepository::class)]
#[ORM\Table(name: '`kulmapeck_cours_like`')]
class Like
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne(inversedBy: 'likes')]
#[ORM\JoinColumn(nullable: false)]
private ?User $author = null;
#[ORM\Column]
private ?bool $isLike = null;
#[ORM\Column]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\Column]
private ?\DateTimeImmutable $updatedAt = null;
#[ORM\ManyToOne(inversedBy: 'likes')]
#[ORM\JoinColumn(nullable: false)]
private ?Cours $cours = null;
public function getId(): ?int
{
return $this->id;
}
public function getAuthor(): ?User
{
return $this->author;
}
public function setAuthor(?User $author): self
{
$this->author = $author;
return $this;
}
public function isIsLike(): ?bool
{
return $this->isLike;
}
public function setIsLike(bool $isLike): self
{
$this->isLike = $isLike;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getCours(): ?Cours
{
return $this->cours;
}
public function setCours(?Cours $cours): self
{
$this->cours = $cours;
return $this;
}
}