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

12 statements  

« prev     ^ index     » next       coverage.py v7.6.12, created at 2025-03-20 13:17 -0400

1""" 

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

3 

4METADATA: 

5 

6File: suggestions.py 

7 Project: paperap 

8Created: 2025-03-18 

9 Version: 0.0.8 

10Author: Jess Mann 

11Email: jess@jmann.me 

12 Copyright (c) 2025 Jess Mann 

13 

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

15 

16LAST MODIFIED: 

17 

182025-03-18 By Jess Mann 

19 

20""" 

21 

22from __future__ import annotations 

23 

24from datetime import date 

25from typing import List, Optional 

26 

27from paperap.models.abstract import StandardModel 

28 

29 

30class DocumentSuggestions(StandardModel): 

31 """ 

32 Represents suggestions for a Paperless-NgX document. 

33 

34 Attributes: 

35 correspondents: List of suggested correspondent IDs. 

36 tags: List of suggested tag IDs. 

37 document_types: List of suggested document type IDs. 

38 storage_paths: List of suggested storage path IDs. 

39 dates: List of suggested dates. 

40 

41 """ 

42 

43 correspondents: list[int] = [] 

44 tags: list[int] = [] 

45 document_types: list[int] = [] 

46 storage_paths: list[int] = [] 

47 dates: list[date] = [] 

48 

49 class Meta(StandardModel.Meta): 

50 read_only_fields = {"correspondents", "tags", "document_types", "storage_paths", "dates"}