251208:0010 Backend & Frontend Debug
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled

This commit is contained in:
2025-12-08 00:10:37 +07:00
parent 32d820ea6b
commit dcd126d704
99 changed files with 2775 additions and 1480 deletions
@@ -130,6 +130,15 @@ export class NotificationService {
};
}
/**
* ดึงจำนวน Notification ที่ยังไม่ได้อ่าน
*/
async getUnreadCount(userId: number): Promise<number> {
return this.notificationRepo.count({
where: { userId, isRead: false },
});
}
async markAsRead(id: number, userId: number): Promise<void> {
const notification = await this.notificationRepo.findOne({
where: { id, userId },