formated project with prettier
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export { prisma } from './prisma/client'; // exports instance of prisma
|
||||
export * from './generated/client'; // exports generated types from prisma
|
||||
export { prisma } from "./prisma/client"; // exports instance of prisma
|
||||
export * from "./generated/client"; // exports generated types from prisma
|
||||
|
||||
import * as zodTypes from './generated/zod';
|
||||
import * as zodTypes from "./generated/zod";
|
||||
|
||||
export const zod = zodTypes;
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
{
|
||||
"name": "@repo/db",
|
||||
"version": "0.0.0",
|
||||
"description": "VAR Databse package",
|
||||
"main": "generated/client/index.js",
|
||||
"types": "generated/client/index.d.ts",
|
||||
"scripts": {
|
||||
"db:generate": "npx prisma generate && npx prisma generate zod",
|
||||
"db:migrate": "npx prisma migrate dev",
|
||||
"db:deploy": "npx prisma migrate deploy"
|
||||
},
|
||||
"exports": {
|
||||
".": "./index.ts",
|
||||
"./zod": "./zod.ts"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@prisma/client": "^6.4.0",
|
||||
"zod-prisma-types": "^3.2.4"
|
||||
}
|
||||
"name": "@repo/db",
|
||||
"version": "0.0.0",
|
||||
"description": "VAR Databse package",
|
||||
"main": "generated/client/index.js",
|
||||
"types": "generated/client/index.d.ts",
|
||||
"scripts": {
|
||||
"db:generate": "npx prisma generate && npx prisma generate zod",
|
||||
"db:migrate": "npx prisma migrate dev",
|
||||
"db:deploy": "npx prisma migrate deploy"
|
||||
},
|
||||
"exports": {
|
||||
".": "./index.ts",
|
||||
"./zod": "./zod.ts"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@prisma/client": "^6.4.0",
|
||||
"zod-prisma-types": "^3.2.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { PrismaClient } from '../generated/client';
|
||||
import { PrismaClient } from "../generated/client";
|
||||
|
||||
const globalForPrisma = global as unknown as { prisma: PrismaClient };
|
||||
|
||||
export const prisma = globalForPrisma.prisma || new PrismaClient();
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
|
||||
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
|
||||
|
||||
@@ -17,7 +17,6 @@ model Account {
|
||||
@@map(name: "accounts")
|
||||
}
|
||||
|
||||
|
||||
model Session {
|
||||
id Int @id @default(autoincrement())
|
||||
userId Int @map(name: "user_id")
|
||||
|
||||
@@ -24,6 +24,7 @@ model User {
|
||||
email String @unique
|
||||
password String
|
||||
vatsimCid Int? @map(name: "vatsim_cid")
|
||||
moodleId Int? @map(name: "moodle_id")
|
||||
emailVerified DateTime? @map(name: "email_verified")
|
||||
image String?
|
||||
badges BADGES[] @default([])
|
||||
|
||||
@@ -1 +1 @@
|
||||
export * from './generated/zod';
|
||||
export * from "./generated/zod";
|
||||
|
||||
Reference in New Issue
Block a user