src/Entity/Client.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ClientRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ClientRepository::class)
  9.  * @ORM\HasLifecycleCallbacks()
  10.  */
  11. class Client
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $firstName;
  23.     /**
  24.      * @ORM\Column(type="string", length=255)
  25.      */
  26.     private $lastName;
  27.   
  28.       /**
  29.      * @ORM\Column(type="string", length=255, nullable=true)
  30.      */
  31.     private $condicionFiscal;
  32.     /**
  33.      * @ORM\Column(type="string", length=30)
  34.      */
  35.     private $dni;
  36.     /**
  37.      * @ORM\Column(type="string", length=255, nullable=true)
  38.      */
  39.     private $telephone;
  40.     /**
  41.      * @ORM\Column(type="string", length=255, nullable=true)
  42.      */
  43.     private $cellphone;
  44.     /**
  45.      * @ORM\Column(type="string", length=255, nullable=true)
  46.      */
  47.     private $address;
  48.     /**
  49.      * @ORM\Column(type="string", length=255, nullable=true)
  50.      */
  51.     private $addressNumber;
  52.     /**
  53.      * @ORM\Column(type="string", length=255, nullable=true)
  54.      */
  55.     private $addressFloor;
  56.     /**
  57.      * @ORM\Column(type="string", length=255, nullable=true)
  58.      */
  59.     private $addressApartment;
  60.     /**
  61.      * @ORM\Column(type="string", length=255, nullable=true)
  62.      */
  63.     private $location;
  64.     /**
  65.      * @ORM\Column(type="string", length=255, nullable=true)
  66.      */
  67.     private $state;
  68.     /**
  69.      * @ORM\Column(type="string", length=255, nullable=true)
  70.      */
  71.     private $origin;
  72.     /**
  73.      * @ORM\Column(type="text", nullable=true)
  74.      */
  75.     private $description;
  76.     /**
  77.      * @ORM\Column(type="boolean", nullable=true)
  78.      */
  79.     private $notifyByEmail;
  80.     /**
  81.      * @ORM\Column(type="boolean", nullable=true)
  82.      */
  83.     private $notifyByWhatsapp;
  84.     /**
  85.      * @ORM\Column(type="boolean", nullable=true)
  86.      */
  87.     private $notifyVehicleEntry;
  88.     /**
  89.      * @ORM\Column(type="json", nullable=true)
  90.      */
  91.     private $notifyCriteria = [];
  92.     /**
  93.      * @ORM\Column(type="datetime")
  94.      */
  95.     private $createdAt;
  96.     /**
  97.      * @ORM\Column(type="datetime", nullable=true)
  98.      */
  99.     private $updatedAt;
  100.     /**
  101.      * @ORM\OneToMany(targetEntity=CarBuy::class, mappedBy="client")
  102.      */
  103.     private $carBuyClientId;
  104.     /**
  105.      * @ORM\OneToMany(targetEntity=CarSale::class, mappedBy="client")
  106.      */
  107.     private $carSaleClientId;
  108.     /**
  109.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="client")
  110.      * @ORM\JoinColumn(nullable=false)
  111.      */
  112.     private $user;
  113.     /**
  114.      * @ORM\Column(type="string", length=50, nullable=true)
  115.      */
  116.     private $email;
  117.     /**
  118.      * @ORM\Column(type="date", nullable=true)
  119.      */
  120.     private ?\DateTimeInterface $licenceVenc null;
  121.     public function __construct()
  122.     {
  123.         $this->arBuyClientId = new ArrayCollection();
  124.         $this->carSaleClientId = new ArrayCollection();
  125.         $this->carBuyClientId = new ArrayCollection();
  126.     }
  127.     public function getId(): ?int
  128.     {
  129.         return $this->id;
  130.     }
  131.     public function getFirstName(): ?string
  132.     {
  133.         return $this->firstName;
  134.     }
  135.     public function setFirstName(string $firstName): self
  136.     {
  137.         $this->firstName $firstName;
  138.         return $this;
  139.     }
  140.     public function getLastName(): ?string
  141.     {
  142.         return $this->lastName;
  143.     }
  144.     public function setLastName(string $lastName): self
  145.     {
  146.         $this->lastName $lastName;
  147.         return $this;
  148.     }
  149.     public function getDni(): ?int
  150.     {
  151.         return $this->dni;
  152.     }
  153.     public function setDni(?int $dni): self
  154.     {
  155.         $this->dni $dni;
  156.         return $this;
  157.     }
  158.       public function getCondicionFiscal(): ?string
  159.     {
  160.         return $this->condicionFiscal;
  161.     }
  162.     public function setCondicionFiscal(string $condicionFiscal): self
  163.     {
  164.         $this->condicionFiscal $condicionFiscal;
  165.         return $this;
  166.     }
  167.     public function getTelephone(): ?string
  168.     {
  169.         return $this->telephone;
  170.     }
  171.     public function setTelephone(?string $telephone): self
  172.     {
  173.         $this->telephone $telephone;
  174.         return $this;
  175.     }
  176.     public function getCellphone(): ?string
  177.     {
  178.         return $this->cellphone;
  179.     }
  180.     public function setCellphone(?string $cellphone): self
  181.     {
  182.         $this->cellphone $cellphone;
  183.         return $this;
  184.     }
  185.     public function getAddress(): ?string
  186.     {
  187.         return $this->address;
  188.     }
  189.     public function setAddress(?string $address): self
  190.     {
  191.         $this->address $address;
  192.         return $this;
  193.     }
  194.     public function getOrigin(): ?string
  195.     {
  196.         return $this->origin;
  197.     }
  198.     public function setOrigin(?string $origin): self
  199.     {
  200.         $this->origin $origin;
  201.         return $this;
  202.     }
  203.     public function getDescription(): ?string
  204.     {
  205.         return $this->description;
  206.     }
  207.     public function setDescription(?string $description): self
  208.     {
  209.         $this->description $description;
  210.         return $this;
  211.     }
  212.     public function getLicenceVenc(): ?\DateTimeInterface
  213.     {
  214.         return $this->licenceVenc;
  215.     }
  216.     public function setLicenceVenc(?\DateTimeInterface $licenceVenc): self
  217.     {
  218.         $this->licenceVenc $licenceVenc;
  219.         return $this;
  220.     }
  221.     public function getCreatedAt(): ?\DateTimeInterface
  222.     {
  223.         return $this->createdAt;
  224.     }
  225.     /**
  226.      * @ORM\PrePersist
  227.      */
  228.     public function setCreatedAt(): self
  229.     {
  230.         $this->createdAt = new \DateTime();
  231.         return $this;
  232.     }
  233.     public function getUpdatedAt(): ?\DateTimeInterface
  234.     {
  235.         return $this->updatedAt;
  236.     }
  237.     /**
  238.      * @ORM\PreUpdate
  239.      */
  240.     public function setUpdatedAt(): self
  241.     {
  242.         $this->updatedAt = new \DateTime();
  243.         return $this;
  244.     }
  245.     /**
  246.      * @return Collection|CarBuy[]
  247.      */
  248.     public function getCarBuyClientId(): Collection
  249.     {
  250.         return $this->carBuyClientId;
  251.     }
  252.     public function addCarBuyClientId(CarBuy $carBuyClientId): self
  253.     {
  254.         if (!$this->carBuyClientId->contains($carBuyClientId)) {
  255.             $this->carBuyClientId[] = $carBuyClientId;
  256.             $carBuyClientId->setClientBuy($this);
  257.         }
  258.         return $this;
  259.     }
  260.     public function removeCarBuyClientId(CarBuy $carBuyClientId): self
  261.     {
  262.         if ($this->carBuyClientId->removeElement($carBuyClientId)) {
  263.             // set the owning side to null (unless already changed)
  264.             if ($carBuyClientId->getClientBuy() === $this) {
  265.                 $carBuyClientId->setClientBuy(null);
  266.             }
  267.         }
  268.         return $this;
  269.     }
  270.     /**
  271.      * @return Collection|CarSale[]
  272.      */
  273.     public function getCarSaleClientId(): Collection
  274.     {
  275.         return $this->carSaleClientId;
  276.     }
  277.     public function addCarSaleClientId(CarSale $carSaleClientId): self
  278.     {
  279.         if (!$this->carSaleClientId->contains($carSaleClientId)) {
  280.             $this->carSaleClientId[] = $carSaleClientId;
  281.             $carSaleClientId->setClientSale($this);
  282.         }
  283.         return $this;
  284.     }
  285.     public function removeCarSaleClientId(CarSale $carSaleClientId): self
  286.     {
  287.         if ($this->carSaleClientId->removeElement($carSaleClientId)) {
  288.             // set the owning side to null (unless already changed)
  289.             if ($carSaleClientId->getClientSale() === $this) {
  290.                 $carSaleClientId->setClientSale(null);
  291.             }
  292.         }
  293.         return $this;
  294.     }
  295.     public function __toString()
  296.     {
  297.         return $this->firstName.' '.$this->lastName;
  298.     }
  299.     public function getUser(): ?User
  300.     {
  301.         return $this->user;
  302.     }
  303.     public function setUser(?User $user): self
  304.     {
  305.         $this->user $user;
  306.         return $this;
  307.     }
  308.     public function getNotifyByEmail(): ?bool
  309.     {
  310.         return $this->notifyByEmail;
  311.     }
  312.     public function setNotifyByEmail(?bool $notifyByEmail): self
  313.     {
  314.         $this->notifyByEmail $notifyByEmail;
  315.         return $this;
  316.     }
  317.     public function getNotifyByWhatsapp(): ?bool
  318.     {
  319.         return $this->notifyByWhatsapp;
  320.     }
  321.     public function setNotifyByWhatsapp(?bool $notifyByWhatsapp): self
  322.     {
  323.         $this->notifyByWhatsapp $notifyByWhatsapp;
  324.         return $this;
  325.     }
  326.     public function getAddressNumber(): ?string
  327.     {
  328.         return $this->addressNumber;
  329.     }
  330.     public function setAddressNumber(?string $addressNumber): self
  331.     {
  332.         $this->addressNumber $addressNumber;
  333.         return $this;
  334.     }
  335.     public function getAddressFloor(): ?string
  336.     {
  337.         return $this->addressFloor;
  338.     }
  339.     public function setAddressFloor(?string $addressFloor): self
  340.     {
  341.         $this->addressFloor $addressFloor;
  342.         return $this;
  343.     }
  344.     public function getAddressApartment(): ?string
  345.     {
  346.         return $this->addressApartment;
  347.     }
  348.     public function setAddressApartment(?string $addressApartment): self
  349.     {
  350.         $this->addressApartment $addressApartment;
  351.         return $this;
  352.     }
  353.     public function getLocation(): ?string
  354.     {
  355.         return $this->location;
  356.     }
  357.     public function setLocation(?string $location): self
  358.     {
  359.         $this->location $location;
  360.         return $this;
  361.     }
  362.     public function getState(): ?string
  363.     {
  364.         return $this->state;
  365.     }
  366.     public function setState(?string $state): self
  367.     {
  368.         $this->state $state;
  369.         return $this;
  370.     }
  371.     public function getNotifyVehicleEntry(): ?bool
  372.     {
  373.         return $this->notifyVehicleEntry;
  374.     }
  375.     public function setNotifyVehicleEntry(?bool $notifyVehicleEntry): self
  376.     {
  377.         $this->notifyVehicleEntry $notifyVehicleEntry;
  378.         return $this;
  379.     }
  380.     public function getNotifyCriteria(): ?array
  381.     {
  382.         return $this->notifyCriteria;
  383.     }
  384.     public function setNotifyCriteria(?array $notifyCriteria): self
  385.     {
  386.         $this->notifyCriteria $notifyCriteria;
  387.         return $this;
  388.     }
  389.     public function getEmail(): ?string
  390.     {
  391.         return $this->email;
  392.     }
  393.     public function setEmail(?string $email): self
  394.     {
  395.         $this->email $email;
  396.         return $this;
  397.     }
  398. }