<?php
namespace App\Entity\Webfactory\Actualites;
use App\Repository\Webfactory\Actualites\WebfactoryActualiteContenuRepository;
use DateTimeImmutable;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'webfactory_actualite_contenu')]
#[ORM\Entity(repositoryClass: WebfactoryActualiteContenuRepository::class)]
class WebfactoryActualiteContenu
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id;
#[ORM\Column(length: 255)]
private ?string $title;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $content;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $image;
#[ORM\Column(length: 255, nullable: true)]
private ?string $metatitle;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $metadesc;
#[ORM\Column]
private ?DateTimeImmutable $created_at;
#[ORM\Column]
private ?DateTimeImmutable $updated_at;
#[ORM\Column(length: 255)]
private ?string $lang = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $metakeywords;
#[ORM\Column(length: 255)]
private ?string $slug;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $shortDescription;
#[ORM\ManyToOne(inversedBy: 'webfactoryActualiteContenus')]
private ?WebfactoryActualite $article = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $statut = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $date_debut_publication = null;
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
private ?\DateTimeInterface $date_fin_publication = null;
public function __construct()
{
$this->created_at = new DateTimeImmutable("now");
$this->updated_at = new DateTimeImmutable("now");
$this->statut = "publiƩ";
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): static
{
$this->title = $title;
return $this;
}
public function getContent(): ?string
{
return $this->content;
}
public function setContent(?string $content): static
{
$this->content = $content;
return $this;
}
public function getImage(): ?string
{
return $this->image;
}
public function setImage($image): self
{
$this->image = $image;
return $this;
}
public function getMetatitle(): ?string
{
return $this->metatitle;
}
public function setMetatitle(?string $metatitle): static
{
$this->metatitle = $metatitle;
return $this;
}
public function getMetadesc(): ?string
{
return $this->metadesc;
}
public function setMetadesc(?string $metadesc): static
{
$this->metadesc = $metadesc;
return $this;
}
public function getCreatedAt(): ?DateTimeImmutable
{
return $this->created_at;
}
public function setCreatedAt(DateTimeImmutable $created_at): static
{
$this->created_at = $created_at;
return $this;
}
public function getUpdatedAt(): ?DateTimeImmutable
{
return $this->updated_at;
}
public function setUpdatedAt(DateTimeImmutable $updated_at): static
{
$this->updated_at = $updated_at;
return $this;
}
public function getLang(): ?string
{
return $this->lang;
}
public function setLang(string $lang): static
{
$this->lang = $lang;
return $this;
}
public function getMetakeywords(): ?string
{
return $this->metakeywords;
}
public function setMetakeywords(?string $metakeywords): static
{
$this->metakeywords = $metakeywords;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(string $slug): static
{
$this->slug = $slug;
return $this;
}
public function getShortDescription(): ?string
{
return $this->shortDescription;
}
public function setShortDescription(?string $shortDescription): static
{
$this->shortDescription = $shortDescription;
return $this;
}
public function getArticle(): ?WebfactoryActualite
{
return $this->article;
}
public function setArticle(?WebfactoryActualite $article): static
{
$this->article = $article;
return $this;
}
public function getStatut(): ?string
{
return $this->statut;
}
public function setStatut(?string $statut): static
{
$this->statut = $statut;
return $this;
}
public function getDateDebutPublication(): ?\DateTimeInterface
{
return $this->date_debut_publication;
}
public function setDateDebutPublication(?\DateTimeInterface $date_debut_publication): static
{
$this->date_debut_publication = $date_debut_publication;
return $this;
}
public function getDateFinPublication(): ?\DateTimeInterface
{
return $this->date_fin_publication;
}
public function setDateFinPublication(?\DateTimeInterface $date_fin_publication): static
{
$this->date_fin_publication = $date_fin_publication;
return $this;
}
}