feat: user repository relations

This commit is contained in:
supalarry 2023-12-11 11:04:34 +01:00
parent 1802b256b5
commit 4a8f52583d

View File

@ -2,33 +2,6 @@ import { PrismaReadService } from "@/modules/prisma/prisma-read.service";
import { Injectable } from "@nestjs/common";
import type { User } from "@prisma/client";
type UserRelations = {
eventTypes?: boolean;
credentials?: boolean;
teams?: boolean;
bookings?: boolean;
schedules?: boolean;
selectedCalendars?: boolean;
availability?: boolean;
webhooks?: boolean;
destinationCalendar?: boolean;
metadata?: boolean;
impersonatedUsers?: boolean;
impersonatedBy?: boolean;
apiKeys?: boolean;
accounts?: boolean;
sessions?: boolean;
Feedback?: boolean;
ownedEventTypes?: boolean;
workflows?: boolean;
routingForms?: boolean;
verifiedNumbers?: boolean;
hosts?: boolean;
organization?: boolean;
accessCodes?: boolean;
platformOAuthClients?: boolean;
};
@Injectable()
export class UserRepository {
constructor(private readonly dbRead: PrismaReadService) {}
@ -58,3 +31,30 @@ export class UserRepository {
return Object.fromEntries(Object.entries(user).filter(([key]) => !keys.includes(key as keyof User)));
}
}
type UserRelations = {
eventTypes?: boolean;
credentials?: boolean;
teams?: boolean;
bookings?: boolean;
schedules?: boolean;
selectedCalendars?: boolean;
availability?: boolean;
webhooks?: boolean;
destinationCalendar?: boolean;
metadata?: boolean;
impersonatedUsers?: boolean;
impersonatedBy?: boolean;
apiKeys?: boolean;
accounts?: boolean;
sessions?: boolean;
Feedback?: boolean;
ownedEventTypes?: boolean;
workflows?: boolean;
routingForms?: boolean;
verifiedNumbers?: boolean;
hosts?: boolean;
organization?: boolean;
accessCodes?: boolean;
platformOAuthClients?: boolean;
};