feat: migrate from Redis to SQLite for event handling and notifications

This commit is contained in:
Arunavo Ray
2025-05-20 19:09:48 +05:30
parent c179953649
commit 6d13ff29ca
17 changed files with 470 additions and 202 deletions

View File

@@ -140,3 +140,15 @@ export const organizationSchema = z.object({
});
export type Organization = z.infer<typeof organizationSchema>;
// Event schema (for SQLite-based pub/sub)
export const eventSchema = z.object({
id: z.string().uuid().optional(),
userId: z.string().uuid(),
channel: z.string().min(1),
payload: z.any(),
read: z.boolean().default(false),
createdAt: z.date().default(() => new Date()),
});
export type Event = z.infer<typeof eventSchema>;