mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
* fix: sms reminder issue with seated event * fix seated event and workflow issue * fix whatsapp reminder * Refactor imports in reminderScheduler.ts * use repository
43 lines
894 B
TypeScript
43 lines
894 B
TypeScript
import type { PrismaClient } from "@calcom/prisma";
|
|
|
|
export class BookingSeatRepository {
|
|
constructor(private prismaClient: PrismaClient) {}
|
|
|
|
getByUidIncludeAttendee(uid: string) {
|
|
return this.prismaClient.bookingSeat.findUnique({
|
|
where: {
|
|
referenceUid: uid,
|
|
},
|
|
select: {
|
|
attendee: {
|
|
select: {
|
|
email: true,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
}
|
|
|
|
getByReferenceUidWithAttendeeDetails(referenceUid: string) {
|
|
return this.prismaClient.bookingSeat.findUnique({
|
|
where: {
|
|
referenceUid,
|
|
},
|
|
select: {
|
|
attendee: {
|
|
select: {
|
|
name: true,
|
|
id: true,
|
|
bookingId: true,
|
|
noShow: true,
|
|
phoneNumber: true,
|
|
email: true,
|
|
locale: true,
|
|
timeZone: true,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
}
|
|
}
|