<?php
namespace App\Entity;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass="App\Repository\CpRepository")
* @ORM\Table(name="69pixl_cp")
* @ORM\HasLifecycleCallbacks()
* @Vich\Uploadable
*/
class Cp
{
/**
* @ORM\PrePersist
*/
public function prePersist()
{
$this->dateCreated = new \DateTime();
}
/**
* @ORM\Id
* @Groups({"cp_group"})
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @Groups({"cp_group"})
* @ORM\Column(name="date_created", type="datetime", nullable=true)
*/
protected $dateCreated;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $lastName;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $firstName;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $numeroAdherent;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="text", nullable=true)
*/
private $urlSign;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="text", nullable=true)
*/
private $idYouSign;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="text", nullable=true)
*/
private $procedureId;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="text", nullable=true)
*/
private $errorYouSign;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="datetime", nullable=true)
*/
private $dateSigne;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $path;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $filename;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $status;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="boolean", nullable=true)
*/
private $mailSendGestion;
/**
* @Groups({"cp_group"})
* @ORM\Column(type="text", nullable=true)
*/
private $urlPdfSign;
/**
* @var createdBy[]
* @Groups({"cp_group"})
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="cps")
*/
protected $createdBy;
/**
* @Groups({"cp_group"})
* @ORM\ManyToOne(targetEntity="App\Entity\DocumentType", inversedBy="fileAttribute")
*/
protected $fileType;
/**
* @Groups({"cp_group"})
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="cpSignatory")
*/
protected $signatoryUser;
public function getStatusTrans(): string
{
$status = $this->status ? $this->status : "";
switch ($status){
case "UNSIGNED":
$status = "En Attente";
break;
case "SIGNED":
$status = "Signé";
break;
}
return $status;
}
public function getId(): ?int
{
return $this->id;
}
public function getDateCreated(): ?\DateTimeInterface
{
return $this->dateCreated;
}
public function setDateCreated(?\DateTimeInterface $dateCreated): self
{
$this->dateCreated = $dateCreated;
return $this;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(?string $lastName): self
{
$this->lastName = $lastName;
return $this;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(?string $firstName): self
{
$this->firstName = $firstName;
return $this;
}
public function getNumeroAdherent(): ?string
{
return $this->numeroAdherent;
}
public function setNumeroAdherent(?string $numeroAdherent): self
{
$this->numeroAdherent = $numeroAdherent;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): self
{
$this->status = $status;
return $this;
}
public function getPath(): ?string
{
return $this->path;
}
public function setPath(?string $path): self
{
$this->path = $path;
return $this;
}
public function getUrlSign(): ?string
{
return $this->urlSign;
}
public function setUrlSign(?string $urlSign): self
{
$this->urlSign = $urlSign;
return $this;
}
public function getIdYouSign(): ?string
{
return $this->idYouSign;
}
public function setIdYouSign(?string $idYouSign): self
{
$this->idYouSign = $idYouSign;
return $this;
}
public function getErrorYouSign(): ?string
{
return $this->errorYouSign;
}
public function setErrorYouSign(?string $errorYouSign): self
{
$this->errorYouSign = $errorYouSign;
return $this;
}
public function getDateSigne(): ?\DateTimeInterface
{
return $this->dateSigne;
}
public function setDateSigne(?\DateTimeInterface $dateSigne): self
{
$this->dateSigne = $dateSigne;
return $this;
}
public function getFilename(): ?string
{
return $this->filename;
}
public function setFilename(?string $filename): self
{
$this->filename = $filename;
return $this;
}
public function getMailSendGestion(): ?bool
{
return $this->mailSendGestion;
}
public function setMailSendGestion(?bool $mailSendGestion): self
{
$this->mailSendGestion = $mailSendGestion;
return $this;
}
public function getUrlPdfSign(): ?string
{
return $this->urlPdfSign;
}
public function setUrlPdfSign(?string $urlPdfSign): self
{
$this->urlPdfSign = $urlPdfSign;
return $this;
}
public function getCreatedBy(): ?User
{
return $this->createdBy;
}
public function setCreatedBy(?User $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
public function getFileType(): ?DocumentType
{
return $this->fileType;
}
public function setFileType(?DocumentType $fileType): self
{
$this->fileType = $fileType;
return $this;
}
public function getSignatoryUser(): ?User
{
return $this->signatoryUser;
}
public function setSignatoryUser(?User $signatoryUser): self
{
$this->signatoryUser = $signatoryUser;
return $this;
}
public function getProcedureId(): ?string
{
return $this->procedureId;
}
public function setProcedureId(?string $procedureId): static
{
$this->procedureId = $procedureId;
return $this;
}
public function isMailSendGestion(): ?bool
{
return $this->mailSendGestion;
}
}