CREATE TABLE `materialReturnFollowups` (
  `id` int AUTO_INCREMENT NOT NULL,
  `requestId` int NOT NULL,
  `associationId` int NOT NULL,
  `serviceLabel` varchar(255),
  `recipientEmails` text,
  `restitutionDate` timestamp NOT NULL,
  `plannedSendAt` timestamp NOT NULL,
  `sentAt` timestamp,
  `status` enum('planifie','en_attente','en_cours','cloture') NOT NULL DEFAULT 'planifie',
  `uploadToken` varchar(96) NOT NULL,
  `uploadTokenExpiresAt` timestamp NOT NULL,
  `signedFileKey` varchar(512),
  `signedFileUrl` varchar(1024),
  `signedFileName` varchar(255),
  `signedMimeType` varchar(100),
  `uploadedByName` varchar(255),
  `uploadedByEmail` varchar(320),
  `uploadedAt` timestamp,
  `closedAt` timestamp,
  `lastReminderSentAt` timestamp,
  `createdAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedAt` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  CONSTRAINT `materialReturnFollowups_id` PRIMARY KEY(`id`),
  CONSTRAINT `materialReturnFollowups_requestId_unique` UNIQUE(`requestId`),
  CONSTRAINT `materialReturnFollowups_uploadToken_unique` UNIQUE(`uploadToken`)
);
