feat: 支持管理员消息推送

This commit is contained in:
richarjiang
2026-04-12 22:18:34 +08:00
parent c60821c5ff
commit 6cee28bf66
26 changed files with 780 additions and 161 deletions

View File

@@ -32,7 +32,7 @@ export class TimeSlotService {
createdAt: Date
updatedAt: Date
},
myBooking: { id: string } | null,
myBooking: { id: string; status: string } | null,
): TimeSlotWithBookingStatus {
return {
id: slot.id,
@@ -48,6 +48,7 @@ export class TimeSlotService {
updatedAt: slot.updatedAt.toISOString(),
isBookedByMe: myBooking !== null,
myBookingId: myBooking?.id ?? null,
myBookingStatus: (myBooking?.status as BookingStatus | undefined) ?? null,
}
}
@@ -71,9 +72,9 @@ export class TimeSlotService {
? {
where: {
userId,
status: BookingStatus.CONFIRMED,
status: { in: [BookingStatus.PENDING_CONFIRMATION, BookingStatus.CONFIRMED] },
},
select: { id: true },
select: { id: true, status: true },
}
: false,
},
@@ -97,9 +98,9 @@ export class TimeSlotService {
? {
where: {
userId,
status: BookingStatus.CONFIRMED,
status: { in: [BookingStatus.PENDING_CONFIRMATION, BookingStatus.CONFIRMED] },
},
select: { id: true },
select: { id: true, status: true },
}
: false,
},