23 lines
646 B
Dart
23 lines
646 B
Dart
import '../entities/client_notification.dart';
|
|
import '../entities/pagination_meta.dart';
|
|
import '../repositories/notification_repository.dart';
|
|
|
|
class GetNotificationsUsecase {
|
|
final NotificationRepository repository;
|
|
|
|
GetNotificationsUsecase(this.repository);
|
|
|
|
Future<NotificationsResult> call({int page = 1, int pageSize = 10}) {
|
|
return repository.getNotifications(page: page, pageSize: pageSize);
|
|
}
|
|
}
|
|
|
|
class NotificationsResult {
|
|
final List<ClientNotification> notifications;
|
|
final PaginationMeta pagination;
|
|
|
|
NotificationsResult({
|
|
required this.notifications,
|
|
required this.pagination,
|
|
});
|
|
} |