feat: added prisma schema for user history
This commit is contained in:
@@ -83,6 +83,23 @@ model User {
|
|||||||
displayName String?
|
displayName String?
|
||||||
email String?
|
email String?
|
||||||
photoURL 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 {
|
enum TeamMemberRole {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common';
|
import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common';
|
||||||
import { PrismaClient } from '@prisma/client/scripts/default-index';
|
import { PrismaClient } from '@prisma/client';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class PrismaService
|
export class PrismaService
|
||||||
|
|||||||
Reference in New Issue
Block a user