src/Entity/CompanyAddress.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CompanyAddressRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. #[ORM\Entity(repositoryClassCompanyAddressRepository::class)]
  7. #[ORM\HasLifecycleCallbacks]
  8. class CompanyAddress extends BaseEntity
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\ManyToOne(inversedBy'addresses')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private ?Company $company null;
  17.     #[ORM\Column(length255)]
  18.     #[Assert\NotBlank(message'Adres başlığı boş bırakılamaz.')]
  19.     private ?string $title null;
  20.     #[ORM\Column(type'text')]
  21.     #[Assert\NotBlank(message'Adres satırı boş bırakılamaz.')]
  22.     private ?string $addressLine null;
  23.     #[ORM\Column(length100)]
  24.     #[Assert\NotBlank(message'Şehir boş bırakılamaz.')]
  25.     private ?string $city null;
  26.     #[ORM\Column(length100)]
  27.     #[Assert\NotBlank(message'İlçe boş bırakılamaz.')]
  28.     private ?string $district null;
  29.     #[ORM\Column]
  30.     private ?bool $isDefault false;
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getCompany(): ?Company
  36.     {
  37.         return $this->company;
  38.     }
  39.     public function setCompany(?Company $company): self
  40.     {
  41.         $this->company $company;
  42.         return $this;
  43.     }
  44.     public function getTitle(): ?string
  45.     {
  46.         return $this->title;
  47.     }
  48.     public function setTitle(string $title): self
  49.     {
  50.         $this->title $title;
  51.         return $this;
  52.     }
  53.     public function getAddressLine(): ?string
  54.     {
  55.         return $this->addressLine;
  56.     }
  57.     public function setAddressLine(string $addressLine): self
  58.     {
  59.         $this->addressLine $addressLine;
  60.         return $this;
  61.     }
  62.     public function getCity(): ?string
  63.     {
  64.         return $this->city;
  65.     }
  66.     public function setCity(string $city): self
  67.     {
  68.         $this->city $city;
  69.         return $this;
  70.     }
  71.     public function getDistrict(): ?string
  72.     {
  73.         return $this->district;
  74.     }
  75.     public function setDistrict(string $district): self
  76.     {
  77.         $this->district $district;
  78.         return $this;
  79.     }
  80.     public function isIsDefault(): ?bool
  81.     {
  82.         return $this->isDefault;
  83.     }
  84.     public function setIsDefault(bool $isDefault): self
  85.     {
  86.         $this->isDefault $isDefault;
  87.         return $this;
  88.     }
  89. }