This commit is contained in:
anhduy-tech
2026-03-06 09:51:53 +07:00
parent 39aea8784e
commit 3ece124848
487 changed files with 1851 additions and 108460 deletions

View File

@@ -2174,21 +2174,3 @@ class Utility(models.Model):
def __str__(self):
return f"{self.name} ({self.code}) - Type: {self.utility_type}"
class Batch_Job(models.Model):
name = models.CharField(max_length=255)
workflow = models.ForeignKey(Workflow, on_delete=models.PROTECT, help_text="Workflow to execute")
cron_schedule = models.CharField(max_length=100, help_text="Cron-like schedule (e.g., '0 0 * * *' for daily at midnight)")
parameters = models.JSONField(default=dict, blank=True, help_text="Parameters to find data for the workflow context")
is_active = models.BooleanField(default=True, db_index=True)
last_run_at = models.DateTimeField(null=True, blank=True)
next_run_at = models.DateTimeField(null=True, blank=True, db_index=True)
create_time = models.DateTimeField(auto_now_add=True)
update_time = models.DateTimeField(auto_now=True)
def __str__(self):
return self.name
class Meta:
db_table = 'batch_job'