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

@@ -10,11 +10,11 @@ class MaintenanceDto with _$MaintenanceDto {
const factory MaintenanceDto({
@JsonKey(name: 'id') int? id,
@JsonKey(name: 'equipment_history_id') required int equipmentHistoryId,
@JsonKey(name: 'equipment_history_id') int? equipmentHistoryId, // Optional in backend
@JsonKey(name: 'started_at') required DateTime startedAt,
@JsonKey(name: 'ended_at') required DateTime endedAt,
@JsonKey(name: 'period_month') @Default(1) int periodMonth,
@JsonKey(name: 'maintenance_type') @Default('O') String maintenanceType,
@JsonKey(name: 'maintenance_type') @Default('WARRANTY') String maintenanceType, // WARRANTY|CONTRACT|INSPECTION
@JsonKey(name: 'is_deleted') @Default(false) bool isDeleted,
@JsonKey(name: 'registered_at') required DateTime registeredAt,
@JsonKey(name: 'updated_at') DateTime? updatedAt,
@@ -39,11 +39,11 @@ class MaintenanceDto with _$MaintenanceDto {
@freezed
class MaintenanceRequestDto with _$MaintenanceRequestDto {
const factory MaintenanceRequestDto({
@JsonKey(name: 'equipment_history_id') required int equipmentHistoryId,
@JsonKey(name: 'equipment_history_id') int? equipmentHistoryId, // Optional in backend
@JsonKey(name: 'started_at') required DateTime startedAt,
@JsonKey(name: 'ended_at') required DateTime endedAt,
@JsonKey(name: 'period_month') @Default(1) int periodMonth,
@JsonKey(name: 'maintenance_type') @Default('O') String maintenanceType,
@JsonKey(name: 'maintenance_type') @Default('WARRANTY') String maintenanceType, // WARRANTY|CONTRACT|INSPECTION
}) = _MaintenanceRequestDto;
factory MaintenanceRequestDto.fromJson(Map<String, dynamic> json) =>
@@ -77,24 +77,46 @@ class MaintenanceListResponse with _$MaintenanceListResponse {
_$MaintenanceListResponseFromJson(json);
}
// Maintenance Type 헬퍼
@freezed
class MaintenanceQueryDto with _$MaintenanceQueryDto {
const factory MaintenanceQueryDto({
@JsonKey(name: 'equipment_id') int? equipmentId,
@JsonKey(name: 'maintenance_type') String? maintenanceType,
@JsonKey(name: 'is_expired') bool? isExpired,
@JsonKey(name: 'expiring_days') int? expiringDays,
@JsonKey(name: 'page') @Default(1) int page,
@JsonKey(name: 'per_page') @Default(10) int perPage,
@JsonKey(name: 'include_deleted') @Default(false) bool includeDeleted,
}) = _MaintenanceQueryDto;
factory MaintenanceQueryDto.fromJson(Map<String, dynamic> json) =>
_$MaintenanceQueryDtoFromJson(json);
}
// Maintenance Type 헬퍼 (백엔드와 일치)
class MaintenanceType {
static const String onsite = 'O';
static const String remote = 'R';
static const String preventive = 'P';
static const String warranty = 'WARRANTY';
static const String contract = 'CONTRACT';
static const String inspection = 'INSPECTION';
static String getDisplayName(String type) {
switch (type) {
case onsite:
return '방문';
case remote:
return '원격';
case preventive:
return '예방';
case warranty:
return '무상 보증';
case contract:
return '유상 계약';
case inspection:
return '점검';
default:
return type;
}
}
static List<String> get allTypes => [onsite, remote, preventive];
static List<String> get allTypes => [warranty, contract, inspection];
static List<Map<String, String>> get typeOptions => [
{'value': warranty, 'label': '무상 보증'},
{'value': contract, 'label': '유상 계약'},
{'value': inspection, 'label': '점검'},
];
}