feat: add trusted ticket intake backend
This commit is contained in:
@@ -158,6 +158,32 @@ class AgentRun(models.Model):
|
||||
]
|
||||
|
||||
|
||||
class AgentArtifact(models.Model):
|
||||
public_id = models.UUIDField(default=uuid.uuid4, unique=True, editable=False)
|
||||
run = models.ForeignKey(
|
||||
AgentRun,
|
||||
null=True,
|
||||
blank=True,
|
||||
on_delete=models.SET_NULL,
|
||||
related_name="artifacts",
|
||||
)
|
||||
artifact_type = models.CharField(max_length=80)
|
||||
schema_version = models.PositiveIntegerField(default=1)
|
||||
payload = models.JSONField(default=dict)
|
||||
created_by = models.ForeignKey(
|
||||
settings.AUTH_USER_MODEL,
|
||||
null=True,
|
||||
blank=True,
|
||||
on_delete=models.SET_NULL,
|
||||
related_name="agent_artifacts",
|
||||
)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ["-created_at"]
|
||||
indexes = [models.Index(fields=["artifact_type", "created_at"])]
|
||||
|
||||
|
||||
class AgentRunStep(models.Model):
|
||||
run = models.ForeignKey(AgentRun, on_delete=models.CASCADE, related_name="steps")
|
||||
code = models.CharField(max_length=80)
|
||||
|
||||
Reference in New Issue
Block a user