feat: 장비 관리 API 연동 구현

- Equipment 관련 DTO 모델 생성 (Request/Response/List/History/In/Out/IO)
- EquipmentRemoteDataSource 구현 (10개 API 엔드포인트)
- EquipmentService 비즈니스 로직 구현
- Controller를 ChangeNotifier 패턴으로 개선
- 장비 목록 화면에 Provider 패턴 및 무한 스크롤 적용
- 장비 입고 화면 API 연동 및 비동기 처리
- DI 컨테이너에 Equipment 관련 의존성 등록
- API/Mock 데이터 소스 전환 가능 (Feature Flag)
- API 통합 진행 상황 문서 업데이트
This commit is contained in:
JiWoong Sul
2025-07-24 16:26:04 +09:00
parent a13c485302
commit 1d1e38bcfa
30 changed files with 4920 additions and 80 deletions

View File

@@ -0,0 +1,254 @@
// 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_out_request.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');
EquipmentOutRequest _$EquipmentOutRequestFromJson(Map<String, dynamic> json) {
return _EquipmentOutRequest.fromJson(json);
}
/// @nodoc
mixin _$EquipmentOutRequest {
int get equipmentId => throw _privateConstructorUsedError;
int get quantity => throw _privateConstructorUsedError;
int get companyId => throw _privateConstructorUsedError;
int? get branchId => throw _privateConstructorUsedError;
String? get notes => throw _privateConstructorUsedError;
/// Serializes this EquipmentOutRequest to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of EquipmentOutRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$EquipmentOutRequestCopyWith<EquipmentOutRequest> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $EquipmentOutRequestCopyWith<$Res> {
factory $EquipmentOutRequestCopyWith(
EquipmentOutRequest value, $Res Function(EquipmentOutRequest) then) =
_$EquipmentOutRequestCopyWithImpl<$Res, EquipmentOutRequest>;
@useResult
$Res call(
{int equipmentId,
int quantity,
int companyId,
int? branchId,
String? notes});
}
/// @nodoc
class _$EquipmentOutRequestCopyWithImpl<$Res, $Val extends EquipmentOutRequest>
implements $EquipmentOutRequestCopyWith<$Res> {
_$EquipmentOutRequestCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of EquipmentOutRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? equipmentId = null,
Object? quantity = null,
Object? companyId = null,
Object? branchId = freezed,
Object? notes = freezed,
}) {
return _then(_value.copyWith(
equipmentId: null == equipmentId
? _value.equipmentId
: equipmentId // ignore: cast_nullable_to_non_nullable
as int,
quantity: null == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
companyId: null == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int,
branchId: freezed == branchId
? _value.branchId
: branchId // ignore: cast_nullable_to_non_nullable
as int?,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$EquipmentOutRequestImplCopyWith<$Res>
implements $EquipmentOutRequestCopyWith<$Res> {
factory _$$EquipmentOutRequestImplCopyWith(_$EquipmentOutRequestImpl value,
$Res Function(_$EquipmentOutRequestImpl) then) =
__$$EquipmentOutRequestImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int equipmentId,
int quantity,
int companyId,
int? branchId,
String? notes});
}
/// @nodoc
class __$$EquipmentOutRequestImplCopyWithImpl<$Res>
extends _$EquipmentOutRequestCopyWithImpl<$Res, _$EquipmentOutRequestImpl>
implements _$$EquipmentOutRequestImplCopyWith<$Res> {
__$$EquipmentOutRequestImplCopyWithImpl(_$EquipmentOutRequestImpl _value,
$Res Function(_$EquipmentOutRequestImpl) _then)
: super(_value, _then);
/// Create a copy of EquipmentOutRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? equipmentId = null,
Object? quantity = null,
Object? companyId = null,
Object? branchId = freezed,
Object? notes = freezed,
}) {
return _then(_$EquipmentOutRequestImpl(
equipmentId: null == equipmentId
? _value.equipmentId
: equipmentId // ignore: cast_nullable_to_non_nullable
as int,
quantity: null == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
companyId: null == companyId
? _value.companyId
: companyId // ignore: cast_nullable_to_non_nullable
as int,
branchId: freezed == branchId
? _value.branchId
: branchId // ignore: cast_nullable_to_non_nullable
as int?,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$EquipmentOutRequestImpl implements _EquipmentOutRequest {
const _$EquipmentOutRequestImpl(
{required this.equipmentId,
required this.quantity,
required this.companyId,
this.branchId,
this.notes});
factory _$EquipmentOutRequestImpl.fromJson(Map<String, dynamic> json) =>
_$$EquipmentOutRequestImplFromJson(json);
@override
final int equipmentId;
@override
final int quantity;
@override
final int companyId;
@override
final int? branchId;
@override
final String? notes;
@override
String toString() {
return 'EquipmentOutRequest(equipmentId: $equipmentId, quantity: $quantity, companyId: $companyId, branchId: $branchId, notes: $notes)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$EquipmentOutRequestImpl &&
(identical(other.equipmentId, equipmentId) ||
other.equipmentId == equipmentId) &&
(identical(other.quantity, quantity) ||
other.quantity == quantity) &&
(identical(other.companyId, companyId) ||
other.companyId == companyId) &&
(identical(other.branchId, branchId) ||
other.branchId == branchId) &&
(identical(other.notes, notes) || other.notes == notes));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, equipmentId, quantity, companyId, branchId, notes);
/// Create a copy of EquipmentOutRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$EquipmentOutRequestImplCopyWith<_$EquipmentOutRequestImpl> get copyWith =>
__$$EquipmentOutRequestImplCopyWithImpl<_$EquipmentOutRequestImpl>(
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$EquipmentOutRequestImplToJson(
this,
);
}
}
abstract class _EquipmentOutRequest implements EquipmentOutRequest {
const factory _EquipmentOutRequest(
{required final int equipmentId,
required final int quantity,
required final int companyId,
final int? branchId,
final String? notes}) = _$EquipmentOutRequestImpl;
factory _EquipmentOutRequest.fromJson(Map<String, dynamic> json) =
_$EquipmentOutRequestImpl.fromJson;
@override
int get equipmentId;
@override
int get quantity;
@override
int get companyId;
@override
int? get branchId;
@override
String? get notes;
/// Create a copy of EquipmentOutRequest
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$EquipmentOutRequestImplCopyWith<_$EquipmentOutRequestImpl> get copyWith =>
throw _privateConstructorUsedError;
}