Skip to content

Commit

Permalink
feat: user repository relations
Browse files Browse the repository at this point in the history
  • Loading branch information
supalarry committed Dec 11, 2023
1 parent 1802b25 commit 4a8f525
Showing 1 changed file with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down Expand Up @@ -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;
};

0 comments on commit 4a8f525

Please sign in to comment.