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

@@ -16,6 +16,7 @@ class ApiEndpoints {
static const String equipment = '/equipments'; // 단수형 별칭
static const String equipments = '/equipments';
static const String equipmentHistory = '/equipment-history';
static const String equipmentHistoryStockStatus = '/equipment-history/stock-status';
// 회사 관리
static const String companies = '/companies';
@@ -38,7 +39,14 @@ class ApiEndpoints {
// 우편번호 관리
static const String zipcodes = '/zipcodes';
static const String zipcodeHierarchySidos = '/zipcodes/hierarchy/sidos';
static const String zipcodeHierarchyGus = '/zipcodes/hierarchy/gus';
static const String zipcodeHierarchyEtcs = '/zipcodes/hierarchy/etcs';
// 검색 및 조회
static const String lookups = '/lookups';
// 검색 및 조회 (개별 엔드포인트로 변경 - 백엔드 실존 API 활용)
static const String lookups = '/lookups'; // 레거시 지원
static const String lookupsVendors = '/lookups/vendors';
static const String lookupsCompanies = '/lookups/companies';
static const String lookupsWarehouses = '/lookups/warehouses';
static String lookupsModelsByVendor(int vendorId) => '/lookups/models/$vendorId';
}

View File

@@ -1,13 +1,32 @@
/// 앱 전역 상수 정의
class AppConstants {
// API 관련
static const int defaultPageSize = 20;
static const int defaultPageSize = 10;
static const int maxPageSize = 100;
static const Duration cacheTimeout = Duration(minutes: 5);
// API 타임아웃
static const Duration apiConnectTimeout = Duration(seconds: 60);
static const Duration apiReceiveTimeout = Duration(seconds: 60);
// 페이지네이션 상수 (중앙 집중 관리)
static const int minPageSize = 5; // 최소 페이지 크기
static const int largePageSize = 20; // 대용량 데이터용
static const int smallPageSize = 5; // 테스트/미리보기용
static const int bulkPageSize = 100; // 대량 조회용
static const int maxBulkPageSize = 1000; // 전체 데이터 조회용
// 테이블별 기본 페이지 크기 (데이터 특성에 맞춰 최적화)
static const int equipmentPageSize = 10; // 장비 목록 (상세 정보 많음)
static const int userPageSize = 20; // 사용자 목록 (일반적인 리스트)
static const int companyPageSize = 10; // 회사 목록 (계층 구조 고려)
static const int warehousePageSize = 10; // 창고 목록 (위치 정보 포함)
static const int adminPageSize = 10; // 관리자 목록 (소수 데이터)
static const int vendorPageSize = 10; // 제조사 목록
static const int modelPageSize = 20; // 모델 목록
static const int historyPageSize = 10; // 이력 목록 (상세 정보 많음)
static const int rentPageSize = 20; // 대여 목록
static const int maintenancePageSize = 10; // 유지보수 목록
// API 타임아웃 (Phase 8 2단계: 30초로 단축하여 빠른 오류 감지)
static const Duration apiConnectTimeout = Duration(seconds: 30);
static const Duration apiReceiveTimeout = Duration(seconds: 30);
static const Duration healthCheckTimeout = Duration(seconds: 10);
static const Duration loginTimeout = Duration(seconds: 10);

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import '../constants/app_constants.dart';
import '../utils/error_handler.dart';
import '../../data/models/common/pagination_params.dart';
@@ -26,7 +27,7 @@ abstract class BaseListController<T> extends ChangeNotifier {
int _currentPage = 1;
/// 페이지당 아이템 수
int _pageSize = 10;
int _pageSize = AppConstants.defaultPageSize;
/// 더 많은 데이터가 있는지 여부
bool _hasMore = true;
@@ -51,7 +52,7 @@ abstract class BaseListController<T> extends ChangeNotifier {
}
/// 컨트롤러 초기화 (페이지 크기 설정 및 데이터 로드)
Future<void> initialize({int pageSize = 10}) async {
Future<void> initialize({int pageSize = AppConstants.defaultPageSize}) async {
_pageSize = pageSize;
await loadData(isRefresh: true);
}

View File

@@ -321,19 +321,25 @@ extension LookupsServiceExtensions on LookupsService {
// 장비명 리스트 (드롭다운 + 직접입력용)
final List<String> equipmentNames = data.equipmentNames.map((item) => item.name).toList();
// 회사 리스트 (드롭다운 전용)
final Map<int, String> companies = {};
// 회사 리스트 (드롭다운 전용) - List<Map> 형태로 변환하여 IdentityMap 오류 방지
final List<Map<String, dynamic>> companies = [];
for (final company in data.companies) {
if (company.id != null) {
companies[company.id!] = company.name;
companies.add({
'id': company.id!,
'name': company.name,
});
}
}
// 창고 리스트 (드롭다운 전용)
final Map<int, String> warehouses = {};
// 창고 리스트 (드롭다운 전용) - List<Map> 형태로 변환하여 IdentityMap 오류 방지
final List<Map<String, dynamic>> warehouses = [];
for (final warehouse in data.warehouses) {
if (warehouse.id != null) {
warehouses[warehouse.id!] = warehouse.name;
warehouses.add({
'id': warehouse.id!,
'name': warehouse.name,
});
}
}