mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
add version property to accompanyingperiodwork for optimistic locking
This commit is contained in:
@@ -244,6 +244,13 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
||||
*/
|
||||
private ?User $updatedBy = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="integer", nullable=false, options={"default": 1})
|
||||
*
|
||||
* @Serializer\Groups({"read", "read:accompanyingPeriodWork:light", "read:evaluation:include-work"})
|
||||
*/
|
||||
private int $version = 1;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->goals = new ArrayCollection();
|
||||
@@ -452,6 +459,18 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues
|
||||
return $this->updatedBy;
|
||||
}
|
||||
|
||||
public function getVersion(): int
|
||||
{
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
public function setVersion(int $version): self
|
||||
{
|
||||
$this->version = $version;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self
|
||||
{
|
||||
$this->accompanyingPeriodWorkEvaluations
|
||||
|
Reference in New Issue
Block a user