- Equipment 관련 DTO 모델 생성 (Request/Response/List/History/In/Out/IO) - EquipmentRemoteDataSource 구현 (10개 API 엔드포인트) - EquipmentService 비즈니스 로직 구현 - Controller를 ChangeNotifier 패턴으로 개선 - 장비 목록 화면에 Provider 패턴 및 무한 스크롤 적용 - 장비 입고 화면 API 연동 및 비동기 처리 - DI 컨테이너에 Equipment 관련 의존성 등록 - API/Mock 데이터 소스 전환 가능 (Feature Flag) - API 통합 진행 상황 문서 업데이트
37 lines
1.0 KiB
Dart
37 lines
1.0 KiB
Dart
import 'package:freezed_annotation/freezed_annotation.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,
|
|
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);
|
|
} |