<?php
namespace App\Entity;
use App\Repository\ArticleRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ArticleRepository::class)
*/
class Article
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $title;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $content;
/**
* @ORM\Column(type="string", length=255)
*/
private $slug;
/**
* @ORM\Column(type="string", length=255)
*/
private $locale;
/**
* @ORM\Column(type="string", length=255)
*/
private $type;
/**
* @ORM\Column(name="user", type="integer")
*/
private $userId;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $baseUrl;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $photoUrl;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $titleSeo;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $contentSeo;
/**
* @ORM\Column(type="boolean")
*/
private $isActivated;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $createdAt;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $updatedAt;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $publishedAt;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $deletedAt;
/**
* @ORM\ManyToMany(targetEntity=Article::class)
*/
private $categorieArticles;
public function __construct()
{
$this->categorieArticles = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): self
{
$this->content = $content;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
public function getLocale(): ?string
{
return $this->locale;
}
public function setLocale(string $locale): self
{
$this->locale = $locale;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): self
{
$this->type = $type;
return $this;
}
public function getUserId(): ?int
{
return $this->userId;
}
public function setUserId(int $userId): self
{
$this->userId = $userId;
return $this;
}
public function getBaseUrl(): ?string
{
return $this->baseUrl;
}
public function setBaseUrl(?string $baseUrl): self
{
$this->baseUrl = $baseUrl;
return $this;
}
public function getPhotoUrl(): ?string
{
return $this->photoUrl;
}
public function setPhotoUrl(?string $photoUrl): self
{
$this->photoUrl = $photoUrl;
return $this;
}
public function getTitleSeo(): ?string
{
return $this->titleSeo;
}
public function setTitleSeo(?string $titleSeo): self
{
$this->titleSeo = $titleSeo;
return $this;
}
public function getContentSeo(): ?string
{
return $this->contentSeo;
}
public function setContentSeo(?string $contentSeo): self
{
$this->contentSeo = $contentSeo;
return $this;
}
public function isIsActivated(): ?bool
{
return $this->isActivated;
}
public function setIsActivated(bool $isActivated): self
{
$this->isActivated = $isActivated;
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 getPublishedAt(): ?\DateTimeImmutable
{
return $this->publishedAt;
}
public function setPublishedAt(\DateTimeImmutable $publishedAt): self
{
$this->publishedAt = $publishedAt;
return $this;
}
/**
* @return Collection<int, self>
*/
public function getCategorieArticles(): Collection
{
return $this->categorieArticles;
}
public function addCategorieArticle(self $categorieArticle): self
{
if (!$this->categorieArticles->contains($categorieArticle)) {
$this->categorieArticles[] = $categorieArticle;
}
return $this;
}
public function removeCategorieArticle(self $categorieArticle): self
{
$this->categorieArticles->removeElement($categorieArticle);
return $this;
}
/**
* @return mixed
*/
public function getDeletedAt()
{
return $this->deletedAt;
}
/**
* @param mixed $deletedAt
*/
public function setDeletedAt($deletedAt): void
{
$this->deletedAt = $deletedAt;
}
}