-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
285 additions
and
299 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace App\Dto\Api\Model; | ||
|
||
class File | ||
{ | ||
public string $titre; | ||
public string $documentType; | ||
public string $url; | ||
} |
4 changes: 2 additions & 2 deletions
4
.../Api/Response/GeolocalisationResponse.php → src/Dto/Api/Model/Geolocalisation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 6 additions & 7 deletions
13
...Dto/Api/Response/InterventionResponse.php → src/Dto/Api/Model/Intervention.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,30 @@ | ||
<?php | ||
|
||
namespace App\Dto\Api\Response; | ||
namespace App\Dto\Api\Model; | ||
|
||
use App\Entity\Intervention; | ||
use App\Entity\Intervention as InterventionEntity; | ||
|
||
class InterventionResponse | ||
class Intervention | ||
{ | ||
public string $dateIntervention; | ||
public ?string $type; | ||
public ?string $statut; | ||
public ?PartnerResponse $partner; | ||
public ?Partner $partner; | ||
public ?string $details; | ||
public array $conclusions = []; | ||
public ?bool $occupantPresent; | ||
public ?bool $proprietairePresent; | ||
|
||
public function __construct( | ||
Intervention $intervention, | ||
InterventionEntity $intervention, | ||
) { | ||
$this->dateIntervention = $intervention->getScheduledAt()->format(\DATE_ATOM); | ||
$this->type = $intervention->getType()?->label(); | ||
$this->statut = $intervention->getStatus(); | ||
$this->partner = $intervention->getPartner() ? new PartnerResponse($intervention->getPartner()) : null; | ||
$this->partner = $intervention->getPartner() ? new Partner($intervention->getPartner()) : null; | ||
$this->details = $intervention->getDetails(); // traitement de suppression du html | ||
$this->conclusions = $intervention->getConcludeProcedure() ?? []; | ||
$this->occupantPresent = $intervention->isOccupantPresent(); | ||
$this->proprietairePresent = $intervention->isProprietairePresent(); | ||
// besoin d'exposer plus d'élements ? | ||
} | ||
} |
9 changes: 4 additions & 5 deletions
9
src/Dto/Api/Response/PartnerResponse.php → src/Dto/Api/Model/Partner.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
<?php | ||
|
||
namespace App\Dto\Api\Response; | ||
namespace App\Dto\Api\Model; | ||
|
||
use App\Entity\Partner; | ||
use App\Entity\Partner as PartnerEntity; | ||
|
||
class PartnerResponse | ||
class Partner | ||
{ | ||
public string $nom; | ||
public ?string $type; | ||
public array $competences = []; | ||
|
||
public function __construct( | ||
Partner $partner, | ||
PartnerEntity $partner, | ||
) { | ||
$this->nom = $partner->getNom(); | ||
$this->type = $partner->getType()?->label(); | ||
$this->competences = $partner->getCompetence() ?? []; | ||
// besoin d'exposer plus d'élements ? | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.