Added expert review/edit document

This commit is contained in:
2025-08-17 18:43:55 +02:00
parent 80285f2b7a
commit 959ec958bb
14 changed files with 497 additions and 18 deletions

View File

@@ -71,6 +71,7 @@ class Organization(models.Model):
threat_actors = models.JSONField(null=True, blank=True, help_text="Which types of threat actors are most relevant to your organization (e.g., cybercriminals, insiders, nation-states)?")
sensitive_data_types = models.JSONField(null=True, blank=True, help_text="What type of sensitive data does your organization handle?")
risks = models.ManyToManyField('Risk', related_name='organizations', blank=True)
expert_analysis = models.BooleanField(null=True, blank=True)
def __str__(self):
return self.name
@@ -105,6 +106,15 @@ class Document(models.Model):
organization = models.ForeignKey(Organization, on_delete=models.CASCADE, related_name='documents')
created_at = models.DateTimeField(auto_now_add=True)
modified_at = models.DateTimeField(auto_now=True)
STATUS_WAITING = 'waiting'
STATUS_DONE = 'done'
STATUS_CHOICES = (
(STATUS_WAITING, 'Waiting'),
(STATUS_DONE, 'Done'),
)
status = models.CharField(max_length=16, choices=STATUS_CHOICES, default=STATUS_WAITING)
key_findings = models.TextField(blank=True, null=True, help_text="Key findings")
recomendations = models.TextField(blank=True, null=True, help_text="Recommendations")