주요 변경사항: - 창고 관리 API 응답 구조와 DTO 불일치 수정 - WarehouseLocationDto에 code, manager_phone 필드 추가 - RemoteDataSource에서 API 응답을 DTO 구조에 맞게 변환 - 회사 관리 API 응답 파싱 오류 수정 - CompanyResponse의 필수 필드를 nullable로 변경 - PaginatedResponse 구조 매핑 로직 개선 - 에러 처리 및 로깅 개선 - Service Layer에 상세 에러 로깅 추가 - Controller에서 에러 타입별 처리 - 새로운 유틸리티 추가 - ResponseInterceptor: API 응답 정규화 - DebugLogger: 디버깅 도구 - HealthCheckService: 서버 상태 확인 - 문서화 - API 통합 테스트 가이드 - 에러 분석 보고서 - 리팩토링 계획서
38 lines
1.1 KiB
Dart
38 lines
1.1 KiB
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
import 'package:superport/core/utils/equipment_status_converter.dart';
|
|
|
|
part 'equipment_response.freezed.dart';
|
|
part 'equipment_response.g.dart';
|
|
|
|
@freezed
|
|
class EquipmentResponse with _$EquipmentResponse {
|
|
const factory EquipmentResponse({
|
|
required int id,
|
|
required String equipmentNumber,
|
|
String? category1,
|
|
String? category2,
|
|
String? category3,
|
|
required String manufacturer,
|
|
String? modelName,
|
|
String? serialNumber,
|
|
String? barcode,
|
|
DateTime? purchaseDate,
|
|
double? purchasePrice,
|
|
@EquipmentStatusJsonConverter() required String status,
|
|
int? currentCompanyId,
|
|
int? currentBranchId,
|
|
int? warehouseLocationId,
|
|
DateTime? lastInspectionDate,
|
|
DateTime? nextInspectionDate,
|
|
String? remark,
|
|
required DateTime createdAt,
|
|
required DateTime updatedAt,
|
|
// 추가 필드 (조인된 데이터)
|
|
String? companyName,
|
|
String? branchName,
|
|
String? warehouseName,
|
|
}) = _EquipmentResponse;
|
|
|
|
factory EquipmentResponse.fromJson(Map<String, dynamic> json) =>
|
|
_$EquipmentResponseFromJson(json);
|
|
} |