praktikum refinemend Plaetze pro Dienstelle und Pro Zeitraum

This commit is contained in:
titver968
2025-11-26 15:27:21 +01:00
parent be9228b71d
commit 89bf0298ce
40 changed files with 2932 additions and 1247 deletions

15
src/lib/prisma.ts Normal file
View File

@@ -0,0 +1,15 @@
import { PrismaClient } from '@prisma/client';
const globalForPrisma = globalThis as unknown as {
prisma: PrismaClient | undefined;
};
export const prisma =
globalForPrisma.prisma ??
new PrismaClient({
log: process.env.NODE_ENV !== 'production' ? ['query', 'error', 'warn'] : ['error'],
});
if (process.env.NODE_ENV !== 'production') {
globalForPrisma.prisma = prisma;
}