import '../models/bo/room_statistics_bo.dart';
import '../repositories/room_statistics_repository.dart';

class RoomStatisticsService {
  final RoomStatisticsRepository _repository;

  RoomStatisticsService({required RoomStatisticsRepository repository})
      : _repository = repository;

  Future<RoomStatisticsBO> getStatistics() async {
    final result = await _repository.getStatistics();
    if (result.success && result.data != null) {
      return result.data!;
    }
    throw Exception(result.msg);
  }
}
