<?php
namespace App\Entity;
use App\Repository\DeployPackagesRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Symfony\Component\Serializer\Annotation\Groups;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DeployPackagesRepository::class)
*/
class DeployPackages
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"loop-log","deploy"})
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $cluster;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $configVersion;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $imageVersion;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $deploymentDate;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @GROUPS("deploy")
*/
private $status;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $executedAt;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="boolean")
*/
private $approved;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="executedBy")
*/
private $executedBy;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="createdBy")
*/
private $createdBy;
/**
* @ORM\Column(type="string", length=255)
*/
private $projectName;
/**
* @ORM\Column(type="integer")
*/
private $projectId;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $deletedAt;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups("loop-log")
*/
private $executionLog;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $finishDate;
/**
* @ORM\OneToMany(targetEntity=DeployLog::class, mappedBy="package")
*/
private $logs;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $deleted;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="deployPackages")
*/
private $deletedBy;
/**
* @ORM\ManyToOne(targetEntity=Groupe::class, inversedBy="deployPackages")
*/
private $groupe;
public function __construct()
{
$this->logs = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getCluster(): ?string
{
return $this->cluster;
}
public function setCluster(string $cluster): self
{
$this->cluster = $cluster;
return $this;
}
public function getConfigVersion(): ?string
{
return $this->configVersion;
}
public function setConfigVersion(?string $configVersion): self
{
$this->configVersion = $configVersion;
return $this;
}
public function getImageVersion(): ?string
{
return $this->imageVersion;
}
public function setImageVersion(?string $imageVersion): self
{
$this->imageVersion = $imageVersion;
return $this;
}
public function getDeploymentDate(): ?\DateTimeInterface
{
return $this->deploymentDate;
}
public function setDeploymentDate(?\DateTimeInterface $deploymentDate): self
{
$this->deploymentDate = $deploymentDate;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): self
{
$this->status = $status;
return $this;
}
public function getExecutedAt(): ?\DateTimeInterface
{
return $this->executedAt;
}
public function setExecutedAt(?\DateTimeInterface $executedAt): self
{
$this->executedAt = $executedAt;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function isApproved(): ?bool
{
return $this->approved;
}
public function setApproved(bool $approved): self
{
$this->approved = $approved;
return $this;
}
public function getExecutedBy(): ?User
{
return $this->executedBy;
}
public function setExecutedBy(?User $executedBy): self
{
$this->executedBy = $executedBy;
return $this;
}
public function getCreatedBy(): ?User
{
return $this->createdBy;
}
public function setCreatedBy(?User $createdBy): self
{
$this->createdBy = $createdBy;
return $this;
}
public function getProjectName(): ?string
{
return $this->projectName;
}
public function setProjectName(string $projectName): self
{
$this->projectName = $projectName;
return $this;
}
public function getProjectId(): ?int
{
return $this->projectId;
}
public function setProjectId(int $projectId): self
{
$this->projectId = $projectId;
return $this;
}
public function getDeletedAt(): ?\DateTimeInterface
{
return $this->deletedAt;
}
public function setDeletedAt(?\DateTimeInterface $deletedAt): self
{
$this->deletedAt = $deletedAt;
return $this;
}
public function getExecutionLog(): ?string
{
return $this->executionLog;
}
public function setExecutionLog(?string $executionLog): self
{
$this->executionLog = $executionLog;
return $this;
}
public function getFinishDate(): ?\DateTimeInterface
{
return $this->finishDate;
}
public function setFinishDate(?\DateTimeInterface $finishDate): self
{
$this->finishDate = $finishDate;
return $this;
}
/**
* @return Collection<int, DeployLog>
*/
public function getLogs(): Collection
{
return $this->logs;
}
public function addLogs(DeployLog $logs): self
{
if (!$this->logs->contains($logs)) {
$this->logs[] = $logs;
$logs->setLogsId($this);
}
return $this;
}
public function removeLogs(DeployLog $logs): self
{
if ($this->logs->removeElement($logs)) {
// set the owning side to null (unless already changed)
if ($logs->getLogsId() === $this) {
$logs->setLogsId(null);
}
}
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(?bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function getDeletedBy(): ?User
{
return $this->deletedBy;
}
public function setDeletedBy(?User $deletedBy): self
{
$this->deletedBy = $deletedBy;
return $this;
}
public function getGroupe(): ?groupe
{
return $this->groupe;
}
public function setGroupe(?groupe $groupe): self
{
$this->groupe = $groupe;
return $this;
}
}