Update the Source to BackupPlan component and shared.

This commit is contained in:
2025-01-05 19:27:24 +02:00
parent c67dc14003
commit 594d9dea3f
50 changed files with 80 additions and 1329 deletions
@@ -0,0 +1,3 @@
from .domain import UUID, Label
__all__ = ['UUID', 'Label']
@@ -0,0 +1,3 @@
from .value_objects import UUID, Label
__all__ = ['UUID', 'Label']
@@ -0,0 +1,4 @@
from .uuid import UUID
from .label import Label
__all__ = ['UUID', 'Label']
@@ -0,0 +1,6 @@
from dataclasses import dataclass, field
@dataclass(frozen=True)
class Label:
label: str = field(default='')
@@ -0,0 +1,14 @@
from dataclasses import dataclass, field
import uuid
@dataclass(frozen=True)
class UUID:
id: str = field(default_factory=lambda: UUID.generate().id)
@classmethod
def generate(cls) -> 'UUID':
return cls(str(uuid.uuid4()))
def __str__(self):
return self.id