Add the query to get all backup plans.

dev
KKlochko 4 months ago
parent 027fee47a6
commit b9564d75e7

@ -0,0 +1,3 @@
from .get_all_backup_plans_query import GetAllBackupBackupPlansQuery
__all__ = ['GetAllBackupBackupPlansQuery']

@ -0,0 +1,8 @@
from tui_rsync.infrastructure.orm.dto.dtos import BackupPlanDTO
from tui_rsync.infrastructure.orm.models import BackupPlanModel
class GetAllBackupBackupPlansQuery:
def execute(self):
return (BackupPlanDTO.to_domain(model) for model in BackupPlanModel.select().iterator())
Loading…
Cancel
Save