fina autoamtiona adn billing and credits

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-04 15:54:15 +00:00
parent f8a9293196
commit 40dfe20ead
40 changed files with 5680 additions and 18 deletions

View File

@@ -65,6 +65,7 @@ class AutomationRun(models.Model):
STATUS_CHOICES = [
('running', 'Running'),
('paused', 'Paused'),
('cancelled', 'Cancelled'),
('completed', 'Completed'),
('failed', 'Failed'),
]
@@ -77,6 +78,11 @@ class AutomationRun(models.Model):
status = models.CharField(max_length=20, choices=STATUS_CHOICES, default='running', db_index=True)
current_stage = models.IntegerField(default=1, help_text="Current stage number (1-7)")
# Pause/Resume tracking
paused_at = models.DateTimeField(null=True, blank=True, help_text="When automation was paused")
resumed_at = models.DateTimeField(null=True, blank=True, help_text="When automation was last resumed")
cancelled_at = models.DateTimeField(null=True, blank=True, help_text="When automation was cancelled")
started_at = models.DateTimeField(auto_now_add=True, db_index=True)
completed_at = models.DateTimeField(null=True, blank=True)