Skip to content

Commit

Permalink
Merge pull request #23 from jolicode/fix/assignment-updated-by-id
Browse files Browse the repository at this point in the history
fixed a wrong property name on the assignment model
  • Loading branch information
xavierlacot authored Oct 6, 2022
2 parents 5d6d182 + 073e3f0 commit 63addf1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Resources/forecast-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ components:
type: string
format: date-time
description: date when the assignment was last updated
updated_by:
updated_by_id:
type: integer
description: id of the user who last updated this assignment
format: int32
Expand Down
10 changes: 5 additions & 5 deletions generated/Model/Assignment.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class Assignment
*
* @var int|null
*/
protected $updatedBy;
protected $updatedById;

/**
* should the assignement be also active on days off?
Expand Down Expand Up @@ -287,17 +287,17 @@ public function setUpdatedAt(?\DateTime $updatedAt): self
/**
* id of the user who last updated this assignment.
*/
public function getUpdatedBy(): ?int
public function getUpdatedById(): ?int
{
return $this->updatedBy;
return $this->updatedById;
}

/**
* id of the user who last updated this assignment.
*/
public function setUpdatedBy(?int $updatedBy): self
public function setUpdatedById(?int $updatedById): self
{
$this->updatedBy = $updatedBy;
$this->updatedById = $updatedById;

return $this;
}
Expand Down
12 changes: 6 additions & 6 deletions generated/Normalizer/AssignmentNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ public function denormalize($data, $class, $format = null, array $context = [])
} elseif (\array_key_exists('updated_at', $data) && null === $data['updated_at']) {
$object->setUpdatedAt(null);
}
if (\array_key_exists('updated_by', $data) && null !== $data['updated_by']) {
$object->setUpdatedBy($data['updated_by']);
} elseif (\array_key_exists('updated_by', $data) && null === $data['updated_by']) {
$object->setUpdatedBy(null);
if (\array_key_exists('updated_by_id', $data) && null !== $data['updated_by_id']) {
$object->setUpdatedById($data['updated_by_id']);
} elseif (\array_key_exists('updated_by_id', $data) && null === $data['updated_by_id']) {
$object->setUpdatedById(null);
}

return $object;
Expand Down Expand Up @@ -155,8 +155,8 @@ public function normalize($object, $format = null, array $context = [])
if (null !== $object->getUpdatedAt()) {
$data['updated_at'] = $object->getUpdatedAt()->format('Y-m-d\\TH:i:s.v\\Z');
}
if (null !== $object->getUpdatedBy()) {
$data['updated_by'] = $object->getUpdatedBy();
if (null !== $object->getUpdatedById()) {
$data['updated_by_id'] = $object->getUpdatedById();
}

return $data;
Expand Down

0 comments on commit 63addf1

Please sign in to comment.