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,71 @@
/// 출고 테이블과 필터 구성을 위한 정적 스펙을 정의한다.
class OutboundTableSpec {
const OutboundTableSpec._();
/// 목록 헤더 라벨.
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> transactionTypeKeywords = ['출고', 'outbound'];
/// 검색 필드 플레이스홀더.
static const String searchPlaceholder = '트랜잭션번호, 작성자, 제품, 고객사 검색';
/// 창고 전체 라벨.
static const String allWarehouseLabel = '전체 창고';
/// 상태 전체 라벨.
static const String allStatusLabel = '전체 상태';
/// 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;
}
}
}