feat: Equipment DTO 호환성 수정 전 백업 커밋
- Equipment DTO 필드명 변경 (name → equipment_number 등) 완료 - Phase 1-7 파생 수정사항 체계적 진행 예정 - 통합 모델 정리, Controller 동기화, UI 업데이트 예정 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -26,6 +26,15 @@ class Equipment {
|
||||
final DateTime? nextInspectionDate; // 다음 점검일
|
||||
final String? equipmentStatus; // 장비 상태
|
||||
|
||||
// 새로운 백엔드 API 필드들 (컨트롤러 호환성용)
|
||||
final String? equipmentNumber; // 장비 번호
|
||||
final String? modelName; // 모델명 (name과 동일하지만 명확성을 위해)
|
||||
final String? category1; // 대분류 (category와 매핑)
|
||||
final String? category2; // 중분류 (subCategory와 매핑)
|
||||
final String? category3; // 소분류 (subSubCategory와 매핑)
|
||||
final int? companyId; // 구매처 회사 ID
|
||||
final DateTime? purchaseDate; // 구매일
|
||||
|
||||
Equipment({
|
||||
this.id,
|
||||
required this.manufacturer,
|
||||
@@ -49,6 +58,14 @@ class Equipment {
|
||||
this.lastInspectionDate,
|
||||
this.nextInspectionDate,
|
||||
this.equipmentStatus,
|
||||
// 백엔드 API 호환성 필드들
|
||||
this.equipmentNumber,
|
||||
this.modelName,
|
||||
this.category1,
|
||||
this.category2,
|
||||
this.category3,
|
||||
this.companyId,
|
||||
this.purchaseDate,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -75,6 +92,14 @@ class Equipment {
|
||||
'lastInspectionDate': lastInspectionDate?.toIso8601String(),
|
||||
'nextInspectionDate': nextInspectionDate?.toIso8601String(),
|
||||
'equipmentStatus': equipmentStatus,
|
||||
// 백엔드 API 호환성 필드들
|
||||
'equipmentNumber': equipmentNumber,
|
||||
'modelName': modelName,
|
||||
'category1': category1,
|
||||
'category2': category2,
|
||||
'category3': category3,
|
||||
'companyId': companyId,
|
||||
'purchaseDate': purchaseDate?.toIso8601String(),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -112,6 +137,16 @@ class Equipment {
|
||||
? DateTime.parse(json['nextInspectionDate'])
|
||||
: null,
|
||||
equipmentStatus: json['equipmentStatus'],
|
||||
// 백엔드 API 호환성 필드들
|
||||
equipmentNumber: json['equipmentNumber'],
|
||||
modelName: json['modelName'],
|
||||
category1: json['category1'],
|
||||
category2: json['category2'],
|
||||
category3: json['category3'],
|
||||
companyId: json['companyId'],
|
||||
purchaseDate: json['purchaseDate'] != null
|
||||
? DateTime.parse(json['purchaseDate'])
|
||||
: null,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user