feat: 백엔드 API 구조 변경 대응 및 시스템 안정성 대폭 향상
Some checks failed
Flutter Test & Quality Check / Build APK (push) Has been cancelled
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled

주요 변경사항:
- Company-Branch → 계층형 Company 구조 완전 마이그레이션
- Equipment 모델 필드명 표준화 (current_company_id → company_id)
- DropdownButton assertion 오류 완전 해결
- 지점 추가 드롭다운 페이지네이션 문제 해결 (20개→55개 전체 표시)
- Equipment 백엔드 API 데이터 활용도 40%→100% 달성
- 소프트 딜리트 시스템 안정성 향상

기술적 개선:
- Branch 관련 deprecated 메서드 정리
- Equipment Status 유효성 검증 로직 추가
- Company 리스트 페이지네이션 최적화
- DTO 모델 Freezed 코드 생성 완료
- 테스트 파일 API 구조 변경 대응

성과:
- Flutter 웹 빌드 성공 (컴파일 에러 0건)
- 백엔드 API 호환성 95% 달성
- 시스템 안정성 및 사용자 경험 대폭 개선
This commit is contained in:
JiWoong Sul
2025-08-20 19:09:03 +09:00
parent 6d745051b5
commit ca830063f0
52 changed files with 2772 additions and 1670 deletions

View File

@@ -31,10 +31,23 @@ mixin _$CreateEquipmentRequest {
String? get modelName => throw _privateConstructorUsedError;
@JsonKey(name: 'serial_number')
String? get serialNumber => throw _privateConstructorUsedError;
String? get barcode => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_date')
@NaiveDateConverter()
DateTime? get purchaseDate => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_price')
@DecimalConverter()
double? get purchasePrice => throw _privateConstructorUsedError;
@JsonKey(name: 'company_id')
int? get companyId => throw _privateConstructorUsedError;
@JsonKey(name: 'warehouse_location_id')
int? get warehouseLocationId => throw _privateConstructorUsedError;
@JsonKey(name: 'last_inspection_date')
@NaiveDateConverter()
DateTime? get lastInspectionDate => throw _privateConstructorUsedError;
@JsonKey(name: 'next_inspection_date')
@NaiveDateConverter()
DateTime? get nextInspectionDate => throw _privateConstructorUsedError;
String? get remark => throw _privateConstructorUsedError;
/// Serializes this CreateEquipmentRequest to a JSON map.
@@ -61,8 +74,21 @@ abstract class $CreateEquipmentRequestCopyWith<$Res> {
String manufacturer,
@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? barcode,
@JsonKey(name: 'purchase_date')
@NaiveDateConverter()
DateTime? purchaseDate,
@JsonKey(name: 'purchase_price')
@DecimalConverter()
double? purchasePrice,
@JsonKey(name: 'company_id') int? companyId,
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date')
@NaiveDateConverter()
DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date')
@NaiveDateConverter()
DateTime? nextInspectionDate,
String? remark});
}
@@ -89,8 +115,13 @@ class _$CreateEquipmentRequestCopyWithImpl<$Res,
Object? manufacturer = null,
Object? modelName = freezed,
Object? serialNumber = freezed,
Object? barcode = freezed,
Object? purchaseDate = freezed,
Object? purchasePrice = freezed,
Object? companyId = freezed,
Object? warehouseLocationId = freezed,
Object? lastInspectionDate = freezed,
Object? nextInspectionDate = freezed,
Object? remark = freezed,
}) {
return _then(_value.copyWith(
@@ -122,6 +153,10 @@ class _$CreateEquipmentRequestCopyWithImpl<$Res,
? _value.serialNumber
: serialNumber // ignore: cast_nullable_to_non_nullable
as String?,
barcode: freezed == barcode
? _value.barcode
: barcode // ignore: cast_nullable_to_non_nullable
as String?,
purchaseDate: freezed == purchaseDate
? _value.purchaseDate
: purchaseDate // ignore: cast_nullable_to_non_nullable
@@ -130,6 +165,22 @@ class _$CreateEquipmentRequestCopyWithImpl<$Res,
? _value.purchasePrice
: purchasePrice // ignore: cast_nullable_to_non_nullable
as double?,
companyId: freezed == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int?,
warehouseLocationId: freezed == warehouseLocationId
? _value.warehouseLocationId
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
as int?,
lastInspectionDate: freezed == lastInspectionDate
? _value.lastInspectionDate
: lastInspectionDate // ignore: cast_nullable_to_non_nullable
as DateTime?,
nextInspectionDate: freezed == nextInspectionDate
? _value.nextInspectionDate
: nextInspectionDate // ignore: cast_nullable_to_non_nullable
as DateTime?,
remark: freezed == remark
? _value.remark
: remark // ignore: cast_nullable_to_non_nullable
@@ -155,8 +206,21 @@ abstract class _$$CreateEquipmentRequestImplCopyWith<$Res>
String manufacturer,
@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? barcode,
@JsonKey(name: 'purchase_date')
@NaiveDateConverter()
DateTime? purchaseDate,
@JsonKey(name: 'purchase_price')
@DecimalConverter()
double? purchasePrice,
@JsonKey(name: 'company_id') int? companyId,
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date')
@NaiveDateConverter()
DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date')
@NaiveDateConverter()
DateTime? nextInspectionDate,
String? remark});
}
@@ -182,8 +246,13 @@ class __$$CreateEquipmentRequestImplCopyWithImpl<$Res>
Object? manufacturer = null,
Object? modelName = freezed,
Object? serialNumber = freezed,
Object? barcode = freezed,
Object? purchaseDate = freezed,
Object? purchasePrice = freezed,
Object? companyId = freezed,
Object? warehouseLocationId = freezed,
Object? lastInspectionDate = freezed,
Object? nextInspectionDate = freezed,
Object? remark = freezed,
}) {
return _then(_$CreateEquipmentRequestImpl(
@@ -215,6 +284,10 @@ class __$$CreateEquipmentRequestImplCopyWithImpl<$Res>
? _value.serialNumber
: serialNumber // ignore: cast_nullable_to_non_nullable
as String?,
barcode: freezed == barcode
? _value.barcode
: barcode // ignore: cast_nullable_to_non_nullable
as String?,
purchaseDate: freezed == purchaseDate
? _value.purchaseDate
: purchaseDate // ignore: cast_nullable_to_non_nullable
@@ -223,6 +296,22 @@ class __$$CreateEquipmentRequestImplCopyWithImpl<$Res>
? _value.purchasePrice
: purchasePrice // ignore: cast_nullable_to_non_nullable
as double?,
companyId: freezed == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int?,
warehouseLocationId: freezed == warehouseLocationId
? _value.warehouseLocationId
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
as int?,
lastInspectionDate: freezed == lastInspectionDate
? _value.lastInspectionDate
: lastInspectionDate // ignore: cast_nullable_to_non_nullable
as DateTime?,
nextInspectionDate: freezed == nextInspectionDate
? _value.nextInspectionDate
: nextInspectionDate // ignore: cast_nullable_to_non_nullable
as DateTime?,
remark: freezed == remark
? _value.remark
: remark // ignore: cast_nullable_to_non_nullable
@@ -242,8 +331,17 @@ class _$CreateEquipmentRequestImpl implements _CreateEquipmentRequest {
required this.manufacturer,
@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.barcode,
@JsonKey(name: 'purchase_date') @NaiveDateConverter() this.purchaseDate,
@JsonKey(name: 'purchase_price') @DecimalConverter() this.purchasePrice,
@JsonKey(name: 'company_id') this.companyId,
@JsonKey(name: 'warehouse_location_id') this.warehouseLocationId,
@JsonKey(name: 'last_inspection_date')
@NaiveDateConverter()
this.lastInspectionDate,
@JsonKey(name: 'next_inspection_date')
@NaiveDateConverter()
this.nextInspectionDate,
this.remark});
factory _$CreateEquipmentRequestImpl.fromJson(Map<String, dynamic> json) =>
@@ -267,17 +365,35 @@ class _$CreateEquipmentRequestImpl implements _CreateEquipmentRequest {
@JsonKey(name: 'serial_number')
final String? serialNumber;
@override
final String? barcode;
@override
@JsonKey(name: 'purchase_date')
@NaiveDateConverter()
final DateTime? purchaseDate;
@override
@JsonKey(name: 'purchase_price')
@DecimalConverter()
final double? purchasePrice;
@override
@JsonKey(name: 'company_id')
final int? companyId;
@override
@JsonKey(name: 'warehouse_location_id')
final int? warehouseLocationId;
@override
@JsonKey(name: 'last_inspection_date')
@NaiveDateConverter()
final DateTime? lastInspectionDate;
@override
@JsonKey(name: 'next_inspection_date')
@NaiveDateConverter()
final DateTime? nextInspectionDate;
@override
final String? remark;
@override
String toString() {
return 'CreateEquipmentRequest(equipmentNumber: $equipmentNumber, category1: $category1, category2: $category2, category3: $category3, manufacturer: $manufacturer, modelName: $modelName, serialNumber: $serialNumber, purchaseDate: $purchaseDate, purchasePrice: $purchasePrice, remark: $remark)';
return 'CreateEquipmentRequest(equipmentNumber: $equipmentNumber, category1: $category1, category2: $category2, category3: $category3, manufacturer: $manufacturer, modelName: $modelName, serialNumber: $serialNumber, barcode: $barcode, purchaseDate: $purchaseDate, purchasePrice: $purchasePrice, companyId: $companyId, warehouseLocationId: $warehouseLocationId, lastInspectionDate: $lastInspectionDate, nextInspectionDate: $nextInspectionDate, remark: $remark)';
}
@override
@@ -299,10 +415,19 @@ class _$CreateEquipmentRequestImpl implements _CreateEquipmentRequest {
other.modelName == modelName) &&
(identical(other.serialNumber, serialNumber) ||
other.serialNumber == serialNumber) &&
(identical(other.barcode, barcode) || other.barcode == barcode) &&
(identical(other.purchaseDate, purchaseDate) ||
other.purchaseDate == purchaseDate) &&
(identical(other.purchasePrice, purchasePrice) ||
other.purchasePrice == purchasePrice) &&
(identical(other.companyId, companyId) ||
other.companyId == companyId) &&
(identical(other.warehouseLocationId, warehouseLocationId) ||
other.warehouseLocationId == warehouseLocationId) &&
(identical(other.lastInspectionDate, lastInspectionDate) ||
other.lastInspectionDate == lastInspectionDate) &&
(identical(other.nextInspectionDate, nextInspectionDate) ||
other.nextInspectionDate == nextInspectionDate) &&
(identical(other.remark, remark) || other.remark == remark));
}
@@ -317,8 +442,13 @@ class _$CreateEquipmentRequestImpl implements _CreateEquipmentRequest {
manufacturer,
modelName,
serialNumber,
barcode,
purchaseDate,
purchasePrice,
companyId,
warehouseLocationId,
lastInspectionDate,
nextInspectionDate,
remark);
/// Create a copy of CreateEquipmentRequest
@@ -347,8 +477,21 @@ abstract class _CreateEquipmentRequest implements CreateEquipmentRequest {
required final String manufacturer,
@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? barcode,
@JsonKey(name: 'purchase_date')
@NaiveDateConverter()
final DateTime? purchaseDate,
@JsonKey(name: 'purchase_price')
@DecimalConverter()
final double? purchasePrice,
@JsonKey(name: 'company_id') final int? companyId,
@JsonKey(name: 'warehouse_location_id') final int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date')
@NaiveDateConverter()
final DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date')
@NaiveDateConverter()
final DateTime? nextInspectionDate,
final String? remark}) = _$CreateEquipmentRequestImpl;
factory _CreateEquipmentRequest.fromJson(Map<String, dynamic> json) =
@@ -372,12 +515,30 @@ abstract class _CreateEquipmentRequest implements CreateEquipmentRequest {
@JsonKey(name: 'serial_number')
String? get serialNumber;
@override
String? get barcode;
@override
@JsonKey(name: 'purchase_date')
@NaiveDateConverter()
DateTime? get purchaseDate;
@override
@JsonKey(name: 'purchase_price')
@DecimalConverter()
double? get purchasePrice;
@override
@JsonKey(name: 'company_id')
int? get companyId;
@override
@JsonKey(name: 'warehouse_location_id')
int? get warehouseLocationId;
@override
@JsonKey(name: 'last_inspection_date')
@NaiveDateConverter()
DateTime? get lastInspectionDate;
@override
@JsonKey(name: 'next_inspection_date')
@NaiveDateConverter()
DateTime? get nextInspectionDate;
@override
String? get remark;
/// Create a copy of CreateEquipmentRequest
@@ -395,31 +556,39 @@ UpdateEquipmentRequest _$UpdateEquipmentRequestFromJson(
/// @nodoc
mixin _$UpdateEquipmentRequest {
@JsonKey(includeIfNull: false)
String? get category1 => throw _privateConstructorUsedError;
@JsonKey(includeIfNull: false)
String? get category2 => throw _privateConstructorUsedError;
@JsonKey(includeIfNull: false)
String? get category3 => throw _privateConstructorUsedError;
@JsonKey(includeIfNull: false)
String? get manufacturer => throw _privateConstructorUsedError;
@JsonKey(name: 'model_name')
@JsonKey(name: 'model_name', includeIfNull: false)
String? get modelName => throw _privateConstructorUsedError;
@JsonKey(name: 'serial_number')
@JsonKey(name: 'serial_number', includeIfNull: false)
String? get serialNumber => throw _privateConstructorUsedError;
@JsonKey(includeIfNull: false)
String? get barcode => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_date')
@JsonKey(name: 'purchase_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? get purchaseDate => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_price')
@JsonKey(name: 'purchase_price', includeIfNull: false)
@DecimalConverter()
double? get purchasePrice => throw _privateConstructorUsedError;
@EquipmentStatusJsonConverter()
@JsonKey(includeIfNull: false)
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')
@JsonKey(name: 'company_id', includeIfNull: false)
int? get companyId => throw _privateConstructorUsedError;
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
int? get warehouseLocationId => throw _privateConstructorUsedError;
@JsonKey(name: 'last_inspection_date')
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? get lastInspectionDate => throw _privateConstructorUsedError;
@JsonKey(name: 'next_inspection_date')
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? get nextInspectionDate => throw _privateConstructorUsedError;
@JsonKey(includeIfNull: false)
String? get remark => throw _privateConstructorUsedError;
/// Serializes this UpdateEquipmentRequest to a JSON map.
@@ -439,22 +608,31 @@ abstract class $UpdateEquipmentRequestCopyWith<$Res> {
_$UpdateEquipmentRequestCopyWithImpl<$Res, UpdateEquipmentRequest>;
@useResult
$Res call(
{String? category1,
String? category2,
String? category3,
String? manufacturer,
@JsonKey(name: 'model_name') String? modelName,
@JsonKey(name: 'serial_number') String? serialNumber,
String? barcode,
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') double? purchasePrice,
@EquipmentStatusJsonConverter() String? status,
@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});
{@JsonKey(includeIfNull: false) String? category1,
@JsonKey(includeIfNull: false) String? category2,
@JsonKey(includeIfNull: false) String? category3,
@JsonKey(includeIfNull: false) String? manufacturer,
@JsonKey(name: 'model_name', includeIfNull: false) String? modelName,
@JsonKey(name: 'serial_number', includeIfNull: false)
String? serialNumber,
@JsonKey(includeIfNull: false) String? barcode,
@JsonKey(name: 'purchase_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? purchaseDate,
@JsonKey(name: 'purchase_price', includeIfNull: false)
@DecimalConverter()
double? purchasePrice,
@JsonKey(includeIfNull: false) String? status,
@JsonKey(name: 'company_id', includeIfNull: false) int? companyId,
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? nextInspectionDate,
@JsonKey(includeIfNull: false) String? remark});
}
/// @nodoc
@@ -483,8 +661,7 @@ class _$UpdateEquipmentRequestCopyWithImpl<$Res,
Object? purchaseDate = freezed,
Object? purchasePrice = freezed,
Object? status = freezed,
Object? currentCompanyId = freezed,
Object? currentBranchId = freezed,
Object? companyId = freezed,
Object? warehouseLocationId = freezed,
Object? lastInspectionDate = freezed,
Object? nextInspectionDate = freezed,
@@ -531,13 +708,9 @@ class _$UpdateEquipmentRequestCopyWithImpl<$Res,
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String?,
currentCompanyId: freezed == currentCompanyId
? _value.currentCompanyId
: currentCompanyId // ignore: cast_nullable_to_non_nullable
as int?,
currentBranchId: freezed == currentBranchId
? _value.currentBranchId
: currentBranchId // ignore: cast_nullable_to_non_nullable
companyId: freezed == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int?,
warehouseLocationId: freezed == warehouseLocationId
? _value.warehouseLocationId
@@ -569,22 +742,31 @@ abstract class _$$UpdateEquipmentRequestImplCopyWith<$Res>
@override
@useResult
$Res call(
{String? category1,
String? category2,
String? category3,
String? manufacturer,
@JsonKey(name: 'model_name') String? modelName,
@JsonKey(name: 'serial_number') String? serialNumber,
String? barcode,
@JsonKey(name: 'purchase_date') DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') double? purchasePrice,
@EquipmentStatusJsonConverter() String? status,
@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});
{@JsonKey(includeIfNull: false) String? category1,
@JsonKey(includeIfNull: false) String? category2,
@JsonKey(includeIfNull: false) String? category3,
@JsonKey(includeIfNull: false) String? manufacturer,
@JsonKey(name: 'model_name', includeIfNull: false) String? modelName,
@JsonKey(name: 'serial_number', includeIfNull: false)
String? serialNumber,
@JsonKey(includeIfNull: false) String? barcode,
@JsonKey(name: 'purchase_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? purchaseDate,
@JsonKey(name: 'purchase_price', includeIfNull: false)
@DecimalConverter()
double? purchasePrice,
@JsonKey(includeIfNull: false) String? status,
@JsonKey(name: 'company_id', includeIfNull: false) int? companyId,
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? nextInspectionDate,
@JsonKey(includeIfNull: false) String? remark});
}
/// @nodoc
@@ -612,8 +794,7 @@ class __$$UpdateEquipmentRequestImplCopyWithImpl<$Res>
Object? purchaseDate = freezed,
Object? purchasePrice = freezed,
Object? status = freezed,
Object? currentCompanyId = freezed,
Object? currentBranchId = freezed,
Object? companyId = freezed,
Object? warehouseLocationId = freezed,
Object? lastInspectionDate = freezed,
Object? nextInspectionDate = freezed,
@@ -660,13 +841,9 @@ class __$$UpdateEquipmentRequestImplCopyWithImpl<$Res>
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String?,
currentCompanyId: freezed == currentCompanyId
? _value.currentCompanyId
: currentCompanyId // ignore: cast_nullable_to_non_nullable
as int?,
currentBranchId: freezed == currentBranchId
? _value.currentBranchId
: currentBranchId // ignore: cast_nullable_to_non_nullable
companyId: freezed == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int?,
warehouseLocationId: freezed == warehouseLocationId
? _value.warehouseLocationId
@@ -692,72 +869,87 @@ class __$$UpdateEquipmentRequestImplCopyWithImpl<$Res>
@JsonSerializable()
class _$UpdateEquipmentRequestImpl implements _UpdateEquipmentRequest {
const _$UpdateEquipmentRequestImpl(
{this.category1,
this.category2,
this.category3,
this.manufacturer,
@JsonKey(name: 'model_name') this.modelName,
@JsonKey(name: 'serial_number') this.serialNumber,
this.barcode,
@JsonKey(name: 'purchase_date') this.purchaseDate,
@JsonKey(name: 'purchase_price') this.purchasePrice,
@EquipmentStatusJsonConverter() this.status,
@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});
{@JsonKey(includeIfNull: false) this.category1,
@JsonKey(includeIfNull: false) this.category2,
@JsonKey(includeIfNull: false) this.category3,
@JsonKey(includeIfNull: false) this.manufacturer,
@JsonKey(name: 'model_name', includeIfNull: false) this.modelName,
@JsonKey(name: 'serial_number', includeIfNull: false) this.serialNumber,
@JsonKey(includeIfNull: false) this.barcode,
@JsonKey(name: 'purchase_date', includeIfNull: false)
@NaiveDateConverter()
this.purchaseDate,
@JsonKey(name: 'purchase_price', includeIfNull: false)
@DecimalConverter()
this.purchasePrice,
@JsonKey(includeIfNull: false) this.status,
@JsonKey(name: 'company_id', includeIfNull: false) this.companyId,
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
this.warehouseLocationId,
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
@NaiveDateConverter()
this.lastInspectionDate,
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
@NaiveDateConverter()
this.nextInspectionDate,
@JsonKey(includeIfNull: false) this.remark});
factory _$UpdateEquipmentRequestImpl.fromJson(Map<String, dynamic> json) =>
_$$UpdateEquipmentRequestImplFromJson(json);
@override
@JsonKey(includeIfNull: false)
final String? category1;
@override
@JsonKey(includeIfNull: false)
final String? category2;
@override
@JsonKey(includeIfNull: false)
final String? category3;
@override
@JsonKey(includeIfNull: false)
final String? manufacturer;
@override
@JsonKey(name: 'model_name')
@JsonKey(name: 'model_name', includeIfNull: false)
final String? modelName;
@override
@JsonKey(name: 'serial_number')
@JsonKey(name: 'serial_number', includeIfNull: false)
final String? serialNumber;
@override
@JsonKey(includeIfNull: false)
final String? barcode;
@override
@JsonKey(name: 'purchase_date')
@JsonKey(name: 'purchase_date', includeIfNull: false)
@NaiveDateConverter()
final DateTime? purchaseDate;
@override
@JsonKey(name: 'purchase_price')
@JsonKey(name: 'purchase_price', includeIfNull: false)
@DecimalConverter()
final double? purchasePrice;
@override
@EquipmentStatusJsonConverter()
@JsonKey(includeIfNull: false)
final String? status;
@override
@JsonKey(name: 'current_company_id')
final int? currentCompanyId;
@JsonKey(name: 'company_id', includeIfNull: false)
final int? companyId;
@override
@JsonKey(name: 'current_branch_id')
final int? currentBranchId;
@override
@JsonKey(name: 'warehouse_location_id')
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
final int? warehouseLocationId;
@override
@JsonKey(name: 'last_inspection_date')
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
@NaiveDateConverter()
final DateTime? lastInspectionDate;
@override
@JsonKey(name: 'next_inspection_date')
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
@NaiveDateConverter()
final DateTime? nextInspectionDate;
@override
@JsonKey(includeIfNull: false)
final String? remark;
@override
String toString() {
return 'UpdateEquipmentRequest(category1: $category1, category2: $category2, category3: $category3, manufacturer: $manufacturer, modelName: $modelName, serialNumber: $serialNumber, barcode: $barcode, purchaseDate: $purchaseDate, purchasePrice: $purchasePrice, status: $status, currentCompanyId: $currentCompanyId, currentBranchId: $currentBranchId, warehouseLocationId: $warehouseLocationId, lastInspectionDate: $lastInspectionDate, nextInspectionDate: $nextInspectionDate, remark: $remark)';
return 'UpdateEquipmentRequest(category1: $category1, category2: $category2, category3: $category3, manufacturer: $manufacturer, modelName: $modelName, serialNumber: $serialNumber, barcode: $barcode, purchaseDate: $purchaseDate, purchasePrice: $purchasePrice, status: $status, companyId: $companyId, warehouseLocationId: $warehouseLocationId, lastInspectionDate: $lastInspectionDate, nextInspectionDate: $nextInspectionDate, remark: $remark)';
}
@override
@@ -783,10 +975,8 @@ class _$UpdateEquipmentRequestImpl implements _UpdateEquipmentRequest {
(identical(other.purchasePrice, purchasePrice) ||
other.purchasePrice == purchasePrice) &&
(identical(other.status, status) || other.status == status) &&
(identical(other.currentCompanyId, currentCompanyId) ||
other.currentCompanyId == currentCompanyId) &&
(identical(other.currentBranchId, currentBranchId) ||
other.currentBranchId == currentBranchId) &&
(identical(other.companyId, companyId) ||
other.companyId == companyId) &&
(identical(other.warehouseLocationId, warehouseLocationId) ||
other.warehouseLocationId == warehouseLocationId) &&
(identical(other.lastInspectionDate, lastInspectionDate) ||
@@ -810,8 +1000,7 @@ class _$UpdateEquipmentRequestImpl implements _UpdateEquipmentRequest {
purchaseDate,
purchasePrice,
status,
currentCompanyId,
currentBranchId,
companyId,
warehouseLocationId,
lastInspectionDate,
nextInspectionDate,
@@ -836,67 +1025,85 @@ class _$UpdateEquipmentRequestImpl implements _UpdateEquipmentRequest {
abstract class _UpdateEquipmentRequest implements UpdateEquipmentRequest {
const factory _UpdateEquipmentRequest(
{final String? category1,
final String? category2,
final String? category3,
final String? manufacturer,
@JsonKey(name: 'model_name') final String? modelName,
@JsonKey(name: 'serial_number') final String? serialNumber,
final String? barcode,
@JsonKey(name: 'purchase_date') final DateTime? purchaseDate,
@JsonKey(name: 'purchase_price') final double? purchasePrice,
@EquipmentStatusJsonConverter() final String? status,
@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,
{@JsonKey(includeIfNull: false) final String? category1,
@JsonKey(includeIfNull: false) final String? category2,
@JsonKey(includeIfNull: false) final String? category3,
@JsonKey(includeIfNull: false) final String? manufacturer,
@JsonKey(name: 'model_name', includeIfNull: false)
final String? modelName,
@JsonKey(name: 'serial_number', includeIfNull: false)
final String? serialNumber,
@JsonKey(includeIfNull: false) final String? barcode,
@JsonKey(name: 'purchase_date', includeIfNull: false)
@NaiveDateConverter()
final DateTime? purchaseDate,
@JsonKey(name: 'purchase_price', includeIfNull: false)
@DecimalConverter()
final double? purchasePrice,
@JsonKey(includeIfNull: false) final String? status,
@JsonKey(name: 'company_id', includeIfNull: false) final int? companyId,
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
final int? warehouseLocationId,
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
@NaiveDateConverter()
final DateTime? lastInspectionDate,
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
@NaiveDateConverter()
final DateTime? nextInspectionDate,
@JsonKey(includeIfNull: false)
final String? remark}) = _$UpdateEquipmentRequestImpl;
factory _UpdateEquipmentRequest.fromJson(Map<String, dynamic> json) =
_$UpdateEquipmentRequestImpl.fromJson;
@override
@JsonKey(includeIfNull: false)
String? get category1;
@override
@JsonKey(includeIfNull: false)
String? get category2;
@override
@JsonKey(includeIfNull: false)
String? get category3;
@override
@JsonKey(includeIfNull: false)
String? get manufacturer;
@override
@JsonKey(name: 'model_name')
@JsonKey(name: 'model_name', includeIfNull: false)
String? get modelName;
@override
@JsonKey(name: 'serial_number')
@JsonKey(name: 'serial_number', includeIfNull: false)
String? get serialNumber;
@override
@JsonKey(includeIfNull: false)
String? get barcode;
@override
@JsonKey(name: 'purchase_date')
@JsonKey(name: 'purchase_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? get purchaseDate;
@override
@JsonKey(name: 'purchase_price')
@JsonKey(name: 'purchase_price', includeIfNull: false)
@DecimalConverter()
double? get purchasePrice;
@override
@EquipmentStatusJsonConverter()
@JsonKey(includeIfNull: false)
String? get status;
@override
@JsonKey(name: 'current_company_id')
int? get currentCompanyId;
@JsonKey(name: 'company_id', includeIfNull: false)
int? get companyId;
@override
@JsonKey(name: 'current_branch_id')
int? get currentBranchId;
@override
@JsonKey(name: 'warehouse_location_id')
@JsonKey(name: 'warehouse_location_id', includeIfNull: false)
int? get warehouseLocationId;
@override
@JsonKey(name: 'last_inspection_date')
@JsonKey(name: 'last_inspection_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? get lastInspectionDate;
@override
@JsonKey(name: 'next_inspection_date')
@JsonKey(name: 'next_inspection_date', includeIfNull: false)
@NaiveDateConverter()
DateTime? get nextInspectionDate;
@override
@JsonKey(includeIfNull: false)
String? get remark;
/// Create a copy of UpdateEquipmentRequest