feature test su institution
This commit is contained in:
31
backend/app/Etl/Contracts/Importer.php
Normal file
31
backend/app/Etl/Contracts/Importer.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Etl\Contracts;
|
||||
|
||||
use App\Etl\ImportSummary;
|
||||
|
||||
/**
|
||||
* Un importer ETL trasforma una porzione del DB legacy (v1) nello schema v2.
|
||||
*
|
||||
* Contratto comune a tutti gli importer (institutions, poi artifacts, ...): il
|
||||
* comando `v1:import` li orchestra in ordine di dipendenza. Ogni import deve
|
||||
* essere IDEMPOTENTE (upsert su `legacy_id`) e leggere SOLO dalla connessione
|
||||
* `legacy`, scrivere SOLO sulla connessione di default (v2).
|
||||
*/
|
||||
interface Importer
|
||||
{
|
||||
/**
|
||||
* Chiave breve per il filtro `--only` (es. "institutions").
|
||||
*/
|
||||
public function key(): string;
|
||||
|
||||
/**
|
||||
* Etichetta leggibile per l'output del comando.
|
||||
*/
|
||||
public function label(): string;
|
||||
|
||||
/**
|
||||
* Esegue l'import. In dry-run non scrive nulla, ma calcola comunque i conteggi.
|
||||
*/
|
||||
public function import(bool $dryRun): ImportSummary;
|
||||
}
|
||||
Reference in New Issue
Block a user