Coverage for src/paperap/resources/workflows.py: 100%

1"""

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

3

4 METADATA:

5

6 File: workflows.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 from paperap.models.workflow import (

25 Workflow,

26 WorkflowAction,

27 WorkflowActionQuerySet,

28 WorkflowQuerySet,

29 WorkflowTrigger,

30 WorkflowTriggerQuerySet,

31)

32 from paperap.resources.base import BaseResource, StandardResource

33

34

35 class WorkflowResource(StandardResource[Workflow, WorkflowQuerySet]):

36 """Resource for managing workflows."""

37

38 model_class = Workflow

39 name = "workflows"

40

41

42 class WorkflowTriggerResource(StandardResource[WorkflowTrigger, WorkflowTriggerQuerySet]):

43 """Resource for managing workflow triggers."""

44

45 model_class = WorkflowTrigger

46 name = "workflow_triggers"

47

48

49 class WorkflowActionResource(StandardResource[WorkflowAction, WorkflowActionQuerySet]):

50 """Resource for managing workflow actions."""

51

52 model_class = WorkflowAction

53 name = "workflow_actions"