src/Entity/CRM/OrderCustomerAddress.php line 12

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Repository\OrderCustomerAddressRepository;
  4. use DateTime;
  5. use DateTimeInterface;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassOrderCustomerAddressRepository::class)]
  9. class OrderCustomerAddress
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $name null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $firstName null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $lastName null;
  21.     #[ORM\Column(length255)]
  22.     private ?string $address null;
  23.     #[ORM\Column(length255)]
  24.     private ?string $city null;
  25.     #[ORM\Column(length255)]
  26.     private ?string $zipCode null;
  27.     #[ORM\Column]
  28.     private ?string $companyNumber null;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $email null;
  31.     #[ORM\Column]
  32.     private ?bool $checkUser null;
  33.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  34.     private DateTimeInterface $addedDate;
  35.     #[ORM\ManyToOne(inversedBy'orderCustomerAddresses')]
  36.     #[ORM\JoinColumn(nullablefalse)]
  37.     private ?Customer $customer null;
  38.     #[ORM\ManyToOne(inversedBy'orderCustomerAddresses')]
  39.     private ?customerAddress $customerAddress null;
  40.     #[ORM\OneToOne(inversedBy'orderCustomerAddress'cascade: ['persist''remove'])]
  41.     #[ORM\JoinColumn(nullablefalse)]
  42.     private ?Order $orderId null;
  43.     #[ORM\Column(length22nullabletrue)]
  44.     private ?string $phone null;
  45.     #[ORM\Column(nullabletrue)]
  46.     private ?string $regon null;
  47.     public function __construct()
  48.     {
  49.         $this->addedDate = new DateTime();
  50.     }
  51.     public function __toString(): string
  52.     {
  53.         return $this->getFirstName().' '.$this->getLastName();
  54.     }
  55.     public function getId(): ?int
  56.     {
  57.         return $this->id;
  58.     }
  59.     public function getName(): ?string
  60.     {
  61.         return $this->name;
  62.     }
  63.     public function setName(string $name): self
  64.     {
  65.         $this->name $name;
  66.         return $this;
  67.     }
  68.     public function getLastName(): ?string
  69.     {
  70.         return $this->lastName;
  71.     }
  72.     public function setLastName(string $lastName): self
  73.     {
  74.         $this->lastName $lastName;
  75.         return $this;
  76.     }
  77.     public function getAddress(): ?string
  78.     {
  79.         return $this->address;
  80.     }
  81.     public function setAddress(string $address): self
  82.     {
  83.         $this->address $address;
  84.         return $this;
  85.     }
  86.     public function getCity(): ?string
  87.     {
  88.         return $this->city;
  89.     }
  90.     public function setCity(string $city): self
  91.     {
  92.         $this->city $city;
  93.         return $this;
  94.     }
  95.     public function getZipCode(): ?string
  96.     {
  97.         return $this->zipCode;
  98.     }
  99.     public function setZipCode(string $zipCode): self
  100.     {
  101.         $this->zipCode $zipCode;
  102.         return $this;
  103.     }
  104.     public function getCompanyNumber(): ?string
  105.     {
  106.         return $this->companyNumber;
  107.     }
  108.     public function setCompanyNumber(string $companyNumber): self
  109.     {
  110.         $this->companyNumber $companyNumber;
  111.         return $this;
  112.     }
  113.     public function getEmail(): ?string
  114.     {
  115.         return $this->email;
  116.     }
  117.     public function setEmail(?string $email): self
  118.     {
  119.         $this->email $email;
  120.         return $this;
  121.     }
  122.     public function getAddedDate(): ?DateTimeInterface
  123.     {
  124.         return $this->addedDate;
  125.     }
  126.     public function setAddedDate(DateTimeInterface $addedDate): self
  127.     {
  128.         $this->addedDate $addedDate;
  129.         return $this;
  130.     }
  131.     public function getCustomer(): ?Customer
  132.     {
  133.         return $this->customer;
  134.     }
  135.     public function setCustomer(?Customer $customer): self
  136.     {
  137.         $this->customer $customer;
  138.         return $this;
  139.     }
  140.     public function getCustomerAddress(): ?customerAddress
  141.     {
  142.         return $this->customerAddress;
  143.     }
  144.     public function setCustomerAddress(?customerAddress $customerAddress): static
  145.     {
  146.         $this->customerAddress $customerAddress;
  147.         return $this;
  148.     }
  149.     public function getOrderId(): ?Order
  150.     {
  151.         return $this->orderId;
  152.     }
  153.     public function setOrderId(Order $orderId): static
  154.     {
  155.         $this->orderId $orderId;
  156.         return $this;
  157.     }
  158.     public function getFirstName(): ?string
  159.     {
  160.         return $this->firstName;
  161.     }
  162.     public function setFirstName(?string $firstName): void
  163.     {
  164.         $this->firstName $firstName;
  165.     }
  166.     public function getCheckUser(): ?bool
  167.     {
  168.         return $this->checkUser;
  169.     }
  170.     public function setCheckUser(?bool $checkUser): void
  171.     {
  172.         $this->checkUser $checkUser;
  173.     }
  174.     public function getPhone(): ?string
  175.     {
  176.         return $this->phone;
  177.     }
  178.     public function setPhone(?string $phone): void
  179.     {
  180.         $this->phone $phone;
  181.     }
  182.     public function getRegon(): ?string
  183.     {
  184.         return $this->regon;
  185.     }
  186.     public function setRegon(?string $regon): static
  187.     {
  188.         $this->regon $regon;
  189.         return $this;
  190.     }
  191. }