84bc330fa8
* feat: rename repository files to include Repository suffix - Rename apiKey.ts to apiKeyRepository.ts - Rename assignmentReason.ts to assignmentReasonRepository.ts - Update all import statements to use new file names Co-Authored-By: eunjae@cal.com <hey@eunjae.dev> * feat: rename repository files to PrismaRepository with Prisma prefix - Rename apiKeyRepository.ts to PrismaApiKeyRepository.ts - Rename assignmentReasonRepository.ts to PrismaAssignmentReasonRepository.ts - Update class names to PrismaApiKeyRepository and PrismaAssignmentReasonRepository - Update all import statements and usages across 3 files Co-Authored-By: eunjae@cal.com <hey@eunjae.dev> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
17 lines
355 B
TypeScript
17 lines
355 B
TypeScript
import prisma from "@calcom/prisma";
|
|
|
|
export class PrismaAssignmentReasonRepository {
|
|
static async findLatestReasonFromBookingUid(bookingUid: string) {
|
|
return await prisma.assignmentReason.findFirst({
|
|
where: {
|
|
booking: {
|
|
uid: bookingUid,
|
|
},
|
|
},
|
|
orderBy: {
|
|
createdAt: "desc",
|
|
},
|
|
});
|
|
}
|
|
}
|