mirror of
https://gitlab.com/KKlochko/tui-rsync.git
synced 2026-08-12 17:57:43 +00:00
Update the Source to BackupPlan component and shared.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
from .entities import BackupPlan
|
||||
from .value_objects import BackupPlanId, Path, Source, Destination
|
||||
|
||||
__all__ = ['BackupPlan', 'BackupPlanId', 'Path', 'Source', 'Destination']
|
||||
@@ -0,0 +1,3 @@
|
||||
from .backup_plan import BackupPlan
|
||||
|
||||
__all__ = ['BackupPlan']
|
||||
@@ -0,0 +1,14 @@
|
||||
from dataclasses import dataclass, field
|
||||
from typing import List
|
||||
|
||||
from ..value_objects import BackupPlanId, Source, Destination
|
||||
from tui_rsync.core.shared_kernel.components.common.domain import Label
|
||||
|
||||
|
||||
@dataclass
|
||||
class BackupPlan:
|
||||
source: Source
|
||||
destinations: List[Destination]
|
||||
|
||||
id: BackupPlanId = field(default_factory=lambda: BackupPlanId.generate())
|
||||
label: Label = field(default='')
|
||||
@@ -0,0 +1,6 @@
|
||||
from .backup_plan_id import BackupPlanId
|
||||
from .path import Path
|
||||
from .source import Source
|
||||
from .destionation import Destination
|
||||
|
||||
__all__ = ['BackupPlanId', 'Path', 'Source', 'Destination']
|
||||
@@ -0,0 +1,5 @@
|
||||
from tui_rsync.core.shared_kernel.components.common.domain import UUID
|
||||
|
||||
|
||||
class BackupPlanId(UUID):
|
||||
pass
|
||||
@@ -0,0 +1,5 @@
|
||||
from .path import Path
|
||||
|
||||
|
||||
class Destination(Path):
|
||||
pass
|
||||
@@ -0,0 +1,6 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass
|
||||
class Path:
|
||||
path: str
|
||||
@@ -0,0 +1,5 @@
|
||||
from .path import Path
|
||||
|
||||
|
||||
class Source(Path):
|
||||
pass
|
||||
Reference in New Issue
Block a user