feat: 소프트 딜리트 기능 전면 구현 완료
Some checks failed
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled
Flutter Test & Quality Check / Build APK (push) Has been cancelled

## 주요 변경사항
- Company, Equipment, License, Warehouse Location 모든 화면에 소프트 딜리트 구현
- 관리자 권한으로 삭제된 데이터 조회 가능 (includeInactive 파라미터)
- 데이터 무결성 보장을 위한 논리 삭제 시스템 완성

## 기능 개선
- 각 리스트 컨트롤러에 toggleIncludeInactive() 메서드 추가
- UI에 "비활성 포함" 체크박스 추가 (관리자 전용)
- API 데이터소스에 includeInactive 파라미터 지원

## 문서 정리
- 불필요한 문서 파일 제거 및 재구성
- CLAUDE.md 프로젝트 상태 업데이트 (진행률 80%)
- 테스트 결과 문서화 (test20250812v01.md)

## UI 컴포넌트
- Equipment 화면 위젯 모듈화 (custom_dropdown_field, equipment_basic_info_section)
- 폼 유효성 검증 강화

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
JiWoong Sul
2025-08-12 20:02:54 +09:00
parent 1645182b38
commit e7860ae028
48 changed files with 2096 additions and 1242 deletions

View File

@@ -7,15 +7,15 @@ part 'equipment_request.g.dart';
@freezed
class CreateEquipmentRequest with _$CreateEquipmentRequest {
const factory CreateEquipmentRequest({
required String equipmentNumber,
@JsonKey(name: 'equipment_number') required String equipmentNumber,
String? category1,
String? category2,
String? category3,
required String manufacturer,
String? modelName,
String? serialNumber,
DateTime? purchaseDate,
double? purchasePrice,
@JsonKey(name: 'model_name') String? modelName,
@JsonKey(name: 'serial_number') String? serialNumber,
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') double? purchasePrice,
String? remark,
}) = _CreateEquipmentRequest;
@@ -30,17 +30,17 @@ class UpdateEquipmentRequest with _$UpdateEquipmentRequest {
String? category2,
String? category3,
String? manufacturer,
String? modelName,
String? serialNumber,
@JsonKey(name: 'model_name') String? modelName,
@JsonKey(name: 'serial_number') String? serialNumber,
String? barcode,
DateTime? purchaseDate,
double? purchasePrice,
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') double? purchasePrice,
@EquipmentStatusJsonConverter() String? status,
int? currentCompanyId,
int? currentBranchId,
int? warehouseLocationId,
DateTime? lastInspectionDate,
DateTime? nextInspectionDate,
@JsonKey(name: 'current_company_id') int? currentCompanyId,
@JsonKey(name: 'current_branch_id') int? currentBranchId,
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date') DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') DateTime? nextInspectionDate,
String? remark,
}) = _UpdateEquipmentRequest;

View File

@@ -21,14 +21,19 @@ CreateEquipmentRequest _$CreateEquipmentRequestFromJson(
/// @nodoc
mixin _$CreateEquipmentRequest {
@JsonKey(name: 'equipment_number')
String get equipmentNumber => throw _privateConstructorUsedError;
String? get category1 => throw _privateConstructorUsedError;
String? get category2 => throw _privateConstructorUsedError;
String? get category3 => throw _privateConstructorUsedError;
String get manufacturer => throw _privateConstructorUsedError;
@JsonKey(name: 'model_name')
String? get modelName => throw _privateConstructorUsedError;
@JsonKey(name: 'serial_number')
String? get serialNumber => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_date')
DateTime? get purchaseDate => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_price')
double? get purchasePrice => throw _privateConstructorUsedError;
String? get remark => throw _privateConstructorUsedError;
@@ -49,15 +54,15 @@ abstract class $CreateEquipmentRequestCopyWith<$Res> {
_$CreateEquipmentRequestCopyWithImpl<$Res, CreateEquipmentRequest>;
@useResult
$Res call(
{String equipmentNumber,
{@JsonKey(name: 'equipment_number') String equipmentNumber,
String? category1,
String? category2,
String? category3,
String manufacturer,
String? modelName,
String? serialNumber,
DateTime? purchaseDate,
double? purchasePrice,
@JsonKey(name: 'model_name') String? modelName,
@JsonKey(name: 'serial_number') String? serialNumber,
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') double? purchasePrice,
String? remark});
}
@@ -143,15 +148,15 @@ abstract class _$$CreateEquipmentRequestImplCopyWith<$Res>
@override
@useResult
$Res call(
{String equipmentNumber,
{@JsonKey(name: 'equipment_number') String equipmentNumber,
String? category1,
String? category2,
String? category3,
String manufacturer,
String? modelName,
String? serialNumber,
DateTime? purchaseDate,
double? purchasePrice,
@JsonKey(name: 'model_name') String? modelName,
@JsonKey(name: 'serial_number') String? serialNumber,
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') double? purchasePrice,
String? remark});
}
@@ -230,21 +235,22 @@ class __$$CreateEquipmentRequestImplCopyWithImpl<$Res>
@JsonSerializable()
class _$CreateEquipmentRequestImpl implements _CreateEquipmentRequest {
const _$CreateEquipmentRequestImpl(
{required this.equipmentNumber,
{@JsonKey(name: 'equipment_number') required this.equipmentNumber,
this.category1,
this.category2,
this.category3,
required this.manufacturer,
this.modelName,
this.serialNumber,
this.purchaseDate,
this.purchasePrice,
@JsonKey(name: 'model_name') this.modelName,
@JsonKey(name: 'serial_number') this.serialNumber,
@JsonKey(name: 'purchase_date') this.purchaseDate,
@JsonKey(name: 'purchase_price') this.purchasePrice,
this.remark});
factory _$CreateEquipmentRequestImpl.fromJson(Map<String, dynamic> json) =>
_$$CreateEquipmentRequestImplFromJson(json);
@override
@JsonKey(name: 'equipment_number')
final String equipmentNumber;
@override
final String? category1;
@@ -255,12 +261,16 @@ class _$CreateEquipmentRequestImpl implements _CreateEquipmentRequest {
@override
final String manufacturer;
@override
@JsonKey(name: 'model_name')
final String? modelName;
@override
@JsonKey(name: 'serial_number')
final String? serialNumber;
@override
@JsonKey(name: 'purchase_date')
final DateTime? purchaseDate;
@override
@JsonKey(name: 'purchase_price')
final double? purchasePrice;
@override
final String? remark;
@@ -330,21 +340,22 @@ class _$CreateEquipmentRequestImpl implements _CreateEquipmentRequest {
abstract class _CreateEquipmentRequest implements CreateEquipmentRequest {
const factory _CreateEquipmentRequest(
{required final String equipmentNumber,
{@JsonKey(name: 'equipment_number') required final String equipmentNumber,
final String? category1,
final String? category2,
final String? category3,
required final String manufacturer,
final String? modelName,
final String? serialNumber,
final DateTime? purchaseDate,
final double? purchasePrice,
@JsonKey(name: 'model_name') final String? modelName,
@JsonKey(name: 'serial_number') final String? serialNumber,
@JsonKey(name: 'purchase_date') final DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') final double? purchasePrice,
final String? remark}) = _$CreateEquipmentRequestImpl;
factory _CreateEquipmentRequest.fromJson(Map<String, dynamic> json) =
_$CreateEquipmentRequestImpl.fromJson;
@override
@JsonKey(name: 'equipment_number')
String get equipmentNumber;
@override
String? get category1;
@@ -355,12 +366,16 @@ abstract class _CreateEquipmentRequest implements CreateEquipmentRequest {
@override
String get manufacturer;
@override
@JsonKey(name: 'model_name')
String? get modelName;
@override
@JsonKey(name: 'serial_number')
String? get serialNumber;
@override
@JsonKey(name: 'purchase_date')
DateTime? get purchaseDate;
@override
@JsonKey(name: 'purchase_price')
double? get purchasePrice;
@override
String? get remark;
@@ -384,17 +399,26 @@ mixin _$UpdateEquipmentRequest {
String? get category2 => throw _privateConstructorUsedError;
String? get category3 => throw _privateConstructorUsedError;
String? get manufacturer => throw _privateConstructorUsedError;
@JsonKey(name: 'model_name')
String? get modelName => throw _privateConstructorUsedError;
@JsonKey(name: 'serial_number')
String? get serialNumber => throw _privateConstructorUsedError;
String? get barcode => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_date')
DateTime? get purchaseDate => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_price')
double? get purchasePrice => throw _privateConstructorUsedError;
@EquipmentStatusJsonConverter()
String? get status => throw _privateConstructorUsedError;
@JsonKey(name: 'current_company_id')
int? get currentCompanyId => throw _privateConstructorUsedError;
@JsonKey(name: 'current_branch_id')
int? get currentBranchId => throw _privateConstructorUsedError;
@JsonKey(name: 'warehouse_location_id')
int? get warehouseLocationId => throw _privateConstructorUsedError;
@JsonKey(name: 'last_inspection_date')
DateTime? get lastInspectionDate => throw _privateConstructorUsedError;
@JsonKey(name: 'next_inspection_date')
DateTime? get nextInspectionDate => throw _privateConstructorUsedError;
String? get remark => throw _privateConstructorUsedError;
@@ -419,17 +443,17 @@ abstract class $UpdateEquipmentRequestCopyWith<$Res> {
String? category2,
String? category3,
String? manufacturer,
String? modelName,
String? serialNumber,
@JsonKey(name: 'model_name') String? modelName,
@JsonKey(name: 'serial_number') String? serialNumber,
String? barcode,
DateTime? purchaseDate,
double? purchasePrice,
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') double? purchasePrice,
@EquipmentStatusJsonConverter() String? status,
int? currentCompanyId,
int? currentBranchId,
int? warehouseLocationId,
DateTime? lastInspectionDate,
DateTime? nextInspectionDate,
@JsonKey(name: 'current_company_id') int? currentCompanyId,
@JsonKey(name: 'current_branch_id') int? currentBranchId,
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date') DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') DateTime? nextInspectionDate,
String? remark});
}
@@ -549,17 +573,17 @@ abstract class _$$UpdateEquipmentRequestImplCopyWith<$Res>
String? category2,
String? category3,
String? manufacturer,
String? modelName,
String? serialNumber,
@JsonKey(name: 'model_name') String? modelName,
@JsonKey(name: 'serial_number') String? serialNumber,
String? barcode,
DateTime? purchaseDate,
double? purchasePrice,
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') double? purchasePrice,
@EquipmentStatusJsonConverter() String? status,
int? currentCompanyId,
int? currentBranchId,
int? warehouseLocationId,
DateTime? lastInspectionDate,
DateTime? nextInspectionDate,
@JsonKey(name: 'current_company_id') int? currentCompanyId,
@JsonKey(name: 'current_branch_id') int? currentBranchId,
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date') DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') DateTime? nextInspectionDate,
String? remark});
}
@@ -672,17 +696,17 @@ class _$UpdateEquipmentRequestImpl implements _UpdateEquipmentRequest {
this.category2,
this.category3,
this.manufacturer,
this.modelName,
this.serialNumber,
@JsonKey(name: 'model_name') this.modelName,
@JsonKey(name: 'serial_number') this.serialNumber,
this.barcode,
this.purchaseDate,
this.purchasePrice,
@JsonKey(name: 'purchase_date') this.purchaseDate,
@JsonKey(name: 'purchase_price') this.purchasePrice,
@EquipmentStatusJsonConverter() this.status,
this.currentCompanyId,
this.currentBranchId,
this.warehouseLocationId,
this.lastInspectionDate,
this.nextInspectionDate,
@JsonKey(name: 'current_company_id') this.currentCompanyId,
@JsonKey(name: 'current_branch_id') this.currentBranchId,
@JsonKey(name: 'warehouse_location_id') this.warehouseLocationId,
@JsonKey(name: 'last_inspection_date') this.lastInspectionDate,
@JsonKey(name: 'next_inspection_date') this.nextInspectionDate,
this.remark});
factory _$UpdateEquipmentRequestImpl.fromJson(Map<String, dynamic> json) =>
@@ -697,27 +721,36 @@ class _$UpdateEquipmentRequestImpl implements _UpdateEquipmentRequest {
@override
final String? manufacturer;
@override
@JsonKey(name: 'model_name')
final String? modelName;
@override
@JsonKey(name: 'serial_number')
final String? serialNumber;
@override
final String? barcode;
@override
@JsonKey(name: 'purchase_date')
final DateTime? purchaseDate;
@override
@JsonKey(name: 'purchase_price')
final double? purchasePrice;
@override
@EquipmentStatusJsonConverter()
final String? status;
@override
@JsonKey(name: 'current_company_id')
final int? currentCompanyId;
@override
@JsonKey(name: 'current_branch_id')
final int? currentBranchId;
@override
@JsonKey(name: 'warehouse_location_id')
final int? warehouseLocationId;
@override
@JsonKey(name: 'last_inspection_date')
final DateTime? lastInspectionDate;
@override
@JsonKey(name: 'next_inspection_date')
final DateTime? nextInspectionDate;
@override
final String? remark;
@@ -807,17 +840,17 @@ abstract class _UpdateEquipmentRequest implements UpdateEquipmentRequest {
final String? category2,
final String? category3,
final String? manufacturer,
final String? modelName,
final String? serialNumber,
@JsonKey(name: 'model_name') final String? modelName,
@JsonKey(name: 'serial_number') final String? serialNumber,
final String? barcode,
final DateTime? purchaseDate,
final double? purchasePrice,
@JsonKey(name: 'purchase_date') final DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') final double? purchasePrice,
@EquipmentStatusJsonConverter() final String? status,
final int? currentCompanyId,
final int? currentBranchId,
final int? warehouseLocationId,
final DateTime? lastInspectionDate,
final DateTime? nextInspectionDate,
@JsonKey(name: 'current_company_id') final int? currentCompanyId,
@JsonKey(name: 'current_branch_id') final int? currentBranchId,
@JsonKey(name: 'warehouse_location_id') final int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date') final DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') final DateTime? nextInspectionDate,
final String? remark}) = _$UpdateEquipmentRequestImpl;
factory _UpdateEquipmentRequest.fromJson(Map<String, dynamic> json) =
@@ -832,27 +865,36 @@ abstract class _UpdateEquipmentRequest implements UpdateEquipmentRequest {
@override
String? get manufacturer;
@override
@JsonKey(name: 'model_name')
String? get modelName;
@override
@JsonKey(name: 'serial_number')
String? get serialNumber;
@override
String? get barcode;
@override
@JsonKey(name: 'purchase_date')
DateTime? get purchaseDate;
@override
@JsonKey(name: 'purchase_price')
double? get purchasePrice;
@override
@EquipmentStatusJsonConverter()
String? get status;
@override
@JsonKey(name: 'current_company_id')
int? get currentCompanyId;
@override
@JsonKey(name: 'current_branch_id')
int? get currentBranchId;
@override
@JsonKey(name: 'warehouse_location_id')
int? get warehouseLocationId;
@override
@JsonKey(name: 'last_inspection_date')
DateTime? get lastInspectionDate;
@override
@JsonKey(name: 'next_inspection_date')
DateTime? get nextInspectionDate;
@override
String? get remark;

View File

@@ -9,32 +9,32 @@ part of 'equipment_request.dart';
_$CreateEquipmentRequestImpl _$$CreateEquipmentRequestImplFromJson(
Map<String, dynamic> json) =>
_$CreateEquipmentRequestImpl(
equipmentNumber: json['equipmentNumber'] as String,
equipmentNumber: json['equipment_number'] as String,
category1: json['category1'] as String?,
category2: json['category2'] as String?,
category3: json['category3'] as String?,
manufacturer: json['manufacturer'] as String,
modelName: json['modelName'] as String?,
serialNumber: json['serialNumber'] as String?,
purchaseDate: json['purchaseDate'] == null
modelName: json['model_name'] as String?,
serialNumber: json['serial_number'] as String?,
purchaseDate: json['purchase_date'] == null
? null
: DateTime.parse(json['purchaseDate'] as String),
purchasePrice: (json['purchasePrice'] as num?)?.toDouble(),
: DateTime.parse(json['purchase_date'] as String),
purchasePrice: (json['purchase_price'] as num?)?.toDouble(),
remark: json['remark'] as String?,
);
Map<String, dynamic> _$$CreateEquipmentRequestImplToJson(
_$CreateEquipmentRequestImpl instance) =>
<String, dynamic>{
'equipmentNumber': instance.equipmentNumber,
'equipment_number': instance.equipmentNumber,
'category1': instance.category1,
'category2': instance.category2,
'category3': instance.category3,
'manufacturer': instance.manufacturer,
'modelName': instance.modelName,
'serialNumber': instance.serialNumber,
'purchaseDate': instance.purchaseDate?.toIso8601String(),
'purchasePrice': instance.purchasePrice,
'model_name': instance.modelName,
'serial_number': instance.serialNumber,
'purchase_date': instance.purchaseDate?.toIso8601String(),
'purchase_price': instance.purchasePrice,
'remark': instance.remark,
};
@@ -45,24 +45,24 @@ _$UpdateEquipmentRequestImpl _$$UpdateEquipmentRequestImplFromJson(
category2: json['category2'] as String?,
category3: json['category3'] as String?,
manufacturer: json['manufacturer'] as String?,
modelName: json['modelName'] as String?,
serialNumber: json['serialNumber'] as String?,
modelName: json['model_name'] as String?,
serialNumber: json['serial_number'] as String?,
barcode: json['barcode'] as String?,
purchaseDate: json['purchaseDate'] == null
purchaseDate: json['purchase_date'] == null
? null
: DateTime.parse(json['purchaseDate'] as String),
purchasePrice: (json['purchasePrice'] as num?)?.toDouble(),
: DateTime.parse(json['purchase_date'] as String),
purchasePrice: (json['purchase_price'] as num?)?.toDouble(),
status: _$JsonConverterFromJson<String, String>(
json['status'], const EquipmentStatusJsonConverter().fromJson),
currentCompanyId: (json['currentCompanyId'] as num?)?.toInt(),
currentBranchId: (json['currentBranchId'] as num?)?.toInt(),
warehouseLocationId: (json['warehouseLocationId'] as num?)?.toInt(),
lastInspectionDate: json['lastInspectionDate'] == null
currentCompanyId: (json['current_company_id'] as num?)?.toInt(),
currentBranchId: (json['current_branch_id'] as num?)?.toInt(),
warehouseLocationId: (json['warehouse_location_id'] as num?)?.toInt(),
lastInspectionDate: json['last_inspection_date'] == null
? null
: DateTime.parse(json['lastInspectionDate'] as String),
nextInspectionDate: json['nextInspectionDate'] == null
: DateTime.parse(json['last_inspection_date'] as String),
nextInspectionDate: json['next_inspection_date'] == null
? null
: DateTime.parse(json['nextInspectionDate'] as String),
: DateTime.parse(json['next_inspection_date'] as String),
remark: json['remark'] as String?,
);
@@ -73,18 +73,18 @@ Map<String, dynamic> _$$UpdateEquipmentRequestImplToJson(
'category2': instance.category2,
'category3': instance.category3,
'manufacturer': instance.manufacturer,
'modelName': instance.modelName,
'serialNumber': instance.serialNumber,
'model_name': instance.modelName,
'serial_number': instance.serialNumber,
'barcode': instance.barcode,
'purchaseDate': instance.purchaseDate?.toIso8601String(),
'purchasePrice': instance.purchasePrice,
'purchase_date': instance.purchaseDate?.toIso8601String(),
'purchase_price': instance.purchasePrice,
'status': _$JsonConverterToJson<String, String>(
instance.status, const EquipmentStatusJsonConverter().toJson),
'currentCompanyId': instance.currentCompanyId,
'currentBranchId': instance.currentBranchId,
'warehouseLocationId': instance.warehouseLocationId,
'lastInspectionDate': instance.lastInspectionDate?.toIso8601String(),
'nextInspectionDate': instance.nextInspectionDate?.toIso8601String(),
'current_company_id': instance.currentCompanyId,
'current_branch_id': instance.currentBranchId,
'warehouse_location_id': instance.warehouseLocationId,
'last_inspection_date': instance.lastInspectionDate?.toIso8601String(),
'next_inspection_date': instance.nextInspectionDate?.toIso8601String(),
'remark': instance.remark,
};

View File

@@ -8,29 +8,29 @@ part 'equipment_response.g.dart';
class EquipmentResponse with _$EquipmentResponse {
const factory EquipmentResponse({
required int id,
required String equipmentNumber,
@JsonKey(name: 'equipment_number') required String equipmentNumber,
String? category1,
String? category2,
String? category3,
required String manufacturer,
String? modelName,
String? serialNumber,
@JsonKey(name: 'model_name') String? modelName,
@JsonKey(name: 'serial_number') String? serialNumber,
String? barcode,
DateTime? purchaseDate,
double? purchasePrice,
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') String? purchasePrice,
@EquipmentStatusJsonConverter() required String status,
int? currentCompanyId,
int? currentBranchId,
int? warehouseLocationId,
DateTime? lastInspectionDate,
DateTime? nextInspectionDate,
@JsonKey(name: 'current_company_id') int? currentCompanyId,
@JsonKey(name: 'current_branch_id') int? currentBranchId,
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date') DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') DateTime? nextInspectionDate,
String? remark,
required DateTime createdAt,
required DateTime updatedAt,
@JsonKey(name: 'created_at') required DateTime createdAt,
@JsonKey(name: 'updated_at') required DateTime updatedAt,
// 추가 필드 (조인된 데이터)
String? companyName,
String? branchName,
String? warehouseName,
@JsonKey(name: 'company_name') String? companyName,
@JsonKey(name: 'branch_name') String? branchName,
@JsonKey(name: 'warehouse_name') String? warehouseName,
}) = _EquipmentResponse;
factory EquipmentResponse.fromJson(Map<String, dynamic> json) =>

View File

@@ -21,29 +21,44 @@ EquipmentResponse _$EquipmentResponseFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$EquipmentResponse {
int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'equipment_number')
String get equipmentNumber => throw _privateConstructorUsedError;
String? get category1 => throw _privateConstructorUsedError;
String? get category2 => throw _privateConstructorUsedError;
String? get category3 => throw _privateConstructorUsedError;
String get manufacturer => throw _privateConstructorUsedError;
@JsonKey(name: 'model_name')
String? get modelName => throw _privateConstructorUsedError;
@JsonKey(name: 'serial_number')
String? get serialNumber => throw _privateConstructorUsedError;
String? get barcode => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_date')
DateTime? get purchaseDate => throw _privateConstructorUsedError;
double? get purchasePrice => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_price')
String? get purchasePrice => throw _privateConstructorUsedError;
@EquipmentStatusJsonConverter()
String get status => throw _privateConstructorUsedError;
@JsonKey(name: 'current_company_id')
int? get currentCompanyId => throw _privateConstructorUsedError;
@JsonKey(name: 'current_branch_id')
int? get currentBranchId => throw _privateConstructorUsedError;
@JsonKey(name: 'warehouse_location_id')
int? get warehouseLocationId => throw _privateConstructorUsedError;
@JsonKey(name: 'last_inspection_date')
DateTime? get lastInspectionDate => throw _privateConstructorUsedError;
@JsonKey(name: 'next_inspection_date')
DateTime? get nextInspectionDate => throw _privateConstructorUsedError;
String? get remark => throw _privateConstructorUsedError;
@JsonKey(name: 'created_at')
DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at')
DateTime get updatedAt =>
throw _privateConstructorUsedError; // 추가 필드 (조인된 데이터)
@JsonKey(name: 'company_name')
String? get companyName => throw _privateConstructorUsedError;
@JsonKey(name: 'branch_name')
String? get branchName => throw _privateConstructorUsedError;
@JsonKey(name: 'warehouse_name')
String? get warehouseName => throw _privateConstructorUsedError;
/// Serializes this EquipmentResponse to a JSON map.
@@ -64,28 +79,28 @@ abstract class $EquipmentResponseCopyWith<$Res> {
@useResult
$Res call(
{int id,
String equipmentNumber,
@JsonKey(name: 'equipment_number') String equipmentNumber,
String? category1,
String? category2,
String? category3,
String manufacturer,
String? modelName,
String? serialNumber,
@JsonKey(name: 'model_name') String? modelName,
@JsonKey(name: 'serial_number') String? serialNumber,
String? barcode,
DateTime? purchaseDate,
double? purchasePrice,
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') String? purchasePrice,
@EquipmentStatusJsonConverter() String status,
int? currentCompanyId,
int? currentBranchId,
int? warehouseLocationId,
DateTime? lastInspectionDate,
DateTime? nextInspectionDate,
@JsonKey(name: 'current_company_id') int? currentCompanyId,
@JsonKey(name: 'current_branch_id') int? currentBranchId,
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date') DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') DateTime? nextInspectionDate,
String? remark,
DateTime createdAt,
DateTime updatedAt,
String? companyName,
String? branchName,
String? warehouseName});
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt,
@JsonKey(name: 'company_name') String? companyName,
@JsonKey(name: 'branch_name') String? branchName,
@JsonKey(name: 'warehouse_name') String? warehouseName});
}
/// @nodoc
@@ -171,7 +186,7 @@ class _$EquipmentResponseCopyWithImpl<$Res, $Val extends EquipmentResponse>
purchasePrice: freezed == purchasePrice
? _value.purchasePrice
: purchasePrice // ignore: cast_nullable_to_non_nullable
as double?,
as String?,
status: null == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
@@ -234,28 +249,28 @@ abstract class _$$EquipmentResponseImplCopyWith<$Res>
@useResult
$Res call(
{int id,
String equipmentNumber,
@JsonKey(name: 'equipment_number') String equipmentNumber,
String? category1,
String? category2,
String? category3,
String manufacturer,
String? modelName,
String? serialNumber,
@JsonKey(name: 'model_name') String? modelName,
@JsonKey(name: 'serial_number') String? serialNumber,
String? barcode,
DateTime? purchaseDate,
double? purchasePrice,
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') String? purchasePrice,
@EquipmentStatusJsonConverter() String status,
int? currentCompanyId,
int? currentBranchId,
int? warehouseLocationId,
DateTime? lastInspectionDate,
DateTime? nextInspectionDate,
@JsonKey(name: 'current_company_id') int? currentCompanyId,
@JsonKey(name: 'current_branch_id') int? currentBranchId,
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date') DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') DateTime? nextInspectionDate,
String? remark,
DateTime createdAt,
DateTime updatedAt,
String? companyName,
String? branchName,
String? warehouseName});
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt,
@JsonKey(name: 'company_name') String? companyName,
@JsonKey(name: 'branch_name') String? branchName,
@JsonKey(name: 'warehouse_name') String? warehouseName});
}
/// @nodoc
@@ -339,7 +354,7 @@ class __$$EquipmentResponseImplCopyWithImpl<$Res>
purchasePrice: freezed == purchasePrice
? _value.purchasePrice
: purchasePrice // ignore: cast_nullable_to_non_nullable
as double?,
as String?,
status: null == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
@@ -397,28 +412,28 @@ class __$$EquipmentResponseImplCopyWithImpl<$Res>
class _$EquipmentResponseImpl implements _EquipmentResponse {
const _$EquipmentResponseImpl(
{required this.id,
required this.equipmentNumber,
@JsonKey(name: 'equipment_number') required this.equipmentNumber,
this.category1,
this.category2,
this.category3,
required this.manufacturer,
this.modelName,
this.serialNumber,
@JsonKey(name: 'model_name') this.modelName,
@JsonKey(name: 'serial_number') this.serialNumber,
this.barcode,
this.purchaseDate,
this.purchasePrice,
@JsonKey(name: 'purchase_date') this.purchaseDate,
@JsonKey(name: 'purchase_price') this.purchasePrice,
@EquipmentStatusJsonConverter() required this.status,
this.currentCompanyId,
this.currentBranchId,
this.warehouseLocationId,
this.lastInspectionDate,
this.nextInspectionDate,
@JsonKey(name: 'current_company_id') this.currentCompanyId,
@JsonKey(name: 'current_branch_id') this.currentBranchId,
@JsonKey(name: 'warehouse_location_id') this.warehouseLocationId,
@JsonKey(name: 'last_inspection_date') this.lastInspectionDate,
@JsonKey(name: 'next_inspection_date') this.nextInspectionDate,
this.remark,
required this.createdAt,
required this.updatedAt,
this.companyName,
this.branchName,
this.warehouseName});
@JsonKey(name: 'created_at') required this.createdAt,
@JsonKey(name: 'updated_at') required this.updatedAt,
@JsonKey(name: 'company_name') this.companyName,
@JsonKey(name: 'branch_name') this.branchName,
@JsonKey(name: 'warehouse_name') this.warehouseName});
factory _$EquipmentResponseImpl.fromJson(Map<String, dynamic> json) =>
_$$EquipmentResponseImplFromJson(json);
@@ -426,6 +441,7 @@ class _$EquipmentResponseImpl implements _EquipmentResponse {
@override
final int id;
@override
@JsonKey(name: 'equipment_number')
final String equipmentNumber;
@override
final String? category1;
@@ -436,40 +452,54 @@ class _$EquipmentResponseImpl implements _EquipmentResponse {
@override
final String manufacturer;
@override
@JsonKey(name: 'model_name')
final String? modelName;
@override
@JsonKey(name: 'serial_number')
final String? serialNumber;
@override
final String? barcode;
@override
@JsonKey(name: 'purchase_date')
final DateTime? purchaseDate;
@override
final double? purchasePrice;
@JsonKey(name: 'purchase_price')
final String? purchasePrice;
@override
@EquipmentStatusJsonConverter()
final String status;
@override
@JsonKey(name: 'current_company_id')
final int? currentCompanyId;
@override
@JsonKey(name: 'current_branch_id')
final int? currentBranchId;
@override
@JsonKey(name: 'warehouse_location_id')
final int? warehouseLocationId;
@override
@JsonKey(name: 'last_inspection_date')
final DateTime? lastInspectionDate;
@override
@JsonKey(name: 'next_inspection_date')
final DateTime? nextInspectionDate;
@override
final String? remark;
@override
@JsonKey(name: 'created_at')
final DateTime createdAt;
@override
@JsonKey(name: 'updated_at')
final DateTime updatedAt;
// 추가 필드 (조인된 데이터)
@override
@JsonKey(name: 'company_name')
final String? companyName;
@override
@JsonKey(name: 'branch_name')
final String? branchName;
@override
@JsonKey(name: 'warehouse_name')
final String? warehouseName;
@override
@@ -575,27 +605,28 @@ class _$EquipmentResponseImpl implements _EquipmentResponse {
abstract class _EquipmentResponse implements EquipmentResponse {
const factory _EquipmentResponse(
{required final int id,
required final String equipmentNumber,
@JsonKey(name: 'equipment_number') required final String equipmentNumber,
final String? category1,
final String? category2,
final String? category3,
required final String manufacturer,
final String? modelName,
final String? serialNumber,
@JsonKey(name: 'model_name') final String? modelName,
@JsonKey(name: 'serial_number') final String? serialNumber,
final String? barcode,
final DateTime? purchaseDate,
final double? purchasePrice,
@JsonKey(name: 'purchase_date') final DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') final String? purchasePrice,
@EquipmentStatusJsonConverter() required final String status,
final int? currentCompanyId,
final int? currentBranchId,
final int? warehouseLocationId,
final DateTime? lastInspectionDate,
final DateTime? nextInspectionDate,
@JsonKey(name: 'current_company_id') final int? currentCompanyId,
@JsonKey(name: 'current_branch_id') final int? currentBranchId,
@JsonKey(name: 'warehouse_location_id') final int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date') final DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') final DateTime? nextInspectionDate,
final String? remark,
required final DateTime createdAt,
required final DateTime updatedAt,
final String? companyName,
final String? branchName,
@JsonKey(name: 'created_at') required final DateTime createdAt,
@JsonKey(name: 'updated_at') required final DateTime updatedAt,
@JsonKey(name: 'company_name') final String? companyName,
@JsonKey(name: 'branch_name') final String? branchName,
@JsonKey(name: 'warehouse_name')
final String? warehouseName}) = _$EquipmentResponseImpl;
factory _EquipmentResponse.fromJson(Map<String, dynamic> json) =
@@ -604,6 +635,7 @@ abstract class _EquipmentResponse implements EquipmentResponse {
@override
int get id;
@override
@JsonKey(name: 'equipment_number')
String get equipmentNumber;
@override
String? get category1;
@@ -614,39 +646,53 @@ abstract class _EquipmentResponse implements EquipmentResponse {
@override
String get manufacturer;
@override
@JsonKey(name: 'model_name')
String? get modelName;
@override
@JsonKey(name: 'serial_number')
String? get serialNumber;
@override
String? get barcode;
@override
@JsonKey(name: 'purchase_date')
DateTime? get purchaseDate;
@override
double? get purchasePrice;
@JsonKey(name: 'purchase_price')
String? get purchasePrice;
@override
@EquipmentStatusJsonConverter()
String get status;
@override
@JsonKey(name: 'current_company_id')
int? get currentCompanyId;
@override
@JsonKey(name: 'current_branch_id')
int? get currentBranchId;
@override
@JsonKey(name: 'warehouse_location_id')
int? get warehouseLocationId;
@override
@JsonKey(name: 'last_inspection_date')
DateTime? get lastInspectionDate;
@override
@JsonKey(name: 'next_inspection_date')
DateTime? get nextInspectionDate;
@override
String? get remark;
@override
@JsonKey(name: 'created_at')
DateTime get createdAt;
@override
@JsonKey(name: 'updated_at')
DateTime get updatedAt; // 추가 필드 (조인된 데이터)
@override
@JsonKey(name: 'company_name')
String? get companyName;
@override
@JsonKey(name: 'branch_name')
String? get branchName;
@override
@JsonKey(name: 'warehouse_name')
String? get warehouseName;
/// Create a copy of EquipmentResponse

View File

@@ -10,61 +10,61 @@ _$EquipmentResponseImpl _$$EquipmentResponseImplFromJson(
Map<String, dynamic> json) =>
_$EquipmentResponseImpl(
id: (json['id'] as num).toInt(),
equipmentNumber: json['equipmentNumber'] as String,
equipmentNumber: json['equipment_number'] as String,
category1: json['category1'] as String?,
category2: json['category2'] as String?,
category3: json['category3'] as String?,
manufacturer: json['manufacturer'] as String,
modelName: json['modelName'] as String?,
serialNumber: json['serialNumber'] as String?,
modelName: json['model_name'] as String?,
serialNumber: json['serial_number'] as String?,
barcode: json['barcode'] as String?,
purchaseDate: json['purchaseDate'] == null
purchaseDate: json['purchase_date'] == null
? null
: DateTime.parse(json['purchaseDate'] as String),
purchasePrice: (json['purchasePrice'] as num?)?.toDouble(),
: DateTime.parse(json['purchase_date'] as String),
purchasePrice: json['purchase_price'] as String?,
status: const EquipmentStatusJsonConverter()
.fromJson(json['status'] as String),
currentCompanyId: (json['currentCompanyId'] as num?)?.toInt(),
currentBranchId: (json['currentBranchId'] as num?)?.toInt(),
warehouseLocationId: (json['warehouseLocationId'] as num?)?.toInt(),
lastInspectionDate: json['lastInspectionDate'] == null
currentCompanyId: (json['current_company_id'] as num?)?.toInt(),
currentBranchId: (json['current_branch_id'] as num?)?.toInt(),
warehouseLocationId: (json['warehouse_location_id'] as num?)?.toInt(),
lastInspectionDate: json['last_inspection_date'] == null
? null
: DateTime.parse(json['lastInspectionDate'] as String),
nextInspectionDate: json['nextInspectionDate'] == null
: DateTime.parse(json['last_inspection_date'] as String),
nextInspectionDate: json['next_inspection_date'] == null
? null
: DateTime.parse(json['nextInspectionDate'] as String),
: DateTime.parse(json['next_inspection_date'] as String),
remark: json['remark'] as String?,
createdAt: DateTime.parse(json['createdAt'] as String),
updatedAt: DateTime.parse(json['updatedAt'] as String),
companyName: json['companyName'] as String?,
branchName: json['branchName'] as String?,
warehouseName: json['warehouseName'] as String?,
createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String),
companyName: json['company_name'] as String?,
branchName: json['branch_name'] as String?,
warehouseName: json['warehouse_name'] as String?,
);
Map<String, dynamic> _$$EquipmentResponseImplToJson(
_$EquipmentResponseImpl instance) =>
<String, dynamic>{
'id': instance.id,
'equipmentNumber': instance.equipmentNumber,
'equipment_number': instance.equipmentNumber,
'category1': instance.category1,
'category2': instance.category2,
'category3': instance.category3,
'manufacturer': instance.manufacturer,
'modelName': instance.modelName,
'serialNumber': instance.serialNumber,
'model_name': instance.modelName,
'serial_number': instance.serialNumber,
'barcode': instance.barcode,
'purchaseDate': instance.purchaseDate?.toIso8601String(),
'purchasePrice': instance.purchasePrice,
'purchase_date': instance.purchaseDate?.toIso8601String(),
'purchase_price': instance.purchasePrice,
'status': const EquipmentStatusJsonConverter().toJson(instance.status),
'currentCompanyId': instance.currentCompanyId,
'currentBranchId': instance.currentBranchId,
'warehouseLocationId': instance.warehouseLocationId,
'lastInspectionDate': instance.lastInspectionDate?.toIso8601String(),
'nextInspectionDate': instance.nextInspectionDate?.toIso8601String(),
'current_company_id': instance.currentCompanyId,
'current_branch_id': instance.currentBranchId,
'warehouse_location_id': instance.warehouseLocationId,
'last_inspection_date': instance.lastInspectionDate?.toIso8601String(),
'next_inspection_date': instance.nextInspectionDate?.toIso8601String(),
'remark': instance.remark,
'createdAt': instance.createdAt.toIso8601String(),
'updatedAt': instance.updatedAt.toIso8601String(),
'companyName': instance.companyName,
'branchName': instance.branchName,
'warehouseName': instance.warehouseName,
'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(),
'company_name': instance.companyName,
'branch_name': instance.branchName,
'warehouse_name': instance.warehouseName,
};