src/Entity/CRM/OrderCustomer.php line 11

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