This commit is contained in:
Phuoc Nguyen
2025-11-03 15:02:33 +07:00
parent 56c470baa1
commit aa3a52bba7
17 changed files with 1393 additions and 345 deletions

View File

@@ -0,0 +1,32 @@
/// Notification Repository Interface
///
/// Defines operations for managing notifications.
library;
import 'package:worker/features/notifications/domain/entities/notification.dart';
/// Notification Repository
///
/// Provides methods to:
/// - Fetch notifications (all, by category, unread)
/// - Mark notifications as read
/// - Get notification counts
abstract class NotificationRepository {
/// Get all notifications
Future<List<Notification>> getAllNotifications();
/// Get notifications by category (general or order)
Future<List<Notification>> getNotificationsByCategory(String category);
/// Get unread notifications count
Future<int> getUnreadCount();
/// Mark notification as read
Future<void> markAsRead(String notificationId);
/// Mark all notifications as read
Future<void> markAllAsRead();
/// Refresh notifications (fetch from server)
Future<List<Notification>> refreshNotifications();
}