192 lines
5.3 KiB
JSON
192 lines
5.3 KiB
JSON
{
|
|
"metadata": {
|
|
"version": "1.0",
|
|
"description": "Mapping campi tra sistema Gescon e NetGescon",
|
|
"updated": "2025-01-08"
|
|
},
|
|
"amministratori": {
|
|
"source_fields": {
|
|
"cf_amministratore": {
|
|
"target": "codice_fiscale",
|
|
"type": "string",
|
|
"length": 16,
|
|
"required": true,
|
|
"transformation": "uppercase",
|
|
"validation": "codice_fiscale_italiano"
|
|
},
|
|
"denominazione": {
|
|
"target": "denominazione",
|
|
"type": "string",
|
|
"length": 255,
|
|
"required": true,
|
|
"transformation": "trim"
|
|
},
|
|
"email": {
|
|
"target": "email",
|
|
"type": "email",
|
|
"length": 255,
|
|
"required": true,
|
|
"validation": "email_format"
|
|
},
|
|
"pec": {
|
|
"target": "pec",
|
|
"type": "email",
|
|
"length": 255,
|
|
"required": false,
|
|
"validation": "email_format"
|
|
},
|
|
"telefono": {
|
|
"target": "telefono",
|
|
"type": "string",
|
|
"length": 20,
|
|
"required": false,
|
|
"transformation": "normalize_phone"
|
|
},
|
|
"indirizzo": {
|
|
"target": "indirizzo",
|
|
"type": "string",
|
|
"length": 255,
|
|
"required": true,
|
|
"transformation": "title_case"
|
|
},
|
|
"cap": {
|
|
"target": "cap",
|
|
"type": "string",
|
|
"length": 5,
|
|
"required": true,
|
|
"validation": "cap_italiano"
|
|
},
|
|
"citta": {
|
|
"target": "citta",
|
|
"type": "string",
|
|
"length": 100,
|
|
"required": true,
|
|
"transformation": "title_case"
|
|
},
|
|
"provincia": {
|
|
"target": "provincia",
|
|
"type": "string",
|
|
"length": 2,
|
|
"required": true,
|
|
"transformation": "uppercase",
|
|
"validation": "provincia_italiana"
|
|
}
|
|
},
|
|
"calculated_fields": {
|
|
"codice_amministratore": {
|
|
"source": "cf_amministratore",
|
|
"transformation": "substring(0,8)",
|
|
"description": "Primi 8 caratteri del CF"
|
|
},
|
|
"password": {
|
|
"source": "generated",
|
|
"transformation": "random_secure_password(12)",
|
|
"description": "Password generata automaticamente"
|
|
},
|
|
"user_name": {
|
|
"source": [
|
|
"responsabile_nome",
|
|
"responsabile_cognome"
|
|
],
|
|
"transformation": "concat_with_space",
|
|
"description": "Nome completo per utente"
|
|
}
|
|
}
|
|
},
|
|
"stabili": {
|
|
"source_fields": {
|
|
"cod_stabile": {
|
|
"target": "codice_stabile_old",
|
|
"type": "string",
|
|
"length": 10,
|
|
"required": true,
|
|
"description": "Codice legacy per riferimento"
|
|
},
|
|
"denominazione": {
|
|
"target": "denominazione",
|
|
"type": "string",
|
|
"length": 255,
|
|
"required": true,
|
|
"transformation": "title_case"
|
|
},
|
|
"indirizzo": {
|
|
"target": "indirizzo",
|
|
"type": "string",
|
|
"length": 255,
|
|
"required": true,
|
|
"transformation": "title_case"
|
|
},
|
|
"codice_fisc": {
|
|
"target": "codice_fiscale",
|
|
"type": "string",
|
|
"length": 16,
|
|
"required": true,
|
|
"transformation": "uppercase",
|
|
"validation": "codice_fiscale_condominio"
|
|
},
|
|
"iban_bancario": {
|
|
"target": "iban_principale",
|
|
"type": "string",
|
|
"length": 27,
|
|
"required": false,
|
|
"transformation": "normalize_iban",
|
|
"validation": "iban_format"
|
|
},
|
|
"num_condomini": {
|
|
"target": "numero_unita",
|
|
"type": "integer",
|
|
"required": false,
|
|
"validation": "positive_number"
|
|
},
|
|
"cf_amministratore": {
|
|
"target": "amministratore_id",
|
|
"type": "reference",
|
|
"lookup_table": "amministratori",
|
|
"lookup_field": "codice_fiscale",
|
|
"required": true,
|
|
"description": "Collegamento via CF amministratore"
|
|
}
|
|
},
|
|
"calculated_fields": {
|
|
"comune_id": {
|
|
"source": [
|
|
"citta",
|
|
"provincia"
|
|
],
|
|
"transformation": "lookup_comune_italiano",
|
|
"description": "ID comune dalla tabella comuni_italiani"
|
|
},
|
|
"data_creazione": {
|
|
"source": "current_timestamp",
|
|
"transformation": "datetime_now",
|
|
"description": "Timestamp import"
|
|
}
|
|
}
|
|
},
|
|
"transformations": {
|
|
"uppercase": "Converte in maiuscolo",
|
|
"title_case": "Prima lettera maiuscola per ogni parola",
|
|
"trim": "Rimuove spazi iniziali e finali",
|
|
"normalize_phone": "Normalizza formato telefono (+39 xxx xxx xxxx)",
|
|
"normalize_iban": "Rimuove spazi e normalizza IBAN",
|
|
"substring": "Estrae sottostinga dalla posizione specificata",
|
|
"concat_with_space": "Concatena con spazio tra i valori",
|
|
"lookup_comune_italiano": "Trova ID comune da denominazione e provincia"
|
|
},
|
|
"validations": {
|
|
"codice_fiscale_italiano": "Controllo algoritmo CF italiano",
|
|
"email_format": "Controllo formato email valido",
|
|
"cap_italiano": "Controllo CAP 5 cifre",
|
|
"provincia_italiana": "Controllo sigla provincia esistente",
|
|
"iban_format": "Controllo formato IBAN europeo",
|
|
"positive_number": "Numero positivo maggiore di 0"
|
|
},
|
|
"references": {
|
|
"amministratori_stabili": {
|
|
"description": "Relazione amministratori → stabili",
|
|
"foreign_key": "cf_amministratore",
|
|
"primary_table": "amministratori",
|
|
"primary_key": "codice_fiscale"
|
|
}
|
|
}
|
|
} |