backup: 사용하지 않는 파일 삭제 전 복구 지점

- 전체 371개 파일 중 82개 미사용 파일 식별
- Phase 1: 33개 파일 삭제 예정 (100% 안전)
- Phase 2: 30개 파일 삭제 검토 예정
- Phase 3: 19개 파일 수동 검토 예정

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
JiWoong Sul
2025-09-02 19:51:40 +09:00
parent 650cd4be55
commit c419f8f458
149 changed files with 12934 additions and 3644 deletions

View File

@@ -1,4 +1,5 @@
import 'package:dio/dio.dart';
import '../../core/constants/app_constants.dart';
import '../models/rent_dto.dart';
import '../../domain/repositories/rent_repository.dart';
@@ -11,18 +12,22 @@ class RentRepositoryImpl implements RentRepository {
@override
Future<RentListResponse> getRents({
int page = 1,
int pageSize = 10,
String? search,
String? status,
int? equipmentHistoryId,
int perPage = AppConstants.rentPageSize,
int? equipmentId,
int? companyId,
bool? isActive,
DateTime? dateFrom,
DateTime? dateTo,
}) async {
try {
final queryParams = {
'page': page,
'page_size': pageSize,
if (search != null) 'search': search,
if (status != null) 'status': status,
if (equipmentHistoryId != null) 'equipment_history_id': equipmentHistoryId,
'per_page': perPage,
if (equipmentId != null) 'equipment_id': equipmentId,
if (companyId != null) 'company_id': companyId,
if (isActive != null) 'is_active': isActive,
if (dateFrom != null) 'date_from': dateFrom.toIso8601String().split('T')[0],
if (dateTo != null) 'date_to': dateTo.toIso8601String().split('T')[0],
};
final response = await _dio.get(
@@ -85,14 +90,13 @@ class RentRepositoryImpl implements RentRepository {
@override
Future<RentDto> returnRent(int id, String returnDate) async {
Future<List<RentDto>> getActiveRents() async {
try {
final response = await _dio.patch(
'$_baseEndpoint/$id/return',
data: {'return_date': returnDate},
);
return RentDto.fromJson(response.data);
final response = await _dio.get('$_baseEndpoint/active');
// Backend returns List<RentDto> directly for /active endpoint
final List<dynamic> dataList = response.data as List<dynamic>;
return dataList.map((json) => RentDto.fromJson(json)).toList();
} on DioException catch (e) {
throw _handleError(e);
}