refactor: convert BookingRepository to use dependency injection pattern (#22389)
* refactor: convert BookingRepository to use dependency injection pattern - Add constructor injection for PrismaClient to BookingRepository - Convert all static methods to instance methods using this.prismaClient - Update all usage sites to use two-step instantiation pattern: const bookingRepo = new BookingRepository(prisma); bookingRepo.method(...) - Apply same dependency injection pattern as UserRepository, TeamRepository, and SelectedSlotsRepository - Update test files to use correct prismaMock import paths - Maintain all existing functionality and type safety Files updated: - BookingRepository class structure and all 15 static methods - Video meeting pages and booking views - Booking utilities and services (handleNewBooking, originalRescheduledBookingUtils) - Round robin handlers and reassignment logic - Interval limits and booking limits checking - Test files with proper mocking setup Co-Authored-By: [email protected] <[email protected]> * chore: bump platform libs --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]>
This commit is contained in:
1 parent
80ac118242
commit
c316721051
21 files changed
+124
-88
No files matched your search
@@ -38,7 +38,7 @@
|
||||
"@axiomhq/winston": "^1.2.0",
|
||||
"@calcom/platform-constants": "*",
|
||||
"@calcom/platform-enums": "*",
|
||||
"@calcom/platform-libraries": "npm:@calcom/[email protected]5",
|
||||
"@calcom/platform-libraries": "npm:@calcom/[email protected]6",
|
||||
"@calcom/platform-types": "*",
|
||||
"@calcom/platform-utils": "*",
|
||||
"@calcom/prisma": "*",
|
||||
|
||||
Reference in new issue
Block a user