Skip to content

Commit

Permalink
Add responsible external_id field
Browse files Browse the repository at this point in the history
  • Loading branch information
Neur0toxine authored Aug 14, 2024
2 parents 6e4dd6a + d342701 commit 2640e66
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
25 changes: 25 additions & 0 deletions src/Bot/Model/Entity/Responsible.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ class Responsible implements ModelInterface
*/
private $type;

/**
* @var string $externalId
*
* @Type("string")
* @Accessor(getter="getExternalId",setter="setExternalId")
* @SkipWhenEmpty()
*/
private $externalId;

/**
* @return string|null
*/
Expand Down Expand Up @@ -96,4 +105,20 @@ public function setType(string $type)
{
$this->type = $type;
}

/**
* @return string|null
*/
public function getExternalId(): ?string
{
return $this->externalId;
}

/**
* @param string $externalId
*/
public function setExternalId(string $externalId): void
{
$this->externalId = $externalId;
}
}
2 changes: 1 addition & 1 deletion tests/Resources/dialogReassigned.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"responsible":{"type":"user","id":4,"assigned_at":"2019-06-21T08:01:09Z"},"is_reassign":true,"previous_responsible":{"type":"user","id":12,"assigned_at":"2019-06-11T12:49:34Z"},"left_user_id":12}
{"responsible":{"type":"user","id":4,"external_id": "4","assigned_at":"2019-06-21T08:01:09Z"},"is_reassign":true,"previous_responsible":{"type":"user","id":12,"external_id": "12","assigned_at":"2019-06-11T12:49:34Z"},"left_user_id":12}
2 changes: 1 addition & 1 deletion tests/Resources/dialogUnassigned.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"previous_responsible":{"type":"user","id":12,"assigned_at":"2019-06-11T12:49:34Z"}}
{"previous_responsible":{"type":"user","id":12,"external_id": "12","assigned_at":"2019-06-11T12:49:34Z"}}
3 changes: 3 additions & 0 deletions tests/Resources/dialogs.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"responsible": {
"type": "user",
"id": 12,
"external_id": "12",
"assigned_at": "2019-06-11T12:49:34.716716Z"
},
"is_active": true
Expand All @@ -27,6 +28,7 @@
"responsible": {
"type": "user",
"id": 12,
"external_id": "12",
"assigned_at": "2019-06-11T08:40:14.136916Z"
},
"is_active": true
Expand All @@ -43,6 +45,7 @@
"responsible": {
"type": "user",
"id": 12,
"external_id": "12",
"assigned_at": "2019-06-11T08:40:14Z"
},
"is_active": true
Expand Down

0 comments on commit 2640e66

Please sign in to comment.