changes
This commit is contained in:
@@ -1998,6 +1998,7 @@ class Email_Job(models.Model):
|
||||
create_time = models.DateTimeField(null=True, auto_now_add=True)
|
||||
update_time = models.DateTimeField(null=True, auto_now=True)
|
||||
|
||||
|
||||
class Meta:
|
||||
db_table = 'email_job'
|
||||
|
||||
@@ -2011,8 +2012,6 @@ class Transaction_Discount(models.Model):
|
||||
|
||||
class Meta:
|
||||
db_table = 'transaction_discount'
|
||||
unique_together = ('transaction', 'discount')
|
||||
|
||||
|
||||
class Co_Ownership(models.Model):
|
||||
transaction = models.ForeignKey(Transaction, null=False, related_name='co_op', on_delete=models.PROTECT)
|
||||
@@ -2142,4 +2141,22 @@ class Utility(models.Model):
|
||||
verbose_name_plural = 'Utilities'
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.name} ({self.code}) - Type: {self.utility_type}"
|
||||
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'
|
||||
Reference in New Issue
Block a user