src/Entity/Service.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\ServiceRepository")
  7.  */
  8. class Service
  9. {
  10.     /**
  11.      * @ORM\Id()
  12.      * @ORM\GeneratedValue()
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @Gedmo\Slug(fields={"name", "id"})
  18.      * @ORM\Column(length=128, unique=true)
  19.      */
  20.     private $slug;
  21.     /**
  22.      * @ORM\Column(type="text")
  23.      */
  24.     private $nom_service;
  25.     /**
  26.      * @ORM\Column(type="text")
  27.      */
  28.     private $description_service;
  29.     /**
  30.      * @ORM\Column(type="datetime")
  31.      */
  32.     private $create_at;
  33.     /**
  34.      * @ORM\Column(type="string", length=255,nullable=true)
  35.      */
  36.     private $create_by;
  37.     /**
  38.      * @ORM\ManyToOne(targetEntity="App\Entity\Direction", inversedBy="services")
  39.      * @ORM\JoinColumn(nullable=false)
  40.      */
  41.     private $direction;
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getNomService(): ?string
  47.     {
  48.         return $this->nom_service;
  49.     }
  50.     public function setNomService(string $nom_service): self
  51.     {
  52.         $this->nom_service $nom_service;
  53.         return $this;
  54.     }
  55.     public function getDescriptionService(): ?string
  56.     {
  57.         return $this->description_service;
  58.     }
  59.     public function setDescriptionService(string $description_service): self
  60.     {
  61.         $this->description_service $description_service;
  62.         return $this;
  63.     }
  64.     public function getCreateAt(): ?\DateTimeInterface
  65.     {
  66.         return $this->create_at;
  67.     }
  68.     public function setCreateAt(\DateTimeInterface $create_at): self
  69.     {
  70.         $this->create_at $create_at;
  71.         return $this;
  72.     }
  73.     public function getCreateBy(): ?string
  74.     {
  75.         return $this->create_by;
  76.     }
  77.     public function setCreateBy(string $create_by): self
  78.     {
  79.         $this->create_by $create_by;
  80.         return $this;
  81.     }
  82.     public function getSlug(): ?string
  83.     {
  84.         return $this->slug;
  85.     }
  86.     public function setSlug(string $slug): self
  87.     {
  88.         $this->slug $slug;
  89.         return $this;
  90.     }
  91.     public function getDirection(): ?Direction
  92.     {
  93.         return $this->direction;
  94.     }
  95.     public function setDirection(?Direction $direction): self
  96.     {
  97.         $this->direction $direction;
  98.         return $this;
  99.     }
  100.     /**
  101.      * toString
  102.      *
  103.      * @return string
  104.      */
  105.     public function __toString() {
  106.         return $this->getNomService();
  107.     }
  108. }