Files
superport/lib/data/models/equipment/equipment_dto.freezed.dart
JiWoong Sul 198aac6525
Some checks failed
Flutter Test & Quality Check / Test on macos-latest (push) Has been cancelled
Flutter Test & Quality Check / Test on ubuntu-latest (push) Has been cancelled
Flutter Test & Quality Check / Build APK (push) Has been cancelled
test: 통합 테스트 오류 및 경고 수정
- 모든 서비스 메서드 시그니처를 실제 구현에 맞게 수정
- TestDataGenerator 제거하고 직접 객체 생성으로 변경
- 모델 필드명 및 타입 불일치 수정
- 불필요한 Either 패턴 사용 제거
- null safety 관련 이슈 해결

수정된 파일:
- test/integration/screens/company_integration_test.dart
- test/integration/screens/equipment_integration_test.dart
- test/integration/screens/user_integration_test.dart
- test/integration/screens/login_integration_test.dart
2025-08-05 20:24:05 +09:00

658 lines
25 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_dto.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');
EquipmentDto _$EquipmentDtoFromJson(Map<String, dynamic> json) {
return _EquipmentDto.fromJson(json);
}
/// @nodoc
mixin _$EquipmentDto {
int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'serial_number')
String get serialNumber => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String? get category => throw _privateConstructorUsedError;
String? get manufacturer => throw _privateConstructorUsedError;
String? get model => throw _privateConstructorUsedError;
String get status => throw _privateConstructorUsedError;
@JsonKey(name: 'company_id')
int get companyId => throw _privateConstructorUsedError;
@JsonKey(name: 'company_name')
String? get companyName => throw _privateConstructorUsedError;
@JsonKey(name: 'warehouse_location_id')
int? get warehouseLocationId => throw _privateConstructorUsedError;
@JsonKey(name: 'warehouse_name')
String? get warehouseName => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_date')
String? get purchaseDate => throw _privateConstructorUsedError;
@JsonKey(name: 'purchase_price')
double? get purchasePrice => throw _privateConstructorUsedError;
@JsonKey(name: 'current_value')
double? get currentValue => throw _privateConstructorUsedError;
@JsonKey(name: 'warranty_expiry')
String? get warrantyExpiry => throw _privateConstructorUsedError;
@JsonKey(name: 'last_maintenance_date')
String? get lastMaintenanceDate => throw _privateConstructorUsedError;
@JsonKey(name: 'next_maintenance_date')
String? get nextMaintenanceDate => throw _privateConstructorUsedError;
Map<String, dynamic>? get specifications =>
throw _privateConstructorUsedError;
String? get notes => throw _privateConstructorUsedError;
@JsonKey(name: 'created_at')
DateTime? get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at')
DateTime? get updatedAt => throw _privateConstructorUsedError;
/// Serializes this EquipmentDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of EquipmentDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$EquipmentDtoCopyWith<EquipmentDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $EquipmentDtoCopyWith<$Res> {
factory $EquipmentDtoCopyWith(
EquipmentDto value, $Res Function(EquipmentDto) then) =
_$EquipmentDtoCopyWithImpl<$Res, EquipmentDto>;
@useResult
$Res call(
{int id,
@JsonKey(name: 'serial_number') String serialNumber,
String name,
String? category,
String? manufacturer,
String? model,
String status,
@JsonKey(name: 'company_id') int companyId,
@JsonKey(name: 'company_name') String? companyName,
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
@JsonKey(name: 'warehouse_name') String? warehouseName,
@JsonKey(name: 'purchase_date') String? purchaseDate,
@JsonKey(name: 'purchase_price') double? purchasePrice,
@JsonKey(name: 'current_value') double? currentValue,
@JsonKey(name: 'warranty_expiry') String? warrantyExpiry,
@JsonKey(name: 'last_maintenance_date') String? lastMaintenanceDate,
@JsonKey(name: 'next_maintenance_date') String? nextMaintenanceDate,
Map<String, dynamic>? specifications,
String? notes,
@JsonKey(name: 'created_at') DateTime? createdAt,
@JsonKey(name: 'updated_at') DateTime? updatedAt});
}
/// @nodoc
class _$EquipmentDtoCopyWithImpl<$Res, $Val extends EquipmentDto>
implements $EquipmentDtoCopyWith<$Res> {
_$EquipmentDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of EquipmentDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? serialNumber = null,
Object? name = null,
Object? category = freezed,
Object? manufacturer = freezed,
Object? model = freezed,
Object? status = null,
Object? companyId = null,
Object? companyName = freezed,
Object? warehouseLocationId = freezed,
Object? warehouseName = freezed,
Object? purchaseDate = freezed,
Object? purchasePrice = freezed,
Object? currentValue = freezed,
Object? warrantyExpiry = freezed,
Object? lastMaintenanceDate = freezed,
Object? nextMaintenanceDate = freezed,
Object? specifications = freezed,
Object? notes = freezed,
Object? createdAt = freezed,
Object? updatedAt = freezed,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
serialNumber: null == serialNumber
? _value.serialNumber
: serialNumber // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
category: freezed == category
? _value.category
: category // ignore: cast_nullable_to_non_nullable
as String?,
manufacturer: freezed == manufacturer
? _value.manufacturer
: manufacturer // ignore: cast_nullable_to_non_nullable
as String?,
model: freezed == model
? _value.model
: model // ignore: cast_nullable_to_non_nullable
as String?,
status: null == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String,
companyId: null == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int,
companyName: freezed == companyName
? _value.companyName
: companyName // ignore: cast_nullable_to_non_nullable
as String?,
warehouseLocationId: freezed == warehouseLocationId
? _value.warehouseLocationId
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
as int?,
warehouseName: freezed == warehouseName
? _value.warehouseName
: warehouseName // ignore: cast_nullable_to_non_nullable
as String?,
purchaseDate: freezed == purchaseDate
? _value.purchaseDate
: purchaseDate // ignore: cast_nullable_to_non_nullable
as String?,
purchasePrice: freezed == purchasePrice
? _value.purchasePrice
: purchasePrice // ignore: cast_nullable_to_non_nullable
as double?,
currentValue: freezed == currentValue
? _value.currentValue
: currentValue // ignore: cast_nullable_to_non_nullable
as double?,
warrantyExpiry: freezed == warrantyExpiry
? _value.warrantyExpiry
: warrantyExpiry // ignore: cast_nullable_to_non_nullable
as String?,
lastMaintenanceDate: freezed == lastMaintenanceDate
? _value.lastMaintenanceDate
: lastMaintenanceDate // ignore: cast_nullable_to_non_nullable
as String?,
nextMaintenanceDate: freezed == nextMaintenanceDate
? _value.nextMaintenanceDate
: nextMaintenanceDate // ignore: cast_nullable_to_non_nullable
as String?,
specifications: freezed == specifications
? _value.specifications
: specifications // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
createdAt: freezed == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
) as $Val);
}
}
/// @nodoc
abstract class _$$EquipmentDtoImplCopyWith<$Res>
implements $EquipmentDtoCopyWith<$Res> {
factory _$$EquipmentDtoImplCopyWith(
_$EquipmentDtoImpl value, $Res Function(_$EquipmentDtoImpl) then) =
__$$EquipmentDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
@JsonKey(name: 'serial_number') String serialNumber,
String name,
String? category,
String? manufacturer,
String? model,
String status,
@JsonKey(name: 'company_id') int companyId,
@JsonKey(name: 'company_name') String? companyName,
@JsonKey(name: 'warehouse_location_id') int? warehouseLocationId,
@JsonKey(name: 'warehouse_name') String? warehouseName,
@JsonKey(name: 'purchase_date') String? purchaseDate,
@JsonKey(name: 'purchase_price') double? purchasePrice,
@JsonKey(name: 'current_value') double? currentValue,
@JsonKey(name: 'warranty_expiry') String? warrantyExpiry,
@JsonKey(name: 'last_maintenance_date') String? lastMaintenanceDate,
@JsonKey(name: 'next_maintenance_date') String? nextMaintenanceDate,
Map<String, dynamic>? specifications,
String? notes,
@JsonKey(name: 'created_at') DateTime? createdAt,
@JsonKey(name: 'updated_at') DateTime? updatedAt});
}
/// @nodoc
class __$$EquipmentDtoImplCopyWithImpl<$Res>
extends _$EquipmentDtoCopyWithImpl<$Res, _$EquipmentDtoImpl>
implements _$$EquipmentDtoImplCopyWith<$Res> {
__$$EquipmentDtoImplCopyWithImpl(
_$EquipmentDtoImpl _value, $Res Function(_$EquipmentDtoImpl) _then)
: super(_value, _then);
/// Create a copy of EquipmentDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? serialNumber = null,
Object? name = null,
Object? category = freezed,
Object? manufacturer = freezed,
Object? model = freezed,
Object? status = null,
Object? companyId = null,
Object? companyName = freezed,
Object? warehouseLocationId = freezed,
Object? warehouseName = freezed,
Object? purchaseDate = freezed,
Object? purchasePrice = freezed,
Object? currentValue = freezed,
Object? warrantyExpiry = freezed,
Object? lastMaintenanceDate = freezed,
Object? nextMaintenanceDate = freezed,
Object? specifications = freezed,
Object? notes = freezed,
Object? createdAt = freezed,
Object? updatedAt = freezed,
}) {
return _then(_$EquipmentDtoImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
serialNumber: null == serialNumber
? _value.serialNumber
: serialNumber // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
category: freezed == category
? _value.category
: category // ignore: cast_nullable_to_non_nullable
as String?,
manufacturer: freezed == manufacturer
? _value.manufacturer
: manufacturer // ignore: cast_nullable_to_non_nullable
as String?,
model: freezed == model
? _value.model
: model // ignore: cast_nullable_to_non_nullable
as String?,
status: null == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String,
companyId: null == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int,
companyName: freezed == companyName
? _value.companyName
: companyName // ignore: cast_nullable_to_non_nullable
as String?,
warehouseLocationId: freezed == warehouseLocationId
? _value.warehouseLocationId
: warehouseLocationId // ignore: cast_nullable_to_non_nullable
as int?,
warehouseName: freezed == warehouseName
? _value.warehouseName
: warehouseName // ignore: cast_nullable_to_non_nullable
as String?,
purchaseDate: freezed == purchaseDate
? _value.purchaseDate
: purchaseDate // ignore: cast_nullable_to_non_nullable
as String?,
purchasePrice: freezed == purchasePrice
? _value.purchasePrice
: purchasePrice // ignore: cast_nullable_to_non_nullable
as double?,
currentValue: freezed == currentValue
? _value.currentValue
: currentValue // ignore: cast_nullable_to_non_nullable
as double?,
warrantyExpiry: freezed == warrantyExpiry
? _value.warrantyExpiry
: warrantyExpiry // ignore: cast_nullable_to_non_nullable
as String?,
lastMaintenanceDate: freezed == lastMaintenanceDate
? _value.lastMaintenanceDate
: lastMaintenanceDate // ignore: cast_nullable_to_non_nullable
as String?,
nextMaintenanceDate: freezed == nextMaintenanceDate
? _value.nextMaintenanceDate
: nextMaintenanceDate // ignore: cast_nullable_to_non_nullable
as String?,
specifications: freezed == specifications
? _value._specifications
: specifications // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
createdAt: freezed == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$EquipmentDtoImpl implements _EquipmentDto {
const _$EquipmentDtoImpl(
{required this.id,
@JsonKey(name: 'serial_number') required this.serialNumber,
required this.name,
this.category,
this.manufacturer,
this.model,
required this.status,
@JsonKey(name: 'company_id') required this.companyId,
@JsonKey(name: 'company_name') this.companyName,
@JsonKey(name: 'warehouse_location_id') this.warehouseLocationId,
@JsonKey(name: 'warehouse_name') this.warehouseName,
@JsonKey(name: 'purchase_date') this.purchaseDate,
@JsonKey(name: 'purchase_price') this.purchasePrice,
@JsonKey(name: 'current_value') this.currentValue,
@JsonKey(name: 'warranty_expiry') this.warrantyExpiry,
@JsonKey(name: 'last_maintenance_date') this.lastMaintenanceDate,
@JsonKey(name: 'next_maintenance_date') this.nextMaintenanceDate,
final Map<String, dynamic>? specifications,
this.notes,
@JsonKey(name: 'created_at') this.createdAt,
@JsonKey(name: 'updated_at') this.updatedAt})
: _specifications = specifications;
factory _$EquipmentDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$EquipmentDtoImplFromJson(json);
@override
final int id;
@override
@JsonKey(name: 'serial_number')
final String serialNumber;
@override
final String name;
@override
final String? category;
@override
final String? manufacturer;
@override
final String? model;
@override
final String status;
@override
@JsonKey(name: 'company_id')
final int companyId;
@override
@JsonKey(name: 'company_name')
final String? companyName;
@override
@JsonKey(name: 'warehouse_location_id')
final int? warehouseLocationId;
@override
@JsonKey(name: 'warehouse_name')
final String? warehouseName;
@override
@JsonKey(name: 'purchase_date')
final String? purchaseDate;
@override
@JsonKey(name: 'purchase_price')
final double? purchasePrice;
@override
@JsonKey(name: 'current_value')
final double? currentValue;
@override
@JsonKey(name: 'warranty_expiry')
final String? warrantyExpiry;
@override
@JsonKey(name: 'last_maintenance_date')
final String? lastMaintenanceDate;
@override
@JsonKey(name: 'next_maintenance_date')
final String? nextMaintenanceDate;
final Map<String, dynamic>? _specifications;
@override
Map<String, dynamic>? get specifications {
final value = _specifications;
if (value == null) return null;
if (_specifications is EqualUnmodifiableMapView) return _specifications;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(value);
}
@override
final String? notes;
@override
@JsonKey(name: 'created_at')
final DateTime? createdAt;
@override
@JsonKey(name: 'updated_at')
final DateTime? updatedAt;
@override
String toString() {
return 'EquipmentDto(id: $id, serialNumber: $serialNumber, name: $name, category: $category, manufacturer: $manufacturer, model: $model, status: $status, companyId: $companyId, companyName: $companyName, warehouseLocationId: $warehouseLocationId, warehouseName: $warehouseName, purchaseDate: $purchaseDate, purchasePrice: $purchasePrice, currentValue: $currentValue, warrantyExpiry: $warrantyExpiry, lastMaintenanceDate: $lastMaintenanceDate, nextMaintenanceDate: $nextMaintenanceDate, specifications: $specifications, notes: $notes, createdAt: $createdAt, updatedAt: $updatedAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$EquipmentDtoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.serialNumber, serialNumber) ||
other.serialNumber == serialNumber) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.category, category) ||
other.category == category) &&
(identical(other.manufacturer, manufacturer) ||
other.manufacturer == manufacturer) &&
(identical(other.model, model) || other.model == model) &&
(identical(other.status, status) || other.status == status) &&
(identical(other.companyId, companyId) ||
other.companyId == companyId) &&
(identical(other.companyName, companyName) ||
other.companyName == companyName) &&
(identical(other.warehouseLocationId, warehouseLocationId) ||
other.warehouseLocationId == warehouseLocationId) &&
(identical(other.warehouseName, warehouseName) ||
other.warehouseName == warehouseName) &&
(identical(other.purchaseDate, purchaseDate) ||
other.purchaseDate == purchaseDate) &&
(identical(other.purchasePrice, purchasePrice) ||
other.purchasePrice == purchasePrice) &&
(identical(other.currentValue, currentValue) ||
other.currentValue == currentValue) &&
(identical(other.warrantyExpiry, warrantyExpiry) ||
other.warrantyExpiry == warrantyExpiry) &&
(identical(other.lastMaintenanceDate, lastMaintenanceDate) ||
other.lastMaintenanceDate == lastMaintenanceDate) &&
(identical(other.nextMaintenanceDate, nextMaintenanceDate) ||
other.nextMaintenanceDate == nextMaintenanceDate) &&
const DeepCollectionEquality()
.equals(other._specifications, _specifications) &&
(identical(other.notes, notes) || other.notes == notes) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([
runtimeType,
id,
serialNumber,
name,
category,
manufacturer,
model,
status,
companyId,
companyName,
warehouseLocationId,
warehouseName,
purchaseDate,
purchasePrice,
currentValue,
warrantyExpiry,
lastMaintenanceDate,
nextMaintenanceDate,
const DeepCollectionEquality().hash(_specifications),
notes,
createdAt,
updatedAt
]);
/// Create a copy of EquipmentDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$EquipmentDtoImplCopyWith<_$EquipmentDtoImpl> get copyWith =>
__$$EquipmentDtoImplCopyWithImpl<_$EquipmentDtoImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$EquipmentDtoImplToJson(
this,
);
}
}
abstract class _EquipmentDto implements EquipmentDto {
const factory _EquipmentDto(
{required final int id,
@JsonKey(name: 'serial_number') required final String serialNumber,
required final String name,
final String? category,
final String? manufacturer,
final String? model,
required final String status,
@JsonKey(name: 'company_id') required final int companyId,
@JsonKey(name: 'company_name') final String? companyName,
@JsonKey(name: 'warehouse_location_id') final int? warehouseLocationId,
@JsonKey(name: 'warehouse_name') final String? warehouseName,
@JsonKey(name: 'purchase_date') final String? purchaseDate,
@JsonKey(name: 'purchase_price') final double? purchasePrice,
@JsonKey(name: 'current_value') final double? currentValue,
@JsonKey(name: 'warranty_expiry') final String? warrantyExpiry,
@JsonKey(name: 'last_maintenance_date') final String? lastMaintenanceDate,
@JsonKey(name: 'next_maintenance_date') final String? nextMaintenanceDate,
final Map<String, dynamic>? specifications,
final String? notes,
@JsonKey(name: 'created_at') final DateTime? createdAt,
@JsonKey(name: 'updated_at')
final DateTime? updatedAt}) = _$EquipmentDtoImpl;
factory _EquipmentDto.fromJson(Map<String, dynamic> json) =
_$EquipmentDtoImpl.fromJson;
@override
int get id;
@override
@JsonKey(name: 'serial_number')
String get serialNumber;
@override
String get name;
@override
String? get category;
@override
String? get manufacturer;
@override
String? get model;
@override
String get status;
@override
@JsonKey(name: 'company_id')
int get companyId;
@override
@JsonKey(name: 'company_name')
String? get companyName;
@override
@JsonKey(name: 'warehouse_location_id')
int? get warehouseLocationId;
@override
@JsonKey(name: 'warehouse_name')
String? get warehouseName;
@override
@JsonKey(name: 'purchase_date')
String? get purchaseDate;
@override
@JsonKey(name: 'purchase_price')
double? get purchasePrice;
@override
@JsonKey(name: 'current_value')
double? get currentValue;
@override
@JsonKey(name: 'warranty_expiry')
String? get warrantyExpiry;
@override
@JsonKey(name: 'last_maintenance_date')
String? get lastMaintenanceDate;
@override
@JsonKey(name: 'next_maintenance_date')
String? get nextMaintenanceDate;
@override
Map<String, dynamic>? get specifications;
@override
String? get notes;
@override
@JsonKey(name: 'created_at')
DateTime? get createdAt;
@override
@JsonKey(name: 'updated_at')
DateTime? get updatedAt;
/// Create a copy of EquipmentDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$EquipmentDtoImplCopyWith<_$EquipmentDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}