refactor: 인벤토리 테이블 스펙과 도메인 계층 정비

This commit is contained in:
JiWoong Sul
2025-10-14 18:09:26 +09:00
parent 8d3b2c1e20
commit 1325109fba
32 changed files with 5550 additions and 290 deletions

View File

@@ -0,0 +1,76 @@
/// 대여 테이블과 필터 구성에 필요한 정적 스펙을 정의한다.
class RentalTableSpec {
const RentalTableSpec._();
/// 목록 헤더 라벨.
static const List<String> headers = [
'번호',
'처리일자',
'창고',
'대여구분',
'트랜잭션번호',
'상태',
'반납예정일',
'고객수',
'품목수',
'총수량',
'비고',
];
/// 페이지당 항목 수 선택지.
static const List<int> pageSizeOptions = [10, 20, 50];
/// include 파라미터 기본값.
static const List<String> defaultIncludeOptions = ['lines', 'customers'];
/// 백엔드 미응답 시 사용하는 기본 상태라벨.
static const List<String> fallbackStatusOptions = ['대여중', '반납대기', '완료'];
/// 대여 타입 식별 키워드.
static const List<String> rentTransactionKeywords = ['대여', 'rent'];
/// 반납 타입 식별 키워드.
static const List<String> returnTransactionKeywords = ['반납', 'return'];
/// 필터에서 제공하는 대여구분 라벨.
static const List<String> rentalTypes = ['대여', '반납'];
/// 검색 플레이스홀더.
static const String searchPlaceholder = '트랜잭션번호, 작성자, 제품, 고객사 검색';
/// 창고 전체 라벨.
static const String allWarehouseLabel = '전체 창고';
/// 상태 전체 라벨.
static const String allStatusLabel = '전체 상태';
/// 대여구분 전체 라벨.
static const String allRentalTypeLabel = '대여구분 전체';
/// include 선택 없음 라벨.
static const String includeEmptyLabel = 'Include 없음';
/// 테이블 열 폭 기준 값.
static const double columnSpanWidth = 140;
/// 테이블 행 높이 기준 값.
static const double rowSpanHeight = 56;
/// 날짜 필터 시작 범위.
static final DateTime dateRangeFirstDate = DateTime(2020);
/// 날짜 필터 종료 범위.
static final DateTime dateRangeLastDate = DateTime(2030);
/// include 라벨 정의.
static String includeLabel(String value) {
switch (value) {
case 'lines':
return '라인 포함';
case 'customers':
return '고객 포함';
default:
return value;
}
}
}