Skip to content
Snippets Groups Projects
Commit afd149f0 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Ajout d'une V2 à l'API pour permettre l'import avec unicaen/db-import par...

Ajout d'une V2 à l'API pour permettre l'import avec unicaen/db-import par ESUP-SyGAL ; la V1 demeure.
parent 965f9316
No related branches found
No related tags found
No related merge requests found
Pipeline #12932 passed
Showing
with 5478 additions and 321 deletions
Journal des modifications
=========================
2.0.0
-----
- Ajout d'une V2 à l'API pour permettre l'import avec unicaen/db-import par ESUP-SyGAL ; la V1 demeure.
1.3.7
-----
- Rétablissement de la possibilité d'importer les origines de financement.
......
......@@ -7,7 +7,7 @@
et les met à disposition pour leur lecture via des requêtes GET.
## Technologies employées
## Outils employés
*sygal-import-ws* repose sur l'utilisation de :
- [Apigility](https://apigility.org/) pour la fourniture du ws ;
......@@ -53,24 +53,34 @@ Par exemple, `0.0.0.0:443->8443/tcp` indique que le ws est accessible sur la mac
## Les services fournis
Chaque vue en base de données peut être interrogée via un service dédié :
* `/structure`
* `/etablissement`
* `/ecole-doctorale`
* `/unite-recherche`
* `/individu`
* `/doctorant`
* `/these`
* `/these-annee-univ`
* `/role`
* `/acteur`
* `/origine-financement`
* `/financement`
* `/titre-acces`
* `/variable`
- `/structure`
- `/etablissement`
- `/ecole-doctorale`
- `/unite-recherche`
- `/individu`
- `/doctorant`
- `/these`
- `/these-annee-univ`
- `/role`
- `/acteur`
- `/origine-financement`
- `/financement`
- `/titre-acces`
- `/variable`
## Versions
L'API existe en plusieurs versions, veillez à spécifier la version correcte dans l'URL.
Exemple pour la version 1 : `https://localhost:8443/v1/variable`.
Exemple pour la version 2 : `https://localhost:8443/v2/variable`.
## Interrogation avec `curl`
Exemple :
```bash
curl --insecure --header "Accept: application/json" --header "Authorization: Basic xxxx" https://localhost:8443/variable
curl --insecure --header "Accept: application/json" --header "Authorization: Basic xxxx" https://localhost:8443/v1/variable
```
Remplacer `xxxx` par le token généré grâce à la commande suivante
......@@ -88,12 +98,12 @@ L'interrogation d'un service sans paramètre va retourner l'intégralité des do
Afin d'obtenir les informations spécifiques à une donnée, il est possible d'ajouter son identifiant, exemple :
```bash
curl --insecure --header "Accept: application/json" --header "Authorization: Basic xxxx" https://localhost:8443/variable/ETB_LIB_NOM_RESP
curl --insecure --header "Accept: application/json" --header "Authorization: Basic xxxx" https://localhost:8443/v1/variable/ETB_LIB_NOM_RESP
```
Pour mettre en forme le JSON retourné et faciliter la lecture, une solution est d'utiliser `python -m json.tool`:
```bash
curl --insecure --header "Accept: application/json" --header "Authorization: Basic xxxx" https://localhost:8443/variable | python -m json.tool
curl --insecure --header "Accept: application/json" --header "Authorization: Basic xxxx" https://localhost:8443/v1/variable | python -m json.tool
```
......@@ -103,11 +113,24 @@ curl --insecure --header "Accept: application/json" --header "Authorization: Bas
* Le web service retourne du json seulement.
## Service Acteur
## Services acceptant un paramètre
Aucun service n'accepte de paramètre, sauf ceux qui suivent.
### `/acteur`
Ce service accepte un paramètre supplémentaire : un identifiant de thèse (source code) peut être spécifié pour obtenir
les acteurs de cette seule thèse.
Exemple :
```bash
curl --insecure --header "Accept: application/json" --header "Authorization: Basic xxxxx" https://localhost:8443/acteur?these_id=13111
curl --insecure --header "Accept: application/json" --header "Authorization: Basic xxxxx" https://localhost:8443/v1/acteur?these_id=13111
```
### `/doctorant`
Ce service accepte un paramètre supplémentaire : un identifiant de thèse (source code) peut être spécifié pour obtenir
le doctorant de cette thèse.
Exemple :
```bash
curl --insecure --header "Accept: application/json" --header "Authorization: Basic xxxxx" https://localhost:8443/v1/doctorant?these_id=13111
```
This diff is collapsed.
This diff is collapsed.
Version 2.0.0
=============
## Sources PHP
Sur le serveur, placez-vous dans le répertoire du web service (sans doute `/var/www/sygal-import-ws`)
puis lancez les commandes suivantes pour installer la nouvelle version :
```bash
git fetch && git fetch --tags && git checkout --force 2.0.0 && bash install.sh
```
Selon le moteur PHP que vous avez installé, rechargez le service, exemple :
- php7.0-fpm : `service php7.0-fpm reload`
- apache2-mod-php7.0 : `service apache2 reload`
## Base de données
De nouvelles vues et tables *_V2 doivent être créées dans la base Apogée ou Physalis.
### Apogée
- Cf. [2.0.0/apogee-v2.sql](2.0.0/apogee-v2.sql).
### Physalis
- Cf. [2.0.0/physalis-v2.sql](2.0.0/physalis-v2.sql).
......@@ -6,20 +6,6 @@ use Application\Controller\ConsoleController;
use Application\Service\TableService;
use Application\Service\TableServiceFactory;
use Doctrine\DBAL\Logging\EchoSQLLogger;
use ImportData\V1\Entity\Db\Acteur;
use ImportData\V1\Entity\Db\Doctorant;
use ImportData\V1\Entity\Db\EcoleDoctorale;
use ImportData\V1\Entity\Db\Etablissement;
use ImportData\V1\Entity\Db\Financement;
use ImportData\V1\Entity\Db\Individu;
use ImportData\V1\Entity\Db\OrigineFinancement;
use ImportData\V1\Entity\Db\Role;
use ImportData\V1\Entity\Db\Structure;
use ImportData\V1\Entity\Db\These;
use ImportData\V1\Entity\Db\TheseAnneeUniv;
use ImportData\V1\Entity\Db\TitreAcces;
use ImportData\V1\Entity\Db\UniteRecherche;
use ImportData\V1\Entity\Db\Variable;
use Zend\ServiceManager\Factory\InvokableFactory;
return [
......@@ -37,20 +23,62 @@ return [
],
],
'services_to_entity_classes' => [
'structure' => Structure::class,
'etablissement' => Etablissement::class,
'ecole-doctorale' => EcoleDoctorale::class,
'unite-recherche' => UniteRecherche::class,
'individu' => Individu::class,
'doctorant' => Doctorant::class,
'these' => These::class,
'these-annee-univ' => TheseAnneeUniv::class,
'role' => Role::class,
'acteur' => Acteur::class,
'variable' => Variable::class,
'origine-financement' => OrigineFinancement::class,
'financement' => Financement::class,
'titre-acces' => TitreAcces::class,
'structure' => [
\ImportData\V1\Entity\Db\Structure::class,
\ImportData\V2\Entity\Db\Structure::class,
],
'etablissement' => [
\ImportData\V1\Entity\Db\Etablissement::class,
\ImportData\V2\Entity\Db\Etablissement::class,
],
'ecole-doctorale' => [
\ImportData\V1\Entity\Db\EcoleDoctorale::class,
\ImportData\V2\Entity\Db\EcoleDoctorale::class,
],
'unite-recherche' => [
\ImportData\V1\Entity\Db\UniteRecherche::class,
\ImportData\V2\Entity\Db\UniteRecherche::class,
],
'individu' => [
\ImportData\V1\Entity\Db\Individu::class,
\ImportData\V2\Entity\Db\Individu::class,
],
'doctorant' => [
\ImportData\V1\Entity\Db\Doctorant::class,
\ImportData\V2\Entity\Db\Doctorant::class,
],
'these' => [
\ImportData\V1\Entity\Db\These::class,
\ImportData\V2\Entity\Db\These::class,
],
'these-annee-univ' => [
\ImportData\V1\Entity\Db\TheseAnneeUniv::class,
\ImportData\V2\Entity\Db\TheseAnneeUniv::class,
],
'role' => [
\ImportData\V1\Entity\Db\Role::class,
\ImportData\V2\Entity\Db\Role::class,
],
'acteur' => [
\ImportData\V1\Entity\Db\Acteur::class,
\ImportData\V2\Entity\Db\Acteur::class,
],
'variable' => [
\ImportData\V1\Entity\Db\Variable::class,
\ImportData\V2\Entity\Db\Variable::class,
],
'origine-financement' => [
\ImportData\V1\Entity\Db\OrigineFinancement::class,
\ImportData\V2\Entity\Db\OrigineFinancement::class,
],
'financement' => [
\ImportData\V1\Entity\Db\Financement::class,
\ImportData\V2\Entity\Db\Financement::class,
],
'titre-acces' => [
\ImportData\V1\Entity\Db\TitreAcces::class,
\ImportData\V2\Entity\Db\TitreAcces::class,
],
],
'doctrine' => [
'sql_logger_collector' => [
......
......@@ -34,19 +34,22 @@ class ConsoleController extends AbstractConsoleController
public function updateServiceTablesAction()
{
$request = $this->getRequest();
$services = $request->getParam('services');
$services = $services ? explode(',', $services) : null;
$verbose = $request->getParam('verbose');
$priority = $verbose ? Logger::DEBUG : Logger::INFO;
foreach ($this->logger->getWriters()->toArray() as $writer) {
/** @var AbstractWriter $writer */
$writer->addFilter(new Priority($priority));
}
$this->tableService->setLogger($this->logger);
if ($services !== null) {
$services = explode(',', $services);
$this->tableService->updateTablesForServices($services);
} else {
$this->tableService->updateTablesForAllServices();
}
$this->logger->info("Terminé.");
}
......
......@@ -12,6 +12,9 @@ class TableService
{
use LoggerAwareTrait;
const DELETE_TEMPLATE = "delete from %s ;";
const INSERT_TEMPLATE = "insert into %s (%s) select %s from V_%s ;";
/**
* @var EntityManager
*/
......@@ -61,17 +64,25 @@ class TableService
}
/**
* Lance la mise à jour des tables sources.
* Lance la mise à jour des tables sources pour tous les services.
*/
public function updateTablesForAllServices()
{
$services = array_keys($this->servicesToEntityClassesConfig);
$this->updateTablesForServices($services);
}
/**
* Lance la mise à jour des tables sources pour les services spécifiés.
*
* @param array|string|null $services Liste éventuelle des noms de services dont on veut mettre à jour
* les tables sources.
* Exemple : ['structure','etablissement','unite-recherche','ecole-doctorale']
* @param array $services Liste des noms de services dont on veut mettre à jour les tables sources.
* Exemple : ['structure', 'etablissement']
*/
public function updateTablesForServices($services = null)
public function updateTablesForServices(array $services)
{
$conn = $this->entityManager->getConnection();
$services = (array)$services ?: array_keys($this->servicesToEntityClassesConfig);
$sql = $this->generateTablesUpdateSQLForServices($services);
$sql = $this->generateSQLUpdatesForServices($services);
$this->logger->debug("SQL généré : " . $sql);
......@@ -94,72 +105,98 @@ class TableService
$this->logger->info(
"Les tables sources des services suivants ont été mises à jour avec succès :" . PHP_EOL .
implode(PHP_EOL, $services));
implode(PHP_EOL, $services)
);
}
/**
* Génère le SQL permettant de mettre à jour le contenu des tables sources.
* Génère le SQL permettant de mettre à jour le contenu des tables sources pour les services spécifiés.
*
* @param array $services Liste des noms de services dont on veut mettre à jour les tables sources.
* Exemple : ['structure', 'etablissement']
*
* @param array|string $services Liste éventuelle des noms de services dont on veut mettre à jour
* les tables sources.
* Exemple : ['structure','etablissement','unite-recherche','ecole-doctorale']
* @return string SQL généré.
* Exemple :
* @return string SQL généré, exemple :
* <pre>
* begin
* delete from SYGAL_STRUCTURE ;
* insert into SYGAL_STRUCTURE (SOURCE_ID, TYPE_STRUCTURE_ID, SIGLE, LIBELLE, CODE_PAYS, LIBELLE_PAYS, ID) select SOURCE_ID, TYPE_STRUCTURE_ID, SIGLE, LIBELLE, CODE_PAYS, LIBELLE_PAYS, ID from V_SYGAL_STRUCTURE ;
* delete from SYGAL_ETABLISSEMENT ;
* insert into SYGAL_ETABLISSEMENT (SOURCE_ID, STRUCTURE_ID, CODE, ID) select SOURCE_ID, STRUCTURE_ID, CODE, ID from V_SYGAL_ETABLISSEMENT ;
* delete from SYGAL_UNITE_RECH ;
* insert into SYGAL_UNITE_RECH (SOURCE_ID, STRUCTURE_ID, ID) select SOURCE_ID, STRUCTURE_ID, ID from V_SYGAL_UNITE_RECH ;
* delete from SYGAL_ECOLE_DOCT ;
* insert into SYGAL_ECOLE_DOCT (SOURCE_ID, STRUCTURE_ID, ID) select SOURCE_ID, STRUCTURE_ID, ID from V_SYGAL_ECOLE_DOCT ;
* insert into SYGAL_STRUCTURE (SOURCE_ID, ...) select SOURCE_ID, ... from V_SYGAL_STRUCTURE ;
* delete from SYGAL_STRUCTURE_V2 ;
* insert into SYGAL_STRUCTURE_V2 (SOURCE_CODE, ...) select SOURCE_CODE, ... from V_SYGAL_STRUCTURE_V2 ;
* delete from SYGAL_ETABLISSEMENT
* insert into SYGAL_ETABLISSEMENT (SOURCE_ID, ...) select SOURCE_ID, ... from V_SYGAL_ETABLISSEMENT ;
* delete from SYGAL_ETABLISSEMENT_V2 ;
* insert into SYGAL_ETABLISSEMENT_V2 (SOURCE_CODE, ...) select SOURCE_CODE, ... from V_SYGAL_ETABLISSEMENT_V2 ;
* end;
* </pre>
*/
private function generateTablesUpdateSQLForServices(array $services)
private function generateSQLUpdatesForServices(array $services): string
{
$deleteTemplate = "delete from %s ;";
$updateTemplate = "insert into %s (%s) select %s from V_%s ;";
$sqlParts = [];
$sqlParts[] = 'begin';
foreach ($services as $service) {
$className = $this->getEntityClassNameForService($service);
$sqlParts[] = $this->generateSQLUpdatesForService($service);
}
$sqlParts[] = 'end;';
$metadata = $this->entityManager->getClassMetadata($className);
$tableName = $metadata->getTableName();
$columnNames = $metadata->getColumnNames();
return implode(PHP_EOL, $sqlParts);
}
// exclusion éventuelle de certaines colonnes
$columnNames = array_diff($columnNames, $this->excludedColumnNames);
/**
* Génère le SQL permettant de mettre à jour le contenu des tables sources pour un service.
*
* @param string $service Nom du service dont on veut mettre à jour les tables sources.
* Exemple : 'structure'
*
* @return string SQL généré, exemple :
* <pre>
* delete from SYGAL_STRUCTURE ;
* insert into SYGAL_STRUCTURE (SOURCE_ID, ...) select SOURCE_ID, ... from V_SYGAL_STRUCTURE ;
* delete from SYGAL_STRUCTURE_V2 ;
* insert into SYGAL_STRUCTURE_V2 (SOURCE_CODE, ...) select SOURCE_CODE, ... from V_SYGAL_STRUCTURE_V2 ;
* </pre>
*/
private function generateSQLUpdatesForService(string $service): string
{
$sqlParts = [];
// SQL à exécuter au préalable ?
if (isset($this->servicesPreSql[$service])) {
$sqlParts[] = $this->servicesPreSql[$service];
}
$sqlParts[] = sprintf($deleteTemplate, $tableName);
$sqlParts[] = sprintf($updateTemplate, $tableName, $cols = implode(', ', $columnNames), $cols, $tableName);
$classNames = $this->getEntityClassNamesForService($service);
// NB : Il y a une classe d'entité Doctrine par version de l'API.
foreach ($classNames as $className) {
$metadata = $this->entityManager->getClassMetadata($className);
$tableName = $metadata->getTableName();
$columnNames = $metadata->getColumnNames();
// exclusion éventuelle de certaines colonnes
$columnNames = array_diff($columnNames, $this->excludedColumnNames);
$cols = implode(', ', $columnNames);
$sqlParts[] = sprintf(self::DELETE_TEMPLATE, $tableName);
$sqlParts[] = sprintf(self::INSERT_TEMPLATE, $tableName, $cols, $cols, $tableName);
}
$sqlParts[] = 'end;';
return implode(PHP_EOL, $sqlParts);
}
/**
* Retourne les classes d'entité Doctrine correspondant au service spécifié.
* NB : Il y a une classe par version de l'API.
*
* @param string $service
* @return string
* @return array
*/
private function getEntityClassNameForService($service)
private function getEntityClassNamesForService(string $service): array
{
$className = $this->servicesToEntityClassesConfig[$service] ?? null;
if ($className === null) {
throw new \LogicException("Service inconnu : '$service''");
if (! isset($this->servicesToEntityClassesConfig[$service])) {
throw new \LogicException("Service inconnu : '$service'");
}
return $className;
return $this->servicesToEntityClassesConfig[$service];
}
}
This diff is collapsed.
<?php
namespace ImportData\V2\Entity\Db;
/**
* Acteur
*
* @codeCoverageIgnore
*/
class Acteur
{
private $id;
private $sourceCode;
private $sourceId;
private $theseId;
private $roleId;
private $individuId;
private $acteurEtablissementId;
private $codeRoleJury;
private $libRoleJury;
private $codeQualite;
private $libQualite;
private $temoinHDR;
private $temoinRapport;
private $sourceInsertDate;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getSourceCode()
{
return $this->sourceCode;
}
/**
* @return mixed
*/
public function getSourceId()
{
return $this->sourceId;
}
/**
* @return mixed
*/
public function getTheseId()
{
return $this->theseId;
}
/**
* @return mixed
*/
public function getRoleId()
{
return $this->roleId;
}
/**
* @return mixed
*/
public function getIndividuId()
{
return $this->individuId;
}
/**
* @return mixed
*/
public function getActeurEtablissementId()
{
return $this->acteurEtablissementId;
}
/**
* return $this;
* }
*
* /**
* @return mixed
*/
public function getCodeRoleJury()
{
return $this->codeRoleJury;
}
/**
* @return mixed
*/
public function getLibRoleJury()
{
return $this->libRoleJury;
}
/**
* @return mixed
*/
public function getCodeQualite()
{
return $this->codeQualite;
}
/**
* @return mixed
*/
public function getLibQualite()
{
return $this->libQualite;
}
/**
* @return mixed
*/
public function getTemoinHDR()
{
return $this->temoinHDR;
}
/**
* @return mixed
*/
public function getTemoinRapport()
{
return $this->temoinRapport;
}
/**
* @return mixed
*/
public function getSourceInsertDate()
{
return $this->sourceInsertDate;
}
}
<?php
namespace ImportData\V2\Entity\Db;
/**
* Doctorant
*
* @codeCoverageIgnore
*/
class Doctorant
{
private $id;
private $sourceCode;
private $sourceId;
private $individuId;
private $sourceInsertDate;
private $ine;
/**
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getSourceCode()
{
return $this->sourceCode;
}
/**
* @return mixed
*/
public function getSourceId()
{
return $this->sourceId;
}
/**
* @return mixed
*/
public function getIndividuId()
{
return $this->individuId;
}
/**
* @return string
*/
public function getIne()
{
return $this->ine;
}
/**
* @return mixed
*/
public function getSourceInsertDate()
{
return $this->sourceInsertDate;
}
}
<?php
namespace ImportData\V2\Entity\Db;
/**
* Structure
*
* @codeCoverageIgnore
*/
class EcoleDoctorale
{
private $id;
private $sourceCode;
private $sourceId;
private $structureId;
private $sourceInsertDate;
/**
* @return string
*/
public function getId(): string
{
return $this->id;
}
/**
* @return string
*/
public function getSourceCode(): string
{
return $this->sourceCode;
}
/**
* @return mixed
*/
public function getSourceId()
{
return $this->sourceId;
}
/**
* @return string
*/
public function getStructureId(): string
{
return $this->structureId;
}
/**
* @return mixed
*/
public function getSourceInsertDate()
{
return $this->sourceInsertDate;
}
}
<?php
namespace ImportData\V2\Entity\Db;
/**
* Structure
*
* @codeCoverageIgnore
*/
class Etablissement
{
private $id;
private $sourceCode;
private $sourceId;
private $structureId;
private $sourceInsertDate;
/**
* @return string
*/
public function getId(): string
{
return $this->id;
}
/**
* @return string
*/
public function getSourceCode(): string
{
return $this->sourceCode;
}
/**
* @return mixed
*/
public function getSourceId()
{
return $this->sourceId;
}
/**
* @return string
*/
public function getStructureId(): string
{
return $this->structureId;
}
/**
* @return mixed
*/
public function getSourceInsertDate()
{
return $this->sourceInsertDate;
}
}
<?php
namespace ImportData\V2\Entity\Db;
/**
* Financement
*
* @codeCoverageIgnore
*/
class Financement
{
private $id;
private $sourceCode;
private $sourceId;
private $theseId;
private $annee;
private $origineFinancementId;
private $complementFinancement;
private $quotiteFinancement;
private $dateDebutFinancement;
private $dateFinFinancement;
private $codeTypeFinancement;
private $libelleTypeFinancement;
private $sourceInsertDate;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getSourceCode()
{
return $this->sourceCode;
}
/**
* @return mixed
*/
public function getSourceId()
{
return $this->sourceId;
}
/**
* @return mixed
*/
public function getTheseId()
{
return $this->theseId;
}
/**
* @return mixed
*/
public function getAnnee()
{
return $this->annee;
}
/**
* @return mixed
*/
public function getOrigineFinancementId()
{
return $this->origineFinancementId;
}
/**
* @return mixed
*/
public function getComplementFinancement()
{
return $this->complementFinancement;
}
/**
* @return mixed
*/
public function getQuotiteFinancement()
{
return $this->quotiteFinancement;
}
/**
* @return mixed
*/
public function getDateDebutFinancement()
{
return $this->dateDebutFinancement;
}
/**
* @return mixed
*/
public function getDateFinFinancement()
{
return $this->dateFinFinancement;
}
/**
* @return mixed
*/
public function getSourceInsertDate()
{
return $this->sourceInsertDate;
}
/**
* @return mixed
*/
public function getCodeTypeFinancement()
{
return $this->codeTypeFinancement;
}
/**
* @return mixed
*/
public function getLibelleTypeFinancement()
{
return $this->libelleTypeFinancement;
}
}
<?php
namespace ImportData\V2\Entity\Db;
/**
* These
*
* @codeCoverageIgnore
*/
class Individu
{
private $id;
private $sourceCode;
private $sourceId;
private $supannId;
private $type;
private $civilite;
private $nomUsuel;
private $nomPatronymique;
private $prenom1;
private $prenom2;
private $prenom3;
private $email;
private $dateNaissance;
private $nationalite;
private $sourceInsertDate;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getSourceCode()
{
return $this->sourceCode;
}
/**
* @return mixed
*/
public function getSourceId()
{
return $this->sourceId;
}
/**
* @return string
*/
public function getSupannId()
{
return $this->supannId;
}
/**
* @return mixed
*/
public function getType()
{
return $this->type;
}
/**
* @return mixed
*/
public function getCivilite()
{
return $this->civilite;
}
/**
* @return mixed
*/
public function getNomUsuel()
{
return $this->nomUsuel;
}
/**
* @return mixed
*/
public function getNomPatronymique()
{
return $this->nomPatronymique;
}
/**
* @return mixed
*/
public function getPrenom1()
{
return $this->prenom1;
}
/**
* @return mixed
*/
public function getPrenom2()
{
return $this->prenom2;
}
/**
* @return mixed
*/
public function getPrenom3()
{
return $this->prenom3;
}
/**
* @return mixed
*/
public function getEmail()
{
return $this->email;
}
/**
* @return mixed
*/
public function getDateNaissance()
{
return $this->dateNaissance;
}
/**
* @return mixed
*/
public function getNationalite()
{
return $this->nationalite;
}
/**
* @return mixed
*/
public function getSourceInsertDate()
{
return $this->sourceInsertDate;
}
}
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="ImportData\V2\Entity\Db\Acteur" table="SYGAL_ACTEUR_V2">
<id name="id" column="ID"/>
<field name="sourceCode" column="SOURCE_CODE" length="100"/>
<field name="sourceId" column="SOURCE_ID" length="64"/>
<field name="theseId" type="integer" column="THESE_ID"/>
<field name="roleId" column="ROLE_ID" length="1"/>
<field name="codeRoleJury" column="COD_ROJ_COMPL" length="1"/>
<field name="libRoleJury" column="LIB_ROJ_COMPL" length="40"/>
<field name="individuId" column="INDIVIDU_ID" length="40"/>
<field name="acteurEtablissementId" column="ACTEUR_ETABLISSEMENT_ID" length="40"/>
<field name="codeQualite" column="COD_CPS" length="10"/>
<field name="libQualite" column="LIB_CPS" length="40"/>
<field name="temoinHDR" column="TEM_HAB_RCH_PER" length="1"/>
<field name="temoinRapport" column="TEM_RAP_RECU" length="1"/>
<field name="sourceInsertDate" type="datetime" column="SOURCE_INSERT_DATE"/>
</entity>
</doctrine-mapping>
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="ImportData\V2\Entity\Db\Doctorant" table="SYGAL_DOCTORANT_V2">
<id name="id" column="ID"/>
<field name="sourceCode" type="integer" column="SOURCE_CODE"/>
<field name="sourceId" column="SOURCE_ID" length="64"/>
<field name="individuId" column="INDIVIDU_ID"/>
<field name="ine" length="64" column="INE"/>
<field name="sourceInsertDate" type="datetime" column="SOURCE_INSERT_DATE"/>
</entity>
</doctrine-mapping>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="ImportData\V2\Entity\Db\EcoleDoctorale" table="SYGAL_ECOLE_DOCT_V2">
<id name="id" column="ID"/>
<field name="sourceCode" length="64" column="SOURCE_CODE"/>
<field name="sourceId" column="SOURCE_ID" length="64"/>
<field name="structureId" length="64" column="STRUCTURE_ID"/>
<field name="sourceInsertDate" type="datetime" column="SOURCE_INSERT_DATE"/>
</entity>
</doctrine-mapping>
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="ImportData\V2\Entity\Db\Etablissement" table="SYGAL_ETABLISSEMENT_V2">
<id name="id" column="ID"/>
<field name="sourceCode" length="64" column="SOURCE_CODE"/>
<field name="sourceId" column="SOURCE_ID" length="64"/>
<field name="structureId" length="64" column="STRUCTURE_ID"/>
<field name="sourceInsertDate" type="datetime" column="SOURCE_INSERT_DATE"/>
</entity>
</doctrine-mapping>
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="ImportData\V2\Entity\Db\Financement" table="SYGAL_FINANCEMENT_V2">
<id name="id" length="8" column="ID"/>
<field name="sourceCode" column="SOURCE_CODE" length="6"/>
<field name="sourceId" column="SOURCE_ID" length="64"/>
<field name="theseId" type="integer" column="THESE_ID"/>
<field name="annee" column="ANNEE_ID" length="8"/>
<field name="origineFinancementId" column="ORIGINE_FINANCEMENT_ID" length="8"/>
<field name="complementFinancement" column="COMPLEMENT_FINANCEMENT" length="40"/>
<field name="quotiteFinancement" type="integer" column="QUOTITE_FINANCEMENT"/>
<field name="dateDebutFinancement" type="datetime" column="DATE_DEBUT_FINANCEMENT"/>
<field name="dateFinFinancement" type="datetime" column="DATE_FIN_FINANCEMENT"/>
<field name="codeTypeFinancement" column="CODE_TYPE_FINANCEMENT"/>
<field name="libelleTypeFinancement" column="LIBELLE_TYPE_FINANCEMENT"/>
<field name="sourceInsertDate" type="datetime" column="SOURCE_INSERT_DATE"/>
</entity>
</doctrine-mapping>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment