Checkpoint: Ajout de la page de gestion des flux RSS : liste des flux, formulaire d'ajout/édition avec type (Veille/AAP), type par défaut, règles d'automatisme par mots-clés, paramètres de fréquence (heure fixe ou intervalle), activation/désactivation. Tables BDD rss_feeds et rss_settings. Procédures tRPC complètes. Navigation sidebar mise à jour.

This commit is contained in:
Manus
2026-04-25 16:44:09 -04:00
parent 4a17eaa04a
commit c3e1720e83
11 changed files with 1958 additions and 5 deletions

View File

@@ -0,0 +1,26 @@
CREATE TABLE `rss_feeds` (
`id` int AUTO_INCREMENT NOT NULL,
`url` text NOT NULL,
`name` varchar(255) NOT NULL,
`feedType` enum('veille','aap') NOT NULL,
`defaultTypeVeille` enum('reglementaire','concurrentielle','technologique','generale'),
`defaultCategorieAap` enum('Handicap','PA','Enfance','Précarité','Sanitaire','Autre'),
`autoRules` json,
`isActive` boolean NOT NULL DEFAULT true,
`lastFetchedAt` timestamp,
`lastFetchStatus` enum('ok','error','pending') DEFAULT 'pending',
`lastFetchError` text,
`createdAt` timestamp NOT NULL DEFAULT (now()),
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
CONSTRAINT `rss_feeds_id` PRIMARY KEY(`id`)
);
--> statement-breakpoint
CREATE TABLE `rss_settings` (
`id` int AUTO_INCREMENT NOT NULL,
`fetchIntervalMinutes` int NOT NULL DEFAULT 360,
`scheduledTime` varchar(5) DEFAULT '06:00',
`fetchMode` enum('interval','scheduled') NOT NULL DEFAULT 'scheduled',
`autoFetchEnabled` boolean NOT NULL DEFAULT true,
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
CONSTRAINT `rss_settings_id` PRIMARY KEY(`id`)
);