INNER CODE UNIT · Python

Document

center-for-threat-informed-defense/tram · src/tram/models.py:66

class Document(models.Model):
    """Store all documents that can be analyzed to create reports"""

    docfile = models.FileField()
    created_on = models.DateTimeField(auto_now_add=True)
    updated_on = models.DateTimeField(auto_now=True)
    created_by = models.ForeignKey(User, null=True, on_delete=models.SET_NULL)

    def __str__(self):
        return self.docfile.name


class DocumentProcessingJob(models.Model):
    """Queue of document processing jobs"""

    document = models.ForeignKey(Document, on_delete=models.CASCADE)
    status = models.CharField(
        max_length=255, default="queued", choices=JOB_STATUS_CHOICES

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…