<?php
namespace App\Entity\Cvs;
use App\Entity\Core\Users;
use App\Entity\Core\Agencies;
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;
/**
* Categories
*
* @ORM\Table("cvs_categories")
* @ORM\Entity()
* @ORM\HasLifecycleCallbacks()
*/
class Categories
{
/**
* @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="title", type="string", length=255, nullable=true)
*/
private $title;
/**
* @var string
*
* @ORM\Column(name="slug", type="string", length=255, nullable=true)
*/
private $slug;
/**
* @var string
*
* @ORM\Column(name="description", type="text", nullable=true)
*/
private $description;
/**
* @var string
*
* @ORM\Column(name="icon", type="text", nullable=true)
*/
private $icon;
/**
* @var string
*
* @ORM\Column(name="short_title", type="string", length=255, nullable=true)
*/
private $shortTitle;
/**
* @var string
*
* @ORM\Column(name="short_description", type="text", nullable=true)
*/
private $shortDescription;
/**
* @var \BigCategories
*
* @ORM\ManyToOne(targetEntity="App\Entity\Cvs\BigCategories")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="big_category_id", referencedColumnName="id", nullable=true)
* })
*/
protected $bigCategory;
/**
* @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->title;
}
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 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): static
{
$this->description = $description;
return $this;
}
public function getIcon(): ?string
{
return $this->icon;
}
public function setIcon(?string $icon): static
{
$this->icon = $icon;
return $this;
}
public function getShortTitle(): ?string
{
return $this->shortTitle;
}
public function setShortTitle(?string $shortTitle): static
{
$this->shortTitle = $shortTitle;
return $this;
}
public function getShortDescription(): ?string
{
return $this->shortDescription;
}
public function setShortDescription(?string $shortDescription): static
{
$this->shortDescription = $shortDescription;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(?string $slug): static
{
$this->slug = $slug;
return $this;
}
public function getBigCategory(): ?BigCategories
{
return $this->bigCategory;
}
public function setBigCategory(?BigCategories $bigCategory): static
{
$this->bigCategory = $bigCategory;
return $this;
}
}