src/Entity/BigWorks.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="big_works")
  11.  */
  12. class BigWorks
  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 $body
  47.      *
  48.      * @ORM\Column(type="text", nullable=true)
  49.      */
  50.     protected $body;
  51.     /**
  52.      * @var string $image
  53.      *
  54.      * @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
  55.      * @ORM\JoinColumn(name="image_id", referencedColumnName="id", onDelete="SET NULL")
  56.      */
  57.     protected $image;
  58.     /**
  59.      * @var string $image_cover
  60.      *
  61.      * @ORM\ManyToOne(targetEntity="App\Entity\SonataMediaMedia", cascade = {"persist"})
  62.      * @ORM\JoinColumn(name="image_cover_id", referencedColumnName="id", onDelete="SET NULL")
  63.      */
  64.     protected $image_cover;
  65.     /**
  66.      * @var string $public_date
  67.      *
  68.      * @ORM\Column(type="date", nullable=true)
  69.      */
  70.     protected $public_date;
  71.     /**
  72.      * @var \App\Entity\Seo $seo
  73.      *
  74.      * @ORM\ManyToOne(targetEntity="App\Entity\Seo", inversedBy="big_works")
  75.      * @ORM\JoinColumn(name="seo_id", referencedColumnName="id")
  76.      */
  77.     private $seo;
  78.     /**
  79.      * @Gedmo\SortablePosition
  80.      * @var string $position
  81.      *
  82.      * @ORM\Column(type="integer", nullable=true)
  83.      */
  84.     protected $position;
  85.     /**
  86.      * @var string $create_at
  87.      *
  88.      * @Gedmo\Timestampable(on="create")
  89.      * @ORM\Column(type="datetime", nullable=true)
  90.      */
  91.     protected $create_at;
  92.     /**
  93.      * @var string $update_at
  94.      *
  95.      * @Gedmo\Timestampable(on="update")
  96.      * @ORM\Column(type="datetime", nullable=true)
  97.      */
  98.     protected $update_at;
  99.     public function __toString(): string
  100.     {
  101.         return $this->name;
  102.     }
  103.     public function getId(): ?int
  104.     {
  105.         return $this->id;
  106.     }
  107.     public function isPublic(): ?bool
  108.     {
  109.         return $this->public;
  110.     }
  111.     public function setPublic(?bool $public): static
  112.     {
  113.         $this->public $public;
  114.         return $this;
  115.     }
  116.     public function getName(): ?string
  117.     {
  118.         return $this->name;
  119.     }
  120.     public function setName(?string $name): static
  121.     {
  122.         $this->name $name;
  123.         return $this;
  124.     }
  125.     public function getSlug(): ?string
  126.     {
  127.         return $this->slug;
  128.     }
  129.     public function setSlug(?string $slug): static
  130.     {
  131.         $this->slug $slug;
  132.         return $this;
  133.     }
  134.     public function getDescription(): ?string
  135.     {
  136.         return $this->description;
  137.     }
  138.     public function setDescription(?string $description): static
  139.     {
  140.         $this->description $description;
  141.         return $this;
  142.     }
  143.     public function getBody(): ?string
  144.     {
  145.         return $this->body;
  146.     }
  147.     public function setBody(?string $body): static
  148.     {
  149.         $this->body $body;
  150.         return $this;
  151.     }
  152.     public function getPublicDate(): ?\DateTimeInterface
  153.     {
  154.         return $this->public_date;
  155.     }
  156.     public function setPublicDate(?\DateTimeInterface $public_date): static
  157.     {
  158.         $this->public_date $public_date;
  159.         return $this;
  160.     }
  161.     public function getPosition(): ?int
  162.     {
  163.         return $this->position;
  164.     }
  165.     public function setPosition(?int $position): static
  166.     {
  167.         $this->position $position;
  168.         return $this;
  169.     }
  170.     public function getCreateAt(): ?\DateTimeInterface
  171.     {
  172.         return $this->create_at;
  173.     }
  174.     public function setCreateAt(?\DateTimeInterface $create_at): static
  175.     {
  176.         $this->create_at $create_at;
  177.         return $this;
  178.     }
  179.     public function getUpdateAt(): ?\DateTimeInterface
  180.     {
  181.         return $this->update_at;
  182.     }
  183.     public function setUpdateAt(?\DateTimeInterface $update_at): static
  184.     {
  185.         $this->update_at $update_at;
  186.         return $this;
  187.     }
  188.     public function getImage(): ?SonataMediaMedia
  189.     {
  190.         return $this->image;
  191.     }
  192.     public function setImage(?SonataMediaMedia $image): static
  193.     {
  194.         $this->image $image;
  195.         return $this;
  196.     }
  197.     public function getImageCover(): ?SonataMediaMedia
  198.     {
  199.         return $this->image_cover;
  200.     }
  201.     public function setImageCover(?SonataMediaMedia $image_cover): static
  202.     {
  203.         $this->image_cover $image_cover;
  204.         return $this;
  205.     }
  206.     public function getSeo(): ?Seo
  207.     {
  208.         return $this->seo;
  209.     }
  210.     public function setSeo(?Seo $seo): static
  211.     {
  212.         $this->seo $seo;
  213.         return $this;
  214.     }
  215. }