Coverage for src/paperap/models/task/model.py: 100%

1"""

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

3

4 METADATA:

5

6 File: task.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 typing import Any, Optional

25

26 from paperap.models.abstract.model import StandardModel

27 from paperap.models.task.queryset import TaskQuerySet

28

29

30 class Task(StandardModel):

31 """

32 Represents a task in Paperless-NgX.

33 """

34

35 task_id: str

36 task_file_name: str | None = None

37 date_done: str | None = None # ISO format date

38 type: str | None = None

39 status: str | None = None

40 result: str | None = None

41 acknowledged: bool

42 related_document: int | None = None

43

44 class Meta(StandardModel.Meta):

45 queryset = TaskQuerySet