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:
@@ -9,8 +9,10 @@ class LookupData with _$LookupData {
|
||||
const factory LookupData({
|
||||
@JsonKey(name: 'manufacturers', defaultValue: []) required List<LookupItem> manufacturers,
|
||||
@JsonKey(name: 'equipment_names', defaultValue: []) required List<EquipmentNameItem> equipmentNames,
|
||||
@JsonKey(name: 'equipment_categories', defaultValue: []) required List<CategoryItem> equipmentCategories,
|
||||
@JsonKey(name: 'equipment_categories', defaultValue: []) required List<CategoryCombinationItem> equipmentCategories,
|
||||
@JsonKey(name: 'equipment_statuses', defaultValue: []) required List<StatusItem> equipmentStatuses,
|
||||
@JsonKey(name: 'companies', defaultValue: []) required List<LookupItem> companies,
|
||||
@JsonKey(name: 'warehouses', defaultValue: []) required List<LookupItem> warehouses,
|
||||
}) = _LookupData;
|
||||
|
||||
factory LookupData.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -21,7 +23,7 @@ class LookupData with _$LookupData {
|
||||
@freezed
|
||||
class LookupItem with _$LookupItem {
|
||||
const factory LookupItem({
|
||||
required int id,
|
||||
int? id,
|
||||
required String name,
|
||||
}) = _LookupItem;
|
||||
|
||||
@@ -33,7 +35,7 @@ class LookupItem with _$LookupItem {
|
||||
@freezed
|
||||
class EquipmentNameItem with _$EquipmentNameItem {
|
||||
const factory EquipmentNameItem({
|
||||
required int id,
|
||||
int? id,
|
||||
required String name,
|
||||
@JsonKey(name: 'model_number') String? modelNumber,
|
||||
}) = _EquipmentNameItem;
|
||||
@@ -42,7 +44,20 @@ class EquipmentNameItem with _$EquipmentNameItem {
|
||||
_$EquipmentNameItemFromJson(json);
|
||||
}
|
||||
|
||||
/// 카테고리 Lookup 아이템
|
||||
/// 카테고리 조합 Lookup 아이템 (백엔드 API 실제 구조)
|
||||
@freezed
|
||||
class CategoryCombinationItem with _$CategoryCombinationItem {
|
||||
const factory CategoryCombinationItem({
|
||||
required String category1,
|
||||
required String category2,
|
||||
required String category3,
|
||||
}) = _CategoryCombinationItem;
|
||||
|
||||
factory CategoryCombinationItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$CategoryCombinationItemFromJson(json);
|
||||
}
|
||||
|
||||
/// 개별 카테고리 아이템 (UI용)
|
||||
@freezed
|
||||
class CategoryItem with _$CategoryItem {
|
||||
const factory CategoryItem({
|
||||
|
||||
@@ -26,10 +26,14 @@ mixin _$LookupData {
|
||||
List<EquipmentNameItem> get equipmentNames =>
|
||||
throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
||||
List<CategoryItem> get equipmentCategories =>
|
||||
List<CategoryCombinationItem> get equipmentCategories =>
|
||||
throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
||||
List<StatusItem> get equipmentStatuses => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'companies', defaultValue: [])
|
||||
List<LookupItem> get companies => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'warehouses', defaultValue: [])
|
||||
List<LookupItem> get warehouses => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this LookupData to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -53,9 +57,12 @@ abstract class $LookupDataCopyWith<$Res> {
|
||||
@JsonKey(name: 'equipment_names', defaultValue: [])
|
||||
List<EquipmentNameItem> equipmentNames,
|
||||
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
||||
List<CategoryItem> equipmentCategories,
|
||||
List<CategoryCombinationItem> equipmentCategories,
|
||||
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
||||
List<StatusItem> equipmentStatuses});
|
||||
List<StatusItem> equipmentStatuses,
|
||||
@JsonKey(name: 'companies', defaultValue: []) List<LookupItem> companies,
|
||||
@JsonKey(name: 'warehouses', defaultValue: [])
|
||||
List<LookupItem> warehouses});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -77,6 +84,8 @@ class _$LookupDataCopyWithImpl<$Res, $Val extends LookupData>
|
||||
Object? equipmentNames = null,
|
||||
Object? equipmentCategories = null,
|
||||
Object? equipmentStatuses = null,
|
||||
Object? companies = null,
|
||||
Object? warehouses = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
manufacturers: null == manufacturers
|
||||
@@ -90,11 +99,19 @@ class _$LookupDataCopyWithImpl<$Res, $Val extends LookupData>
|
||||
equipmentCategories: null == equipmentCategories
|
||||
? _value.equipmentCategories
|
||||
: equipmentCategories // ignore: cast_nullable_to_non_nullable
|
||||
as List<CategoryItem>,
|
||||
as List<CategoryCombinationItem>,
|
||||
equipmentStatuses: null == equipmentStatuses
|
||||
? _value.equipmentStatuses
|
||||
: equipmentStatuses // ignore: cast_nullable_to_non_nullable
|
||||
as List<StatusItem>,
|
||||
companies: null == companies
|
||||
? _value.companies
|
||||
: companies // ignore: cast_nullable_to_non_nullable
|
||||
as List<LookupItem>,
|
||||
warehouses: null == warehouses
|
||||
? _value.warehouses
|
||||
: warehouses // ignore: cast_nullable_to_non_nullable
|
||||
as List<LookupItem>,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
@@ -113,9 +130,12 @@ abstract class _$$LookupDataImplCopyWith<$Res>
|
||||
@JsonKey(name: 'equipment_names', defaultValue: [])
|
||||
List<EquipmentNameItem> equipmentNames,
|
||||
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
||||
List<CategoryItem> equipmentCategories,
|
||||
List<CategoryCombinationItem> equipmentCategories,
|
||||
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
||||
List<StatusItem> equipmentStatuses});
|
||||
List<StatusItem> equipmentStatuses,
|
||||
@JsonKey(name: 'companies', defaultValue: []) List<LookupItem> companies,
|
||||
@JsonKey(name: 'warehouses', defaultValue: [])
|
||||
List<LookupItem> warehouses});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -135,6 +155,8 @@ class __$$LookupDataImplCopyWithImpl<$Res>
|
||||
Object? equipmentNames = null,
|
||||
Object? equipmentCategories = null,
|
||||
Object? equipmentStatuses = null,
|
||||
Object? companies = null,
|
||||
Object? warehouses = null,
|
||||
}) {
|
||||
return _then(_$LookupDataImpl(
|
||||
manufacturers: null == manufacturers
|
||||
@@ -148,11 +170,19 @@ class __$$LookupDataImplCopyWithImpl<$Res>
|
||||
equipmentCategories: null == equipmentCategories
|
||||
? _value._equipmentCategories
|
||||
: equipmentCategories // ignore: cast_nullable_to_non_nullable
|
||||
as List<CategoryItem>,
|
||||
as List<CategoryCombinationItem>,
|
||||
equipmentStatuses: null == equipmentStatuses
|
||||
? _value._equipmentStatuses
|
||||
: equipmentStatuses // ignore: cast_nullable_to_non_nullable
|
||||
as List<StatusItem>,
|
||||
companies: null == companies
|
||||
? _value._companies
|
||||
: companies // ignore: cast_nullable_to_non_nullable
|
||||
as List<LookupItem>,
|
||||
warehouses: null == warehouses
|
||||
? _value._warehouses
|
||||
: warehouses // ignore: cast_nullable_to_non_nullable
|
||||
as List<LookupItem>,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -166,13 +196,19 @@ class _$LookupDataImpl implements _LookupData {
|
||||
@JsonKey(name: 'equipment_names', defaultValue: [])
|
||||
required final List<EquipmentNameItem> equipmentNames,
|
||||
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
||||
required final List<CategoryItem> equipmentCategories,
|
||||
required final List<CategoryCombinationItem> equipmentCategories,
|
||||
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
||||
required final List<StatusItem> equipmentStatuses})
|
||||
required final List<StatusItem> equipmentStatuses,
|
||||
@JsonKey(name: 'companies', defaultValue: [])
|
||||
required final List<LookupItem> companies,
|
||||
@JsonKey(name: 'warehouses', defaultValue: [])
|
||||
required final List<LookupItem> warehouses})
|
||||
: _manufacturers = manufacturers,
|
||||
_equipmentNames = equipmentNames,
|
||||
_equipmentCategories = equipmentCategories,
|
||||
_equipmentStatuses = equipmentStatuses;
|
||||
_equipmentStatuses = equipmentStatuses,
|
||||
_companies = companies,
|
||||
_warehouses = warehouses;
|
||||
|
||||
factory _$LookupDataImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$LookupDataImplFromJson(json);
|
||||
@@ -195,10 +231,10 @@ class _$LookupDataImpl implements _LookupData {
|
||||
return EqualUnmodifiableListView(_equipmentNames);
|
||||
}
|
||||
|
||||
final List<CategoryItem> _equipmentCategories;
|
||||
final List<CategoryCombinationItem> _equipmentCategories;
|
||||
@override
|
||||
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
||||
List<CategoryItem> get equipmentCategories {
|
||||
List<CategoryCombinationItem> get equipmentCategories {
|
||||
if (_equipmentCategories is EqualUnmodifiableListView)
|
||||
return _equipmentCategories;
|
||||
// ignore: implicit_dynamic_type
|
||||
@@ -215,9 +251,27 @@ class _$LookupDataImpl implements _LookupData {
|
||||
return EqualUnmodifiableListView(_equipmentStatuses);
|
||||
}
|
||||
|
||||
final List<LookupItem> _companies;
|
||||
@override
|
||||
@JsonKey(name: 'companies', defaultValue: [])
|
||||
List<LookupItem> get companies {
|
||||
if (_companies is EqualUnmodifiableListView) return _companies;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_companies);
|
||||
}
|
||||
|
||||
final List<LookupItem> _warehouses;
|
||||
@override
|
||||
@JsonKey(name: 'warehouses', defaultValue: [])
|
||||
List<LookupItem> get warehouses {
|
||||
if (_warehouses is EqualUnmodifiableListView) return _warehouses;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_warehouses);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'LookupData(manufacturers: $manufacturers, equipmentNames: $equipmentNames, equipmentCategories: $equipmentCategories, equipmentStatuses: $equipmentStatuses)';
|
||||
return 'LookupData(manufacturers: $manufacturers, equipmentNames: $equipmentNames, equipmentCategories: $equipmentCategories, equipmentStatuses: $equipmentStatuses, companies: $companies, warehouses: $warehouses)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -232,7 +286,11 @@ class _$LookupDataImpl implements _LookupData {
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._equipmentCategories, _equipmentCategories) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._equipmentStatuses, _equipmentStatuses));
|
||||
.equals(other._equipmentStatuses, _equipmentStatuses) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._companies, _companies) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._warehouses, _warehouses));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -242,7 +300,9 @@ class _$LookupDataImpl implements _LookupData {
|
||||
const DeepCollectionEquality().hash(_manufacturers),
|
||||
const DeepCollectionEquality().hash(_equipmentNames),
|
||||
const DeepCollectionEquality().hash(_equipmentCategories),
|
||||
const DeepCollectionEquality().hash(_equipmentStatuses));
|
||||
const DeepCollectionEquality().hash(_equipmentStatuses),
|
||||
const DeepCollectionEquality().hash(_companies),
|
||||
const DeepCollectionEquality().hash(_warehouses));
|
||||
|
||||
/// Create a copy of LookupData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -267,9 +327,13 @@ abstract class _LookupData implements LookupData {
|
||||
@JsonKey(name: 'equipment_names', defaultValue: [])
|
||||
required final List<EquipmentNameItem> equipmentNames,
|
||||
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
||||
required final List<CategoryItem> equipmentCategories,
|
||||
required final List<CategoryCombinationItem> equipmentCategories,
|
||||
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
||||
required final List<StatusItem> equipmentStatuses}) = _$LookupDataImpl;
|
||||
required final List<StatusItem> equipmentStatuses,
|
||||
@JsonKey(name: 'companies', defaultValue: [])
|
||||
required final List<LookupItem> companies,
|
||||
@JsonKey(name: 'warehouses', defaultValue: [])
|
||||
required final List<LookupItem> warehouses}) = _$LookupDataImpl;
|
||||
|
||||
factory _LookupData.fromJson(Map<String, dynamic> json) =
|
||||
_$LookupDataImpl.fromJson;
|
||||
@@ -282,10 +346,16 @@ abstract class _LookupData implements LookupData {
|
||||
List<EquipmentNameItem> get equipmentNames;
|
||||
@override
|
||||
@JsonKey(name: 'equipment_categories', defaultValue: [])
|
||||
List<CategoryItem> get equipmentCategories;
|
||||
List<CategoryCombinationItem> get equipmentCategories;
|
||||
@override
|
||||
@JsonKey(name: 'equipment_statuses', defaultValue: [])
|
||||
List<StatusItem> get equipmentStatuses;
|
||||
@override
|
||||
@JsonKey(name: 'companies', defaultValue: [])
|
||||
List<LookupItem> get companies;
|
||||
@override
|
||||
@JsonKey(name: 'warehouses', defaultValue: [])
|
||||
List<LookupItem> get warehouses;
|
||||
|
||||
/// Create a copy of LookupData
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -301,7 +371,7 @@ LookupItem _$LookupItemFromJson(Map<String, dynamic> json) {
|
||||
|
||||
/// @nodoc
|
||||
mixin _$LookupItem {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
int? get id => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this LookupItem to a JSON map.
|
||||
@@ -320,7 +390,7 @@ abstract class $LookupItemCopyWith<$Res> {
|
||||
LookupItem value, $Res Function(LookupItem) then) =
|
||||
_$LookupItemCopyWithImpl<$Res, LookupItem>;
|
||||
@useResult
|
||||
$Res call({int id, String name});
|
||||
$Res call({int? id, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -338,14 +408,14 @@ class _$LookupItemCopyWithImpl<$Res, $Val extends LookupItem>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? id = freezed,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
id: freezed == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int?,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
@@ -362,7 +432,7 @@ abstract class _$$LookupItemImplCopyWith<$Res>
|
||||
__$$LookupItemImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String name});
|
||||
$Res call({int? id, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -378,14 +448,14 @@ class __$$LookupItemImplCopyWithImpl<$Res>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? id = freezed,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_$LookupItemImpl(
|
||||
id: null == id
|
||||
id: freezed == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int?,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
@@ -397,13 +467,13 @@ class __$$LookupItemImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$LookupItemImpl implements _LookupItem {
|
||||
const _$LookupItemImpl({required this.id, required this.name});
|
||||
const _$LookupItemImpl({this.id, required this.name});
|
||||
|
||||
factory _$LookupItemImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$LookupItemImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
final int? id;
|
||||
@override
|
||||
final String name;
|
||||
|
||||
@@ -442,14 +512,14 @@ class _$LookupItemImpl implements _LookupItem {
|
||||
}
|
||||
|
||||
abstract class _LookupItem implements LookupItem {
|
||||
const factory _LookupItem(
|
||||
{required final int id, required final String name}) = _$LookupItemImpl;
|
||||
const factory _LookupItem({final int? id, required final String name}) =
|
||||
_$LookupItemImpl;
|
||||
|
||||
factory _LookupItem.fromJson(Map<String, dynamic> json) =
|
||||
_$LookupItemImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
int? get id;
|
||||
@override
|
||||
String get name;
|
||||
|
||||
@@ -467,7 +537,7 @@ EquipmentNameItem _$EquipmentNameItemFromJson(Map<String, dynamic> json) {
|
||||
|
||||
/// @nodoc
|
||||
mixin _$EquipmentNameItem {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
int? get id => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'model_number')
|
||||
String? get modelNumber => throw _privateConstructorUsedError;
|
||||
@@ -489,7 +559,7 @@ abstract class $EquipmentNameItemCopyWith<$Res> {
|
||||
_$EquipmentNameItemCopyWithImpl<$Res, EquipmentNameItem>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
{int? id,
|
||||
String name,
|
||||
@JsonKey(name: 'model_number') String? modelNumber});
|
||||
}
|
||||
@@ -509,15 +579,15 @@ class _$EquipmentNameItemCopyWithImpl<$Res, $Val extends EquipmentNameItem>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? id = freezed,
|
||||
Object? name = null,
|
||||
Object? modelNumber = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
id: freezed == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int?,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
@@ -539,7 +609,7 @@ abstract class _$$EquipmentNameItemImplCopyWith<$Res>
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
{int? id,
|
||||
String name,
|
||||
@JsonKey(name: 'model_number') String? modelNumber});
|
||||
}
|
||||
@@ -557,15 +627,15 @@ class __$$EquipmentNameItemImplCopyWithImpl<$Res>
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? id = freezed,
|
||||
Object? name = null,
|
||||
Object? modelNumber = freezed,
|
||||
}) {
|
||||
return _then(_$EquipmentNameItemImpl(
|
||||
id: null == id
|
||||
id: freezed == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int?,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
@@ -582,7 +652,7 @@ class __$$EquipmentNameItemImplCopyWithImpl<$Res>
|
||||
@JsonSerializable()
|
||||
class _$EquipmentNameItemImpl implements _EquipmentNameItem {
|
||||
const _$EquipmentNameItemImpl(
|
||||
{required this.id,
|
||||
{this.id,
|
||||
required this.name,
|
||||
@JsonKey(name: 'model_number') this.modelNumber});
|
||||
|
||||
@@ -590,7 +660,7 @@ class _$EquipmentNameItemImpl implements _EquipmentNameItem {
|
||||
_$$EquipmentNameItemImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
final int? id;
|
||||
@override
|
||||
final String name;
|
||||
@override
|
||||
@@ -636,7 +706,7 @@ class _$EquipmentNameItemImpl implements _EquipmentNameItem {
|
||||
|
||||
abstract class _EquipmentNameItem implements EquipmentNameItem {
|
||||
const factory _EquipmentNameItem(
|
||||
{required final int id,
|
||||
{final int? id,
|
||||
required final String name,
|
||||
@JsonKey(name: 'model_number') final String? modelNumber}) =
|
||||
_$EquipmentNameItemImpl;
|
||||
@@ -645,7 +715,7 @@ abstract class _EquipmentNameItem implements EquipmentNameItem {
|
||||
_$EquipmentNameItemImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
int? get id;
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
@@ -660,6 +730,202 @@ abstract class _EquipmentNameItem implements EquipmentNameItem {
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
CategoryCombinationItem _$CategoryCombinationItemFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _CategoryCombinationItem.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CategoryCombinationItem {
|
||||
String get category1 => throw _privateConstructorUsedError;
|
||||
String get category2 => throw _privateConstructorUsedError;
|
||||
String get category3 => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this CategoryCombinationItem to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of CategoryCombinationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$CategoryCombinationItemCopyWith<CategoryCombinationItem> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CategoryCombinationItemCopyWith<$Res> {
|
||||
factory $CategoryCombinationItemCopyWith(CategoryCombinationItem value,
|
||||
$Res Function(CategoryCombinationItem) then) =
|
||||
_$CategoryCombinationItemCopyWithImpl<$Res, CategoryCombinationItem>;
|
||||
@useResult
|
||||
$Res call({String category1, String category2, String category3});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CategoryCombinationItemCopyWithImpl<$Res,
|
||||
$Val extends CategoryCombinationItem>
|
||||
implements $CategoryCombinationItemCopyWith<$Res> {
|
||||
_$CategoryCombinationItemCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of CategoryCombinationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? category1 = null,
|
||||
Object? category2 = null,
|
||||
Object? category3 = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
category1: null == category1
|
||||
? _value.category1
|
||||
: category1 // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
category2: null == category2
|
||||
? _value.category2
|
||||
: category2 // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
category3: null == category3
|
||||
? _value.category3
|
||||
: category3 // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CategoryCombinationItemImplCopyWith<$Res>
|
||||
implements $CategoryCombinationItemCopyWith<$Res> {
|
||||
factory _$$CategoryCombinationItemImplCopyWith(
|
||||
_$CategoryCombinationItemImpl value,
|
||||
$Res Function(_$CategoryCombinationItemImpl) then) =
|
||||
__$$CategoryCombinationItemImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String category1, String category2, String category3});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CategoryCombinationItemImplCopyWithImpl<$Res>
|
||||
extends _$CategoryCombinationItemCopyWithImpl<$Res,
|
||||
_$CategoryCombinationItemImpl>
|
||||
implements _$$CategoryCombinationItemImplCopyWith<$Res> {
|
||||
__$$CategoryCombinationItemImplCopyWithImpl(
|
||||
_$CategoryCombinationItemImpl _value,
|
||||
$Res Function(_$CategoryCombinationItemImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CategoryCombinationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? category1 = null,
|
||||
Object? category2 = null,
|
||||
Object? category3 = null,
|
||||
}) {
|
||||
return _then(_$CategoryCombinationItemImpl(
|
||||
category1: null == category1
|
||||
? _value.category1
|
||||
: category1 // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
category2: null == category2
|
||||
? _value.category2
|
||||
: category2 // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
category3: null == category3
|
||||
? _value.category3
|
||||
: category3 // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$CategoryCombinationItemImpl implements _CategoryCombinationItem {
|
||||
const _$CategoryCombinationItemImpl(
|
||||
{required this.category1,
|
||||
required this.category2,
|
||||
required this.category3});
|
||||
|
||||
factory _$CategoryCombinationItemImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$CategoryCombinationItemImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String category1;
|
||||
@override
|
||||
final String category2;
|
||||
@override
|
||||
final String category3;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CategoryCombinationItem(category1: $category1, category2: $category2, category3: $category3)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CategoryCombinationItemImpl &&
|
||||
(identical(other.category1, category1) ||
|
||||
other.category1 == category1) &&
|
||||
(identical(other.category2, category2) ||
|
||||
other.category2 == category2) &&
|
||||
(identical(other.category3, category3) ||
|
||||
other.category3 == category3));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, category1, category2, category3);
|
||||
|
||||
/// Create a copy of CategoryCombinationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CategoryCombinationItemImplCopyWith<_$CategoryCombinationItemImpl>
|
||||
get copyWith => __$$CategoryCombinationItemImplCopyWithImpl<
|
||||
_$CategoryCombinationItemImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$CategoryCombinationItemImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _CategoryCombinationItem implements CategoryCombinationItem {
|
||||
const factory _CategoryCombinationItem(
|
||||
{required final String category1,
|
||||
required final String category2,
|
||||
required final String category3}) = _$CategoryCombinationItemImpl;
|
||||
|
||||
factory _CategoryCombinationItem.fromJson(Map<String, dynamic> json) =
|
||||
_$CategoryCombinationItemImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get category1;
|
||||
@override
|
||||
String get category2;
|
||||
@override
|
||||
String get category3;
|
||||
|
||||
/// Create a copy of CategoryCombinationItem
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CategoryCombinationItemImplCopyWith<_$CategoryCombinationItemImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
CategoryItem _$CategoryItemFromJson(Map<String, dynamic> json) {
|
||||
return _CategoryItem.fromJson(json);
|
||||
}
|
||||
|
||||
@@ -18,13 +18,22 @@ _$LookupDataImpl _$$LookupDataImplFromJson(Map<String, dynamic> json) =>
|
||||
.toList() ??
|
||||
[],
|
||||
equipmentCategories: (json['equipment_categories'] as List<dynamic>?)
|
||||
?.map((e) => CategoryItem.fromJson(e as Map<String, dynamic>))
|
||||
?.map((e) =>
|
||||
CategoryCombinationItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
equipmentStatuses: (json['equipment_statuses'] as List<dynamic>?)
|
||||
?.map((e) => StatusItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
companies: (json['companies'] as List<dynamic>?)
|
||||
?.map((e) => LookupItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
warehouses: (json['warehouses'] as List<dynamic>?)
|
||||
?.map((e) => LookupItem.fromJson(e as Map<String, dynamic>))
|
||||
.toList() ??
|
||||
[],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$LookupDataImplToJson(_$LookupDataImpl instance) =>
|
||||
@@ -33,11 +42,13 @@ Map<String, dynamic> _$$LookupDataImplToJson(_$LookupDataImpl instance) =>
|
||||
'equipment_names': instance.equipmentNames,
|
||||
'equipment_categories': instance.equipmentCategories,
|
||||
'equipment_statuses': instance.equipmentStatuses,
|
||||
'companies': instance.companies,
|
||||
'warehouses': instance.warehouses,
|
||||
};
|
||||
|
||||
_$LookupItemImpl _$$LookupItemImplFromJson(Map<String, dynamic> json) =>
|
||||
_$LookupItemImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
name: json['name'] as String,
|
||||
);
|
||||
|
||||
@@ -50,7 +61,7 @@ Map<String, dynamic> _$$LookupItemImplToJson(_$LookupItemImpl instance) =>
|
||||
_$EquipmentNameItemImpl _$$EquipmentNameItemImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$EquipmentNameItemImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
name: json['name'] as String,
|
||||
modelNumber: json['model_number'] as String?,
|
||||
);
|
||||
@@ -63,6 +74,22 @@ Map<String, dynamic> _$$EquipmentNameItemImplToJson(
|
||||
'model_number': instance.modelNumber,
|
||||
};
|
||||
|
||||
_$CategoryCombinationItemImpl _$$CategoryCombinationItemImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$CategoryCombinationItemImpl(
|
||||
category1: json['category1'] as String,
|
||||
category2: json['category2'] as String,
|
||||
category3: json['category3'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CategoryCombinationItemImplToJson(
|
||||
_$CategoryCombinationItemImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'category1': instance.category1,
|
||||
'category2': instance.category2,
|
||||
'category3': instance.category3,
|
||||
};
|
||||
|
||||
_$CategoryItemImpl _$$CategoryItemImplFromJson(Map<String, dynamic> json) =>
|
||||
_$CategoryItemImpl(
|
||||
id: json['id'] as String,
|
||||
|
||||
Reference in New Issue
Block a user