src/Entity/WinWOP/Module.php line 19

Open in your IDE?
  1. <?php
  2. /**
  3.  * Copyright (c) 2019, MND Next GmbH - www.mndnext.de
  4.  */
  5. namespace App\Entity\WinWOP;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Component\HttpFoundation\File\File;
  9. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  10. use Symfony\Component\Validator\Constraints as Assert;
  11. /**
  12.  * @ORM\Entity
  13.  * @ORM\HasLifecycleCallbacks()
  14.  * @ORM\Table(name="win_wop_modules")
  15.  */
  16. class Module
  17. {
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\Column(type="integer")
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     protected $id;
  24.     /**
  25.      * @var string
  26.      * @ORM\Column(type="string")
  27.      * @Assert\NotBlank(message="Bitte geben Sie einen Namen ein.", groups={"Basic"})
  28.      */
  29.     protected $name;
  30.     /**
  31.      * Constructor
  32.      */
  33.     public function __construct()
  34.     {
  35.     }
  36.     public function getId()
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getName(): ?string
  41.     {
  42.         return $this->name;
  43.     }
  44.     public function setName($name)
  45.     {
  46.         $this->name $name;
  47.         return $this;
  48.     }
  49.     public function __toString()
  50.     {
  51.         return $this->getName();
  52.     }
  53. }