| 43 | |
| 44 | @dataclass |
| 45 | class BasicDocument: |
| 46 | id: Union[int, str] # row id in database |
| 47 | data_source_id: int # data source id in database |
| 48 | type: DocumentType |
| 49 | title: str |
| 50 | content: str |
| 51 | timestamp: datetime |
| 52 | author: str |
| 53 | author_image_url: str |
| 54 | location: str |
| 55 | url: str |
| 56 | status: str = None |
| 57 | is_active: bool = None |
| 58 | file_type: FileType = None |
| 59 | children: List['BasicDocument'] = None |
| 60 | |
| 61 | @property |
| 62 | def id_in_data_source(self): |
| 63 | return str(self.data_source_id) + '_' + str(self.id) |
| 64 |
no outgoing calls
no test coverage detected