Add the query to get all backup plans.

This commit is contained in:
2025-01-08 15:36:38 +02:00
parent 027fee47a6
commit b9564d75e7
2 changed files with 11 additions and 0 deletions
@@ -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())