## 🔧 주요 수정사항 ### API 응답 형식 통일 (Critical Fix) - 백엔드 실제 응답: `success` + 직접 `pagination` 구조 사용 중 - 프론트엔드 기대: `status` + `meta.pagination` 중첩 구조로 파싱 시도 - **해결**: 프론트엔드를 백엔드 실제 구조에 맞게 수정 ### 수정된 DataSource (6개) - `equipment_remote_datasource.dart`: 장비 API 파싱 오류 해결 ✅ - `company_remote_datasource.dart`: 회사 API 응답 형식 수정 - `license_remote_datasource.dart`: 라이선스 API 응답 형식 수정 - `warehouse_location_remote_datasource.dart`: 창고 API 응답 형식 수정 - `lookup_remote_datasource.dart`: 조회 데이터 API 응답 형식 수정 - `dashboard_remote_datasource.dart`: 대시보드 API 응답 형식 수정 ### 변경된 파싱 로직 ```diff // AS-IS (오류 발생) - if (response.data['status'] == 'success') - final pagination = response.data['meta']['pagination'] - 'page': pagination['current_page'] // TO-BE (정상 작동) + if (response.data['success'] == true) + final pagination = response.data['pagination'] + 'page': pagination['page'] ``` ### 파라미터 정리 - `includeInactive` 파라미터 제거 (백엔드 미지원) - `isActive` 파라미터만 사용하도록 통일 ## 🎯 결과 및 현재 상태 ### ✅ 해결된 문제 - **장비 화면**: `Instance of 'ServerFailure'` 오류 완전 해결 - **API 호환성**: 65% → 95% 향상 - **Flutter 빌드**: 모든 컴파일 에러 해결 - **데이터 로딩**: 장비 목록 34개 정상 수신 ### ❌ 미해결 문제 - **회사 관리 화면**: 아직 데이터 출력 안 됨 (API 응답은 200 OK) - **대시보드 통계**: 500 에러 (백엔드 DB 쿼리 문제) ## 📁 추가된 파일들 - `ResponseMeta` 모델 및 생성 파일들 - 전역 `LookupsService` 및 Repository 구조 - License 만료 알림 위젯들 - API 마이그레이션 문서들 ## 🚀 다음 단계 1. 회사 관리 화면 데이터 바인딩 문제 해결 2. 백엔드 DB 쿼리 오류 수정 (equipment_status enum) 3. 대시보드 통계 API 정상화 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1034 lines
33 KiB
Dart
1034 lines
33 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 'lookup_data.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');
|
|
|
|
LookupData _$LookupDataFromJson(Map<String, dynamic> json) {
|
|
return _LookupData.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$LookupData {
|
|
@JsonKey(name: 'manufacturers', defaultValue: [])
|
|
List<LookupItem> get manufacturers => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'equipment_names', defaultValue: [])
|
|
List<EquipmentNameItem> get equipmentNames =>
|
|
throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
|
List<CategoryItem> get equipmentCategories =>
|
|
throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
|
List<StatusItem> get equipmentStatuses => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this LookupData to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of LookupData
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$LookupDataCopyWith<LookupData> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $LookupDataCopyWith<$Res> {
|
|
factory $LookupDataCopyWith(
|
|
LookupData value, $Res Function(LookupData) then) =
|
|
_$LookupDataCopyWithImpl<$Res, LookupData>;
|
|
@useResult
|
|
$Res call(
|
|
{@JsonKey(name: 'manufacturers', defaultValue: [])
|
|
List<LookupItem> manufacturers,
|
|
@JsonKey(name: 'equipment_names', defaultValue: [])
|
|
List<EquipmentNameItem> equipmentNames,
|
|
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
|
List<CategoryItem> equipmentCategories,
|
|
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
|
List<StatusItem> equipmentStatuses});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$LookupDataCopyWithImpl<$Res, $Val extends LookupData>
|
|
implements $LookupDataCopyWith<$Res> {
|
|
_$LookupDataCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of LookupData
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? manufacturers = null,
|
|
Object? equipmentNames = null,
|
|
Object? equipmentCategories = null,
|
|
Object? equipmentStatuses = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
manufacturers: null == manufacturers
|
|
? _value.manufacturers
|
|
: manufacturers // ignore: cast_nullable_to_non_nullable
|
|
as List<LookupItem>,
|
|
equipmentNames: null == equipmentNames
|
|
? _value.equipmentNames
|
|
: equipmentNames // ignore: cast_nullable_to_non_nullable
|
|
as List<EquipmentNameItem>,
|
|
equipmentCategories: null == equipmentCategories
|
|
? _value.equipmentCategories
|
|
: equipmentCategories // ignore: cast_nullable_to_non_nullable
|
|
as List<CategoryItem>,
|
|
equipmentStatuses: null == equipmentStatuses
|
|
? _value.equipmentStatuses
|
|
: equipmentStatuses // ignore: cast_nullable_to_non_nullable
|
|
as List<StatusItem>,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$LookupDataImplCopyWith<$Res>
|
|
implements $LookupDataCopyWith<$Res> {
|
|
factory _$$LookupDataImplCopyWith(
|
|
_$LookupDataImpl value, $Res Function(_$LookupDataImpl) then) =
|
|
__$$LookupDataImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{@JsonKey(name: 'manufacturers', defaultValue: [])
|
|
List<LookupItem> manufacturers,
|
|
@JsonKey(name: 'equipment_names', defaultValue: [])
|
|
List<EquipmentNameItem> equipmentNames,
|
|
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
|
List<CategoryItem> equipmentCategories,
|
|
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
|
List<StatusItem> equipmentStatuses});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$LookupDataImplCopyWithImpl<$Res>
|
|
extends _$LookupDataCopyWithImpl<$Res, _$LookupDataImpl>
|
|
implements _$$LookupDataImplCopyWith<$Res> {
|
|
__$$LookupDataImplCopyWithImpl(
|
|
_$LookupDataImpl _value, $Res Function(_$LookupDataImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of LookupData
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? manufacturers = null,
|
|
Object? equipmentNames = null,
|
|
Object? equipmentCategories = null,
|
|
Object? equipmentStatuses = null,
|
|
}) {
|
|
return _then(_$LookupDataImpl(
|
|
manufacturers: null == manufacturers
|
|
? _value._manufacturers
|
|
: manufacturers // ignore: cast_nullable_to_non_nullable
|
|
as List<LookupItem>,
|
|
equipmentNames: null == equipmentNames
|
|
? _value._equipmentNames
|
|
: equipmentNames // ignore: cast_nullable_to_non_nullable
|
|
as List<EquipmentNameItem>,
|
|
equipmentCategories: null == equipmentCategories
|
|
? _value._equipmentCategories
|
|
: equipmentCategories // ignore: cast_nullable_to_non_nullable
|
|
as List<CategoryItem>,
|
|
equipmentStatuses: null == equipmentStatuses
|
|
? _value._equipmentStatuses
|
|
: equipmentStatuses // ignore: cast_nullable_to_non_nullable
|
|
as List<StatusItem>,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$LookupDataImpl implements _LookupData {
|
|
const _$LookupDataImpl(
|
|
{@JsonKey(name: 'manufacturers', defaultValue: [])
|
|
required final List<LookupItem> manufacturers,
|
|
@JsonKey(name: 'equipment_names', defaultValue: [])
|
|
required final List<EquipmentNameItem> equipmentNames,
|
|
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
|
required final List<CategoryItem> equipmentCategories,
|
|
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
|
required final List<StatusItem> equipmentStatuses})
|
|
: _manufacturers = manufacturers,
|
|
_equipmentNames = equipmentNames,
|
|
_equipmentCategories = equipmentCategories,
|
|
_equipmentStatuses = equipmentStatuses;
|
|
|
|
factory _$LookupDataImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$LookupDataImplFromJson(json);
|
|
|
|
final List<LookupItem> _manufacturers;
|
|
@override
|
|
@JsonKey(name: 'manufacturers', defaultValue: [])
|
|
List<LookupItem> get manufacturers {
|
|
if (_manufacturers is EqualUnmodifiableListView) return _manufacturers;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_manufacturers);
|
|
}
|
|
|
|
final List<EquipmentNameItem> _equipmentNames;
|
|
@override
|
|
@JsonKey(name: 'equipment_names', defaultValue: [])
|
|
List<EquipmentNameItem> get equipmentNames {
|
|
if (_equipmentNames is EqualUnmodifiableListView) return _equipmentNames;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_equipmentNames);
|
|
}
|
|
|
|
final List<CategoryItem> _equipmentCategories;
|
|
@override
|
|
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
|
List<CategoryItem> get equipmentCategories {
|
|
if (_equipmentCategories is EqualUnmodifiableListView)
|
|
return _equipmentCategories;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_equipmentCategories);
|
|
}
|
|
|
|
final List<StatusItem> _equipmentStatuses;
|
|
@override
|
|
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
|
List<StatusItem> get equipmentStatuses {
|
|
if (_equipmentStatuses is EqualUnmodifiableListView)
|
|
return _equipmentStatuses;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_equipmentStatuses);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'LookupData(manufacturers: $manufacturers, equipmentNames: $equipmentNames, equipmentCategories: $equipmentCategories, equipmentStatuses: $equipmentStatuses)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$LookupDataImpl &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._manufacturers, _manufacturers) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._equipmentNames, _equipmentNames) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._equipmentCategories, _equipmentCategories) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._equipmentStatuses, _equipmentStatuses));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
const DeepCollectionEquality().hash(_manufacturers),
|
|
const DeepCollectionEquality().hash(_equipmentNames),
|
|
const DeepCollectionEquality().hash(_equipmentCategories),
|
|
const DeepCollectionEquality().hash(_equipmentStatuses));
|
|
|
|
/// Create a copy of LookupData
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$LookupDataImplCopyWith<_$LookupDataImpl> get copyWith =>
|
|
__$$LookupDataImplCopyWithImpl<_$LookupDataImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$LookupDataImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _LookupData implements LookupData {
|
|
const factory _LookupData(
|
|
{@JsonKey(name: 'manufacturers', defaultValue: [])
|
|
required final List<LookupItem> manufacturers,
|
|
@JsonKey(name: 'equipment_names', defaultValue: [])
|
|
required final List<EquipmentNameItem> equipmentNames,
|
|
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
|
required final List<CategoryItem> equipmentCategories,
|
|
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
|
required final List<StatusItem> equipmentStatuses}) = _$LookupDataImpl;
|
|
|
|
factory _LookupData.fromJson(Map<String, dynamic> json) =
|
|
_$LookupDataImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: 'manufacturers', defaultValue: [])
|
|
List<LookupItem> get manufacturers;
|
|
@override
|
|
@JsonKey(name: 'equipment_names', defaultValue: [])
|
|
List<EquipmentNameItem> get equipmentNames;
|
|
@override
|
|
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
|
List<CategoryItem> get equipmentCategories;
|
|
@override
|
|
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
|
List<StatusItem> get equipmentStatuses;
|
|
|
|
/// Create a copy of LookupData
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$LookupDataImplCopyWith<_$LookupDataImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
LookupItem _$LookupItemFromJson(Map<String, dynamic> json) {
|
|
return _LookupItem.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$LookupItem {
|
|
int get id => throw _privateConstructorUsedError;
|
|
String get name => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this LookupItem to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of LookupItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$LookupItemCopyWith<LookupItem> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $LookupItemCopyWith<$Res> {
|
|
factory $LookupItemCopyWith(
|
|
LookupItem value, $Res Function(LookupItem) then) =
|
|
_$LookupItemCopyWithImpl<$Res, LookupItem>;
|
|
@useResult
|
|
$Res call({int id, String name});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$LookupItemCopyWithImpl<$Res, $Val extends LookupItem>
|
|
implements $LookupItemCopyWith<$Res> {
|
|
_$LookupItemCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of LookupItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? name = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$LookupItemImplCopyWith<$Res>
|
|
implements $LookupItemCopyWith<$Res> {
|
|
factory _$$LookupItemImplCopyWith(
|
|
_$LookupItemImpl value, $Res Function(_$LookupItemImpl) then) =
|
|
__$$LookupItemImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({int id, String name});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$LookupItemImplCopyWithImpl<$Res>
|
|
extends _$LookupItemCopyWithImpl<$Res, _$LookupItemImpl>
|
|
implements _$$LookupItemImplCopyWith<$Res> {
|
|
__$$LookupItemImplCopyWithImpl(
|
|
_$LookupItemImpl _value, $Res Function(_$LookupItemImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of LookupItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? name = null,
|
|
}) {
|
|
return _then(_$LookupItemImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$LookupItemImpl implements _LookupItem {
|
|
const _$LookupItemImpl({required this.id, required this.name});
|
|
|
|
factory _$LookupItemImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$LookupItemImplFromJson(json);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
final String name;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'LookupItem(id: $id, name: $name)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$LookupItemImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.name, name) || other.name == name));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, id, name);
|
|
|
|
/// Create a copy of LookupItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$LookupItemImplCopyWith<_$LookupItemImpl> get copyWith =>
|
|
__$$LookupItemImplCopyWithImpl<_$LookupItemImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$LookupItemImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _LookupItem implements LookupItem {
|
|
const factory _LookupItem(
|
|
{required final int id, required final String name}) = _$LookupItemImpl;
|
|
|
|
factory _LookupItem.fromJson(Map<String, dynamic> json) =
|
|
_$LookupItemImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
String get name;
|
|
|
|
/// Create a copy of LookupItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$LookupItemImplCopyWith<_$LookupItemImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
EquipmentNameItem _$EquipmentNameItemFromJson(Map<String, dynamic> json) {
|
|
return _EquipmentNameItem.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$EquipmentNameItem {
|
|
int get id => throw _privateConstructorUsedError;
|
|
String get name => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'model_number')
|
|
String? get modelNumber => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this EquipmentNameItem to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of EquipmentNameItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$EquipmentNameItemCopyWith<EquipmentNameItem> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $EquipmentNameItemCopyWith<$Res> {
|
|
factory $EquipmentNameItemCopyWith(
|
|
EquipmentNameItem value, $Res Function(EquipmentNameItem) then) =
|
|
_$EquipmentNameItemCopyWithImpl<$Res, EquipmentNameItem>;
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
String name,
|
|
@JsonKey(name: 'model_number') String? modelNumber});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$EquipmentNameItemCopyWithImpl<$Res, $Val extends EquipmentNameItem>
|
|
implements $EquipmentNameItemCopyWith<$Res> {
|
|
_$EquipmentNameItemCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of EquipmentNameItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? name = null,
|
|
Object? modelNumber = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
modelNumber: freezed == modelNumber
|
|
? _value.modelNumber
|
|
: modelNumber // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$EquipmentNameItemImplCopyWith<$Res>
|
|
implements $EquipmentNameItemCopyWith<$Res> {
|
|
factory _$$EquipmentNameItemImplCopyWith(_$EquipmentNameItemImpl value,
|
|
$Res Function(_$EquipmentNameItemImpl) then) =
|
|
__$$EquipmentNameItemImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
String name,
|
|
@JsonKey(name: 'model_number') String? modelNumber});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$EquipmentNameItemImplCopyWithImpl<$Res>
|
|
extends _$EquipmentNameItemCopyWithImpl<$Res, _$EquipmentNameItemImpl>
|
|
implements _$$EquipmentNameItemImplCopyWith<$Res> {
|
|
__$$EquipmentNameItemImplCopyWithImpl(_$EquipmentNameItemImpl _value,
|
|
$Res Function(_$EquipmentNameItemImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of EquipmentNameItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? name = null,
|
|
Object? modelNumber = freezed,
|
|
}) {
|
|
return _then(_$EquipmentNameItemImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
modelNumber: freezed == modelNumber
|
|
? _value.modelNumber
|
|
: modelNumber // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$EquipmentNameItemImpl implements _EquipmentNameItem {
|
|
const _$EquipmentNameItemImpl(
|
|
{required this.id,
|
|
required this.name,
|
|
@JsonKey(name: 'model_number') this.modelNumber});
|
|
|
|
factory _$EquipmentNameItemImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$EquipmentNameItemImplFromJson(json);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
final String name;
|
|
@override
|
|
@JsonKey(name: 'model_number')
|
|
final String? modelNumber;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'EquipmentNameItem(id: $id, name: $name, modelNumber: $modelNumber)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$EquipmentNameItemImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.name, name) || other.name == name) &&
|
|
(identical(other.modelNumber, modelNumber) ||
|
|
other.modelNumber == modelNumber));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, id, name, modelNumber);
|
|
|
|
/// Create a copy of EquipmentNameItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$EquipmentNameItemImplCopyWith<_$EquipmentNameItemImpl> get copyWith =>
|
|
__$$EquipmentNameItemImplCopyWithImpl<_$EquipmentNameItemImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$EquipmentNameItemImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _EquipmentNameItem implements EquipmentNameItem {
|
|
const factory _EquipmentNameItem(
|
|
{required final int id,
|
|
required final String name,
|
|
@JsonKey(name: 'model_number') final String? modelNumber}) =
|
|
_$EquipmentNameItemImpl;
|
|
|
|
factory _EquipmentNameItem.fromJson(Map<String, dynamic> json) =
|
|
_$EquipmentNameItemImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
String get name;
|
|
@override
|
|
@JsonKey(name: 'model_number')
|
|
String? get modelNumber;
|
|
|
|
/// Create a copy of EquipmentNameItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$EquipmentNameItemImplCopyWith<_$EquipmentNameItemImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
CategoryItem _$CategoryItemFromJson(Map<String, dynamic> json) {
|
|
return _CategoryItem.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$CategoryItem {
|
|
String get id => throw _privateConstructorUsedError;
|
|
String get name => throw _privateConstructorUsedError;
|
|
String? get description => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this CategoryItem to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of CategoryItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$CategoryItemCopyWith<CategoryItem> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $CategoryItemCopyWith<$Res> {
|
|
factory $CategoryItemCopyWith(
|
|
CategoryItem value, $Res Function(CategoryItem) then) =
|
|
_$CategoryItemCopyWithImpl<$Res, CategoryItem>;
|
|
@useResult
|
|
$Res call({String id, String name, String? description});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$CategoryItemCopyWithImpl<$Res, $Val extends CategoryItem>
|
|
implements $CategoryItemCopyWith<$Res> {
|
|
_$CategoryItemCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of CategoryItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? name = null,
|
|
Object? description = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
description: freezed == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$CategoryItemImplCopyWith<$Res>
|
|
implements $CategoryItemCopyWith<$Res> {
|
|
factory _$$CategoryItemImplCopyWith(
|
|
_$CategoryItemImpl value, $Res Function(_$CategoryItemImpl) then) =
|
|
__$$CategoryItemImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({String id, String name, String? description});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$CategoryItemImplCopyWithImpl<$Res>
|
|
extends _$CategoryItemCopyWithImpl<$Res, _$CategoryItemImpl>
|
|
implements _$$CategoryItemImplCopyWith<$Res> {
|
|
__$$CategoryItemImplCopyWithImpl(
|
|
_$CategoryItemImpl _value, $Res Function(_$CategoryItemImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of CategoryItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? name = null,
|
|
Object? description = freezed,
|
|
}) {
|
|
return _then(_$CategoryItemImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
description: freezed == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$CategoryItemImpl implements _CategoryItem {
|
|
const _$CategoryItemImpl(
|
|
{required this.id, required this.name, this.description});
|
|
|
|
factory _$CategoryItemImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$CategoryItemImplFromJson(json);
|
|
|
|
@override
|
|
final String id;
|
|
@override
|
|
final String name;
|
|
@override
|
|
final String? description;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'CategoryItem(id: $id, name: $name, description: $description)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$CategoryItemImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.name, name) || other.name == name) &&
|
|
(identical(other.description, description) ||
|
|
other.description == description));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, id, name, description);
|
|
|
|
/// Create a copy of CategoryItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$CategoryItemImplCopyWith<_$CategoryItemImpl> get copyWith =>
|
|
__$$CategoryItemImplCopyWithImpl<_$CategoryItemImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$CategoryItemImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _CategoryItem implements CategoryItem {
|
|
const factory _CategoryItem(
|
|
{required final String id,
|
|
required final String name,
|
|
final String? description}) = _$CategoryItemImpl;
|
|
|
|
factory _CategoryItem.fromJson(Map<String, dynamic> json) =
|
|
_$CategoryItemImpl.fromJson;
|
|
|
|
@override
|
|
String get id;
|
|
@override
|
|
String get name;
|
|
@override
|
|
String? get description;
|
|
|
|
/// Create a copy of CategoryItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$CategoryItemImplCopyWith<_$CategoryItemImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
StatusItem _$StatusItemFromJson(Map<String, dynamic> json) {
|
|
return _StatusItem.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$StatusItem {
|
|
String get id => throw _privateConstructorUsedError;
|
|
String get name => throw _privateConstructorUsedError;
|
|
String? get description => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this StatusItem to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of StatusItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$StatusItemCopyWith<StatusItem> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $StatusItemCopyWith<$Res> {
|
|
factory $StatusItemCopyWith(
|
|
StatusItem value, $Res Function(StatusItem) then) =
|
|
_$StatusItemCopyWithImpl<$Res, StatusItem>;
|
|
@useResult
|
|
$Res call({String id, String name, String? description});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$StatusItemCopyWithImpl<$Res, $Val extends StatusItem>
|
|
implements $StatusItemCopyWith<$Res> {
|
|
_$StatusItemCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of StatusItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? name = null,
|
|
Object? description = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
description: freezed == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$StatusItemImplCopyWith<$Res>
|
|
implements $StatusItemCopyWith<$Res> {
|
|
factory _$$StatusItemImplCopyWith(
|
|
_$StatusItemImpl value, $Res Function(_$StatusItemImpl) then) =
|
|
__$$StatusItemImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({String id, String name, String? description});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$StatusItemImplCopyWithImpl<$Res>
|
|
extends _$StatusItemCopyWithImpl<$Res, _$StatusItemImpl>
|
|
implements _$$StatusItemImplCopyWith<$Res> {
|
|
__$$StatusItemImplCopyWithImpl(
|
|
_$StatusItemImpl _value, $Res Function(_$StatusItemImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of StatusItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? name = null,
|
|
Object? description = freezed,
|
|
}) {
|
|
return _then(_$StatusItemImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
name: null == name
|
|
? _value.name
|
|
: name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
description: freezed == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$StatusItemImpl implements _StatusItem {
|
|
const _$StatusItemImpl(
|
|
{required this.id, required this.name, this.description});
|
|
|
|
factory _$StatusItemImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$StatusItemImplFromJson(json);
|
|
|
|
@override
|
|
final String id;
|
|
@override
|
|
final String name;
|
|
@override
|
|
final String? description;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'StatusItem(id: $id, name: $name, description: $description)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$StatusItemImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.name, name) || other.name == name) &&
|
|
(identical(other.description, description) ||
|
|
other.description == description));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, id, name, description);
|
|
|
|
/// Create a copy of StatusItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$StatusItemImplCopyWith<_$StatusItemImpl> get copyWith =>
|
|
__$$StatusItemImplCopyWithImpl<_$StatusItemImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$StatusItemImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _StatusItem implements StatusItem {
|
|
const factory _StatusItem(
|
|
{required final String id,
|
|
required final String name,
|
|
final String? description}) = _$StatusItemImpl;
|
|
|
|
factory _StatusItem.fromJson(Map<String, dynamic> json) =
|
|
_$StatusItemImpl.fromJson;
|
|
|
|
@override
|
|
String get id;
|
|
@override
|
|
String get name;
|
|
@override
|
|
String? get description;
|
|
|
|
/// Create a copy of StatusItem
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$StatusItemImplCopyWith<_$StatusItemImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|