Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
feat: added prisma schema for user history
ankitsridhar16d066b9c9136d
diff --git a/packages/hoppscotch-backend/prisma/schema.prisma b/packages/hoppscotch-backend/prisma/schema.prismaindex 947d158a8..2fc841fff 100644--- a/packages/hoppscotch-backend/prisma/schema.prisma+++ b/packages/hoppscotch-backend/prisma/schema.prisma@@ -79,10 +79,27 @@ model TeamEnvironment {}model User {- uid String @id @default(cuid())- displayName String?- email String?- photoURL String?+ uid String @id @default(cuid())+ displayName String?+ email String?+ photoURL String?+ UserHistory UserHistory[]+}++model UserHistory {+ id String @id @default(cuid())+ userUid String+ user User @relation(fields: [userUid], references: [uid], onDelete: Cascade)+ type ReqType+ request Json+ responseMetadata Json+ isStarred Boolean+ executedOn DateTime @default(now())+}++enum ReqType {+ REST+ GQL}enum TeamMemberRole {diff --git a/packages/hoppscotch-backend/src/prisma/prisma.service.ts b/packages/hoppscotch-backend/src/prisma/prisma.service.tsindex 5b962c430..8febf1b5b 100644--- a/packages/hoppscotch-backend/src/prisma/prisma.service.ts+++ b/packages/hoppscotch-backend/src/prisma/prisma.service.ts@@ -1,5 +1,5 @@import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common';-import { PrismaClient } from '@prisma/client/scripts/default-index';+import { PrismaClient } from '@prisma/client';@Injectable()export class PrismaService