## 주요 변경사항 - 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>
705 lines
27 KiB
Dart
705 lines
27 KiB
Dart
// coverage:ignore-file
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
// ignore_for_file: type=lint
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
|
|
part of 'equipment_response.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
T _$identity<T>(T value) => value;
|
|
|
|
final _privateConstructorUsedError = UnsupportedError(
|
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
|
|
|
EquipmentResponse _$EquipmentResponseFromJson(Map<String, dynamic> json) {
|
|
return _EquipmentResponse.fromJson(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;
|
|
@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.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of EquipmentResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$EquipmentResponseCopyWith<EquipmentResponse> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $EquipmentResponseCopyWith<$Res> {
|
|
factory $EquipmentResponseCopyWith(
|
|
EquipmentResponse value, $Res Function(EquipmentResponse) then) =
|
|
_$EquipmentResponseCopyWithImpl<$Res, EquipmentResponse>;
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
@JsonKey(name: 'equipment_number') String equipmentNumber,
|
|
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') String? 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(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
|
|
class _$EquipmentResponseCopyWithImpl<$Res, $Val extends EquipmentResponse>
|
|
implements $EquipmentResponseCopyWith<$Res> {
|
|
_$EquipmentResponseCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of EquipmentResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? equipmentNumber = null,
|
|
Object? category1 = freezed,
|
|
Object? category2 = freezed,
|
|
Object? category3 = freezed,
|
|
Object? manufacturer = null,
|
|
Object? modelName = freezed,
|
|
Object? serialNumber = freezed,
|
|
Object? barcode = freezed,
|
|
Object? purchaseDate = freezed,
|
|
Object? purchasePrice = freezed,
|
|
Object? status = null,
|
|
Object? currentCompanyId = freezed,
|
|
Object? currentBranchId = freezed,
|
|
Object? warehouseLocationId = freezed,
|
|
Object? lastInspectionDate = freezed,
|
|
Object? nextInspectionDate = freezed,
|
|
Object? remark = freezed,
|
|
Object? createdAt = null,
|
|
Object? updatedAt = null,
|
|
Object? companyName = freezed,
|
|
Object? branchName = freezed,
|
|
Object? warehouseName = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
equipmentNumber: null == equipmentNumber
|
|
? _value.equipmentNumber
|
|
: equipmentNumber // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
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?,
|
|
serialNumber: freezed == serialNumber
|
|
? _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
|
|
as DateTime?,
|
|
purchasePrice: freezed == purchasePrice
|
|
? _value.purchasePrice
|
|
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
status: null == status
|
|
? _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
|
|
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
|
|
as String?,
|
|
createdAt: null == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
updatedAt: null == updatedAt
|
|
? _value.updatedAt
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
companyName: freezed == companyName
|
|
? _value.companyName
|
|
: companyName // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
branchName: freezed == branchName
|
|
? _value.branchName
|
|
: branchName // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
warehouseName: freezed == warehouseName
|
|
? _value.warehouseName
|
|
: warehouseName // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$EquipmentResponseImplCopyWith<$Res>
|
|
implements $EquipmentResponseCopyWith<$Res> {
|
|
factory _$$EquipmentResponseImplCopyWith(_$EquipmentResponseImpl value,
|
|
$Res Function(_$EquipmentResponseImpl) then) =
|
|
__$$EquipmentResponseImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
@JsonKey(name: 'equipment_number') String equipmentNumber,
|
|
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') String? 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(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
|
|
class __$$EquipmentResponseImplCopyWithImpl<$Res>
|
|
extends _$EquipmentResponseCopyWithImpl<$Res, _$EquipmentResponseImpl>
|
|
implements _$$EquipmentResponseImplCopyWith<$Res> {
|
|
__$$EquipmentResponseImplCopyWithImpl(_$EquipmentResponseImpl _value,
|
|
$Res Function(_$EquipmentResponseImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of EquipmentResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? equipmentNumber = null,
|
|
Object? category1 = freezed,
|
|
Object? category2 = freezed,
|
|
Object? category3 = freezed,
|
|
Object? manufacturer = null,
|
|
Object? modelName = freezed,
|
|
Object? serialNumber = freezed,
|
|
Object? barcode = freezed,
|
|
Object? purchaseDate = freezed,
|
|
Object? purchasePrice = freezed,
|
|
Object? status = null,
|
|
Object? currentCompanyId = freezed,
|
|
Object? currentBranchId = freezed,
|
|
Object? warehouseLocationId = freezed,
|
|
Object? lastInspectionDate = freezed,
|
|
Object? nextInspectionDate = freezed,
|
|
Object? remark = freezed,
|
|
Object? createdAt = null,
|
|
Object? updatedAt = null,
|
|
Object? companyName = freezed,
|
|
Object? branchName = freezed,
|
|
Object? warehouseName = freezed,
|
|
}) {
|
|
return _then(_$EquipmentResponseImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
equipmentNumber: null == equipmentNumber
|
|
? _value.equipmentNumber
|
|
: equipmentNumber // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
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?,
|
|
serialNumber: freezed == serialNumber
|
|
? _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
|
|
as DateTime?,
|
|
purchasePrice: freezed == purchasePrice
|
|
? _value.purchasePrice
|
|
: purchasePrice // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
status: null == status
|
|
? _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
|
|
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
|
|
as String?,
|
|
createdAt: null == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
updatedAt: null == updatedAt
|
|
? _value.updatedAt
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
companyName: freezed == companyName
|
|
? _value.companyName
|
|
: companyName // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
branchName: freezed == branchName
|
|
? _value.branchName
|
|
: branchName // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
warehouseName: freezed == warehouseName
|
|
? _value.warehouseName
|
|
: warehouseName // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$EquipmentResponseImpl implements _EquipmentResponse {
|
|
const _$EquipmentResponseImpl(
|
|
{required this.id,
|
|
@JsonKey(name: 'equipment_number') required this.equipmentNumber,
|
|
this.category1,
|
|
this.category2,
|
|
this.category3,
|
|
required 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() required 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(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);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
@JsonKey(name: 'equipment_number')
|
|
final String equipmentNumber;
|
|
@override
|
|
final String? category1;
|
|
@override
|
|
final String? category2;
|
|
@override
|
|
final String? category3;
|
|
@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 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
|
|
String toString() {
|
|
return 'EquipmentResponse(id: $id, equipmentNumber: $equipmentNumber, 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, createdAt: $createdAt, updatedAt: $updatedAt, companyName: $companyName, branchName: $branchName, warehouseName: $warehouseName)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$EquipmentResponseImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.equipmentNumber, equipmentNumber) ||
|
|
other.equipmentNumber == equipmentNumber) &&
|
|
(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.modelName, modelName) ||
|
|
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.status, status) || other.status == status) &&
|
|
(identical(other.currentCompanyId, currentCompanyId) ||
|
|
other.currentCompanyId == currentCompanyId) &&
|
|
(identical(other.currentBranchId, currentBranchId) ||
|
|
other.currentBranchId == currentBranchId) &&
|
|
(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) &&
|
|
(identical(other.createdAt, createdAt) ||
|
|
other.createdAt == createdAt) &&
|
|
(identical(other.updatedAt, updatedAt) ||
|
|
other.updatedAt == updatedAt) &&
|
|
(identical(other.companyName, companyName) ||
|
|
other.companyName == companyName) &&
|
|
(identical(other.branchName, branchName) ||
|
|
other.branchName == branchName) &&
|
|
(identical(other.warehouseName, warehouseName) ||
|
|
other.warehouseName == warehouseName));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hashAll([
|
|
runtimeType,
|
|
id,
|
|
equipmentNumber,
|
|
category1,
|
|
category2,
|
|
category3,
|
|
manufacturer,
|
|
modelName,
|
|
serialNumber,
|
|
barcode,
|
|
purchaseDate,
|
|
purchasePrice,
|
|
status,
|
|
currentCompanyId,
|
|
currentBranchId,
|
|
warehouseLocationId,
|
|
lastInspectionDate,
|
|
nextInspectionDate,
|
|
remark,
|
|
createdAt,
|
|
updatedAt,
|
|
companyName,
|
|
branchName,
|
|
warehouseName
|
|
]);
|
|
|
|
/// Create a copy of EquipmentResponse
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$EquipmentResponseImplCopyWith<_$EquipmentResponseImpl> get copyWith =>
|
|
__$$EquipmentResponseImplCopyWithImpl<_$EquipmentResponseImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$EquipmentResponseImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _EquipmentResponse implements EquipmentResponse {
|
|
const factory _EquipmentResponse(
|
|
{required final int id,
|
|
@JsonKey(name: 'equipment_number') required final String equipmentNumber,
|
|
final String? category1,
|
|
final String? category2,
|
|
final String? category3,
|
|
required 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 String? purchasePrice,
|
|
@EquipmentStatusJsonConverter() required 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,
|
|
final String? remark,
|
|
@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) =
|
|
_$EquipmentResponseImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
@JsonKey(name: 'equipment_number')
|
|
String get equipmentNumber;
|
|
@override
|
|
String? get category1;
|
|
@override
|
|
String? get category2;
|
|
@override
|
|
String? get category3;
|
|
@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')
|
|
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
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$EquipmentResponseImplCopyWith<_$EquipmentResponseImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|