src/Admin/Modules/OnlineService/Entity/OnlineServiceCategory.php line 11

  1. <?php
  2. namespace App\Admin\Modules\OnlineService\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Table(name="online_service_category", uniqueConstraints={@ORM\UniqueConstraint(columns={"name"})})
  6.  * @ORM\Entity
  7.  */
  8. class OnlineServiceCategory
  9. {
  10.     /**
  11.      * @ORM\Column(type="integer")
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue(strategy="AUTO")
  14.      */
  15.     private $id;
  16.     
  17.     /**
  18.      * @ORM\Column(name="name", type="string", length=255, nullable=false, options={"collation"="utf8_unicode_ci"})
  19.      */
  20.     private $name;
  21.     
  22.     public function __toString()
  23.     {
  24.         return $this->name;
  25.     }
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getName(): ?string
  31.     {
  32.         return $this->name;
  33.     }
  34.     public function setName(string $name): self
  35.     {
  36.         $this->name $name;
  37.         return $this;
  38.     }
  39. }