Files
demat-facturation/drizzle/0029_unknown_spot.sql
Manus e32d540bc9 Checkpoint: Ajout de l'onglet "Paramétrage" dans la page Ventilation FreePro :
- Table DB freeproSettings (URL portail, credentials, fréquence, date antériorité, statut dernière récupération)
- Service freeproAutoImport.ts : connexion HTTP au portail FreePro, téléchargement CSV, pipeline d'import
- Procédures tRPC : getSettings, saveSettings, testConnection, forceImport
- Job périodique en mémoire (daily/weekly/monthly) via setInterval
- Frontend : wrapper Tabs (onglet 1 = Import & Historique, onglet 2 = Paramétrage)
- Onglet Paramétrage : credentials, fréquence, date antériorité, bouton "Forcer récupération", statut
- Tests unitaires : 8 tests passés
2026-06-08 09:24:05 -04:00

18 lines
677 B
SQL

CREATE TABLE `freeproSettings` (
`id` int AUTO_INCREMENT NOT NULL,
`userId` int NOT NULL,
`portalUrl` varchar(255) NOT NULL DEFAULT 'https://pro.free.fr',
`loginEmail` varchar(320),
`loginPassword` text,
`frequency` enum('manual','daily','weekly','monthly') NOT NULL DEFAULT 'manual',
`maxAnteriority` int,
`autoEnabled` int NOT NULL DEFAULT 0,
`lastSuccessAt` timestamp,
`lastStatus` text,
`lastImportCount` int DEFAULT 0,
`createdAt` timestamp NOT NULL DEFAULT (now()),
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
CONSTRAINT `freeproSettings_id` PRIMARY KEY(`id`),
CONSTRAINT `freeproSettings_userId_unique` UNIQUE(`userId`)
);