Checkpoint: Boîte à idées : table BDD, API tRPC (créer, lister, répondre, changer statut), page avec liste filtrée par statut et recherche, bouton Nouvelle demande, réponse admin avec statut colorisé, menu dans la sidebar

This commit is contained in:
Manus
2026-04-17 10:57:07 -04:00
parent b36a049ca5
commit 535dd19188
11 changed files with 1311 additions and 0 deletions

View File

@@ -115,3 +115,22 @@ export const importLogs = mysqlTable("import_logs", {
export type ImportLog = typeof importLogs.$inferSelect;
export type InsertImportLog = typeof importLogs.$inferInsert;
// ─── Boîte à idées ───────────────────────────────────────────────────────────
export const ideas = mysqlTable("ideas", {
id: int("id").autoincrement().primaryKey(),
userId: int("userId").notNull(),
userName: varchar("userName", { length: 255 }).notNull(),
titre: varchar("titre", { length: 512 }).notNull(),
message: text("message").notNull(),
statut: mysqlEnum("statut", ["ouvert", "en_cours", "resolu", "ferme"]).default("ouvert").notNull(),
reponseAdmin: text("reponseAdmin"),
reponduPar: varchar("reponduPar", { length: 255 }),
reponduAt: timestamp("reponduAt"),
createdAt: timestamp("createdAt").defaultNow().notNull(),
updatedAt: timestamp("updatedAt").defaultNow().onUpdateNow().notNull(),
});
export type Idea = typeof ideas.$inferSelect;
export type InsertIdea = typeof ideas.$inferInsert;