import '../utils/http/response_model.dart';
import '../utils/http/dio_request.dart';
import '../models/bo/inspection_history_bo.dart';

class InspectionHistoryRepository {
  Future<ResponseModel<InspectionHistoryListBO>> getList({
    required int pageSize,
    required int pageNum,
    required int deviceId,
  }) {
    return DioRequest.instance.get<InspectionHistoryListBO>(
      '/app/device/inspection/list',
      queryParameters: {
        'pageSize': pageSize,
        'pageNum': pageNum,
        'deviceId': deviceId,
      },
      fromJsonT: (data) =>
          InspectionHistoryListBO.fromJson(data as Map<String, dynamic>),
    );
  }
}