<?php
namespace App\Entity;
use App\Repository\PipelineGmbRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
use Symfony\Component\HttpFoundation\File\File;
/**
* @Vich\Uploadable
*/
#[ORM\Entity(repositoryClass: PipelineGmbRepository::class)]
class PipelineGmb
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: AccountingFirm::class, inversedBy: 'pipelineGmbs')]
#[ORM\JoinColumn(nullable: false)]
private $accountingFirm;
#[ORM\Column(type: 'string', length: 255)]
private $status;
#[ORM\Column(type: 'datetime_immutable')]
private $createdAt;
#[ORM\Column(type: 'datetime_immutable')]
private $updatedAt;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $trelloCardShortId;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $trelloCardId;
#[ORM\Column(type: 'string', length: 255)]
private $email;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $codeType;
#[ORM\OneToMany(mappedBy: 'pipelineGmb', targetEntity: PipelineGmbDate::class, cascade: ['persist', 'remove'], orphanRemoval: true)]
private $pipelineGmbDates;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $code;
#[ORM\Column(type: 'integer', nullable: true)]
private $relaunch_count;
#[ORM\ManyToOne(targetEntity: PipelineContact::class)]
#[ORM\JoinColumn(nullable: false)]
private ?PipelineContact $contact = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $calendlyEventUri = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $calendlyInviteeUri = null;
#[ORM\Column(type: 'datetime_immutable', nullable: true)]
private ?\DateTimeImmutable $calendlyScheduledAt = null;
/**
* @Vich\UploadableField(mapping="pipeline_gmb_qrcode", fileNameProperty="qrCodePath")
*/
private ?File $qrCodeFile = null;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $qrCodePath = null;
#[ORM\Column(type: 'datetime_immutable', nullable: true)]
private ?\DateTimeImmutable $validatedAt = null;
public function __construct()
{
$this->pipelineGmbDates = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getAccountingFirm(): ?AccountingFirm
{
return $this->accountingFirm;
}
public function setAccountingFirm(?AccountingFirm $accountingFirm): self
{
$this->accountingFirm = $accountingFirm;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): self
{
$this->status = $status;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeImmutable
{
return $this->updatedAt;
}
public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getTrelloCardShortId(): ?string
{
return $this->trelloCardShortId;
}
public function setTrelloCardShortId(?string $trelloCardShortId): self
{
$this->trelloCardShortId = $trelloCardShortId;
return $this;
}
public function getTrelloCardId(): ?string
{
return $this->trelloCardId;
}
public function setTrelloCardId(?string $trelloCardId): self
{
$this->trelloCardId = $trelloCardId;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
public function getCodeType(): ?string
{
return $this->codeType;
}
public function setCodeType(?string $codeType): self
{
$this->codeType = $codeType;
return $this;
}
/**
* @return Collection<int, PipelineGmbDate>
*/
public function getPipelineGmbDates(): Collection
{
return $this->pipelineGmbDates;
}
public function addPipelineGmbDate(PipelineGmbDate $pipelineGmbDate): self
{
if (!$this->pipelineGmbDates->contains($pipelineGmbDate)) {
$this->pipelineGmbDates[] = $pipelineGmbDate;
$pipelineGmbDate->setPipelineGmb($this);
}
return $this;
}
public function removePipelineGmbDate(PipelineGmbDate $pipelineGmbDate): self
{
if ($this->pipelineGmbDates->removeElement($pipelineGmbDate)) {
// set the owning side to null (unless already changed)
if ($pipelineGmbDate->getPipelineGmb() === $this) {
$pipelineGmbDate->setPipelineGmb(null);
}
}
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(?string $code): self
{
$this->code = $code;
return $this;
}
public function getRelaunchCount(): ?int
{
return $this->relaunch_count;
}
public function setRelaunchCount(?int $relaunch_count): self
{
$this->relaunch_count = $relaunch_count;
return $this;
}
public function getContact(): ?PipelineContact
{
return $this->contact;
}
public function setContact(?PipelineContact $contact): self
{
$this->contact = $contact;
return $this;
}
public function getCalendlyEventUri(): ?string
{
return $this->calendlyEventUri;
}
public function setCalendlyEventUri(?string $calendlyEventUri): self
{
$this->calendlyEventUri = $calendlyEventUri;
return $this;
}
public function getCalendlyInviteeUri(): ?string
{
return $this->calendlyInviteeUri;
}
public function setCalendlyInviteeUri(?string $calendlyInviteeUri): self
{
$this->calendlyInviteeUri = $calendlyInviteeUri;
return $this;
}
public function getCalendlyScheduledAt(): ?\DateTimeImmutable
{
return $this->calendlyScheduledAt;
}
public function setCalendlyScheduledAt(?\DateTimeImmutable $calendlyScheduledAt): self
{
$this->calendlyScheduledAt = $calendlyScheduledAt;
return $this;
}
public function getCalendlyScheduledAtFormatted(): ?string
{
return $this->calendlyScheduledAt?->format('d/m/Y H:i');
}
public function setQrCodeFile(?File $file = null): void
{
$this->qrCodeFile = $file;
if ($file !== null) {
$this->updatedAt = new \DateTimeImmutable();
}
}
public function getQrCodeFile(): ?File
{
return $this->qrCodeFile;
}
public function getQrCodePath(): ?string
{
return $this->qrCodePath;
}
public function setQrCodePath(?string $qrCodePath): self
{
$this->qrCodePath = $qrCodePath;
return $this;
}
public function getValidatedAt(): ?\DateTimeImmutable
{
return $this->validatedAt;
}
public function setValidatedAt(?\DateTimeImmutable $validatedAt): self
{
$this->validatedAt = $validatedAt;
return $this;
}
}