src/Entity/Designation.php line 13

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DesignationRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use phpDocumentor\Reflection\Types\Integer;
  9. #[ORM\Entity(repositoryClassDesignationRepository::class)]
  10. class Designation
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(length2)]
  15.     private ?string $designationCode null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $name null;
  18.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  19.     private ?\DateTimeInterface $updated null;
  20.     #[ORM\Column]
  21.     private ?int $updatedBy null;
  22.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  23.     private ?string $description null;
  24.     #[ORM\Column]
  25.     private ?int $priorityOrder null;
  26.     #[ORM\OneToMany(mappedBy'designation'targetEntityTeamMember::class)]
  27.     private Collection $teamMembers;
  28.     public function __construct()
  29.     {
  30.         $this->teamMembers = new ArrayCollection();
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getDesignationCode(): ?string
  37.     {
  38.         return $this->designationCode;
  39.     }
  40.     public function setDesignationCode(string $designationCode): static
  41.     {
  42.         $this->designationCode $designationCode;
  43.         return $this;
  44.     }
  45.     public function getName(): ?string
  46.     {
  47.         return $this->name;
  48.     }
  49.     public function setName(string $name): static
  50.     {
  51.         $this->name $name;
  52.         return $this;
  53.     }
  54.     public function getUpdatedBy(): ?int
  55.     {
  56.         return $this->updatedBy;
  57.     }
  58.     public function setUpdatedBy(int $updatedBy): static
  59.     {
  60.         $this->updatedBy $updatedBy;
  61.         return $this;
  62.     }
  63.     public function getDescription(): ?string
  64.     {
  65.         return $this->description;
  66.     }
  67.     public function setDescription(?string $description): static
  68.     {
  69.         $this->description $description;
  70.         return $this;
  71.     }
  72.     /**
  73.      * @return Collection<int, TeamMember>
  74.      */
  75.     public function getTeamMembers(): Collection
  76.     {
  77.         return $this->teamMembers;
  78.     }
  79.     public function addTeamMember(TeamMember $teamMember): static
  80.     {
  81.         if (!$this->teamMembers->contains($teamMember)) {
  82.             $this->teamMembers->add($teamMember);
  83.             $teamMember->setDesignation($this);
  84.         }
  85.         return $this;
  86.     }
  87.     public function removeTeamMember(TeamMember $teamMember): static
  88.     {
  89.         if ($this->teamMembers->removeElement($teamMember)) {
  90.             // set the owning side to null (unless already changed)
  91.             if ($teamMember->getDesignation() === $this) {
  92.                 $teamMember->setDesignation(null);
  93.             }
  94.         }
  95.         return $this;
  96.     }
  97.     public function getPriorityOrder(): ?int
  98.     {
  99.         return $this->priorityOrder;
  100.     }
  101.     public function setPriorityOrder(?int $priorityOrder): void
  102.     {
  103.         $this->priorityOrder $priorityOrder;
  104.     }
  105. }