Files
superport/lib/data/models/equipment/equipment_history_dto.freezed.dart
JiWoong Sul cddde57450 feat: 장비 관리 기능 강화 및 이력 추적 개선
- EquipmentHistoryDto 모델 확장 (상세 정보 추가)
- 장비 이력 화면 UI/UX 개선
- 장비 입고 폼 검증 로직 강화
- 테스트 이력 화면 추가
- API 응답 처리 개선

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-09 02:17:16 +09:00

667 lines
23 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_history_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');
EquipmentHistoryDto _$EquipmentHistoryDtoFromJson(Map<String, dynamic> json) {
return _EquipmentHistoryDto.fromJson(json);
}
/// @nodoc
mixin _$EquipmentHistoryDto {
int get id => throw _privateConstructorUsedError;
@JsonKey(name: 'equipment_id')
int get equipmentId => throw _privateConstructorUsedError;
@JsonKey(name: 'transaction_type')
String get transactionType => throw _privateConstructorUsedError;
int get quantity => throw _privateConstructorUsedError;
@JsonKey(name: 'transaction_date')
DateTime get transactionDate => throw _privateConstructorUsedError;
String? get remarks => throw _privateConstructorUsedError;
@JsonKey(name: 'created_by')
int? get createdBy => throw _privateConstructorUsedError;
@JsonKey(name: 'user_id')
int? get userId => throw _privateConstructorUsedError;
@JsonKey(name: 'created_at')
DateTime get createdAt => throw _privateConstructorUsedError; // 추가 정보
@JsonKey(name: 'user_name')
String? get userName => throw _privateConstructorUsedError;
@JsonKey(name: 'performed_by')
String? get performedBy => throw _privateConstructorUsedError;
/// Serializes this EquipmentHistoryDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of EquipmentHistoryDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$EquipmentHistoryDtoCopyWith<EquipmentHistoryDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $EquipmentHistoryDtoCopyWith<$Res> {
factory $EquipmentHistoryDtoCopyWith(
EquipmentHistoryDto value, $Res Function(EquipmentHistoryDto) then) =
_$EquipmentHistoryDtoCopyWithImpl<$Res, EquipmentHistoryDto>;
@useResult
$Res call(
{int id,
@JsonKey(name: 'equipment_id') int equipmentId,
@JsonKey(name: 'transaction_type') String transactionType,
int quantity,
@JsonKey(name: 'transaction_date') DateTime transactionDate,
String? remarks,
@JsonKey(name: 'created_by') int? createdBy,
@JsonKey(name: 'user_id') int? userId,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'user_name') String? userName,
@JsonKey(name: 'performed_by') String? performedBy});
}
/// @nodoc
class _$EquipmentHistoryDtoCopyWithImpl<$Res, $Val extends EquipmentHistoryDto>
implements $EquipmentHistoryDtoCopyWith<$Res> {
_$EquipmentHistoryDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of EquipmentHistoryDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? equipmentId = null,
Object? transactionType = null,
Object? quantity = null,
Object? transactionDate = null,
Object? remarks = freezed,
Object? createdBy = freezed,
Object? userId = freezed,
Object? createdAt = null,
Object? userName = freezed,
Object? performedBy = freezed,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
equipmentId: null == equipmentId
? _value.equipmentId
: equipmentId // ignore: cast_nullable_to_non_nullable
as int,
transactionType: null == transactionType
? _value.transactionType
: transactionType // ignore: cast_nullable_to_non_nullable
as String,
quantity: null == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
transactionDate: null == transactionDate
? _value.transactionDate
: transactionDate // ignore: cast_nullable_to_non_nullable
as DateTime,
remarks: freezed == remarks
? _value.remarks
: remarks // ignore: cast_nullable_to_non_nullable
as String?,
createdBy: freezed == createdBy
? _value.createdBy
: createdBy // ignore: cast_nullable_to_non_nullable
as int?,
userId: freezed == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int?,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
userName: freezed == userName
? _value.userName
: userName // ignore: cast_nullable_to_non_nullable
as String?,
performedBy: freezed == performedBy
? _value.performedBy
: performedBy // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$EquipmentHistoryDtoImplCopyWith<$Res>
implements $EquipmentHistoryDtoCopyWith<$Res> {
factory _$$EquipmentHistoryDtoImplCopyWith(_$EquipmentHistoryDtoImpl value,
$Res Function(_$EquipmentHistoryDtoImpl) then) =
__$$EquipmentHistoryDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
@JsonKey(name: 'equipment_id') int equipmentId,
@JsonKey(name: 'transaction_type') String transactionType,
int quantity,
@JsonKey(name: 'transaction_date') DateTime transactionDate,
String? remarks,
@JsonKey(name: 'created_by') int? createdBy,
@JsonKey(name: 'user_id') int? userId,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'user_name') String? userName,
@JsonKey(name: 'performed_by') String? performedBy});
}
/// @nodoc
class __$$EquipmentHistoryDtoImplCopyWithImpl<$Res>
extends _$EquipmentHistoryDtoCopyWithImpl<$Res, _$EquipmentHistoryDtoImpl>
implements _$$EquipmentHistoryDtoImplCopyWith<$Res> {
__$$EquipmentHistoryDtoImplCopyWithImpl(_$EquipmentHistoryDtoImpl _value,
$Res Function(_$EquipmentHistoryDtoImpl) _then)
: super(_value, _then);
/// Create a copy of EquipmentHistoryDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? equipmentId = null,
Object? transactionType = null,
Object? quantity = null,
Object? transactionDate = null,
Object? remarks = freezed,
Object? createdBy = freezed,
Object? userId = freezed,
Object? createdAt = null,
Object? userName = freezed,
Object? performedBy = freezed,
}) {
return _then(_$EquipmentHistoryDtoImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
equipmentId: null == equipmentId
? _value.equipmentId
: equipmentId // ignore: cast_nullable_to_non_nullable
as int,
transactionType: null == transactionType
? _value.transactionType
: transactionType // ignore: cast_nullable_to_non_nullable
as String,
quantity: null == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
transactionDate: null == transactionDate
? _value.transactionDate
: transactionDate // ignore: cast_nullable_to_non_nullable
as DateTime,
remarks: freezed == remarks
? _value.remarks
: remarks // ignore: cast_nullable_to_non_nullable
as String?,
createdBy: freezed == createdBy
? _value.createdBy
: createdBy // ignore: cast_nullable_to_non_nullable
as int?,
userId: freezed == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int?,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
userName: freezed == userName
? _value.userName
: userName // ignore: cast_nullable_to_non_nullable
as String?,
performedBy: freezed == performedBy
? _value.performedBy
: performedBy // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$EquipmentHistoryDtoImpl implements _EquipmentHistoryDto {
const _$EquipmentHistoryDtoImpl(
{required this.id,
@JsonKey(name: 'equipment_id') required this.equipmentId,
@JsonKey(name: 'transaction_type') required this.transactionType,
required this.quantity,
@JsonKey(name: 'transaction_date') required this.transactionDate,
this.remarks,
@JsonKey(name: 'created_by') this.createdBy,
@JsonKey(name: 'user_id') this.userId,
@JsonKey(name: 'created_at') required this.createdAt,
@JsonKey(name: 'user_name') this.userName,
@JsonKey(name: 'performed_by') this.performedBy});
factory _$EquipmentHistoryDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$EquipmentHistoryDtoImplFromJson(json);
@override
final int id;
@override
@JsonKey(name: 'equipment_id')
final int equipmentId;
@override
@JsonKey(name: 'transaction_type')
final String transactionType;
@override
final int quantity;
@override
@JsonKey(name: 'transaction_date')
final DateTime transactionDate;
@override
final String? remarks;
@override
@JsonKey(name: 'created_by')
final int? createdBy;
@override
@JsonKey(name: 'user_id')
final int? userId;
@override
@JsonKey(name: 'created_at')
final DateTime createdAt;
// 추가 정보
@override
@JsonKey(name: 'user_name')
final String? userName;
@override
@JsonKey(name: 'performed_by')
final String? performedBy;
@override
String toString() {
return 'EquipmentHistoryDto(id: $id, equipmentId: $equipmentId, transactionType: $transactionType, quantity: $quantity, transactionDate: $transactionDate, remarks: $remarks, createdBy: $createdBy, userId: $userId, createdAt: $createdAt, userName: $userName, performedBy: $performedBy)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$EquipmentHistoryDtoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.equipmentId, equipmentId) ||
other.equipmentId == equipmentId) &&
(identical(other.transactionType, transactionType) ||
other.transactionType == transactionType) &&
(identical(other.quantity, quantity) ||
other.quantity == quantity) &&
(identical(other.transactionDate, transactionDate) ||
other.transactionDate == transactionDate) &&
(identical(other.remarks, remarks) || other.remarks == remarks) &&
(identical(other.createdBy, createdBy) ||
other.createdBy == createdBy) &&
(identical(other.userId, userId) || other.userId == userId) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.userName, userName) ||
other.userName == userName) &&
(identical(other.performedBy, performedBy) ||
other.performedBy == performedBy));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
equipmentId,
transactionType,
quantity,
transactionDate,
remarks,
createdBy,
userId,
createdAt,
userName,
performedBy);
/// Create a copy of EquipmentHistoryDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$EquipmentHistoryDtoImplCopyWith<_$EquipmentHistoryDtoImpl> get copyWith =>
__$$EquipmentHistoryDtoImplCopyWithImpl<_$EquipmentHistoryDtoImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$EquipmentHistoryDtoImplToJson(
this,
);
}
}
abstract class _EquipmentHistoryDto implements EquipmentHistoryDto {
const factory _EquipmentHistoryDto(
{required final int id,
@JsonKey(name: 'equipment_id') required final int equipmentId,
@JsonKey(name: 'transaction_type') required final String transactionType,
required final int quantity,
@JsonKey(name: 'transaction_date')
required final DateTime transactionDate,
final String? remarks,
@JsonKey(name: 'created_by') final int? createdBy,
@JsonKey(name: 'user_id') final int? userId,
@JsonKey(name: 'created_at') required final DateTime createdAt,
@JsonKey(name: 'user_name') final String? userName,
@JsonKey(name: 'performed_by')
final String? performedBy}) = _$EquipmentHistoryDtoImpl;
factory _EquipmentHistoryDto.fromJson(Map<String, dynamic> json) =
_$EquipmentHistoryDtoImpl.fromJson;
@override
int get id;
@override
@JsonKey(name: 'equipment_id')
int get equipmentId;
@override
@JsonKey(name: 'transaction_type')
String get transactionType;
@override
int get quantity;
@override
@JsonKey(name: 'transaction_date')
DateTime get transactionDate;
@override
String? get remarks;
@override
@JsonKey(name: 'created_by')
int? get createdBy;
@override
@JsonKey(name: 'user_id')
int? get userId;
@override
@JsonKey(name: 'created_at')
DateTime get createdAt; // 추가 정보
@override
@JsonKey(name: 'user_name')
String? get userName;
@override
@JsonKey(name: 'performed_by')
String? get performedBy;
/// Create a copy of EquipmentHistoryDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$EquipmentHistoryDtoImplCopyWith<_$EquipmentHistoryDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
CreateHistoryRequest _$CreateHistoryRequestFromJson(Map<String, dynamic> json) {
return _CreateHistoryRequest.fromJson(json);
}
/// @nodoc
mixin _$CreateHistoryRequest {
@JsonKey(name: 'transaction_type')
String get transactionType => throw _privateConstructorUsedError;
int get quantity => throw _privateConstructorUsedError;
@JsonKey(name: 'transaction_date')
DateTime? get transactionDate => throw _privateConstructorUsedError;
String? get remarks => throw _privateConstructorUsedError;
@JsonKey(name: 'user_id')
int? get userId => throw _privateConstructorUsedError;
/// Serializes this CreateHistoryRequest to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of CreateHistoryRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$CreateHistoryRequestCopyWith<CreateHistoryRequest> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $CreateHistoryRequestCopyWith<$Res> {
factory $CreateHistoryRequestCopyWith(CreateHistoryRequest value,
$Res Function(CreateHistoryRequest) then) =
_$CreateHistoryRequestCopyWithImpl<$Res, CreateHistoryRequest>;
@useResult
$Res call(
{@JsonKey(name: 'transaction_type') String transactionType,
int quantity,
@JsonKey(name: 'transaction_date') DateTime? transactionDate,
String? remarks,
@JsonKey(name: 'user_id') int? userId});
}
/// @nodoc
class _$CreateHistoryRequestCopyWithImpl<$Res,
$Val extends CreateHistoryRequest>
implements $CreateHistoryRequestCopyWith<$Res> {
_$CreateHistoryRequestCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of CreateHistoryRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? transactionType = null,
Object? quantity = null,
Object? transactionDate = freezed,
Object? remarks = freezed,
Object? userId = freezed,
}) {
return _then(_value.copyWith(
transactionType: null == transactionType
? _value.transactionType
: transactionType // ignore: cast_nullable_to_non_nullable
as String,
quantity: null == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
transactionDate: freezed == transactionDate
? _value.transactionDate
: transactionDate // ignore: cast_nullable_to_non_nullable
as DateTime?,
remarks: freezed == remarks
? _value.remarks
: remarks // ignore: cast_nullable_to_non_nullable
as String?,
userId: freezed == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int?,
) as $Val);
}
}
/// @nodoc
abstract class _$$CreateHistoryRequestImplCopyWith<$Res>
implements $CreateHistoryRequestCopyWith<$Res> {
factory _$$CreateHistoryRequestImplCopyWith(_$CreateHistoryRequestImpl value,
$Res Function(_$CreateHistoryRequestImpl) then) =
__$$CreateHistoryRequestImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: 'transaction_type') String transactionType,
int quantity,
@JsonKey(name: 'transaction_date') DateTime? transactionDate,
String? remarks,
@JsonKey(name: 'user_id') int? userId});
}
/// @nodoc
class __$$CreateHistoryRequestImplCopyWithImpl<$Res>
extends _$CreateHistoryRequestCopyWithImpl<$Res, _$CreateHistoryRequestImpl>
implements _$$CreateHistoryRequestImplCopyWith<$Res> {
__$$CreateHistoryRequestImplCopyWithImpl(_$CreateHistoryRequestImpl _value,
$Res Function(_$CreateHistoryRequestImpl) _then)
: super(_value, _then);
/// Create a copy of CreateHistoryRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? transactionType = null,
Object? quantity = null,
Object? transactionDate = freezed,
Object? remarks = freezed,
Object? userId = freezed,
}) {
return _then(_$CreateHistoryRequestImpl(
transactionType: null == transactionType
? _value.transactionType
: transactionType // ignore: cast_nullable_to_non_nullable
as String,
quantity: null == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
transactionDate: freezed == transactionDate
? _value.transactionDate
: transactionDate // ignore: cast_nullable_to_non_nullable
as DateTime?,
remarks: freezed == remarks
? _value.remarks
: remarks // ignore: cast_nullable_to_non_nullable
as String?,
userId: freezed == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$CreateHistoryRequestImpl implements _CreateHistoryRequest {
const _$CreateHistoryRequestImpl(
{@JsonKey(name: 'transaction_type') required this.transactionType,
required this.quantity,
@JsonKey(name: 'transaction_date') this.transactionDate,
this.remarks,
@JsonKey(name: 'user_id') this.userId});
factory _$CreateHistoryRequestImpl.fromJson(Map<String, dynamic> json) =>
_$$CreateHistoryRequestImplFromJson(json);
@override
@JsonKey(name: 'transaction_type')
final String transactionType;
@override
final int quantity;
@override
@JsonKey(name: 'transaction_date')
final DateTime? transactionDate;
@override
final String? remarks;
@override
@JsonKey(name: 'user_id')
final int? userId;
@override
String toString() {
return 'CreateHistoryRequest(transactionType: $transactionType, quantity: $quantity, transactionDate: $transactionDate, remarks: $remarks, userId: $userId)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$CreateHistoryRequestImpl &&
(identical(other.transactionType, transactionType) ||
other.transactionType == transactionType) &&
(identical(other.quantity, quantity) ||
other.quantity == quantity) &&
(identical(other.transactionDate, transactionDate) ||
other.transactionDate == transactionDate) &&
(identical(other.remarks, remarks) || other.remarks == remarks) &&
(identical(other.userId, userId) || other.userId == userId));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, transactionType, quantity, transactionDate, remarks, userId);
/// Create a copy of CreateHistoryRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$CreateHistoryRequestImplCopyWith<_$CreateHistoryRequestImpl>
get copyWith =>
__$$CreateHistoryRequestImplCopyWithImpl<_$CreateHistoryRequestImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$CreateHistoryRequestImplToJson(
this,
);
}
}
abstract class _CreateHistoryRequest implements CreateHistoryRequest {
const factory _CreateHistoryRequest(
{@JsonKey(name: 'transaction_type') required final String transactionType,
required final int quantity,
@JsonKey(name: 'transaction_date') final DateTime? transactionDate,
final String? remarks,
@JsonKey(name: 'user_id')
final int? userId}) = _$CreateHistoryRequestImpl;
factory _CreateHistoryRequest.fromJson(Map<String, dynamic> json) =
_$CreateHistoryRequestImpl.fromJson;
@override
@JsonKey(name: 'transaction_type')
String get transactionType;
@override
int get quantity;
@override
@JsonKey(name: 'transaction_date')
DateTime? get transactionDate;
@override
String? get remarks;
@override
@JsonKey(name: 'user_id')
int? get userId;
/// Create a copy of CreateHistoryRequest
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$CreateHistoryRequestImplCopyWith<_$CreateHistoryRequestImpl>
get copyWith => throw _privateConstructorUsedError;
}