src/Entity/CompanyContact.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CompanyContactRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. #[ORM\Entity(repositoryClassCompanyContactRepository::class)]
  7. #[ORM\HasLifecycleCallbacks]
  8. class CompanyContact extends BaseEntity
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\ManyToOne(inversedBy'contacts')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private ?Company $company null;
  17.     #[ORM\Column(length255)]
  18.     #[Assert\NotBlank(message'Ad Soyad boş bırakılamaz.')]
  19.     private ?string $fullName null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     #[Assert\Email(message'Geçerli bir e-posta adresi giriniz.')]
  22.     private ?string $email null;
  23.     #[ORM\Column(length50nullabletrue)]
  24.     private ?string $phone null;
  25.     #[ORM\Column(length100nullabletrue)]
  26.     private ?string $jobTitle null;
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getCompany(): ?Company
  32.     {
  33.         return $this->company;
  34.     }
  35.     public function setCompany(?Company $company): self
  36.     {
  37.         $this->company $company;
  38.         return $this;
  39.     }
  40.     public function getFullName(): ?string
  41.     {
  42.         return $this->fullName;
  43.     }
  44.     public function setFullName(string $fullName): self
  45.     {
  46.         $this->fullName $fullName;
  47.         return $this;
  48.     }
  49.     public function getEmail(): ?string
  50.     {
  51.         return $this->email;
  52.     }
  53.     public function setEmail(?string $email): self
  54.     {
  55.         $this->email $email;
  56.         return $this;
  57.     }
  58.     public function getPhone(): ?string
  59.     {
  60.         return $this->phone;
  61.     }
  62.     public function setPhone(?string $phone): self
  63.     {
  64.         $this->phone $phone;
  65.         return $this;
  66.     }
  67.     public function getJobTitle(): ?string
  68.     {
  69.         return $this->jobTitle;
  70.     }
  71.     public function setJobTitle(?string $jobTitle): self
  72.     {
  73.         $this->jobTitle $jobTitle;
  74.         return $this;
  75.     }
  76. }