Working on notification system.

This commit is contained in:
charlesgauthereau
2025-12-06 23:14:59 +01:00
parent 9458b12d69
commit fde7688485
64 changed files with 792 additions and 551 deletions
+11 -2
View File
@@ -1,9 +1,10 @@
import {boolean, jsonb, pgEnum, pgTable, primaryKey, unique, uuid, varchar} from "drizzle-orm/pg-core";
import {timestamps} from "@/db/schema/00_common";
import {organization} from "@/db/schema/03_organization";
import {MemberWithUser, Organization, organization} from "@/db/schema/03_organization";
import {relations} from "drizzle-orm";
import {createSelectSchema} from "drizzle-zod";
import {z} from "zod";
import {OrganizationInvitation} from "@/db/schema/05_invitation";
export const providerKindEnum = pgEnum('provider_kind', ['slack', 'smtp']);
@@ -47,4 +48,12 @@ export const organizationNotificationChannelRelations = relations(organizationNo
}));
export const notificationChannelSchema = createSelectSchema(notificationChannel);
export type NotificationChannel = z.infer<typeof notificationChannelSchema>;
export type NotificationChannel = z.infer<typeof notificationChannelSchema>;
export type NotificationChannelWith = NotificationChannel & {
organizations: {
organizationId: string;
notificationChannelId: string;
}[];
};