Coverage for src/paperap/models/workflow/queryset.py: 100%

1"""

2----------------------------------------------------------------------------

3

4 METADATA:

5

6 File: queryset.py

7 Project: paperap

8 Created: 2025-03-04

9 Version: 0.0.5

10 Author: Jess Mann

11 Email: jess@jmann.me

12 Copyright (c) 2025 Jess Mann

13

14----------------------------------------------------------------------------

15

16 LAST MODIFIED:

17

18 2025-03-04 By Jess Mann

19

20"""

21

22 from __future__ import annotations

23

24 import logging

25 from typing import TYPE_CHECKING, Any

26

27 from paperap.models.abstract.queryset import BaseQuerySet, StandardQuerySet

28

29 if TYPE_CHECKING:

30 from paperap.models.workflow.model import Workflow, WorkflowAction, WorkflowTrigger

31

32 logger = logging.getLogger(__name__)

33

34

35 class WorkflowQuerySet(StandardQuerySet["Workflow"]):

36 """

37 A lazy-loaded, chainable query interface for Paperless NGX resources.

38

39 BaseQuerySet provides pagination, filtering, and caching functionality similar to Django's BaseQuerySet.

40 It's designed to be lazy - only fetching data when it's actually needed.

41 """

42

43

44 class WorkflowActionQuerySet(StandardQuerySet["WorkflowAction"]):

45 """

46 A lazy-loaded, chainable query interface for Paperless NGX resources.

47

48 BaseQuerySet provides pagination, filtering, and caching functionality similar to Django's BaseQuerySet.

49 It's designed to be lazy - only fetching data when it's actually needed.

50 """

51

52

53 class WorkflowTriggerQuerySet(StandardQuerySet["WorkflowTrigger"]):

54 """

55 A lazy-loaded, chainable query interface for Paperless NGX resources.

56

57 BaseQuerySet provides pagination, filtering, and caching functionality similar to Django's BaseQuerySet.

58 It's designed to be lazy - only fetching data when it's actually needed.

59 """