Checkpoint: Ajout de l'onglet "Signatures" dans la page Paramètres : table DB signatures (firstName, lastName, imageKey, imageUrl), migration appliquée, routes tRPC (list, upload, create, delete), composant SignaturesSection avec formulaire d'ajout (prénom+nom+upload image), grille d'affichage des signatures avec aperçu, bouton de suppression au survol
This commit is contained in:
11
drizzle/0013_absent_santa_claus.sql
Normal file
11
drizzle/0013_absent_santa_claus.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE `signatures` (
|
||||
`id` int AUTO_INCREMENT NOT NULL,
|
||||
`userId` int NOT NULL,
|
||||
`firstName` varchar(100) NOT NULL,
|
||||
`lastName` varchar(100) NOT NULL,
|
||||
`imageKey` text NOT NULL,
|
||||
`imageUrl` text NOT NULL,
|
||||
`createdAt` timestamp NOT NULL DEFAULT (now()),
|
||||
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
|
||||
CONSTRAINT `signatures_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
1379
drizzle/meta/0013_snapshot.json
Normal file
1379
drizzle/meta/0013_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -92,6 +92,13 @@
|
||||
"when": 1772788503373,
|
||||
"tag": "0012_left_madame_web",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 13,
|
||||
"version": "5",
|
||||
"when": 1773528566252,
|
||||
"tag": "0013_absent_santa_claus",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -306,3 +306,20 @@ export const llmFieldsConfig = mysqlTable("llmFieldsConfig", {
|
||||
|
||||
export type LlmFieldConfig = typeof llmFieldsConfig.$inferSelect;
|
||||
export type InsertLlmFieldConfig = typeof llmFieldsConfig.$inferInsert;
|
||||
|
||||
/**
|
||||
* Signatures table storing user signature images with first/last name
|
||||
*/
|
||||
export const signatures = mysqlTable("signatures", {
|
||||
id: int("id").autoincrement().primaryKey(),
|
||||
userId: int("userId").notNull(),
|
||||
firstName: varchar("firstName", { length: 100 }).notNull(),
|
||||
lastName: varchar("lastName", { length: 100 }).notNull(),
|
||||
imageKey: text("imageKey").notNull(), // Local storage key
|
||||
imageUrl: text("imageUrl").notNull(), // Public URL to the signature image
|
||||
createdAt: timestamp("createdAt").defaultNow().notNull(),
|
||||
updatedAt: timestamp("updatedAt").defaultNow().onUpdateNow().notNull(),
|
||||
});
|
||||
|
||||
export type Signature = typeof signatures.$inferSelect;
|
||||
export type InsertSignature = typeof signatures.$inferInsert;
|
||||
|
||||
Reference in New Issue
Block a user