Add hardware-linked USB intake and inspection workflow
This commit is contained in:
@@ -570,3 +570,18 @@ class ImportJob(TimeStampedModel):
|
||||
headers = models.JSONField(default=list)
|
||||
preview_rows = models.JSONField(default=list)
|
||||
result = models.JSONField(default=dict)
|
||||
|
||||
|
||||
class DeviceIdentity(models.Model):
|
||||
"""Stable intake identity, independent of mutable specifications and USBs."""
|
||||
hwid = models.CharField(max_length=100, unique=True)
|
||||
device = models.ForeignKey(Device, on_delete=models.PROTECT, related_name='hardware_identities')
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class InspectionSubmission(models.Model):
|
||||
request_id = models.UUIDField(unique=True)
|
||||
device = models.ForeignKey(Device, on_delete=models.PROTECT, related_name='usb_inspections')
|
||||
payload_hash = models.CharField(max_length=64)
|
||||
payload = models.JSONField()
|
||||
recorded_by = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, null=True)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
Reference in New Issue
Block a user