<?php
namespace App\Entity;
use App\Repository\PublicationRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity(repositoryClass=PublicationRepository::class)
* @UniqueEntity(fields={"slug"}, message="url déja utilisé")
*/
class Publication
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $title;
/**
* @ORM\Column(type="string", length=255)
*/
private $description;
/**
* @ORM\Column(type="string", length=255, unique=true)
*/
private $slug;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $keywodrs;
/**
* @ORM\Column(type="text")
*/
private $content;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $created_at;
/**
* @ORM\Column(type="datetime_immutable", nullable=true)
*/
private $updated_at;
/**
* @ORM\ManyToOne(targetEntity=PublicationImage::class, inversedBy="publications")
*/
private $publicationImage;
/**
* @ORM\Column(type="string", length=190, nullable=true)
*/
private $bigtitle;
/**
* @ORM\Column(type="string", length=150, nullable=true)
*/
private $breadcrumbs;
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 getDescription(): ?string
{
return $this->description;
}
public function setDescription(string $description): self
{
$this->description = $description;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): self
{
$this->slug = $slug;
return $this;
}
public function getKeywodrs(): ?string
{
return $this->keywodrs;
}
public function setKeywodrs(?string $keywodrs): self
{
$this->keywodrs = $keywodrs;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(string $content): self
{
$this->content = $content;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->created_at;
}
public function setCreatedAt(\DateTimeImmutable $created_at): self
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updated_at;
}
public function setUpdatedAt(?\DateTimeImmutable $updated_at): self
{
$this->updated_at = $updated_at;
return $this;
}
public function getPublicationImage(): ?PublicationImage
{
return $this->publicationImage;
}
public function setPublicationImage(?PublicationImage $publicationImage): self
{
$this->publicationImage = $publicationImage;
return $this;
}
public function getBigtitle(): ?string
{
return $this->bigtitle;
}
public function setBigtitle(?string $bigtitle): self
{
$this->bigtitle = $bigtitle;
return $this;
}
public function getBreadcrumbs(): ?string
{
return $this->breadcrumbs;
}
public function setBreadcrumbs(?string $breadcrumbs): self
{
$this->breadcrumbs = $breadcrumbs;
return $this;
}
}