<?php
namespace App\Entity\Pages;
use Doctrine\DBAL\Types\Types;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
/**
* Save Templates
*
* @ORM\Table("pages_save_templates")
* @ORM\Entity(repositoryClass="App\Repository\Pages\SaveTemplatesRepository")
* @ORM\HasLifecycleCallbacks()
*/
class SaveTemplates
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var string
*
* @ORM\Column(name="created_at", type="datetime", nullable=true, options={"comment":"Date de création"})
*/
private $createdAt;
/**
* @var string
*
* @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"Date de mise à jour"})
*/
private $updatedAt;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255, nullable=true)
*/
private $name;
/**
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $description;
/**
* @var string
*
* @ORM\Column(name="generation_html", type="text", nullable=true)
*/
private $generationHTML;
/**
* @var string
*
* @ORM\Column(name="last_id_page", type="text", nullable=true)
*/
private $last;
/**
* @ORM\PrePersist
*/
public function setCreatedAtValue(): void
{
$this->setCreatedAt(new \DateTime("now"));
$this->setUpdatedAt(new \DateTime("now"));
}
/**
* @ORM\PreUpdate
*/
public function setUpdatedAtValue(): void
{
$this->setUpdatedAt(new \DateTime("now"));
}
public function __toString()
{
return $this->name;
}
public function getId(): ?int
{
return $this->id;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): self
{
$this->name = $name;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getGenerationHTML(): ?string
{
return $this->generationHTML;
}
public function setGenerationHTML(?string $generationHTML): self
{
$this->generationHTML = $generationHTML;
return $this;
}
public function getLast(): ?string
{
return $this->last;
}
public function setLast(?string $last): self
{
$this->last = $last;
return $this;
}
}