src/Entity/CRM/Worker.php line 10

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\WorkerRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassWorkerRepository::class)]
  7. class Worker
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\Column(length255nullabletrue)]
  14.     private ?string $firstName null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $lastName null;
  17.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  18.     private ?\DateTimeInterface $birthDate null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $address null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $city null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $phone null;
  25.     #[ORM\Column]
  26.     private ?bool $isActive null;
  27.     #[ORM\OneToOne(inversedBy'worker')]
  28.     private ?Admin $admin null;
  29.     #[ORM\Column(length180)]
  30.     private ?string $email null;
  31.     #[ORM\Column(length180nullabletrue)]
  32.     private ?string $position null;
  33.     #[ORM\ManyToOne(inversedBy'workers')]
  34.     private ?Department $department null;
  35.     #[ORM\ManyToOne(inversedBy'workers')]
  36.     private ?Branch $branch null;
  37.     public function __toString()
  38.     {
  39.         return $this->firstName.' '.$this->lastName;
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getFirstName(): ?string
  46.     {
  47.         return $this->firstName;
  48.     }
  49.     public function setFirstName(?string $firstName): self
  50.     {
  51.         $this->firstName $firstName;
  52.         return $this;
  53.     }
  54.     public function getLastName(): ?string
  55.     {
  56.         return $this->lastName;
  57.     }
  58.     public function setLastName(?string $lastName): self
  59.     {
  60.         $this->lastName $lastName;
  61.         return $this;
  62.     }
  63.     public function getBirthDate(): ?\DateTimeInterface
  64.     {
  65.         return $this->birthDate;
  66.     }
  67.     public function setBirthDate(?\DateTimeInterface $birthDate): self
  68.     {
  69.         $this->birthDate $birthDate;
  70.         return $this;
  71.     }
  72.     public function getAddress(): ?string
  73.     {
  74.         return $this->address;
  75.     }
  76.     public function setAddress(?string $address): self
  77.     {
  78.         $this->address $address;
  79.         return $this;
  80.     }
  81.     public function getCity(): ?string
  82.     {
  83.         return $this->city;
  84.     }
  85.     public function setCity(?string $city): self
  86.     {
  87.         $this->city $city;
  88.         return $this;
  89.     }
  90.     public function getPhone(): ?string
  91.     {
  92.         return $this->phone;
  93.     }
  94.     public function setPhone(?string $phone): self
  95.     {
  96.         $this->phone $phone;
  97.         return $this;
  98.     }
  99.     public function isIsActive(): ?bool
  100.     {
  101.         return $this->isActive;
  102.     }
  103.     public function setIsActive(bool $isActive): self
  104.     {
  105.         $this->isActive $isActive;
  106.         return $this;
  107.     }
  108.     public function getAdmin(): ?admin
  109.     {
  110.         return $this->admin;
  111.     }
  112.     public function setAdmin(?admin $admin): self
  113.     {
  114.         $this->admin $admin;
  115.         return $this;
  116.     }
  117.     public function getEmail(): ?string
  118.     {
  119.         return $this->email;
  120.     }
  121.     public function setEmail(string $email): self
  122.     {
  123.         $this->email $email;
  124.         return $this;
  125.     }
  126.     public function getPosition(): ?string
  127.     {
  128.         return $this->position;
  129.     }
  130.     public function setPosition(?string $position): self
  131.     {
  132.         $this->position $position;
  133.         return $this;
  134.     }
  135.     public function getDepartment(): ?Department
  136.     {
  137.         return $this->department;
  138.     }
  139.     public function setDepartment(?Department $department): self
  140.     {
  141.         $this->department $department;
  142.         return $this;
  143.     }
  144.     public function getBranch(): ?Branch
  145.     {
  146.         return $this->branch;
  147.     }
  148.     public function setBranch(?Branch $branch): self
  149.     {
  150.         $this->branch $branch;
  151.         return $this;
  152.     }
  153. }