Proje: OkulUp API · Hub: OkulUp API — Domain

OkulUp API — Bildirim Sistemi

Mimarı

  • NotificationService: DB’ye bildirim yazar, kullanıcı tercihlerine göre filtreler
  • PushNotificationService: Firebase/APNs push gönderir
  • Queue Jobs: Bildirim gönderimi kuyruk üzerinden asenkron

NotificationType Enum (19 Tür)

announcement_published
message_received
assignment_published, assignment_submitted, assignment_reviewed, assignment_parent_submitted
payment_due, payment_overdue, payment_reminder
event_reminder
appointment_created, appointment_updated
attendance_alert
note_reminder
document_request_created, document_request_approved, document_request_rejected,
document_request_uploaded, document_request_completed

9 Mobil Kategori (Badge Grupları)

NotificationType::category() her türü şu gruplara eşler: announcement | message | assignment | payment | event | appointment | attendance | note | document_request

NotificationService::getUnreadCount(){ total: int, by_type: { kategori: count } } formatı döner.

Bildirim Tercihleri

Her kullanıcı notification_preferences tablosu üzerinden:

  • Tür bazlı açık/kapalı
  • Sessiz saat (quiet time) — bu saatte bildirim gönderilmez

NotificationService::shouldNotify() her bildirimden önce kontrol eder.

Unread Count Cache

  • Cache key: user:{userId}:unread_notifications
  • TTL: 30 saniye
  • Yeni bildirim oluşturulduğunda veya okunduğunda invalidate edilir

Queue Jobs

JobTetikleyici
SendAssignmentNotificationJobpublish, submit, review
SendAttendanceNotificationJobdevamsızlık kaydı
SendMessageNotificationJobyeni mesaj
SendPaymentReminderJobscheduled reminder
SendEnrollmentNotificationJobkayıt talebi onay/ret
SendDocumentRequestNotificationJobdoküman talebi durum değişikliği
SendNoteReminderJobnote.reminder_at geldiğinde
SendPushNotificationJobgenel push
CheckNotificationReceiptsJobpush delivery kontrolü