feat(workflow) : ajoute workflow requis sur Project (RESTRICT)
This commit is contained in:
@@ -69,6 +69,12 @@ class Project
|
|||||||
#[Groups(['project:read', 'project:write'])]
|
#[Groups(['project:read', 'project:write'])]
|
||||||
private ?Client $client = null;
|
private ?Client $client = null;
|
||||||
|
|
||||||
|
#[ORM\ManyToOne(targetEntity: Workflow::class)]
|
||||||
|
#[ORM\JoinColumn(nullable: false, onDelete: 'RESTRICT')]
|
||||||
|
#[Groups(['project:read', 'project:write', 'task:read'])]
|
||||||
|
#[Assert\NotNull(message: 'Un projet doit avoir un workflow.')]
|
||||||
|
private ?Workflow $workflow = null;
|
||||||
|
|
||||||
#[ORM\Column(length: 255, nullable: true)]
|
#[ORM\Column(length: 255, nullable: true)]
|
||||||
#[Groups(['project:read', 'project:write', 'task:read'])]
|
#[Groups(['project:read', 'project:write', 'task:read'])]
|
||||||
private ?string $giteaOwner = null;
|
private ?string $giteaOwner = null;
|
||||||
@@ -228,6 +234,18 @@ class Project
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getWorkflow(): ?Workflow
|
||||||
|
{
|
||||||
|
return $this->workflow;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setWorkflow(Workflow $workflow): static
|
||||||
|
{
|
||||||
|
$this->workflow = $workflow;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
#[Groups(['project:read'])]
|
#[Groups(['project:read'])]
|
||||||
public function getTaskCount(): int
|
public function getTaskCount(): int
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user