- 모든 서비스 메서드 시그니처를 실제 구현에 맞게 수정 - TestDataGenerator 제거하고 직접 객체 생성으로 변경 - 모델 필드명 및 타입 불일치 수정 - 불필요한 Either 패턴 사용 제거 - null safety 관련 이슈 해결 수정된 파일: - test/integration/screens/company_integration_test.dart - test/integration/screens/equipment_integration_test.dart - test/integration/screens/user_integration_test.dart - test/integration/screens/login_integration_test.dart
34 lines
1.3 KiB
Dart
34 lines
1.3 KiB
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'equipment_dto.freezed.dart';
|
|
part 'equipment_dto.g.dart';
|
|
|
|
@freezed
|
|
class EquipmentDto with _$EquipmentDto {
|
|
const factory EquipmentDto({
|
|
required int id,
|
|
@JsonKey(name: 'serial_number') required String serialNumber,
|
|
required String name,
|
|
String? category,
|
|
String? manufacturer,
|
|
String? model,
|
|
required String status,
|
|
@JsonKey(name: 'company_id') required int companyId,
|
|
@JsonKey(name: 'company_name') String? companyName,
|
|
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
|
|
@JsonKey(name: 'warehouse_name') String? warehouseName,
|
|
@JsonKey(name: 'purchase_date') String? purchaseDate,
|
|
@JsonKey(name: 'purchase_price') double? purchasePrice,
|
|
@JsonKey(name: 'current_value') double? currentValue,
|
|
@JsonKey(name: 'warranty_expiry') String? warrantyExpiry,
|
|
@JsonKey(name: 'last_maintenance_date') String? lastMaintenanceDate,
|
|
@JsonKey(name: 'next_maintenance_date') String? nextMaintenanceDate,
|
|
Map<String, dynamic>? specifications,
|
|
String? notes,
|
|
@JsonKey(name: 'created_at') DateTime? createdAt,
|
|
@JsonKey(name: 'updated_at') DateTime? updatedAt,
|
|
}) = _EquipmentDto;
|
|
|
|
factory EquipmentDto.fromJson(Map<String, dynamic> json) =>
|
|
_$EquipmentDtoFromJson(json);
|
|
} |