src/Flexy/ShopBundle/Entity/Customer/CustomerAddress.php line 13

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Customer;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Flexy\ShopBundle\Entity\Shipping\City;
  5. use App\Flexy\ShopBundle\Entity\Shipping\Departement;
  6. use App\Flexy\ShopBundle\Repository\Customer\CustomerAddressRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ApiResource]
  9. #[ORM\Entity(repositoryClassCustomerAddressRepository::class)]
  10. class CustomerAddress
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column(type'integer')]
  15.     private $id;
  16.      #[ORM\Column(type'text'nullabletrue)]
  17.     private ?string $description null;
  18.     #[ORM\Column(type'string'length255nullabletrue)]
  19.     private ?string $email null;
  20.     #[ORM\Column(type'datetime_immutable'nullabletrue)]
  21.     private ?\DateTimeImmutable $createdAt null;
  22.     #[ORM\Column(type'string'length255nullabletrue)]
  23.     private ?string $address null;
  24.     #[ORM\Column(type'string'length255)]
  25.     private ?string $phone null;
  26.     #[ORM\Column(type'string'length255nullabletrue)]
  27.     private ?string $companyName null;
  28.     #[ORM\Column(type'string'length255nullabletrue)]
  29.     private ?string $addressIndication null;
  30.     #[ORM\Column(type'string'length255nullabletrue)]
  31.     private ?string $country null;
  32.     #[ORM\Column(type'string'length255nullabletrue)]
  33.     private ?string $postCode null;
  34.     #[ORM\ManyToOne(targetEntityCustomer::class, inversedBy'customerAddresses')]
  35.     private ?\App\Flexy\ShopBundle\Entity\Customer\Customer $customer null;
  36.     #[ORM\ManyToOne(targetEntityCity::class, inversedBy'customerAddresses')]
  37.     private ?\App\Flexy\ShopBundle\Entity\Shipping\City $city null;
  38.     #[ORM\ManyToOne(targetEntityDepartement::class, inversedBy'customerAddresses')]
  39.     private ?\App\Flexy\ShopBundle\Entity\Shipping\Departement $departement null;
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getDescription(): ?string
  45.     {
  46.         return $this->description;
  47.     }
  48.     public function setDescription(?string $description): self
  49.     {
  50.         $this->description $description;
  51.         return $this;
  52.     }
  53.     public function getEmail(): ?string
  54.     {
  55.         return $this->email;
  56.     }
  57.     public function setEmail(?string $email): self
  58.     {
  59.         $this->email $email;
  60.         return $this;
  61.     }
  62.     public function getCreatedAt(): ?\DateTimeImmutable
  63.     {
  64.         return $this->createdAt;
  65.     }
  66.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  67.     {
  68.         $this->createdAt $createdAt;
  69.         return $this;
  70.     }
  71.     public function getAddress(): ?string
  72.     {
  73.         return $this->address;
  74.     }
  75.     public function setAddress(?string $address): self
  76.     {
  77.         $this->address $address;
  78.         return $this;
  79.     }
  80.     public function getPhone(): ?string
  81.     {
  82.         return $this->phone;
  83.     }
  84.     public function setPhone(string $phone): self
  85.     {
  86.         $this->phone $phone;
  87.         return $this;
  88.     }
  89.     public function getCompanyName(): ?string
  90.     {
  91.         return $this->companyName;
  92.     }
  93.     public function setCompanyName(?string $companyName): self
  94.     {
  95.         $this->companyName $companyName;
  96.         return $this;
  97.     }
  98.     public function getAddressIndication(): ?string
  99.     {
  100.         return $this->addressIndication;
  101.     }
  102.     public function setAddressIndication(?string $addressIndication): self
  103.     {
  104.         $this->addressIndication $addressIndication;
  105.         return $this;
  106.     }
  107.     public function getCountry(): ?string
  108.     {
  109.         return $this->country;
  110.     }
  111.     public function setCountry(?string $country): self
  112.     {
  113.         $this->country $country;
  114.         return $this;
  115.     }
  116.     public function getPostCode(): ?string
  117.     {
  118.         return $this->postCode;
  119.     }
  120.     public function setPostCode(?string $postCode): self
  121.     {
  122.         $this->postCode $postCode;
  123.         return $this;
  124.     }
  125.     public function getCustomer(): ?Customer
  126.     {
  127.         return $this->customer;
  128.     }
  129.     public function setCustomer(?Customer $customer): self
  130.     {
  131.         $this->customer $customer;
  132.         return $this;
  133.     }
  134.     public function getCity(): ?City
  135.     {
  136.         return $this->city;
  137.     }
  138.     public function setCity(?City $city): self
  139.     {
  140.         $this->city $city;
  141.         return $this;
  142.     }
  143.     public function getDepartement(): ?Departement
  144.     {
  145.         return $this->departement;
  146.     }
  147.     public function setDepartement(?Departement $departement): self
  148.     {
  149.         $this->departement $departement;
  150.         return $this;
  151.     }
  152. }