src/Entity/Prestataire.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PrestataireRepository;
  4. use App\Traits\TimeStampTrait;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassPrestataireRepository::class)]
  7. #[ORM\HasLifecycleCallbacks]
  8. class Prestataire
  9. {
  10.     use TimeStampTrait;
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length100)]
  16.     private ?string $code null;
  17.     #[ORM\Column(length50)]
  18.     private ?string $fullname null;
  19.     #[ORM\Column(length25)]
  20.     private ?string $phone null;
  21.     #[ORM\Column(length50nullabletrue)]
  22.     private ?string $email null;
  23.     #[ORM\Column(length100nullabletrue)]
  24.     private ?string $adress null;
  25.     #[ORM\Column]
  26.     private ?bool $status null;
  27.     #[ORM\ManyToOne(inversedBy'prestataires')]
  28.     private ?Entreprise $marchand null;
  29.     #[ORM\ManyToOne(inversedBy'prestataires')]
  30.     private ?Service $service null;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getCode(): ?string
  36.     {
  37.         return $this->code;
  38.     }
  39.     public function setCode(string $code): static
  40.     {
  41.         $this->code $code;
  42.         return $this;
  43.     }
  44.     public function getFullname(): ?string
  45.     {
  46.         return $this->fullname;
  47.     }
  48.     public function setFullname(string $fullname): static
  49.     {
  50.         $this->fullname $fullname;
  51.         return $this;
  52.     }
  53.     public function getPhone(): ?string
  54.     {
  55.         return $this->phone;
  56.     }
  57.     public function setPhone(string $phone): static
  58.     {
  59.         $this->phone $phone;
  60.         return $this;
  61.     }
  62.     public function getEmail(): ?string
  63.     {
  64.         return $this->email;
  65.     }
  66.     public function setEmail(?string $email): static
  67.     {
  68.         $this->email $email;
  69.         return $this;
  70.     }
  71.     public function getAdress(): ?string
  72.     {
  73.         return $this->adress;
  74.     }
  75.     public function setAdress(?string $adress): static
  76.     {
  77.         $this->adress $adress;
  78.         return $this;
  79.     }
  80.     public function isStatus(): ?bool
  81.     {
  82.         return $this->status;
  83.     }
  84.     public function setStatus(bool $status): static
  85.     {
  86.         $this->status $status;
  87.         return $this;
  88.     }
  89.     public function getMarchand(): ?Entreprise
  90.     {
  91.         return $this->marchand;
  92.     }
  93.     public function setMarchand(?Entreprise $marchand): static
  94.     {
  95.         $this->marchand $marchand;
  96.         return $this;
  97.     }
  98.     public function getService(): ?Service
  99.     {
  100.         return $this->service;
  101.     }
  102.     public function setService(?Service $service): static
  103.     {
  104.         $this->service $service;
  105.         return $this;
  106.     }
  107.     public function __toString(): string
  108.     {
  109.         return $this->fullname;
  110.     }
  111. }