<?php
namespace App\Entity;
use App\Repository\CustomerRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass=CustomerRepository::class)
*/
class Customer
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=60)
* @Assert\NotBlank(message="Customer Name is required.")
*/
private $customer_name;
/**
* @ORM\Column(type="string", length=12, nullable=true)
* Assert\NotBlank(message="Customer Administrative Code is required.")
* @Assert\Length(
* max = 12,
* maxMessage = "Customer Administrative Code cannot be longer than {{ limit }} characters."
* )
*/
private $code_client;
/**
* @ORM\Column(type="string", length=30, nullable=true)
*/
private $nick_name;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $color_code;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $chemin_logo;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $no_use;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $deleted_at;
public function getId(): ?int
{
return $this->id;
}
public function getCustomerName(): ?string
{
return $this->customer_name;
}
public function setCustomerName(?string $customer_name): self
{
$this->customer_name = $customer_name;
return $this;
}
public function getCodeClient(): ?string
{
return $this->code_client;
}
public function setCodeClient(?string $code_client): self
{
$this->code_client = $code_client;
return $this;
}
public function getNickName(): ?string
{
return $this->nick_name;
}
public function setNickName(?string $nick_name): self
{
$this->nick_name = $nick_name;
return $this;
}
public function getColorCode(): ?string
{
return $this->color_code;
}
public function setColorCode(?string $color_code): self
{
$this->color_code = $color_code;
return $this;
}
public function getCheminLogo(): ?string
{
return $this->chemin_logo;
}
public function setCheminLogo(?string $chemin_logo): self
{
$this->chemin_logo = $chemin_logo;
return $this;
}
public function getNoUse(): ?string
{
return $this->no_use;
}
public function setNoUse(?string $no_use): self
{
$this->no_use = $no_use;
return $this;
}
public function getDeletedAt(): ?\DateTimeInterface
{
return $this->deleted_at;
}
public function setDeletedAt(?\DateTimeInterface $deleted_at): self
{
$this->deleted_at = $deleted_at;
return $this;
}
/**
* @ORM\OneToMany(targetEntity="ApplicationsDisplayed", mappedBy="customer", cascade={"all"}, orphanRemoval=true)
*/
private $applicationsDisplayed;
/**
* Constructor
*/
public function __construct()
{
$this->applicationsDisplayed = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Add Application Status
*
* @param \App\Entity\ApplicationsDisplayed $applicationsDisplayed
*
* @return Customer
*/
public function addApplicationsDisplayed(\App\Entity\ApplicationsDisplayed $applicationsDisplayed){
$applicationsDisplayed->setCustomer($this);
$this->applicationsDisplayed->add($applicationsDisplayed);
return $this;
}
/**
* Remove application status
*
* @param \App\Entity\ApplicationsDisplayed $applicationsDisplayed
*/
public function removeApplicationsDisplayed(\App\Entity\ApplicationsDisplayed $applicationsDisplayed)
{
$this->applicationsDisplayed->removeElement($applicationsDisplayed);
$applicationsDisplayed->setCustomer(null);
}
/**
* Get application status
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getApplicationsDisplayed()
{
return $this->applicationsDisplayed;
}
}