<?php
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
//use Symfony\Bridge\Doctrine\Validator\Constraints as DoctrineAssert;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity
* @ORM\Table(name="manuals_and_catalogs")
*/
class ManualsAndCatalogs
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var boolean $public
*
* @ORM\Column(type="boolean", nullable=true)
*/
protected $public;
/**
* @var string $name
*
* @ORM\Column(type="string", nullable=true)
*/
protected $name;
/**
* @var string $slug
* @Gedmo\Slug(fields={"name"}, updatable=true, unique=true)
*
* @ORM\Column(type="string", nullable=true)
*/
protected $slug;
/**
* @var string $description
*
* @ORM\Column(type="text", nullable=true)
*/
protected $description;
/**
* @var string $image
*
* @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
* @ORM\JoinColumn(name="image_id", referencedColumnName="id", onDelete="SET NULL")
*/
protected $image;
/**
* @var string $file
*
* @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
* @ORM\JoinColumn(name="file_id", referencedColumnName="id", onDelete="SET NULL")
*/
protected $file;
/**
* @var \App\Entity\Seo $seo
*
* @ORM\ManyToOne(targetEntity="App\Entity\Seo", inversedBy="manuals_and_catalogs")
* @ORM\JoinColumn(name="seo_id", referencedColumnName="id")
*/
private $seo;
/**
* @Gedmo\SortablePosition
* @var string $position
*
* @ORM\Column(type="integer", nullable=true)
*/
protected $position;
/**
* @var string $create_at
*
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime", nullable=true)
*/
protected $create_at;
/**
* @var string $update_at
*
* @Gedmo\Timestampable(on="update")
* @ORM\Column(type="datetime", nullable=true)
*/
protected $update_at;
public function __toString(): string
{
return $this->name;
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(?string $name): static
{
$this->name = $name;
return $this;
}
public function getSlug(): ?string
{
return $this->slug;
}
public function setSlug(?string $slug): static
{
$this->slug = $slug;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): static
{
$this->description = $description;
return $this;
}
public function getPosition(): ?int
{
return $this->position;
}
public function setPosition(?int $position): static
{
$this->position = $position;
return $this;
}
public function getCreateAt(): ?\DateTimeInterface
{
return $this->create_at;
}
public function setCreateAt(?\DateTimeInterface $create_at): static
{
$this->create_at = $create_at;
return $this;
}
public function getUpdateAt(): ?\DateTimeInterface
{
return $this->update_at;
}
public function setUpdateAt(?\DateTimeInterface $update_at): static
{
$this->update_at = $update_at;
return $this;
}
public function getImage(): ?SonataMediaMedia
{
return $this->image;
}
public function setImage(?SonataMediaMedia $image): static
{
$this->image = $image;
return $this;
}
public function getFile(): ?SonataMediaMedia
{
return $this->file;
}
public function setFile(?SonataMediaMedia $file): static
{
$this->file = $file;
return $this;
}
public function getSeo(): ?Seo
{
return $this->seo;
}
public function setSeo(?Seo $seo): static
{
$this->seo = $seo;
return $this;
}
public function isPublic(): ?bool
{
return $this->public;
}
public function setPublic(?bool $public): static
{
$this->public = $public;
return $this;
}
}