This commit is contained in:
mike
2025-12-12 23:04:51 +01:00
parent 56b2db82fc
commit 87550e426a
14 changed files with 132 additions and 122 deletions

View File

@@ -12,7 +12,7 @@ class FileRecord:
size: int
modified_time: float
created_time: float
disk: str
disk_label: str
checksum: str | None = None
status: str = 'indexed' # indexed, planned, moved, verified
category: str | None = None
@@ -23,7 +23,7 @@ class FileRecord:
class OperationRecord:
"""Record of a migration operation"""
source_path: Path
dest_path: Path
target_path: Path
operation_type: str # move, copy, hardlink, symlink
status: str = 'pending' # pending, in_progress, completed, failed
error: str | None = None

View File

@@ -12,7 +12,7 @@ class FileRecord:
size: int
modified_time: float
created_time: float
disk: str
disk_label: str
checksum: Optional[str] = None
status: str = 'indexed' # indexed, planned, moved, verified
category: Optional[str] = None
@@ -25,7 +25,7 @@ class FileRecord:
'size': self.size,
'modified_time': self.modified_time,
'created_time': self.created_time,
'disk': self.disk,
'disk_label': self.disk_label,
'checksum': self.checksum,
'status': self.status,
'category': self.category,
@@ -37,7 +37,7 @@ class FileRecord:
class OperationRecord:
"""Record of a migration operation"""
source_path: Path
dest_path: Path
target_path: Path
operation_type: str # move, copy, hardlink, symlink
size: int = 0
status: str = 'pending' # pending, in_progress, completed, failed
@@ -49,7 +49,7 @@ class OperationRecord:
"""Convert to dictionary for serialization"""
return {
'source_path': str(self.source_path),
'dest_path': str(self.dest_path),
'target_path': str(self.target_path),
'operation_type': self.operation_type,
'size': self.size,
'status': self.status,