- V/R 시스템 완전 전환: WARRANTY/CONTRACT/INSPECTION → V(방문)/R(원격) - 유지보수 대시보드 카드 → StandardDataTable 테이블 형태 전환 - "조회중..." 문제 해결: 백엔드 직접 필드 사용 (equipment_model, company_name) - MaintenanceDto 신규 필드 추가: company_id, company_name, equipment_serial, equipment_model - preloadEquipmentData 비활성화로 불필요한 equipment-history API 호출 제거 - CO-STAR 프레임워크 적용 및 CLAUDE.md v3.0 업데이트 - Flutter Analyze ERROR: 0 유지, 100% shadcn_ui 컴플라이언스 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
35 lines
1.3 KiB
Dart
35 lines
1.3 KiB
Dart
import 'package:freezed_annotation/freezed_annotation.dart';
|
|
|
|
part 'stock_status_dto.freezed.dart';
|
|
part 'stock_status_dto.g.dart';
|
|
|
|
/// 재고 현황 DTO (백엔드 stock-status API 응답)
|
|
@freezed
|
|
class StockStatusDto with _$StockStatusDto {
|
|
const factory StockStatusDto({
|
|
// 백엔드 StockStatusResponse와 정확히 매핑
|
|
@JsonKey(name: 'equipment_id') required int equipmentId,
|
|
@JsonKey(name: 'warehouse_id') required int warehouseId,
|
|
@JsonKey(name: 'equipment_serial') required String equipmentSerial,
|
|
@JsonKey(name: 'model_name') String? modelName,
|
|
@JsonKey(name: 'warehouse_name') required String warehouseName,
|
|
@JsonKey(name: 'current_quantity') required int currentQuantity,
|
|
@JsonKey(name: 'last_transaction_date') DateTime? lastTransactionDate,
|
|
}) = _StockStatusDto;
|
|
|
|
factory StockStatusDto.fromJson(Map<String, dynamic> json) =>
|
|
_$StockStatusDtoFromJson(json);
|
|
}
|
|
|
|
/// 재고 현황 목록 응답 DTO
|
|
@freezed
|
|
class StockStatusListResponse with _$StockStatusListResponse {
|
|
const factory StockStatusListResponse({
|
|
required List<StockStatusDto> items,
|
|
}) = _StockStatusListResponse;
|
|
|
|
factory StockStatusListResponse.fromJson(List<dynamic> json) =>
|
|
StockStatusListResponse(
|
|
items: json.map((item) => StockStatusDto.fromJson(item)).toList(),
|
|
);
|
|
} |