import '../models/bo/inspection_room_bo.dart';
import '../repositories/inspection_room_repository.dart';

class InspectionRoomService {
  final InspectionRoomRepository _repository;

  InspectionRoomService({required InspectionRoomRepository repository})
      : _repository = repository;

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