['contact:read']], denormalizationContext: ['groups' => ['contact:write']], order: ['lastName' => 'ASC'], )] #[ApiFilter(SearchFilter::class, properties: ['client' => 'exact', 'prospect' => 'exact'])] #[ORM\Entity(repositoryClass: DoctrineContactRepository::class)] #[ORM\Table(name: 'directory_contact')] class Contact implements TimestampableInterface, BlamableInterface { use TimestampableBlamableTrait; #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] #[Groups(['contact:read'])] private ?int $id = null; #[ORM\Column(length: 255, nullable: true)] #[Groups(['contact:read', 'contact:write', 'client:read', 'prospect:read'])] private ?string $firstName = null; #[ORM\Column(length: 255, nullable: true)] #[Groups(['contact:read', 'contact:write', 'client:read', 'prospect:read'])] private ?string $lastName = null; #[ORM\Column(length: 255, nullable: true)] #[Groups(['contact:read', 'contact:write', 'client:read', 'prospect:read'])] private ?string $jobTitle = null; #[ORM\Column(length: 255, nullable: true)] #[Groups(['contact:read', 'contact:write', 'client:read', 'prospect:read'])] private ?string $email = null; #[ORM\Column(length: 50, nullable: true)] #[Groups(['contact:read', 'contact:write', 'client:read', 'prospect:read'])] private ?string $phonePrimary = null; #[ORM\Column(length: 50, nullable: true)] #[Groups(['contact:read', 'contact:write', 'client:read', 'prospect:read'])] private ?string $phoneSecondary = null; #[ORM\ManyToOne(targetEntity: Client::class)] #[ORM\JoinColumn(name: 'client_id', referencedColumnName: 'id', nullable: true, onDelete: 'CASCADE')] #[Groups(['contact:read', 'contact:write'])] private ?Client $client = null; #[ORM\ManyToOne(targetEntity: Prospect::class)] #[ORM\JoinColumn(name: 'prospect_id', referencedColumnName: 'id', nullable: true, onDelete: 'CASCADE')] #[Groups(['contact:read', 'contact:write'])] private ?Prospect $prospect = null; public function getId(): ?int { return $this->id; } public function getFirstName(): ?string { return $this->firstName; } public function setFirstName(?string $firstName): static { $this->firstName = $firstName; return $this; } public function getLastName(): ?string { return $this->lastName; } public function setLastName(?string $lastName): static { $this->lastName = $lastName; return $this; } public function getJobTitle(): ?string { return $this->jobTitle; } public function setJobTitle(?string $jobTitle): static { $this->jobTitle = $jobTitle; return $this; } public function getEmail(): ?string { return $this->email; } public function setEmail(?string $email): static { $this->email = $email; return $this; } public function getPhonePrimary(): ?string { return $this->phonePrimary; } public function setPhonePrimary(?string $phonePrimary): static { $this->phonePrimary = $phonePrimary; return $this; } public function getPhoneSecondary(): ?string { return $this->phoneSecondary; } public function setPhoneSecondary(?string $phoneSecondary): static { $this->phoneSecondary = $phoneSecondary; return $this; } public function getClient(): ?Client { return $this->client; } public function setClient(?Client $client): static { $this->client = $client; return $this; } public function getProspect(): ?Prospect { return $this->prospect; } public function setProspect(?Prospect $prospect): static { $this->prospect = $prospect; return $this; } }