From 6856c74e0ac0c9328a1883ee0aaf089c69c71a48 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Metivier <jean-philippe.metivier@unicaen.fr> Date: Fri, 14 Mar 2025 08:40:36 +0100 Subject: [PATCH] Cleaning --- module/Agent/src/Entity/Db/Agent.php | 28 +------------------ .../Db/Mapping/Agent.Entity.Db.Agent.dcm.xml | 1 - 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/module/Agent/src/Entity/Db/Agent.php b/module/Agent/src/Entity/Db/Agent.php index e8d23b27..4bc87293 100644 --- a/module/Agent/src/Entity/Db/Agent.php +++ b/module/Agent/src/Entity/Db/Agent.php @@ -46,25 +46,17 @@ class Agent implements private ?string $sexe = null; private ?DateTime $dateNaissance = null; private ?string $login = null; - private ?string $harpId = null; private ?string $email = null; - private ?string $tContratLong = null; private Collection $affectations; - /** AgentAffectation[] */ private Collection $echelons; - /** AgentEchelon[] */ private Collection $grades; - /** AgentGrade[] */ private Collection $quotites; - /** AgentQuotite[] */ private Collection $statuts; - /** AgentStatut[] */ private Collection $validateurs; private ?AbstractUser $utilisateur = null; - private Collection $fiches; /** FichePoste[] */ private Collection $fichiers; /** Fichier[] */ @@ -78,7 +70,6 @@ class Agent implements public function __construct() { - $this->fiches = new ArrayCollection(); $this->statuts = new ArrayCollection(); $this->missionsSpecifiques = new ArrayCollection(); $this->fichiers = new ArrayCollection(); @@ -91,18 +82,12 @@ class Agent implements $this->validations = new ArrayCollection(); } - /** - * @return string - */ public function generateTag(): string { return 'Agent_' . $this->getId(); } - /** Accesseur en lecteur de l'identification (importer de la base source) ********************/ - - /** Todo remettre un type une fois l'identifiant stabilisé (URN:string ? UCN: int) **/ - public function getId() + public function getId(): ?string { return $this->id; } @@ -147,17 +132,6 @@ class Agent implements return $this->email; } - public function getHarpId(): ?int - { - return $this->harpId; - } - - - public function isContratLong(): bool - { - return $this->tContratLong === 'O'; - } - /** Collections importées *****************************************************************************************/ /** @return AgentAffectation[] */ diff --git a/module/Agent/src/Entity/Db/Mapping/Agent.Entity.Db.Agent.dcm.xml b/module/Agent/src/Entity/Db/Mapping/Agent.Entity.Db.Agent.dcm.xml index 173c9d6d..5787ae2f 100644 --- a/module/Agent/src/Entity/Db/Mapping/Agent.Entity.Db.Agent.dcm.xml +++ b/module/Agent/src/Entity/Db/Mapping/Agent.Entity.Db.Agent.dcm.xml @@ -14,7 +14,6 @@ <field name="dateNaissance" column="date_naissance" type="datetime"/> <field name="login" column="login" length="256"/> <field name="email" column="email" length="1024"/> - <field name="tContratLong" column="T_CONTRAT_LONG" length="1" nullable="true"/> <one-to-many target-entity="Agent\Entity\Db\AgentQuotite" mapped-by="agent" field="quotites"/> <one-to-many target-entity="Agent\Entity\Db\AgentAffectation" mapped-by="agent" field="affectations"/> -- GitLab