initial commit after split

This commit is contained in:
2026-06-24 01:43:16 +02:00
parent bbd6ff4f61
commit 0db662380b
42 changed files with 7028 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
from __future__ import annotations
from dataclasses import dataclass
from datetime import datetime, timezone
from govoplan_files.backend.db.models import FileAsset, FileBlob, FileVersion
class FileStorageError(RuntimeError):
pass
@dataclass(slots=True)
class UploadedStoredFile:
asset: FileAsset
version: FileVersion
blob: FileBlob
@dataclass(slots=True)
class ResolvedPattern:
pattern: str
matches: list[FileAsset]
@dataclass(slots=True)
class FileConflictResolution:
target_path: str
action: str
new_path: str | None = None
@dataclass(slots=True)
class RenamePlanItem:
kind: str
id: str
old_path: str
new_path: str
def utcnow() -> datetime:
return datetime.now(timezone.utc)