初始化项目

This commit is contained in:
wmp
2025-09-13 14:00:56 +08:00
commit f1fa28401e
61 changed files with 4710 additions and 0 deletions

16
prisma/prisma.config.ts Normal file
View File

@@ -0,0 +1,16 @@
import { PrismaClient } from '@prisma/client'
declare global {
var cachedPrisma: PrismaClient
}
export let prisma: PrismaClient
if (process.env.NODE_ENV === 'production') {
prisma = new PrismaClient()
} else {
if (!global.cachedPrisma) {
global.cachedPrisma = new PrismaClient()
}
prisma = global.cachedPrisma
}