352 lines
7.6 KiB
PHP
352 lines
7.6 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
use Doctrine\Common\Collections\Collection;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
|
|
|
/**
|
|
* Scrumissue
|
|
*
|
|
* @ORM\Entity()
|
|
* @ORM\Table(name="scrumissue", uniqueConstraints={@ORM\UniqueConstraint(name="giteaissue", columns={"giteaid","scrum_id"})} )
|
|
* @UniqueEntity("giteaissue", message="Il existe déjà une issues liée avec ce id gitea")
|
|
*/
|
|
class Scrumissue
|
|
{
|
|
/**
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
private $rowid;
|
|
|
|
/**
|
|
* @ORM\Column(type="float")
|
|
*/
|
|
private $weight=0;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", nullable=true)
|
|
*/
|
|
private $color;
|
|
|
|
/**
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
private $giteaid;
|
|
|
|
/**
|
|
* @ORM\Column(type="integer")
|
|
*/
|
|
private $giteanumber;
|
|
|
|
/**
|
|
* @ORM\Column(type="string")
|
|
*/
|
|
private $giteastate;
|
|
|
|
/**
|
|
* @ORM\Column(type="string")
|
|
*
|
|
*/
|
|
private $giteatitle;
|
|
|
|
/**
|
|
* @ORM\Column(type="integer", nullable=true)
|
|
*/
|
|
private $giteamilestone;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", nullable=true)
|
|
*
|
|
*/
|
|
private $giteamilestonename;
|
|
|
|
/**
|
|
* @ORM\Column(type="json")
|
|
*/
|
|
private $giteajson;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Scrum", inversedBy="scrumissues")
|
|
*/
|
|
private $scrum;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Scrumcolumn", inversedBy="scrumissues")
|
|
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
|
|
*/
|
|
private $scrumcolumn;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Scrumsprint", inversedBy="scrumissues")
|
|
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
|
|
*/
|
|
private $scrumsprint;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Scrumissue", inversedBy="scrumissuedependencies")
|
|
* @ORM\JoinColumn(nullable=true, onDelete="SET NULL")
|
|
*/
|
|
private $scrumissueblock;
|
|
|
|
/**
|
|
* @ORM\OneToMany(targetEntity="Scrumissue", mappedBy="scrumissueblock", cascade={"persist"}, orphanRemoval=false)
|
|
*/
|
|
private $scrumissuedependencies;
|
|
|
|
/**
|
|
* @ORM\OneToMany(targetEntity="Userpoker", mappedBy="scrumissue", cascade={"persist"}, orphanRemoval=true)
|
|
*/
|
|
private $userpokers;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->userpokers = new ArrayCollection();
|
|
$this->scrumissuedependcies = new ArrayCollection();
|
|
$this->scrumissuedependencies = new ArrayCollection();
|
|
}
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getRowid(): ?int
|
|
{
|
|
return $this->rowid;
|
|
}
|
|
|
|
public function setRowid(int $rowid): self
|
|
{
|
|
$this->rowid = $rowid;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getGiteaid(): ?int
|
|
{
|
|
return $this->giteaid;
|
|
}
|
|
|
|
public function setGiteaid(int $giteaid): self
|
|
{
|
|
$this->giteaid = $giteaid;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getGiteanumber(): ?int
|
|
{
|
|
return $this->giteanumber;
|
|
}
|
|
|
|
public function setGiteanumber(int $giteanumber): self
|
|
{
|
|
$this->giteanumber = $giteanumber;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getGiteastate(): ?string
|
|
{
|
|
return $this->giteastate;
|
|
}
|
|
|
|
public function setGiteastate(string $giteastate): self
|
|
{
|
|
$this->giteastate = $giteastate;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getGiteatitle(): ?string
|
|
{
|
|
return $this->giteatitle;
|
|
}
|
|
|
|
public function setGiteatitle(string $giteatitle): self
|
|
{
|
|
$this->giteatitle = $giteatitle;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getGiteamilestone(): ?int
|
|
{
|
|
return $this->giteamilestone;
|
|
}
|
|
|
|
public function setGiteamilestone(?int $giteamilestone): self
|
|
{
|
|
$this->giteamilestone = $giteamilestone;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getGiteajson(): ?array
|
|
{
|
|
return $this->giteajson;
|
|
}
|
|
|
|
public function setGiteajson(array $giteajson): self
|
|
{
|
|
$this->giteajson = $giteajson;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getScrum(): ?Scrum
|
|
{
|
|
return $this->scrum;
|
|
}
|
|
|
|
public function setScrum(?Scrum $scrum): self
|
|
{
|
|
$this->scrum = $scrum;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getScrumcolumn(): ?Scrumcolumn
|
|
{
|
|
return $this->scrumcolumn;
|
|
}
|
|
|
|
public function setScrumcolumn(?Scrumcolumn $scrumcolumn): self
|
|
{
|
|
$this->scrumcolumn = $scrumcolumn;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getGiteamilestonename(): ?string
|
|
{
|
|
return $this->giteamilestonename;
|
|
}
|
|
|
|
public function setGiteamilestonename(?string $giteamilestonename): self
|
|
{
|
|
$this->giteamilestonename = $giteamilestonename;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getWeight(): ?float
|
|
{
|
|
return $this->weight;
|
|
}
|
|
|
|
public function setWeight(float $weight): self
|
|
{
|
|
$this->weight = $weight;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getScrumsprint(): ?Scrumsprint
|
|
{
|
|
return $this->scrumsprint;
|
|
}
|
|
|
|
public function setScrumsprint(?Scrumsprint $scrumsprint): self
|
|
{
|
|
$this->scrumsprint = $scrumsprint;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return Collection|Userpoker[]
|
|
*/
|
|
public function getUserpokers(): Collection
|
|
{
|
|
return $this->userpokers;
|
|
}
|
|
|
|
public function addUserpoker(Userpoker $userpoker): self
|
|
{
|
|
if (!$this->userpokers->contains($userpoker)) {
|
|
$this->userpokers[] = $userpoker;
|
|
$userpoker->setScrumissue($this);
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function removeUserpoker(Userpoker $userpoker): self
|
|
{
|
|
if ($this->userpokers->contains($userpoker)) {
|
|
$this->userpokers->removeElement($userpoker);
|
|
// set the owning side to null (unless already changed)
|
|
if ($userpoker->getScrumissue() === $this) {
|
|
$userpoker->setScrumissue(null);
|
|
}
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getScrumissueblock(): ?self
|
|
{
|
|
return $this->scrumissueblock;
|
|
}
|
|
|
|
public function setScrumissueblock(?self $scrumissueblock): self
|
|
{
|
|
$this->scrumissueblock = $scrumissueblock;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return Collection|Scrumissue[]
|
|
*/
|
|
public function getScrumissuedependencies(): Collection
|
|
{
|
|
return $this->scrumissuedependencies;
|
|
}
|
|
|
|
public function addScrumissuedependency(Scrumissue $scrumissuedependency): self
|
|
{
|
|
if (!$this->scrumissuedependencies->contains($scrumissuedependency)) {
|
|
$this->scrumissuedependencies[] = $scrumissuedependency;
|
|
$scrumissuedependency->setScrumissue($this);
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function removeScrumissuedependency(Scrumissue $scrumissuedependency): self
|
|
{
|
|
if ($this->scrumissuedependencies->contains($scrumissuedependency)) {
|
|
$this->scrumissuedependencies->removeElement($scrumissuedependency);
|
|
// set the owning side to null (unless already changed)
|
|
if ($scrumissuedependency->getScrumissue() === $this) {
|
|
$scrumissuedependency->setScrumissue(null);
|
|
}
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getColor(): ?string
|
|
{
|
|
return $this->color;
|
|
}
|
|
|
|
public function setColor(?string $color): self
|
|
{
|
|
$this->color = $color;
|
|
|
|
return $this;
|
|
}
|
|
} |