src/Entity/ManualsAndCatalogs.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. //use Symfony\Bridge\Doctrine\Validator\Constraints as DoctrineAssert;
  7. use Gedmo\Mapping\Annotation as Gedmo;
  8. /**
  9.  * @ORM\Entity
  10.  * @ORM\Table(name="manuals_and_catalogs")
  11.  */
  12. class ManualsAndCatalogs
  13. {
  14.     /**
  15.     * @ORM\Id
  16.     * @ORM\Column(type="integer")
  17.     * @ORM\GeneratedValue(strategy="AUTO")
  18.     */
  19.     protected $id;
  20.     /**
  21.     * @var boolean $public
  22.     *
  23.     * @ORM\Column(type="boolean", nullable=true)
  24.     */
  25.     protected $public;
  26.     /**
  27.     * @var string $name
  28.     *
  29.     * @ORM\Column(type="string", nullable=true)
  30.     */
  31.     protected $name;
  32.     /**
  33.      * @var string $slug
  34.      * @Gedmo\Slug(fields={"name"}, updatable=true, unique=true)
  35.      *
  36.      * @ORM\Column(type="string", nullable=true)
  37.      */
  38.     protected $slug;
  39.     /**
  40.     * @var string $description
  41.     *
  42.     * @ORM\Column(type="text", nullable=true)
  43.     */
  44.     protected $description;
  45.     /**
  46.     * @var string $image
  47.     *
  48.     * @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
  49.     * @ORM\JoinColumn(name="image_id", referencedColumnName="id", onDelete="SET NULL")
  50.     */
  51.     protected $image;
  52.     /**
  53.     * @var string $file
  54.     *
  55.     * @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
  56.     * @ORM\JoinColumn(name="file_id", referencedColumnName="id", onDelete="SET NULL")
  57.     */
  58.     protected $file;
  59.     /**
  60.     * @var \App\Entity\Seo $seo
  61.     *
  62.     * @ORM\ManyToOne(targetEntity="App\Entity\Seo", inversedBy="manuals_and_catalogs")
  63.     * @ORM\JoinColumn(name="seo_id", referencedColumnName="id")
  64.     */
  65.     private $seo;
  66.     /**
  67.      * @Gedmo\SortablePosition
  68.      * @var string $position
  69.      *
  70.      * @ORM\Column(type="integer", nullable=true)
  71.      */
  72.     protected $position;
  73.     /**
  74.      * @var string $create_at
  75.      *
  76.      * @Gedmo\Timestampable(on="create")
  77.      * @ORM\Column(type="datetime", nullable=true)
  78.      */
  79.     protected $create_at;
  80.     /**
  81.      * @var string $update_at
  82.      *
  83.      * @Gedmo\Timestampable(on="update")
  84.      * @ORM\Column(type="datetime", nullable=true)
  85.      */
  86.     protected $update_at;
  87.     public function __toString(): string
  88.     {
  89.         return $this->name;
  90.     }
  91.     public function getId(): ?int
  92.     {
  93.         return $this->id;
  94.     }
  95.     public function getName(): ?string
  96.     {
  97.         return $this->name;
  98.     }
  99.     public function setName(?string $name): static
  100.     {
  101.         $this->name $name;
  102.         return $this;
  103.     }
  104.     public function getSlug(): ?string
  105.     {
  106.         return $this->slug;
  107.     }
  108.     public function setSlug(?string $slug): static
  109.     {
  110.         $this->slug $slug;
  111.         return $this;
  112.     }
  113.     public function getDescription(): ?string
  114.     {
  115.         return $this->description;
  116.     }
  117.     public function setDescription(?string $description): static
  118.     {
  119.         $this->description $description;
  120.         return $this;
  121.     }
  122.     public function getPosition(): ?int
  123.     {
  124.         return $this->position;
  125.     }
  126.     public function setPosition(?int $position): static
  127.     {
  128.         $this->position $position;
  129.         return $this;
  130.     }
  131.     public function getCreateAt(): ?\DateTimeInterface
  132.     {
  133.         return $this->create_at;
  134.     }
  135.     public function setCreateAt(?\DateTimeInterface $create_at): static
  136.     {
  137.         $this->create_at $create_at;
  138.         return $this;
  139.     }
  140.     public function getUpdateAt(): ?\DateTimeInterface
  141.     {
  142.         return $this->update_at;
  143.     }
  144.     public function setUpdateAt(?\DateTimeInterface $update_at): static
  145.     {
  146.         $this->update_at $update_at;
  147.         return $this;
  148.     }
  149.     public function getImage(): ?SonataMediaMedia
  150.     {
  151.         return $this->image;
  152.     }
  153.     public function setImage(?SonataMediaMedia $image): static
  154.     {
  155.         $this->image $image;
  156.         return $this;
  157.     }
  158.     public function getFile(): ?SonataMediaMedia
  159.     {
  160.         return $this->file;
  161.     }
  162.     public function setFile(?SonataMediaMedia $file): static
  163.     {
  164.         $this->file $file;
  165.         return $this;
  166.     }
  167.     public function getSeo(): ?Seo
  168.     {
  169.         return $this->seo;
  170.     }
  171.     public function setSeo(?Seo $seo): static
  172.     {
  173.         $this->seo $seo;
  174.         return $this;
  175.     }
  176.     public function isPublic(): ?bool
  177.     {
  178.         return $this->public;
  179.     }
  180.     public function setPublic(?bool $public): static
  181.     {
  182.         $this->public $public;
  183.         return $this;
  184.     }
  185. }