src/Entity/Customer.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CustomerRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * @ORM\Entity(repositoryClass=CustomerRepository::class)
  8.  */
  9. class Customer
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=60)
  19.      * @Assert\NotBlank(message="Customer Name is required.")
  20.      */
  21.     private $customer_name;
  22.     /**
  23.      * @ORM\Column(type="string", length=12, nullable=true)
  24.      * Assert\NotBlank(message="Customer Administrative Code is required.")
  25.      * @Assert\Length(
  26.      *     max = 12,     
  27.      *     maxMessage = "Customer Administrative Code cannot be longer than {{ limit }} characters."
  28.      * )
  29.      */
  30.     private $code_client;
  31.     /**
  32.      * @ORM\Column(type="string", length=30, nullable=true)
  33.      */
  34.     private $nick_name;
  35.     /**
  36.      * @ORM\Column(type="string", length=255, nullable=true)
  37.      */
  38.     private $color_code;
  39.     /**
  40.      * @ORM\Column(type="string", length=255, nullable=true)
  41.      */
  42.     private $chemin_logo;
  43.     /**
  44.      * @ORM\Column(type="string", length=255, nullable=true)
  45.      */
  46.     private $no_use;
  47.     /**
  48.      * @ORM\Column(type="datetime", nullable=true)
  49.      */
  50.     private $deleted_at;
  51.     public function getId(): ?int
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function getCustomerName(): ?string
  56.     {
  57.         return $this->customer_name;
  58.     }
  59.     public function setCustomerName(?string $customer_name): self
  60.     {
  61.         $this->customer_name $customer_name;
  62.         return $this;
  63.     }
  64.     public function getCodeClient(): ?string
  65.     {
  66.         return $this->code_client;
  67.     }
  68.     public function setCodeClient(?string $code_client): self
  69.     {
  70.         $this->code_client $code_client;
  71.         return $this;
  72.     }
  73.     public function getNickName(): ?string
  74.     {
  75.         return $this->nick_name;
  76.     }
  77.     public function setNickName(?string $nick_name): self
  78.     {
  79.         $this->nick_name $nick_name;
  80.         return $this;
  81.     }
  82.     public function getColorCode(): ?string
  83.     {
  84.         return $this->color_code;
  85.     }
  86.     public function setColorCode(?string $color_code): self
  87.     {
  88.         $this->color_code $color_code;
  89.         return $this;
  90.     }
  91.     public function getCheminLogo(): ?string
  92.     {
  93.         return $this->chemin_logo;
  94.     }
  95.     public function setCheminLogo(?string $chemin_logo): self
  96.     {
  97.         $this->chemin_logo $chemin_logo;
  98.         return $this;
  99.     }
  100.     public function getNoUse(): ?string
  101.     {
  102.         return $this->no_use;
  103.     }
  104.     public function setNoUse(?string $no_use): self
  105.     {
  106.         $this->no_use $no_use;
  107.         return $this;
  108.     }
  109.     public function getDeletedAt(): ?\DateTimeInterface
  110.     {
  111.         return $this->deleted_at;
  112.     }
  113.     public function setDeletedAt(?\DateTimeInterface $deleted_at): self
  114.     {
  115.         $this->deleted_at $deleted_at;
  116.         return $this;
  117.     }
  118.      /**
  119.      * @ORM\OneToMany(targetEntity="ApplicationsDisplayed", mappedBy="customer",  cascade={"all"}, orphanRemoval=true)
  120.      */
  121.     private $applicationsDisplayed;
  122.     /**
  123.      * Constructor
  124.      */
  125.     public function __construct()
  126.     {
  127.         $this->applicationsDisplayed = new \Doctrine\Common\Collections\ArrayCollection();
  128.     }
  129.     
  130.     /**
  131.      * Add Application Status
  132.      * 
  133.      * @param \App\Entity\ApplicationsDisplayed $applicationsDisplayed
  134.      * 
  135.      * @return Customer
  136.      */
  137.     public function addApplicationsDisplayed(\App\Entity\ApplicationsDisplayed $applicationsDisplayed){
  138.         $applicationsDisplayed->setCustomer($this);
  139.         $this->applicationsDisplayed->add($applicationsDisplayed);
  140.         return $this;
  141.     }
  142.    
  143.     /**
  144.      * Remove application status
  145.      *
  146.      * @param \App\Entity\ApplicationsDisplayed $applicationsDisplayed
  147.      */
  148.     public function removeApplicationsDisplayed(\App\Entity\ApplicationsDisplayed $applicationsDisplayed)
  149.     {
  150.         $this->applicationsDisplayed->removeElement($applicationsDisplayed);
  151.         $applicationsDisplayed->setCustomer(null);
  152.     }
  153.     /**
  154.      * Get application status
  155.      *
  156.      * @return \Doctrine\Common\Collections\Collection
  157.      */
  158.     public function getApplicationsDisplayed()
  159.     {
  160.         return $this->applicationsDisplayed;
  161.     }
  162. }