<?phpnamespace App\Entity;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;/** * @ORM\Entity(repositoryClass="App\Repository\ServiceRepository") */class Service{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @Gedmo\Slug(fields={"name", "id"}) * @ORM\Column(length=128, unique=true) */ private $slug; /** * @ORM\Column(type="text") */ private $nom_service; /** * @ORM\Column(type="text") */ private $description_service; /** * @ORM\Column(type="datetime") */ private $create_at; /** * @ORM\Column(type="string", length=255,nullable=true) */ private $create_by; /** * @ORM\ManyToOne(targetEntity="App\Entity\Direction", inversedBy="services") * @ORM\JoinColumn(nullable=false) */ private $direction; public function getId(): ?int { return $this->id; } public function getNomService(): ?string { return $this->nom_service; } public function setNomService(string $nom_service): self { $this->nom_service = $nom_service; return $this; } public function getDescriptionService(): ?string { return $this->description_service; } public function setDescriptionService(string $description_service): self { $this->description_service = $description_service; return $this; } public function getCreateAt(): ?\DateTimeInterface { return $this->create_at; } public function setCreateAt(\DateTimeInterface $create_at): self { $this->create_at = $create_at; return $this; } public function getCreateBy(): ?string { return $this->create_by; } public function setCreateBy(string $create_by): self { $this->create_by = $create_by; return $this; } public function getSlug(): ?string { return $this->slug; } public function setSlug(string $slug): self { $this->slug = $slug; return $this; } public function getDirection(): ?Direction { return $this->direction; } public function setDirection(?Direction $direction): self { $this->direction = $direction; return $this; } /** * toString * * @return string */ public function __toString() { return $this->getNomService(); }}