feat: Equipment DTO 호환성 수정 전 백업 커밋

- Equipment DTO 필드명 변경 (name → equipment_number 등) 완료
- Phase 1-7 파생 수정사항 체계적 진행 예정
- 통합 모델 정리, Controller 동기화, UI 업데이트 예정

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
JiWoong Sul
2025-08-21 19:17:43 +09:00
parent ca830063f0
commit c141c0b914
18 changed files with 2132 additions and 3202 deletions

View File

@@ -7,24 +7,22 @@ part 'equipment_dto.g.dart';
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,
@JsonKey(name: 'equipment_number') required String equipmentNumber,
@JsonKey(name: 'serial_number') String? serialNumber,
String? category1,
String? category2,
String? category3,
required String manufacturer,
@JsonKey(name: 'model_name') String? modelName,
String? barcode,
required String status,
@JsonKey(name: 'company_id') required int companyId,
@JsonKey(name: 'company_name') String? companyName,
@JsonKey(name: 'company_id') int? companyId,
@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: 'last_inspection_date') String? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') String? nextInspectionDate,
String? remark,
@JsonKey(name: 'created_at') DateTime? createdAt,
@JsonKey(name: 'updated_at') DateTime? updatedAt,
}) = _EquipmentDto;

View File

@@ -21,36 +21,31 @@ EquipmentDto _$EquipmentDtoFromJson(Map<String, dynamic> json) {
/// @nodoc
mixin _$EquipmentDto {
int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'equipment_number')
String get equipmentNumber => throw _privateConstructorUsedError;
@JsonKey(name: 'serial_number')
String get serialNumber => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String? get category => throw _privateConstructorUsedError;
String? get manufacturer => throw _privateConstructorUsedError;
String? get model => throw _privateConstructorUsedError;
String? get serialNumber => 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;
String? get barcode => throw _privateConstructorUsedError;
String get status => throw _privateConstructorUsedError;
@JsonKey(name: 'company_id')
int get companyId => throw _privateConstructorUsedError;
@JsonKey(name: 'company_name')
String? get companyName => throw _privateConstructorUsedError;
int? get companyId => throw _privateConstructorUsedError;
@JsonKey(name: 'warehouse_location_id')
int? get warehouseLocationId => throw _privateConstructorUsedError;
@JsonKey(name: 'warehouse_name')
String? get warehouseName => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_date')
String? get purchaseDate => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_price')
double? get purchasePrice => throw _privateConstructorUsedError;
@JsonKey(name: 'current_value')
double? get currentValue => throw _privateConstructorUsedError;
@JsonKey(name: 'warranty_expiry')
String? get warrantyExpiry => throw _privateConstructorUsedError;
@JsonKey(name: 'last_maintenance_date')
String? get lastMaintenanceDate => throw _privateConstructorUsedError;
@JsonKey(name: 'next_maintenance_date')
String? get nextMaintenanceDate => throw _privateConstructorUsedError;
Map<String, dynamic>? get specifications =>
throw _privateConstructorUsedError;
String? get notes => throw _privateConstructorUsedError;
@JsonKey(name: 'last_inspection_date')
String? get lastInspectionDate => throw _privateConstructorUsedError;
@JsonKey(name: 'next_inspection_date')
String? get nextInspectionDate => throw _privateConstructorUsedError;
String? get remark => throw _privateConstructorUsedError;
@JsonKey(name: 'created_at')
DateTime? get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at')
@@ -74,24 +69,22 @@ abstract class $EquipmentDtoCopyWith<$Res> {
@useResult
$Res call(
{int id,
@JsonKey(name: 'serial_number') String serialNumber,
String name,
String? category,
String? manufacturer,
String? model,
@JsonKey(name: 'equipment_number') String equipmentNumber,
@JsonKey(name: 'serial_number') String? serialNumber,
String? category1,
String? category2,
String? category3,
String manufacturer,
@JsonKey(name: 'model_name') String? modelName,
String? barcode,
String status,
@JsonKey(name: 'company_id') int companyId,
@JsonKey(name: 'company_name') String? companyName,
@JsonKey(name: 'company_id') int? companyId,
@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: 'last_inspection_date') String? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') String? nextInspectionDate,
String? remark,
@JsonKey(name: 'created_at') DateTime? createdAt,
@JsonKey(name: 'updated_at') DateTime? updatedAt});
}
@@ -112,24 +105,22 @@ class _$EquipmentDtoCopyWithImpl<$Res, $Val extends EquipmentDto>
@override
$Res call({
Object? id = null,
Object? serialNumber = null,
Object? name = null,
Object? category = freezed,
Object? manufacturer = freezed,
Object? model = freezed,
Object? equipmentNumber = null,
Object? serialNumber = freezed,
Object? category1 = freezed,
Object? category2 = freezed,
Object? category3 = freezed,
Object? manufacturer = null,
Object? modelName = freezed,
Object? barcode = freezed,
Object? status = null,
Object? companyId = null,
Object? companyName = freezed,
Object? companyId = freezed,
Object? warehouseLocationId = freezed,
Object? warehouseName = freezed,
Object? purchaseDate = freezed,
Object? purchasePrice = freezed,
Object? currentValue = freezed,
Object? warrantyExpiry = freezed,
Object? lastMaintenanceDate = freezed,
Object? nextMaintenanceDate = freezed,
Object? specifications = freezed,
Object? notes = freezed,
Object? lastInspectionDate = freezed,
Object? nextInspectionDate = freezed,
Object? remark = freezed,
Object? createdAt = freezed,
Object? updatedAt = freezed,
}) {
@@ -138,46 +129,50 @@ class _$EquipmentDtoCopyWithImpl<$Res, $Val extends EquipmentDto>
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
serialNumber: null == serialNumber
equipmentNumber: null == equipmentNumber
? _value.equipmentNumber
: equipmentNumber // ignore: cast_nullable_to_non_nullable
as String,
serialNumber: freezed == serialNumber
? _value.serialNumber
: serialNumber // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
category: freezed == category
? _value.category
: category // ignore: cast_nullable_to_non_nullable
as String?,
manufacturer: freezed == manufacturer
category1: freezed == category1
? _value.category1
: category1 // ignore: cast_nullable_to_non_nullable
as String?,
category2: freezed == category2
? _value.category2
: category2 // ignore: cast_nullable_to_non_nullable
as String?,
category3: freezed == category3
? _value.category3
: category3 // ignore: cast_nullable_to_non_nullable
as String?,
manufacturer: null == manufacturer
? _value.manufacturer
: manufacturer // ignore: cast_nullable_to_non_nullable
as String,
modelName: freezed == modelName
? _value.modelName
: modelName // ignore: cast_nullable_to_non_nullable
as String?,
model: freezed == model
? _value.model
: model // ignore: cast_nullable_to_non_nullable
barcode: freezed == barcode
? _value.barcode
: barcode // ignore: cast_nullable_to_non_nullable
as String?,
status: null == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String,
companyId: null == companyId
companyId: freezed == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int,
companyName: freezed == companyName
? _value.companyName
: companyName // ignore: cast_nullable_to_non_nullable
as String?,
as int?,
warehouseLocationId: freezed == warehouseLocationId
? _value.warehouseLocationId
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
as int?,
warehouseName: freezed == warehouseName
? _value.warehouseName
: warehouseName // ignore: cast_nullable_to_non_nullable
as String?,
purchaseDate: freezed == purchaseDate
? _value.purchaseDate
: purchaseDate // ignore: cast_nullable_to_non_nullable
@@ -186,29 +181,17 @@ class _$EquipmentDtoCopyWithImpl<$Res, $Val extends EquipmentDto>
? _value.purchasePrice
: purchasePrice // ignore: cast_nullable_to_non_nullable
as double?,
currentValue: freezed == currentValue
? _value.currentValue
: currentValue // ignore: cast_nullable_to_non_nullable
as double?,
warrantyExpiry: freezed == warrantyExpiry
? _value.warrantyExpiry
: warrantyExpiry // ignore: cast_nullable_to_non_nullable
lastInspectionDate: freezed == lastInspectionDate
? _value.lastInspectionDate
: lastInspectionDate // ignore: cast_nullable_to_non_nullable
as String?,
lastMaintenanceDate: freezed == lastMaintenanceDate
? _value.lastMaintenanceDate
: lastMaintenanceDate // ignore: cast_nullable_to_non_nullable
nextInspectionDate: freezed == nextInspectionDate
? _value.nextInspectionDate
: nextInspectionDate // ignore: cast_nullable_to_non_nullable
as String?,
nextMaintenanceDate: freezed == nextMaintenanceDate
? _value.nextMaintenanceDate
: nextMaintenanceDate // ignore: cast_nullable_to_non_nullable
as String?,
specifications: freezed == specifications
? _value.specifications
: specifications // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
remark: freezed == remark
? _value.remark
: remark // ignore: cast_nullable_to_non_nullable
as String?,
createdAt: freezed == createdAt
? _value.createdAt
@@ -232,24 +215,22 @@ abstract class _$$EquipmentDtoImplCopyWith<$Res>
@useResult
$Res call(
{int id,
@JsonKey(name: 'serial_number') String serialNumber,
String name,
String? category,
String? manufacturer,
String? model,
@JsonKey(name: 'equipment_number') String equipmentNumber,
@JsonKey(name: 'serial_number') String? serialNumber,
String? category1,
String? category2,
String? category3,
String manufacturer,
@JsonKey(name: 'model_name') String? modelName,
String? barcode,
String status,
@JsonKey(name: 'company_id') int companyId,
@JsonKey(name: 'company_name') String? companyName,
@JsonKey(name: 'company_id') int? companyId,
@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: 'last_inspection_date') String? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') String? nextInspectionDate,
String? remark,
@JsonKey(name: 'created_at') DateTime? createdAt,
@JsonKey(name: 'updated_at') DateTime? updatedAt});
}
@@ -268,24 +249,22 @@ class __$$EquipmentDtoImplCopyWithImpl<$Res>
@override
$Res call({
Object? id = null,
Object? serialNumber = null,
Object? name = null,
Object? category = freezed,
Object? manufacturer = freezed,
Object? model = freezed,
Object? equipmentNumber = null,
Object? serialNumber = freezed,
Object? category1 = freezed,
Object? category2 = freezed,
Object? category3 = freezed,
Object? manufacturer = null,
Object? modelName = freezed,
Object? barcode = freezed,
Object? status = null,
Object? companyId = null,
Object? companyName = freezed,
Object? companyId = freezed,
Object? warehouseLocationId = freezed,
Object? warehouseName = freezed,
Object? purchaseDate = freezed,
Object? purchasePrice = freezed,
Object? currentValue = freezed,
Object? warrantyExpiry = freezed,
Object? lastMaintenanceDate = freezed,
Object? nextMaintenanceDate = freezed,
Object? specifications = freezed,
Object? notes = freezed,
Object? lastInspectionDate = freezed,
Object? nextInspectionDate = freezed,
Object? remark = freezed,
Object? createdAt = freezed,
Object? updatedAt = freezed,
}) {
@@ -294,46 +273,50 @@ class __$$EquipmentDtoImplCopyWithImpl<$Res>
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
serialNumber: null == serialNumber
equipmentNumber: null == equipmentNumber
? _value.equipmentNumber
: equipmentNumber // ignore: cast_nullable_to_non_nullable
as String,
serialNumber: freezed == serialNumber
? _value.serialNumber
: serialNumber // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
category: freezed == category
? _value.category
: category // ignore: cast_nullable_to_non_nullable
as String?,
manufacturer: freezed == manufacturer
category1: freezed == category1
? _value.category1
: category1 // ignore: cast_nullable_to_non_nullable
as String?,
category2: freezed == category2
? _value.category2
: category2 // ignore: cast_nullable_to_non_nullable
as String?,
category3: freezed == category3
? _value.category3
: category3 // ignore: cast_nullable_to_non_nullable
as String?,
manufacturer: null == manufacturer
? _value.manufacturer
: manufacturer // ignore: cast_nullable_to_non_nullable
as String,
modelName: freezed == modelName
? _value.modelName
: modelName // ignore: cast_nullable_to_non_nullable
as String?,
model: freezed == model
? _value.model
: model // ignore: cast_nullable_to_non_nullable
barcode: freezed == barcode
? _value.barcode
: barcode // ignore: cast_nullable_to_non_nullable
as String?,
status: null == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String,
companyId: null == companyId
companyId: freezed == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int,
companyName: freezed == companyName
? _value.companyName
: companyName // ignore: cast_nullable_to_non_nullable
as String?,
as int?,
warehouseLocationId: freezed == warehouseLocationId
? _value.warehouseLocationId
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
as int?,
warehouseName: freezed == warehouseName
? _value.warehouseName
: warehouseName // ignore: cast_nullable_to_non_nullable
as String?,
purchaseDate: freezed == purchaseDate
? _value.purchaseDate
: purchaseDate // ignore: cast_nullable_to_non_nullable
@@ -342,29 +325,17 @@ class __$$EquipmentDtoImplCopyWithImpl<$Res>
? _value.purchasePrice
: purchasePrice // ignore: cast_nullable_to_non_nullable
as double?,
currentValue: freezed == currentValue
? _value.currentValue
: currentValue // ignore: cast_nullable_to_non_nullable
as double?,
warrantyExpiry: freezed == warrantyExpiry
? _value.warrantyExpiry
: warrantyExpiry // ignore: cast_nullable_to_non_nullable
lastInspectionDate: freezed == lastInspectionDate
? _value.lastInspectionDate
: lastInspectionDate // ignore: cast_nullable_to_non_nullable
as String?,
lastMaintenanceDate: freezed == lastMaintenanceDate
? _value.lastMaintenanceDate
: lastMaintenanceDate // ignore: cast_nullable_to_non_nullable
nextInspectionDate: freezed == nextInspectionDate
? _value.nextInspectionDate
: nextInspectionDate // ignore: cast_nullable_to_non_nullable
as String?,
nextMaintenanceDate: freezed == nextMaintenanceDate
? _value.nextMaintenanceDate
: nextMaintenanceDate // ignore: cast_nullable_to_non_nullable
as String?,
specifications: freezed == specifications
? _value._specifications
: specifications // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
remark: freezed == remark
? _value.remark
: remark // ignore: cast_nullable_to_non_nullable
as String?,
createdAt: freezed == createdAt
? _value.createdAt
@@ -383,27 +354,24 @@ class __$$EquipmentDtoImplCopyWithImpl<$Res>
class _$EquipmentDtoImpl implements _EquipmentDto {
const _$EquipmentDtoImpl(
{required this.id,
@JsonKey(name: 'serial_number') required this.serialNumber,
required this.name,
this.category,
this.manufacturer,
this.model,
@JsonKey(name: 'equipment_number') required this.equipmentNumber,
@JsonKey(name: 'serial_number') this.serialNumber,
this.category1,
this.category2,
this.category3,
required this.manufacturer,
@JsonKey(name: 'model_name') this.modelName,
this.barcode,
required this.status,
@JsonKey(name: 'company_id') required this.companyId,
@JsonKey(name: 'company_name') this.companyName,
@JsonKey(name: 'company_id') this.companyId,
@JsonKey(name: 'warehouse_location_id') this.warehouseLocationId,
@JsonKey(name: 'warehouse_name') this.warehouseName,
@JsonKey(name: 'purchase_date') this.purchaseDate,
@JsonKey(name: 'purchase_price') this.purchasePrice,
@JsonKey(name: 'current_value') this.currentValue,
@JsonKey(name: 'warranty_expiry') this.warrantyExpiry,
@JsonKey(name: 'last_maintenance_date') this.lastMaintenanceDate,
@JsonKey(name: 'next_maintenance_date') this.nextMaintenanceDate,
final Map<String, dynamic>? specifications,
this.notes,
@JsonKey(name: 'last_inspection_date') this.lastInspectionDate,
@JsonKey(name: 'next_inspection_date') this.nextInspectionDate,
this.remark,
@JsonKey(name: 'created_at') this.createdAt,
@JsonKey(name: 'updated_at') this.updatedAt})
: _specifications = specifications;
@JsonKey(name: 'updated_at') this.updatedAt});
factory _$EquipmentDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$EquipmentDtoImplFromJson(json);
@@ -411,60 +379,46 @@ class _$EquipmentDtoImpl implements _EquipmentDto {
@override
final int id;
@override
@JsonKey(name: 'equipment_number')
final String equipmentNumber;
@override
@JsonKey(name: 'serial_number')
final String serialNumber;
final String? serialNumber;
@override
final String name;
final String? category1;
@override
final String? category;
final String? category2;
@override
final String? manufacturer;
final String? category3;
@override
final String? model;
final String manufacturer;
@override
@JsonKey(name: 'model_name')
final String? modelName;
@override
final String? barcode;
@override
final String status;
@override
@JsonKey(name: 'company_id')
final int companyId;
@override
@JsonKey(name: 'company_name')
final String? companyName;
final int? companyId;
@override
@JsonKey(name: 'warehouse_location_id')
final int? warehouseLocationId;
@override
@JsonKey(name: 'warehouse_name')
final String? warehouseName;
@override
@JsonKey(name: 'purchase_date')
final String? purchaseDate;
@override
@JsonKey(name: 'purchase_price')
final double? purchasePrice;
@override
@JsonKey(name: 'current_value')
final double? currentValue;
@JsonKey(name: 'last_inspection_date')
final String? lastInspectionDate;
@override
@JsonKey(name: 'warranty_expiry')
final String? warrantyExpiry;
@JsonKey(name: 'next_inspection_date')
final String? nextInspectionDate;
@override
@JsonKey(name: 'last_maintenance_date')
final String? lastMaintenanceDate;
@override
@JsonKey(name: 'next_maintenance_date')
final String? nextMaintenanceDate;
final Map<String, dynamic>? _specifications;
@override
Map<String, dynamic>? get specifications {
final value = _specifications;
if (value == null) return null;
if (_specifications is EqualUnmodifiableMapView) return _specifications;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(value);
}
@override
final String? notes;
final String? remark;
@override
@JsonKey(name: 'created_at')
final DateTime? createdAt;
@@ -474,7 +428,7 @@ class _$EquipmentDtoImpl implements _EquipmentDto {
@override
String toString() {
return 'EquipmentDto(id: $id, serialNumber: $serialNumber, name: $name, category: $category, manufacturer: $manufacturer, model: $model, status: $status, companyId: $companyId, companyName: $companyName, warehouseLocationId: $warehouseLocationId, warehouseName: $warehouseName, purchaseDate: $purchaseDate, purchasePrice: $purchasePrice, currentValue: $currentValue, warrantyExpiry: $warrantyExpiry, lastMaintenanceDate: $lastMaintenanceDate, nextMaintenanceDate: $nextMaintenanceDate, specifications: $specifications, notes: $notes, createdAt: $createdAt, updatedAt: $updatedAt)';
return 'EquipmentDto(id: $id, equipmentNumber: $equipmentNumber, serialNumber: $serialNumber, category1: $category1, category2: $category2, category3: $category3, manufacturer: $manufacturer, modelName: $modelName, barcode: $barcode, status: $status, companyId: $companyId, warehouseLocationId: $warehouseLocationId, purchaseDate: $purchaseDate, purchasePrice: $purchasePrice, lastInspectionDate: $lastInspectionDate, nextInspectionDate: $nextInspectionDate, remark: $remark, createdAt: $createdAt, updatedAt: $updatedAt)';
}
@override
@@ -483,38 +437,35 @@ class _$EquipmentDtoImpl implements _EquipmentDto {
(other.runtimeType == runtimeType &&
other is _$EquipmentDtoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.equipmentNumber, equipmentNumber) ||
other.equipmentNumber == equipmentNumber) &&
(identical(other.serialNumber, serialNumber) ||
other.serialNumber == serialNumber) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.category, category) ||
other.category == category) &&
(identical(other.category1, category1) ||
other.category1 == category1) &&
(identical(other.category2, category2) ||
other.category2 == category2) &&
(identical(other.category3, category3) ||
other.category3 == category3) &&
(identical(other.manufacturer, manufacturer) ||
other.manufacturer == manufacturer) &&
(identical(other.model, model) || other.model == model) &&
(identical(other.modelName, modelName) ||
other.modelName == modelName) &&
(identical(other.barcode, barcode) || other.barcode == barcode) &&
(identical(other.status, status) || other.status == status) &&
(identical(other.companyId, companyId) ||
other.companyId == companyId) &&
(identical(other.companyName, companyName) ||
other.companyName == companyName) &&
(identical(other.warehouseLocationId, warehouseLocationId) ||
other.warehouseLocationId == warehouseLocationId) &&
(identical(other.warehouseName, warehouseName) ||
other.warehouseName == warehouseName) &&
(identical(other.purchaseDate, purchaseDate) ||
other.purchaseDate == purchaseDate) &&
(identical(other.purchasePrice, purchasePrice) ||
other.purchasePrice == purchasePrice) &&
(identical(other.currentValue, currentValue) ||
other.currentValue == currentValue) &&
(identical(other.warrantyExpiry, warrantyExpiry) ||
other.warrantyExpiry == warrantyExpiry) &&
(identical(other.lastMaintenanceDate, lastMaintenanceDate) ||
other.lastMaintenanceDate == lastMaintenanceDate) &&
(identical(other.nextMaintenanceDate, nextMaintenanceDate) ||
other.nextMaintenanceDate == nextMaintenanceDate) &&
const DeepCollectionEquality()
.equals(other._specifications, _specifications) &&
(identical(other.notes, notes) || other.notes == notes) &&
(identical(other.lastInspectionDate, lastInspectionDate) ||
other.lastInspectionDate == lastInspectionDate) &&
(identical(other.nextInspectionDate, nextInspectionDate) ||
other.nextInspectionDate == nextInspectionDate) &&
(identical(other.remark, remark) || other.remark == remark) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
@@ -526,24 +477,22 @@ class _$EquipmentDtoImpl implements _EquipmentDto {
int get hashCode => Object.hashAll([
runtimeType,
id,
equipmentNumber,
serialNumber,
name,
category,
category1,
category2,
category3,
manufacturer,
model,
modelName,
barcode,
status,
companyId,
companyName,
warehouseLocationId,
warehouseName,
purchaseDate,
purchasePrice,
currentValue,
warrantyExpiry,
lastMaintenanceDate,
nextMaintenanceDate,
const DeepCollectionEquality().hash(_specifications),
notes,
lastInspectionDate,
nextInspectionDate,
remark,
createdAt,
updatedAt
]);
@@ -567,24 +516,22 @@ class _$EquipmentDtoImpl implements _EquipmentDto {
abstract class _EquipmentDto implements EquipmentDto {
const factory _EquipmentDto(
{required final int id,
@JsonKey(name: 'serial_number') required final String serialNumber,
required final String name,
final String? category,
final String? manufacturer,
final String? model,
@JsonKey(name: 'equipment_number') required final String equipmentNumber,
@JsonKey(name: 'serial_number') final String? serialNumber,
final String? category1,
final String? category2,
final String? category3,
required final String manufacturer,
@JsonKey(name: 'model_name') final String? modelName,
final String? barcode,
required final String status,
@JsonKey(name: 'company_id') required final int companyId,
@JsonKey(name: 'company_name') final String? companyName,
@JsonKey(name: 'company_id') final int? companyId,
@JsonKey(name: 'warehouse_location_id') final int? warehouseLocationId,
@JsonKey(name: 'warehouse_name') final String? warehouseName,
@JsonKey(name: 'purchase_date') final String? purchaseDate,
@JsonKey(name: 'purchase_price') final double? purchasePrice,
@JsonKey(name: 'current_value') final double? currentValue,
@JsonKey(name: 'warranty_expiry') final String? warrantyExpiry,
@JsonKey(name: 'last_maintenance_date') final String? lastMaintenanceDate,
@JsonKey(name: 'next_maintenance_date') final String? nextMaintenanceDate,
final Map<String, dynamic>? specifications,
final String? notes,
@JsonKey(name: 'last_inspection_date') final String? lastInspectionDate,
@JsonKey(name: 'next_inspection_date') final String? nextInspectionDate,
final String? remark,
@JsonKey(name: 'created_at') final DateTime? createdAt,
@JsonKey(name: 'updated_at')
final DateTime? updatedAt}) = _$EquipmentDtoImpl;
@@ -595,52 +542,46 @@ abstract class _EquipmentDto implements EquipmentDto {
@override
int get id;
@override
@JsonKey(name: 'equipment_number')
String get equipmentNumber;
@override
@JsonKey(name: 'serial_number')
String get serialNumber;
String? get serialNumber;
@override
String get name;
String? get category1;
@override
String? get category;
String? get category2;
@override
String? get manufacturer;
String? get category3;
@override
String? get model;
String get manufacturer;
@override
@JsonKey(name: 'model_name')
String? get modelName;
@override
String? get barcode;
@override
String get status;
@override
@JsonKey(name: 'company_id')
int get companyId;
@override
@JsonKey(name: 'company_name')
String? get companyName;
int? get companyId;
@override
@JsonKey(name: 'warehouse_location_id')
int? get warehouseLocationId;
@override
@JsonKey(name: 'warehouse_name')
String? get warehouseName;
@override
@JsonKey(name: 'purchase_date')
String? get purchaseDate;
@override
@JsonKey(name: 'purchase_price')
double? get purchasePrice;
@override
@JsonKey(name: 'current_value')
double? get currentValue;
@JsonKey(name: 'last_inspection_date')
String? get lastInspectionDate;
@override
@JsonKey(name: 'warranty_expiry')
String? get warrantyExpiry;
@JsonKey(name: 'next_inspection_date')
String? get nextInspectionDate;
@override
@JsonKey(name: 'last_maintenance_date')
String? get lastMaintenanceDate;
@override
@JsonKey(name: 'next_maintenance_date')
String? get nextMaintenanceDate;
@override
Map<String, dynamic>? get specifications;
@override
String? get notes;
String? get remark;
@override
@JsonKey(name: 'created_at')
DateTime? get createdAt;

View File

@@ -9,24 +9,22 @@ part of 'equipment_dto.dart';
_$EquipmentDtoImpl _$$EquipmentDtoImplFromJson(Map<String, dynamic> json) =>
_$EquipmentDtoImpl(
id: (json['id'] as num).toInt(),
serialNumber: json['serial_number'] as String,
name: json['name'] as String,
category: json['category'] as String?,
manufacturer: json['manufacturer'] as String?,
model: json['model'] as String?,
equipmentNumber: json['equipment_number'] as String,
serialNumber: json['serial_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['model_name'] as String?,
barcode: json['barcode'] as String?,
status: json['status'] as String,
companyId: (json['company_id'] as num).toInt(),
companyName: json['company_name'] as String?,
companyId: (json['company_id'] as num?)?.toInt(),
warehouseLocationId: (json['warehouse_location_id'] as num?)?.toInt(),
warehouseName: json['warehouse_name'] as String?,
purchaseDate: json['purchase_date'] as String?,
purchasePrice: (json['purchase_price'] as num?)?.toDouble(),
currentValue: (json['current_value'] as num?)?.toDouble(),
warrantyExpiry: json['warranty_expiry'] as String?,
lastMaintenanceDate: json['last_maintenance_date'] as String?,
nextMaintenanceDate: json['next_maintenance_date'] as String?,
specifications: json['specifications'] as Map<String, dynamic>?,
notes: json['notes'] as String?,
lastInspectionDate: json['last_inspection_date'] as String?,
nextInspectionDate: json['next_inspection_date'] as String?,
remark: json['remark'] as String?,
createdAt: json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String),
@@ -38,24 +36,22 @@ _$EquipmentDtoImpl _$$EquipmentDtoImplFromJson(Map<String, dynamic> json) =>
Map<String, dynamic> _$$EquipmentDtoImplToJson(_$EquipmentDtoImpl instance) =>
<String, dynamic>{
'id': instance.id,
'equipment_number': instance.equipmentNumber,
'serial_number': instance.serialNumber,
'name': instance.name,
'category': instance.category,
'category1': instance.category1,
'category2': instance.category2,
'category3': instance.category3,
'manufacturer': instance.manufacturer,
'model': instance.model,
'model_name': instance.modelName,
'barcode': instance.barcode,
'status': instance.status,
'company_id': instance.companyId,
'company_name': instance.companyName,
'warehouse_location_id': instance.warehouseLocationId,
'warehouse_name': instance.warehouseName,
'purchase_date': instance.purchaseDate,
'purchase_price': instance.purchasePrice,
'current_value': instance.currentValue,
'warranty_expiry': instance.warrantyExpiry,
'last_maintenance_date': instance.lastMaintenanceDate,
'next_maintenance_date': instance.nextMaintenanceDate,
'specifications': instance.specifications,
'notes': instance.notes,
'last_inspection_date': instance.lastInspectionDate,
'next_inspection_date': instance.nextInspectionDate,
'remark': instance.remark,
'created_at': instance.createdAt?.toIso8601String(),
'updated_at': instance.updatedAt?.toIso8601String(),
};